diff --git a/grails-gsp/src/main/groovy/org/grails/gsp/compiler/GroovyPageCompiler.groovy b/grails-gsp/src/main/groovy/org/grails/gsp/compiler/GroovyPageCompiler.groovy index a67732a2..dc2ace18 100644 --- a/grails-gsp/src/main/groovy/org/grails/gsp/compiler/GroovyPageCompiler.groovy +++ b/grails-gsp/src/main/groovy/org/grails/gsp/compiler/GroovyPageCompiler.groovy @@ -104,7 +104,7 @@ class GroovyPageCompiler { compilerConfig.setTargetDirectory(targetDir) compilerConfig.setSourceEncoding(encoding) ExecutorService threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2) - CompletionService completionService = new ExecutorCompletionService(threadPool); + CompletionService completionService = new ExecutorCompletionService(threadPool) List> futures = [] try { Integer collationLevel = Runtime.getRuntime().availableProcessors() * 2 @@ -137,11 +137,11 @@ class GroovyPageCompiler { // Wait for up to 100ms to see if anything has completed. // The completed future is returned if one is found; otherwise null. // (Tune 100ms as desired) - def completed = completionService.poll(100, TimeUnit.MILLISECONDS); + def completed = completionService.poll(100, TimeUnit.MILLISECONDS) if (completed != null) { Map results = completed.get() as Map //need this to throw exceptions on main thread it seems compileGSPRegistry += results - --pending; + --pending } } @@ -152,7 +152,7 @@ class GroovyPageCompiler { if (viewregistryFile.exists()) { // only changed files are added to the mapping, read the existing mapping file viewregistryFile.withInputStream { stream -> - views.load(new InputStreamReader(stream, "UTF-8")); + views.load(new InputStreamReader(stream, "UTF-8")) } } views.putAll(compileGSPRegistry) diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/DefaultGrailsTagDateHelper.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/DefaultGrailsTagDateHelper.groovy index 5abd6344..309da4c6 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/DefaultGrailsTagDateHelper.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/DefaultGrailsTagDateHelper.groovy @@ -106,7 +106,7 @@ class DefaultGrailsTagDateHelper implements GrailsTagDateHelper { } else { throw new IllegalArgumentException("Cannot format class as date: " + - (date == null ? "" : date.getClass().getName())); + (date == null ? "" : date.getClass().getName())) } ((DateTimeFormatter) formatter).format(instant) } diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GrailsLayoutViewResolverPostProcessor.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GrailsLayoutViewResolverPostProcessor.groovy index e5203951..307e60ea 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GrailsLayoutViewResolverPostProcessor.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GrailsLayoutViewResolverPostProcessor.groovy @@ -59,8 +59,8 @@ class GrailsLayoutViewResolverPostProcessor implements BeanDefinitionRegistryPos @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException { if (enabled && registry.containsBeanDefinition(GRAILS_VIEW_RESOLVER_BEAN_NAME)) { - BeanDefinition previousViewResolver = registry.getBeanDefinition(GRAILS_VIEW_RESOLVER_BEAN_NAME); - registry.removeBeanDefinition(GRAILS_VIEW_RESOLVER_BEAN_NAME); + BeanDefinition previousViewResolver = registry.getBeanDefinition(GRAILS_VIEW_RESOLVER_BEAN_NAME) + registry.removeBeanDefinition(GRAILS_VIEW_RESOLVER_BEAN_NAME) GenericBeanDefinition beanDefinition = new GenericBeanDefinition() beanDefinition.beanClass = layoutViewResolverClass diff --git a/grails-taglib/src/main/groovy/org/grails/taglib/TagLibraryMetaUtils.groovy b/grails-taglib/src/main/groovy/org/grails/taglib/TagLibraryMetaUtils.groovy index b292173a..d7ae842d 100644 --- a/grails-taglib/src/main/groovy/org/grails/taglib/TagLibraryMetaUtils.groovy +++ b/grails-taglib/src/main/groovy/org/grails/taglib/TagLibraryMetaUtils.groovy @@ -61,7 +61,7 @@ class TagLibraryMetaUtils { @CompileStatic static registerMethodMissingForTags(MetaClass metaClass, TagLibraryLookup gspTagLibraryLookup, String namespace, String name, boolean addAll = true, boolean overrideMethods = true) { - GroovyObject mc = (GroovyObject) metaClass; + GroovyObject mc = (GroovyObject) metaClass if (overrideMethods || !doesMethodExist(metaClass, name, [Map, Closure] as Class[])) { mc.setProperty(name) { Map attrs, Closure body -> @@ -102,7 +102,7 @@ class TagLibraryMetaUtils { @CompileStatic static void registerPropertyMissingForTag(MetaClass metaClass, String name, Object result) { - GroovyObject mc = (GroovyObject) metaClass; + GroovyObject mc = (GroovyObject) metaClass mc.setProperty(GrailsClassUtils.getGetterName(name)) { -> result } } diff --git a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/JspTagImpl.groovy b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/JspTagImpl.groovy index 338ff611..7a4a0fb8 100644 --- a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/JspTagImpl.groovy +++ b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/JspTagImpl.groovy @@ -169,7 +169,7 @@ class JspTagImpl implements JspTag { tagBean.setPropertyValue key, value } else if (key && tag instanceof DynamicAttributes) { - ((DynamicAttributes) tag).setDynamicAttribute(null, key, value); + ((DynamicAttributes) tag).setDynamicAttribute(null, key, value) } } } diff --git a/grails-web-taglib/src/main/groovy/grails/artefact/TagLibrary.groovy b/grails-web-taglib/src/main/groovy/grails/artefact/TagLibrary.groovy index a4fc6f50..06aa81e4 100644 --- a/grails-web-taglib/src/main/groovy/grails/artefact/TagLibrary.groovy +++ b/grails-web-taglib/src/main/groovy/grails/artefact/TagLibrary.groovy @@ -131,35 +131,35 @@ trait TagLibrary implements WebAttributes, ServletAttributes, TagLibraryInvoker * @throws MissingPropertyException When no tag namespace or tag is found */ Object propertyMissing(String name) { - TagLibraryLookup gspTagLibraryLookup = getTagLibraryLookup(); + TagLibraryLookup gspTagLibraryLookup = getTagLibraryLookup() if (gspTagLibraryLookup != null) { - Object result = gspTagLibraryLookup.lookupNamespaceDispatcher(name); + Object result = gspTagLibraryLookup.lookupNamespaceDispatcher(name) if (result == null) { String namespace = getTaglibNamespace() - GroovyObject tagLibrary = gspTagLibraryLookup.lookupTagLibrary(namespace, name); + GroovyObject tagLibrary = gspTagLibraryLookup.lookupTagLibrary(namespace, name) if (tagLibrary == null) { - tagLibrary = gspTagLibraryLookup.lookupTagLibrary(TagOutput.DEFAULT_NAMESPACE, name); + tagLibrary = gspTagLibraryLookup.lookupTagLibrary(TagOutput.DEFAULT_NAMESPACE, name) } if (tagLibrary != null) { - Object tagProperty = tagLibrary.getProperty(name); + Object tagProperty = tagLibrary.getProperty(name) if (tagProperty instanceof Closure) { - result = ((Closure) tagProperty).clone(); + result = ((Closure) tagProperty).clone() } } } if (result != null && !Environment.isDevelopmentMode()) { MetaClass mc = GrailsMetaClassUtils.getExpandoMetaClass(getClass()) - TagLibraryMetaUtils.registerPropertyMissingForTag(mc, name, result); + TagLibraryMetaUtils.registerPropertyMissingForTag(mc, name, result) } if (result != null) { - return result; + return result } } - throw new MissingPropertyException(name, this.getClass()); + throw new MissingPropertyException(name, this.getClass()) } } diff --git a/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy b/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy index 99b3cf17..c89b72e8 100644 --- a/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy +++ b/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy @@ -38,7 +38,7 @@ import org.grails.taglib.encoder.WithCodecHelper trait TagLibraryInvoker extends WebAttributes { private TagLibraryLookup tagLibraryLookup - private final boolean developmentMode = Environment.isDevelopmentMode(); + private final boolean developmentMode = Environment.isDevelopmentMode() @Autowired(required = false) void setTagLibraryLookup(TagLibraryLookup tagLibraryLookup) { @@ -77,8 +77,8 @@ trait TagLibraryInvoker extends WebAttributes { def usedNamespace = getTaglibNamespace() GroovyObject tagLibrary = lookup.lookupTagLibrary(usedNamespace, methodName) if (tagLibrary == null) { - tagLibrary = lookup.lookupTagLibrary(TagOutput.DEFAULT_NAMESPACE, methodName); - usedNamespace = TagOutput.DEFAULT_NAMESPACE; + tagLibrary = lookup.lookupTagLibrary(TagOutput.DEFAULT_NAMESPACE, methodName) + usedNamespace = TagOutput.DEFAULT_NAMESPACE } if (tagLibrary) {