CodeNarc Report

Report title:Grails-core-2.0.0.RC1
Date:Mar 23, 2012 5:46:27 PM
Generated with:CodeNarc v0.17

Summary by Package

PackageTotal FilesFiles with ViolationsPriority 1Priority 2Priority 3
All Packages933475-8391722
buildSrc/src/main/groovy/org/grails/gradle11--2
grails-bootstrap/src/main/groovy/grails/build/interactive/completors148-18
grails-bootstrap/src/main/groovy/grails/util43-649
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli1----
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/interactive21-36
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/interactive/completors11-1-
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/support1----
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins33-2551
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/build/scopes1----
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve55-626
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/config31--2
grails-core/src/main/groovy/grails/validation2----
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/cfg22--10
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass21--1
grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler22-17
grails-core/src/main/groovy/org/codehaus/groovy/grails/documentation1----
grails-core/src/main/groovy/org/codehaus/groovy/grails/exceptions21-714
grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins21--3
grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/publishing33-53
grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/support22-11
grails-core/src/main/groovy/org/codehaus/groovy/grails/support1----
grails-core/src/main/groovy/org/codehaus/groovy/grails/validation1----
grails-crud/src/main/groovy/org/codehaus/groovy/grails/scaffolding11-44
grails-docs/src/main/groovy/grails/doc43-127
grails-docs/src/main/groovy/grails/doc/ant1----
grails-docs/src/main/groovy/grails/doc/filters32-29
grails-docs/src/main/groovy/grails/doc/gradle31--6
grails-docs/src/main/groovy/grails/doc/internal4----
grails-docs/src/main/groovy/grails/doc/macros21-1-
grails-docs/src/test/groovy/grails/doc/internal1----
grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate22-27
grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg123-311
grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/plugins/orm/hibernate11-711
grails-plugin-async/src/main/groovy/org/codehaus/groovy/grails/plugins/web/async22--7
grails-plugin-async/src/main/groovy/org/codehaus/groovy/grails/plugins/web/async/api11-1-
grails-plugin-codecs/src/main/groovy/org/codehaus/groovy/grails/plugins11--3
grails-plugin-codecs/src/main/groovy/org/codehaus/groovy/grails/plugins/codecs114--10
grails-plugin-codecs/src/test/groovy/org/codehaus/groovy/grails/web/codecs113-32
grails-plugin-controllers/src/main/groovy/org/codehaus/groovy/grails/plugins/web11-310
grails-plugin-controllers/src/main/groovy/org/codehaus/groovy/grails/web/metaclass32-36
grails-plugin-controllers/src/main/groovy/org/codehaus/groovy/grails/web/plugins/support11-210
grails-plugin-converters/src/main/groovy/grails/web1----
grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/plugins/converters22-13
grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/plugins/converters/api1----
grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/plugins/converters/codecs2----
grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/web/converters32--2
grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/web/converters/configuration11--5
grails-plugin-datasource/src/main/groovy/org/codehaus/groovy/grails/plugins/datasource11-36
grails-plugin-domain-class/src/main/groovy/org/codehaus/groovy/grails/domain11--1
grails-plugin-domain-class/src/main/groovy/org/codehaus/groovy/grails/plugins22-213
grails-plugin-filters/src/main/groovy/org/codehaus/groovy/grails/plugins/web/filters63-66
grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web11-214
grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib98-1048
grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/web/filters1----
grails-plugin-i18n/src/main/groovy/org/codehaus/groovy/grails/plugins/i18n11--1
grails-plugin-log4j/src/main/groovy/org/codehaus/groovy/grails/plugins/log4j22--10
grails-plugin-mimetypes/src/main/groovy/org/codehaus/groovy/grails/plugins/web/api43-25
grails-plugin-mimetypes/src/main/groovy/org/codehaus/groovy/grails/plugins/web/mimes31--1
grails-plugin-mimetypes/src/main/groovy/org/codehaus/groovy/grails/web/mime21-12
grails-plugin-scaffolding/src/main/groovy/org/codehaus/groovy/grails/plugins/scaffolding11-12
grails-plugin-services/src/main/groovy/org/codehaus/groovy/grails/plugins/services11--3
grails-plugin-servlets/src/main/groovy/org/codehaus/groovy/grails/plugins/web21--1
grails-plugin-servlets/src/main/groovy/org/codehaus/groovy/grails/plugins/web/api1----
grails-plugin-testing/src/main/groovy/grails/test76-2310
grails-plugin-testing/src/main/groovy/grails/test/mixin/domain11--1
grails-plugin-testing/src/main/groovy/grails/test/mixin/services1----
grails-plugin-testing/src/main/groovy/grails/test/mixin/support11--6
grails-plugin-testing/src/main/groovy/grails/test/mixin/web44-120
grails-plugin-testing/src/main/groovy/grails/test/mixin/webflow2----
grails-plugin-testing/src/test/groovy/grails/test/mixin4----
grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat54-1011
grails-plugin-url-mappings/src/main/groovy/grails/test11-1713
grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/plugins/web/mapping11-216
grails-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping1----
grails-plugin-validation/src/main/groovy/org/codehaus/groovy/grails/plugins11-16
grails-plugin-validation/src/main/groovy/org/codehaus/groovy/grails/validation1----
grails-plugin-validation/src/main/groovy/org/codehaus/groovy/grails/web/plugins/support1----
grails-plugin-validation/src/test/groovy/org/codehaus/groovy/grails/plugins11--2
grails-resources/src/grails/grails-app/conf6----
grails-resources/src/grails/grails-app/conf/spring1----
grails-resources/src/grails/plugin/grails-app/conf2----
grails-spring/src/main/groovy/grails/spring11-16
grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/plugins/web11-12
grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc11-35
grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib11-185
grails-test-suite-persistence/src/test/groovy/grails/test/mixin/domain1----
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate21690-115199
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/binding42-23
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg64-1032
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/metaclass11-22
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/support22--25
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/validation81-228
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/support11--1
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/plugins11-2-
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/plugins/scaffolding11--2
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/plugins/services22-12
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/reload21-1-
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/scaffolding22-24
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/scaffolding/view22-22
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/validation31--1
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/web/binding32-22
grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/web/converters11-2-
grails-test-suite-uber/src/test/groovy/grails/ant11-2-
grails-test-suite-uber/src/test/groovy/grails/persistence1----
grails-test-suite-uber/src/test/groovy/grails/spring21-1021
grails-test-suite-uber/src/test/groovy/grails/test1110-4827
grails-test-suite-uber/src/test/groovy/grails/test/mixin1913-1943
grails-test-suite-uber/src/test/groovy/grails/util75-940
grails-test-suite-uber/src/test/groovy/grails/web1----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/cli21-24
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/cli/support22-18
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/commons116-1626
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/commons/cfg3----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/commons/metaclass43-115
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/compiler11--4
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/compiler/injection11--2
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/context/support11-32
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/documentation11--2
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/domain8----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins76-1110
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/datasource1----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/grails-app/conf2----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/grails-app/services1----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/i18n11--5
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/logging11-15
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/metadata1----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/publishing11-2-
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/testing3----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/web33-69
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/web/mapping11-1-
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/reload21-31
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/resolve21-914
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/test/support2----
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/validation63-4164
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/context11-23
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/errors11-21
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/filters11--3
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/i18n11-112
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/json11--1
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/metaclass31-31
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/servlet65-711
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/servlet/filter11-1-
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc147-623
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/sitemesh32-142
grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/web/util42-47
grails-test-suite-uber/src/test/resources/grails/spring1----
grails-test-suite-uber/src/test/resources/org/codehaus/groovy/grails/commons1----
grails-test-suite-uber/src/test/resources/org/codehaus/groovy/grails/commons/cfg2----
grails-test-suite-uber/src/test/resources/org/codehaus/groovy/grails/plugins11-3-
grails-test-suite-uber/test/resources/grails-app/conf1----
grails-test-suite-uber/test/resources/grails-plugin-utils/global-plugins/logging-0.11----
grails-test-suite-uber/test/resources/grails-plugin-utils/global-plugins/logging-0.1/scripts2----
grails-test-suite-uber/test/resources/grails-plugin-utils/grails-debug/scripts1----
grails-test-suite-uber/test/resources/grails-plugin-utils/plugins/jsecurity-0.31----
grails-test-suite-uber/test/resources/grails-plugin-utils/plugins/jsecurity-0.3/scripts2----
grails-test-suite-uber/test/resources/spring1----
grails-test-suite-uber/test/test-projects/inline-plugins/app/grails-app/conf1----
grails-test-suite-uber/test/test-projects/inline-plugins/plugins/foo1----
grails-test-suite-uber/test/test-projects/inline-plugins/plugins/foo/grails-app/controllers/foo1----
grails-test-suite-uber/test/test-projects/inline-plugins/plugins/foobar1----
grails-test-suite-uber/test/test-projects/inline-plugins/plugins/foobar/grails-app/controllers/foobar1----
grails-test-suite-uber/test/test-projects/nested-inline-plugins/app/grails-app/conf1----
grails-test-suite-uber/test/test-projects/nested-inline-plugins/plugins/plugin-one1----
grails-test-suite-uber/test/test-projects/nested-inline-plugins/plugins/plugin-one/grails-app/conf1----
grails-test-suite-uber/test/test-projects/nested-inline-plugins/plugins/plugin-two1----
grails-test-suite-uber/test/test-projects/plugin-build-settings/grails-app/conf5----
grails-test-suite-uber/test/test-projects/plugin-build-settings/grails-app/conf/spring1----
grails-test-suite-uber/test/test-projects/plugin-build-settings/plugins/hibernate-1.2-SNAPSHOT2----
grails-test-suite-uber/test/test-projects/plugin-build-settings/plugins/hibernate-1.2-SNAPSHOT/scripts3----
grails-test-suite-uber/test/test-projects/plugin-build-settings/plugins/webflow-1.2-SNAPSHOT2----
grails-test-suite-uber/test/test-projects/plugin-build-settings/plugins/webflow-1.2-SNAPSHOT/scripts3----
grails-test-suite-web/src/test/groovy/grails/test11-438
grails-test-suite-web/src/test/groovy/grails/test/mixin22-11
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/plugins/web1----
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/plugins/web/filters51-23
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/plugins/webflow21--1
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/binding143-42
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/converters73-35
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/filters11--4
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/mapping2214-532
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/mapping/filter21--3
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/mime21-2-
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/pages179-189
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp99-833
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/servlet/view11-11
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/taglib3926-5873
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/webflow55-615
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/webflow/engine/builder88-129
grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/webflow/support11-610
grails-test/src/main/groovy/grails/test11--1
grails-test/src/main/groovy/org/codehaus/groovy/grails/plugins/testing43-319
grails-test/src/main/groovy/org/codehaus/groovy/grails/test31--2
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/event21-4-
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/io2----
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/junit411--2
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/junit4/listener21-51
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/junit4/result1----
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/junit4/runner31--2
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/report/junit1----
grails-test/src/main/groovy/org/codehaus/groovy/grails/test/support73-17
grails-web/src/jsp21/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp22--6
grails-web/src/main/groovy/grails/gsp11-4911
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/errors1----
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/i18n1----
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/mapping22-28
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/mime11--1
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages33--8
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp76-2024
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc1----
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions1----
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib22-13
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util11--1
grails-webflow/src/main/groovy/grails/test11-47
grails-webflow/src/main/groovy/org/codehaus/groovy/grails/webflow11--21
grails-webflow/src/main/groovy/org/codehaus/groovy/grails/webflow/context/servlet11--4
grails-webflow/src/main/groovy/org/codehaus/groovy/grails/webflow/engine/builder139-1633
scripts7324-1781

Package: buildSrc.src.main.groovy.org.grails.gradle

➥ GrailsBuildPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport310

[SRC]import org.gradle.api.DefaultTask

[MSG]The [org.gradle.api.DefaultTask] import is never referenced

UnusedImport312

[SRC]import org.gradle.api.specs.Specs

[MSG]The [org.gradle.api.specs.Specs] import is never referenced

Package: grails-bootstrap.src.main.groovy.grails.build.interactive.completors

➥ CreateController.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.CreateController. getURL() can probably be rewritten as URL

➥ CreateScaffoldController.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.CreateScaffoldController. getURL() can probably be rewritten as URL

➥ CreateService.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.CreateService. getURL() can probably be rewritten as URL

➥ CreateTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.CreateTagLib. getURL() can probably be rewritten as URL

➥ GenerateAll.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter335

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.GenerateAll. getURL() can probably be rewritten as URL

➥ GenerateController.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter335

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.GenerateController. getURL() can probably be rewritten as URL

➥ GenerateViews.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter335

[SRC]GrailsResourceUtils.isDomainClass(res.getURL())

[MSG]Violation in class grails.build.interactive.completors.GenerateViews. getURL() can probably be rewritten as URL

➥ RegexCompletor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter234

[SRC]int complete(String buffer, int cursor, List candidates) {

[MSG]Violation in class RegexCompletor. Method parameter [cursor] is never referenced in the method complete of class grails.build.interactive.completors.RegexCompletor

UnnecessaryElseStatement339

[SRC]else return -1

[MSG]When an if statement block ends with a return statement the else is unnecessary

Package: grails-bootstrap.src.main.groovy.grails.util

➥ BuildSettings.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity21003

[SRC]protected void postLoadConfig() {

[MSG]Violation in class grails.util.BuildSettings. The cyclomatic complexity for method [postLoadConfig] is [21]

CyclomaticComplexity21316

[SRC]private void establishProjectStructure() {

[MSG]Violation in class grails.util.BuildSettings. The cyclomatic complexity for method [establishProjectStructure] is [25]

UnnecessaryElseStatement3488

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryGetter3589

[SRC]getCompileDependencies()

[MSG]Violation in class grails.util.BuildSettings. getCompileDependencies() can probably be rewritten as compileDependencies

UnnecessaryGetter3603

[SRC]getProvidedDependencies()

[MSG]Violation in class grails.util.BuildSettings. getProvidedDependencies() can probably be rewritten as providedDependencies

UnnecessaryGetter3616

[SRC]getRuntimeDependencies()

[MSG]Violation in class grails.util.BuildSettings. getRuntimeDependencies() can probably be rewritten as runtimeDependencies

UnnecessaryGetter3630

[SRC]getTestDependencies()

[MSG]Violation in class grails.util.BuildSettings. getTestDependencies() can probably be rewritten as testDependencies

UnnecessaryGetter3644

[SRC]getBuildDependencies()

[MSG]Violation in class grails.util.BuildSettings. getBuildDependencies() can probably be rewritten as buildDependencies

UnnecessaryDefInMethodDeclaration3783

[SRC]protected def loadBuildPropertiesFromClasspath(Propertie..uildProps) {

[MSG]Violation in class grails.util.BuildSettings. The def keyword is unneeded when a method is marked protected

UnnecessaryGetter31011

[SRC]def configURL = config.getConfigFile()

[MSG]Violation in class grails.util.BuildSettings. getConfigFile() can probably be rewritten as configFile

UnnecessaryGetter31012

[SRC]def configFile = configURL ? new File(configURL.getFile()) : null

[MSG]Violation in class grails.util.BuildSettings. getFile() can probably be rewritten as file

UnnecessaryGetter31014

[SRC]def metadataFile = Metadata.current.getMetadataFile()

[MSG]Violation in class grails.util.BuildSettings. getMetadataFile() can probably be rewritten as metadataFile

UnnecessaryGetter31148

[SRC]gcl = rootLoader != null ? new GroovyClassLoader(rootLoa..assLoader())

[MSG]Violation in class grails.util.BuildSettings. getSystemClassLoader() can probably be rewritten as systemClassLoader

UnnecessaryGetter31157

[SRC]def appName = metadata.getApplicationName() ?: "grails"

[MSG]Violation in class grails.util.BuildSettings. getApplicationName() can probably be rewritten as applicationName

UnnecessaryGetter31158

[SRC]def appVersion = metadata.getApplicationVersion() ?: grailsVersion

[MSG]Violation in class grails.util.BuildSettings. getApplicationVersion() can probably be rewritten as applicationVersion

UnnecessaryGetter31217

[SRC]def pluginDirs = getPluginDirectories()

[MSG]Violation in class grails.util.BuildSettings. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter31311

[SRC]appName: Metadata.current.getApplicationName(),

[MSG]Violation in class grails.util.BuildSettings. getApplicationName() can probably be rewritten as applicationName

UnnecessaryGetter31312

[SRC]appVersion: Metadata.current.getApplicationVersion())

[MSG]Violation in class grails.util.BuildSettings. getApplicationVersion() can probably be rewritten as applicationVersion

UnnecessaryGetter31335

[SRC]def workingDirName = metadata.getApplicationName() ?: CO..ING_DIR_NAME

[MSG]Violation in class grails.util.BuildSettings. getApplicationName() can probably be rewritten as applicationName

UnnecessaryGetter31344

[SRC]def version = metadata.getApplicationVersion()

[MSG]Violation in class grails.util.BuildSettings. getApplicationVersion() can probably be rewritten as applicationVersion

UnnecessaryGetter31345

[SRC]def appName = metadata.getApplicationName() ?: baseDir.name

[MSG]Violation in class grails.util.BuildSettings. getApplicationName() can probably be rewritten as applicationName

UnnecessaryGetter31512

[SRC]getBasePluginDescriptor() != null

[MSG]Violation in class grails.util.BuildSettings. getBasePluginDescriptor() can probably be rewritten as basePluginDescriptor

➥ GrailsMain.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter324

[SRC]props.load(getClass().getClassLoader().getResourceAsStre..roperties"))

[MSG]Violation in class grails.util.None. getClassLoader() can probably be rewritten as classLoader

➥ PluginBuildSettings.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2187

[SRC]GrailsPluginInfo[] getPluginInfos(String pluginDirPath=t..inDirPath) {

[MSG]Violation in class PluginBuildSettings. Method parameter [pluginDirPath] is never referenced in the method getPluginInfos of class grails.util.PluginBuildSettings

EmptyCatchBlock2203

[SRC]catch (e) {

[MSG]The catch block is empty

EmptyCatchBlock2739

[SRC]catch (e) {

[MSG]The catch block is empty

UnusedVariable2759

[SRC]def (name, version, xml) = result

[MSG]The variable [xml] in class grails.util.PluginBuildSettings is not used

UnnecessaryGetter3112

[SRC]for (pluginDir in getInlinePluginDirectories()) {

[MSG]Violation in class grails.util.PluginBuildSettings. getInlinePluginDirectories() can probably be rewritten as inlinePluginDirectories

UnnecessaryDefInMethodDeclaration3160

[SRC]protected def addPluginScopeInfoForDirAndInfo(PluginScop..ource dir) {

[MSG]Violation in class grails.util.PluginBuildSettings. The def keyword is unneeded when a method is marked protected

UnnecessaryGetter3192

[SRC]Resource[] pluginDescriptors = getPluginDescriptors()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginDescriptors() can probably be rewritten as pluginDescriptors

UnnecessaryGetter3215

[SRC]buildSettings?.isInlinePluginLocation(pluginLocation?.getFile())

[MSG]Violation in class grails.util.PluginBuildSettings. getFile() can probably be rewritten as file

UnnecessaryGetter3226

[SRC]locations = buildSettings.getInlinePluginDirectories().c..source(it) }

[MSG]Violation in class grails.util.PluginBuildSettings. getInlinePluginDirectories() can probably be rewritten as inlinePluginDirectories

UnnecessaryGetter3239

[SRC]if (!pluginInfosMap) getPluginInfos() // initialize the infos

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3252

[SRC]if (!pluginInfosMap) getPluginInfos() // initialize the infos

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3264

[SRC]def pluginDirs = getPluginDirectories()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessarySubstring3275

[SRC]sourcePath = sourcePath.substring(pluginPath.length())

[MSG]Violation in class grails.util.PluginBuildSettings. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3287

[SRC]def baseDir = buildSettings?.getBaseDir()?.getCanonicalPath()

[MSG]Violation in class grails.util.PluginBuildSettings. getCanonicalPath() can probably be rewritten as canonicalPath

UnnecessaryGetter3287

[SRC]def baseDir = buildSettings?.getBaseDir()?.getCanonicalPath()

[MSG]Violation in class grails.util.PluginBuildSettings. getBaseDir() can probably be rewritten as baseDir

UnnecessaryGetter3386

[SRC]return getPluginSourceDirectories()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginSourceDirectories() can probably be rewritten as pluginSourceDirectories

UnnecessaryGetter3414

[SRC]getPluginSourceDirectories() // initialize cache

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginSourceDirectories() can probably be rewritten as pluginSourceDirectories

UnnecessaryGetter3454

[SRC]pluginDirectoryResources = buildSettings.getPluginDirect..s Resource[]

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3469

[SRC]if (pluginManager == null) return getPluginInfos()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3471

[SRC]def pluginInfos = getPluginInfos().findAll {GrailsPluginInfo info ->

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3472

[SRC]def plugin = pluginManager.getGrailsPlugin(info.getName())

[MSG]Violation in class grails.util.PluginBuildSettings. getName() can probably be rewritten as name

UnnecessaryGetter3486

[SRC]implicitPluginDirectories = buildSettings.getImplicitPlu..source(it) }

[MSG]Violation in class grails.util.PluginBuildSettings. getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories

UnnecessaryGetter3498

[SRC]return buildSettings?.getPluginBaseDirectories() ?: []

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories

UnnecessaryGetter3578

[SRC]artefactResources.addAll compileScopePluginInfo.getArtefactResources()

[MSG]Violation in class grails.util.PluginBuildSettings. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3579

[SRC]artefactResources.addAll providedScopePluginInfo.getArte..tResources()

[MSG]Violation in class grails.util.PluginBuildSettings. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3581

[SRC]if (Environment.getCurrent() == Environment.TEST) {

[MSG]Violation in class grails.util.PluginBuildSettings. getCurrent() can probably be rewritten as current

UnnecessaryGetter3582

[SRC]artefactResources.addAll testScopePluginInfo.getArtefactResources()

[MSG]Violation in class grails.util.PluginBuildSettings. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3584

[SRC]def inlineDirectories = getInlinePluginDirectories()

[MSG]Violation in class grails.util.PluginBuildSettings. getInlinePluginDirectories() can probably be rewritten as inlinePluginDirectories

UnnecessaryGetter3615

[SRC]def baseDescriptor = getBasePluginDescriptor()

[MSG]Violation in class grails.util.PluginBuildSettings. getBasePluginDescriptor() can probably be rewritten as basePluginDescriptor

UnnecessaryGetter3619

[SRC]for (inlinePluginDir in getInlinePluginDirectories()) {

[MSG]Violation in class grails.util.PluginBuildSettings. getInlinePluginDirectories() can probably be rewritten as inlinePluginDirectories

UnnecessaryGetter3635

[SRC]def pluginDirs = getPluginDirectories().toList()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3824

[SRC]Resource[] pluginDirs = getPluginDirectories()

[MSG]Violation in class grails.util.PluginBuildSettings. getPluginDirectories() can probably be rewritten as pluginDirectories

Package: grails-bootstrap.src.main.groovy.org.codehaus.groovy.grails.cli.interactive

➥ InteractiveMode.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity285

[SRC]void run() {

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. The cyclomatic complexity for method [run] is [31]

EmptyCatchBlock2203

[SRC]catch(ScriptExitException e) {

[MSG]The catch block is empty

EmptyCatchBlock2226

[SRC]} catch (e) {

[MSG]The catch block is empty

UnnecessaryGetter348

[SRC]@Delegate GrailsConsole console = GrailsConsole.getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getInstance() can probably be rewritten as instance

UnnecessaryGetter364

[SRC]GroovySystem.getMetaClassRegistry().addMetaClassRegistry..stryCleaner)

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

UnnecessaryGetter382

[SRC]getCurrent() != null && getCurrent().interactiveModeActive

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getCurrent() can probably be rewritten as current

UnnecessaryGetter382

[SRC]getCurrent() != null && getCurrent().interactiveModeActive

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getCurrent() can probably be rewritten as current

UnnecessaryGetter3136

[SRC]final desktop = Desktop.getDesktop()

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getDesktop() can probably be rewritten as desktop

UnnecessaryGetter3238

[SRC]def parser = GrailsScriptRunner.getCommandLineParser()

[MSG]Violation in class org.codehaus.groovy.grails.cli.interactive.InteractiveMode. getCommandLineParser() can probably be rewritten as commandLineParser

Package: grails-bootstrap.src.main.groovy.org.codehaus.groovy.grails.cli.interactive.completors

➥ ClassNameCompletor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter261

[SRC]boolean shouldInclude(Resource res) { true }

[MSG]Violation in class ClassNameCompletor. Method parameter [res] is never referenced in the method shouldInclude of class org.codehaus.groovy.grails.cli.interactive.completors.ClassNameCompletor

Package: grails-bootstrap.src.main.groovy.org.codehaus.groovy.grails.plugins

➥ GrailsPluginUtils.groovy

Rule NamePriorityLine #Source Line / Message
SynchronizedMethod2120

[SRC]static synchronized PluginBuildSettings getPluginBuildSettings() {

[MSG]Violation in class GrailsPluginUtils. The method getPluginBuildSettings is synchronized at the method level

SynchronizedMethod2127

[SRC]static synchronized setPluginBuildSettings(PluginBuildSe.. settings) {

[MSG]Violation in class GrailsPluginUtils. The method setPluginBuildSettings is synchronized at the method level

UnusedMethodParameter2134

[SRC]static GrailsPluginInfo[] getPluginInfos(String pluginDi..Dir?.path) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getPluginInfos of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2144

[SRC]static GrailsPluginInfo[] getSupportedPluginInfos(String..Dir?.path) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getSupportedPluginInfos of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2152

[SRC]static List<String> getPluginBaseDirectories(String pluginDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getPluginBaseDirectories of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2167

[SRC]static Resource[] getPluginDirectories(String pluginDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getPluginDirectories of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2174

[SRC]static List<Resource> getImplicitPluginDirectories(Strin..Dir?.path) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getImplicitPluginDirectories of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2185

[SRC]static Resource[] getArtefactResources(String basedir) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [basedir] is never referenced in the method getArtefactResources of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2199

[SRC]static Resource[] getPluginXmlMetadata(String pluginsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginXmlMetadata of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2206

[SRC]static Resource[] getAvailableScripts(String grailsHome,..g basedir) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [grailsHome] is never referenced in the method getAvailableScripts of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2206

[SRC]static Resource[] getAvailableScripts(String grailsHome,..g basedir) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getAvailableScripts of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2206

[SRC]static Resource[] getAvailableScripts(String grailsHome,..g basedir) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [basedir] is never referenced in the method getAvailableScripts of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2213

[SRC]static Resource[] getPluginScripts(String pluginDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getPluginScripts of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2220

[SRC]static Resource[] getPluginResourceBundles(String pluginDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginDirPath] is never referenced in the method getPluginResourceBundles of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2227

[SRC]static Resource[] getPluginSourceFiles(String pluginsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginSourceFiles of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2234

[SRC]static Resource[] getPluginJarFiles(String pluginsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginJarFiles of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2241

[SRC]static Resource[] getPluginDescriptors(String basedir, S..nsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [basedir] is never referenced in the method getPluginDescriptors of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2241

[SRC]static Resource[] getPluginDescriptors(String basedir, S..nsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginDescriptors of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2260

[SRC]static Resource[] getPluginLibDirectories(String pluginsDirPath) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginLibDirectories of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2267

[SRC]static Resource[] getPluginI18nDirectories(String plugin..Dir?.path) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginI18nDirectories of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

UnusedMethodParameter2302

[SRC]static Resource getPluginDirForName(String pluginsDirPat..luginName) {

[MSG]Violation in class GrailsPluginUtils. Method parameter [pluginsDirPath] is never referenced in the method getPluginDirForName of class org.codehaus.groovy.grails.plugins.GrailsPluginUtils

SynchronizedMethod2309

[SRC]static synchronized clearCaches() {

[MSG]Violation in class GrailsPluginUtils. The method clearCaches is synchronized at the method level

UnnecessaryGetter3135

[SRC]return getPluginBuildSettings().getPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3135

[SRC]return getPluginBuildSettings().getPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3145

[SRC]final PluginBuildSettings settings = getPluginBuildSettings()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3146

[SRC]return settings.getSupportedPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos

UnnecessaryGetter3153

[SRC]getPluginBuildSettings().getPluginBaseDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories

UnnecessaryGetter3153

[SRC]getPluginBuildSettings().getPluginBaseDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3160

[SRC]getPluginBuildSettings().getPluginBaseDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBaseDirectories() can probably be rewritten as pluginBaseDirectories

UnnecessaryGetter3160

[SRC]getPluginBuildSettings().getPluginBaseDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3164

[SRC]getPluginBuildSettings().getPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3164

[SRC]getPluginBuildSettings().getPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3168

[SRC]getPluginBuildSettings().getPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3168

[SRC]getPluginBuildSettings().getPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3175

[SRC]getPluginBuildSettings().getImplicitPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories

UnnecessaryGetter3175

[SRC]getPluginBuildSettings().getImplicitPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3179

[SRC]getPluginBuildSettings().isGlobalPluginLocation(pluginDir)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3186

[SRC]getPluginBuildSettings().getArtefactResources()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3186

[SRC]getPluginBuildSettings().getArtefactResources()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3193

[SRC]getPluginBuildSettings().getArtefactResourcesForOne(projectDir)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3200

[SRC]getPluginBuildSettings().getPluginXmlMetadata()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata

UnnecessaryGetter3200

[SRC]getPluginBuildSettings().getPluginXmlMetadata()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3207

[SRC]getPluginBuildSettings().getAvailableScripts()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getAvailableScripts() can probably be rewritten as availableScripts

UnnecessaryGetter3207

[SRC]getPluginBuildSettings().getAvailableScripts()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3214

[SRC]getPluginBuildSettings().getPluginScripts()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginScripts() can probably be rewritten as pluginScripts

UnnecessaryGetter3214

[SRC]getPluginBuildSettings().getPluginScripts()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3221

[SRC]getPluginBuildSettings().getPluginResourceBundles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginResourceBundles() can probably be rewritten as pluginResourceBundles

UnnecessaryGetter3221

[SRC]getPluginBuildSettings().getPluginResourceBundles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3228

[SRC]getPluginBuildSettings().getPluginSourceFiles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginSourceFiles() can probably be rewritten as pluginSourceFiles

UnnecessaryGetter3228

[SRC]getPluginBuildSettings().getPluginSourceFiles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3235

[SRC]getPluginBuildSettings().getPluginJarFiles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginJarFiles() can probably be rewritten as pluginJarFiles

UnnecessaryGetter3235

[SRC]getPluginBuildSettings().getPluginJarFiles()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3242

[SRC]getPluginBuildSettings().getPluginDescriptors()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginDescriptors() can probably be rewritten as pluginDescriptors

UnnecessaryGetter3242

[SRC]getPluginBuildSettings().getPluginDescriptors()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3246

[SRC]getPluginBuildSettings().getBasePluginDescriptor(basedir)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3254

[SRC]getPluginBuildSettings().getDescriptorForPlugin(pluginDir)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3261

[SRC]getPluginBuildSettings().getPluginLibDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginLibDirectories() can probably be rewritten as pluginLibDirectories

UnnecessaryGetter3261

[SRC]getPluginBuildSettings().getPluginLibDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3268

[SRC]getPluginBuildSettings().getPluginI18nDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginI18nDirectories() can probably be rewritten as pluginI18nDirectories

UnnecessaryGetter3268

[SRC]getPluginBuildSettings().getPluginI18nDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3275

[SRC]getPluginBuildSettings().getGlobalPluginsPath()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getGlobalPluginsPath() can probably be rewritten as globalPluginsPath

UnnecessaryGetter3275

[SRC]getPluginBuildSettings().getGlobalPluginsPath()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3282

[SRC]getPluginBuildSettings().getPluginDirForName(pluginName)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3289

[SRC]getPluginBuildSettings().getMetadataForPlugin(pluginName)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3296

[SRC]getPluginBuildSettings().getMetadataForPlugin(pluginDir)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3303

[SRC]getPluginBuildSettings().getPluginDirForName(pluginName)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3310

[SRC]getPluginBuildSettings().clearCache()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtils. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

➥ GrailsVersionUtils.groovy

Rule NamePriorityLine #Source Line / Message
EqualsAndHashCode2100

[SRC]class VersionComparator implements Comparator {

[MSG]The class org.codehaus.groovy.grails.plugins.VersionComparator defines equals(Object) but not hashCode()

UnusedMethodParameter2167

[SRC]boolean equals(obj) { false }

[MSG]Violation in class VersionComparator. Method parameter [obj] is never referenced in the method equals of class org.codehaus.groovy.grails.plugins.VersionComparator

➥ PluginInfo.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock244

[SRC]catch(e) {

[MSG]The catch block is empty

UnnecessaryGetter356

[SRC]input = pluginXml.getInputStream()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. getInputStream() can probably be rewritten as inputStream

UnnecessaryGetter397

[SRC]"${getName()}-${getVersion()}"

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. getName() can probably be rewritten as name

UnnecessaryGetter397

[SRC]"${getName()}-${getVersion()}"

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. getVersion() can probably be rewritten as version

UnnecessaryGetter3101

[SRC][name:getName(), version:getVersion()]

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. getName() can probably be rewritten as name

UnnecessaryGetter3101

[SRC][name:getName(), version:getVersion()]

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. getVersion() can probably be rewritten as version

UnnecessaryDefInMethodDeclaration3119

[SRC]private def lookupFromMetadata(String name) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.PluginInfo. The def keyword is unneeded when a method is marked private

Package: grails-bootstrap.src.main.groovy.org.codehaus.groovy.grails.resolve

➥ EnhancedDefaultDependencyDescriptor.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3121

[SRC]Field field = getClass().getSuperclass().getDeclaredFiel..Transitive")

[MSG]Violation in class org.codehaus.groovy.grails.resolve.EnhancedDefaultDependencyDescriptor. getSuperclass() can probably be rewritten as superclass

UnnecessaryGetter3128

[SRC]Field field = getClass().getSuperclass().getDeclaredFiel..isChanging")

[MSG]Violation in class org.codehaus.groovy.grails.resolve.EnhancedDefaultDependencyDescriptor. getSuperclass() can probably be rewritten as superclass

➥ IvyDependencyManager.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport334

[SRC]import org.apache.ivy.plugins.resolver.ChainResolver

[MSG]The [org.apache.ivy.plugins.resolver.ChainResolver] import is never referenced

UnusedImport335

[SRC]import org.apache.ivy.util.Message

[MSG]The [org.apache.ivy.util.Message] import is never referenced

UnusedImport336

[SRC]import org.apache.ivy.util.MessageLogger

[MSG]The [org.apache.ivy.util.MessageLogger] import is never referenced

UnnecessaryElseStatement3254

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryGetter3396

[SRC]def candidates = getPluginDependencyDescriptors().findAl..pplication }

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManager. getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors

➥ PluginInstallEngine.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2366

[SRC]def (name, version, xml) = readMetadataFromZip(zipLocation)

[MSG]The variable [xml] in class org.codehaus.groovy.grails.resolve.PluginInstallEngine is not used

UnusedMethodParameter2429

[SRC]protected void resolvePluginJarDependencies(fullPluginNa..ies = [:]) {

[MSG]Violation in class PluginInstallEngine. Method parameter [pluginName] is never referenced in the method resolvePluginJarDependencies of class org.codehaus.groovy.grails.resolve.PluginInstallEngine

BooleanGetBoolean2446

[SRC]def runningUpgrade = Boolean.getBoolean('runningGrailsUpgrade')

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. Boolean.getBoolean(String) is a confusing API for reading System properties. Prefer the System.getProperty(String) API.

UnusedMethodParameter2504

[SRC]protected Map processPluginDependencies(String pluginNam..pluginXml) {

[MSG]Violation in class PluginInstallEngine. Method parameter [pluginName] is never referenced in the method processPluginDependencies of class org.codehaus.groovy.grails.resolve.PluginInstallEngine

UnusedPrivateMethod2731

[SRC]private registerMetadataForPluginLocation(Resource pluginDir) {

[MSG]The method registerMetadataForPluginLocation is not used within PluginInstallEngine.groovy

UnnecessaryGetter391

[SRC]applicationPluginsLocation = settings.getProjectPluginsDir()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getProjectPluginsDir() can probably be rewritten as projectPluginsDir

UnnecessaryGetter3228

[SRC]cacheDir currentDependencyManager.ivySettings.getDefault..absolutePath

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getDefaultCache() can probably be rewritten as defaultCache

UnnecessaryObjectReferences3237

[SRC]pluginResolver.setCheckmodified(true)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessarySelfAssignment3390

[SRC]PluginBuildSettings pluginSettings = pluginSettings

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter3461

[SRC]grails.build.logging.GrailsConsole.getInstance().warn("""

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getInstance() can probably be rewritten as instance

UnnecessaryPackageReference3461

[SRC]grails.build.logging.GrailsConsole.getInstance().warn("""

[MSG]The grails.build.logging.GrailsConsole class was explicitly imported, so specifying the package name is not necessary

UnnecessaryGetter3510

[SRC]def grailsVersion = settings.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter3563

[SRC]GrailsConsole.getInstance().addStatus("Uninstalled plugin [$name]")

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getInstance() can probably be rewritten as instance

UnnecessaryGetter3566

[SRC]GrailsConsole.getInstance().warning("No plugin [$name${v.. uninstall")

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getInstance() can probably be rewritten as instance

UnnecessaryDefInMethodDeclaration3585

[SRC]private def addToMetadata(pluginName, pluginVersion) {

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. The def keyword is unneeded when a method is marked private

UnnecessaryGetter3649

[SRC]GrailsConsole.getInstance().userInput(msg, ['y','n'] as ..ng[]) == 'y'

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getInstance() can probably be rewritten as instance

UnnecessaryGetter3657

[SRC]def pluginInfos = pluginSettings.getPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginInstallEngine. getPluginInfos() can probably be rewritten as pluginInfos

➥ PluginResolveEngine.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2273

[SRC]catch(e) {

[MSG]The catch block is empty

UnnecessaryGetter374

[SRC]output.println getPluginInfoHeader()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginResolveEngine. getPluginInfoHeader() can probably be rewritten as pluginInfoHeader

UnnecessaryGetter3129

[SRC]output.println getPluginInfoFooter()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginResolveEngine. getPluginInfoFooter() can probably be rewritten as pluginInfoFooter

UnnecessaryDefInMethodDeclaration3136

[SRC]protected def printDependencies(output, dependencies) {

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginResolveEngine. The def keyword is unneeded when a method is marked protected

UnnecessaryDefInMethodDeclaration3145

[SRC]protected def printSectionTitle(PrintWriter output, String title) {

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginResolveEngine. The def keyword is unneeded when a method is marked protected

UnnecessaryDefInMethodDeclaration3151

[SRC]protected def printLineSeparator(PrintWriter output) {

[MSG]Violation in class org.codehaus.groovy.grails.resolve.PluginResolveEngine. The def keyword is unneeded when a method is marked protected

➥ ResolveException.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter328

[SRC]for(IvyNode node in confReport.getUnresolvedDependencies()) {

[MSG]Violation in class org.codehaus.groovy.grails.resolve.ResolveException. getUnresolvedDependencies() can probably be rewritten as unresolvedDependencies

UnnecessaryGetter331

[SRC]def failedDownloads = confReport.getFailedArtifactsReports()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.ResolveException. getFailedArtifactsReports() can probably be rewritten as failedArtifactsReports

Package: grails-bootstrap.src.main.groovy.org.codehaus.groovy.grails.resolve.config

➥ RepositoriesConfigurer.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences391

[SRC]fileSystemResolver.settings = dependencyManager.ivySettings

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3169

[SRC]urlResolver.setCheckmodified(true)

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.commons.cfg

➥ ConfigurationHelper.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport321

[SRC]import java.util.Map

UnnecessaryGetter353

[SRC]getCachedConfigs().clear()

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getCachedConfigs() can probably be rewritten as cachedConfigs

UnnecessaryGetter364

[SRC]classLoader = application.getClassLoader()

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getClassLoader() can probably be rewritten as classLoader

UnnecessaryGetter377

[SRC]co = getCachedConfigs().get(cacheKey)

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getCachedConfigs() can probably be rewritten as cachedConfigs

UnnecessaryGetter3111

[SRC]getCachedConfigs().put(cacheKey, co)

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getCachedConfigs() can probably be rewritten as cachedConfigs

UnnecessaryGetter3127

[SRC]binding.put(CONFIG_BINDING_APP_NAME, application.getMeta..ATION_NAME))

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getMetadata() can probably be rewritten as metadata

UnnecessaryGetter3128

[SRC]binding.put(CONFIG_BINDING_APP_VERSION, application.getM..ON_VERSION))

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getMetadata() can probably be rewritten as metadata

UnnecessaryGetter3142

[SRC]getCachedConfigs().put(DEV_CACHE_KEY, config)

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getCachedConfigs() can probably be rewritten as cachedConfigs

UnnecessaryGetter3192

[SRC]stream = resource.getInputStream()

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper. getInputStream() can probably be rewritten as inputStream

➥ MapBasedSmartPropertyOverrideConfigurer.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter345

[SRC]def beans = getBeansConfig()

[MSG]Violation in class org.codehaus.groovy.grails.commons.cfg.MapBasedSmartPropertyOverrideConfigurer. getBeansConfig() can probably be rewritten as beansConfig

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.commons.metaclass

➥ MetaClassEnhancer.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter346

[SRC]method.invoke(method.getDeclaringClass(), instance, *args)

[MSG]Violation in class org.codehaus.groovy.grails.commons.metaclass.MetaClassEnhancer$1. getDeclaringClass() can probably be rewritten as declaringClass

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.compiler

➥ GrailsProjectCompiler.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField243

[SRC]private static final List<String> PLUGIN_EXCLUDE_PATHS =..ial handling

[MSG]The field PLUGIN_EXCLUDE_PATHS is not used within the class org.codehaus.groovy.grails.compiler.GrailsProjectCompiler

UnnecessaryGetter397

[SRC]pluginSettings.getArtefactResourcesForCurrentEnvironment())

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectCompiler. getArtefactResourcesForCurrentEnvironment() can probably be rewritten as artefactResourcesForCurrentEnvironment

UnnecessaryGetter3142

[SRC]def jarFiles = getJarFiles()

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectCompiler. getJarFiles() can probably be rewritten as jarFiles

UnnecessaryGetter3195

[SRC]jarFiles.addAll(getExtraDependencies())

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectCompiler. getExtraDependencies() can probably be rewritten as extraDependencies

➥ GrailsProjectPackager.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter342

[SRC]GrailsConsole grailsConsole = GrailsConsole.getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectPackager. getInstance() can probably be rewritten as instance

UnnecessaryGetter3119

[SRC]ant.copy(todir:buildSettings.getClassesDir(), failonerror:false) {

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectPackager. getClassesDir() can probably be rewritten as classesDir

UnnecessaryGetter3269

[SRC]def pluginInfos = pluginSettings.getSupportedPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectPackager. getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos

UnnecessaryGetter3295

[SRC]def pluginInfos = pluginSettings.getSupportedPluginInfos()

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsProjectPackager. getSupportedPluginInfos() can probably be rewritten as supportedPluginInfos

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.exceptions

➥ DefaultStackTracePrinter.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity243

[SRC]String prettyPrint(Throwable t) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. The cyclomatic complexity for method [prettyPrint] is [23]

CyclomaticComplexity2167

[SRC]String prettyPrintCodeSnippet(Throwable exception) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. The cyclomatic complexity for method [prettyPrintCodeSnippet] is [21]

EmptyCatchBlock2239

[SRC]catch (e) {

[MSG]The catch block is empty

EmptyCatchBlock2245

[SRC]} catch (e) {

[MSG]The catch block is empty

EmptyCatchBlock2278

[SRC]} catch (e) {

[MSG]The catch block is empty

UnusedMethodParameter2318

[SRC]String formatCodeSnippetEnd(Resource resource, int lineNumber) {

[MSG]Violation in class DefaultStackTracePrinter. Method parameter [resource] is never referenced in the method formatCodeSnippetEnd of class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter

UnusedMethodParameter2318

[SRC]String formatCodeSnippetEnd(Resource resource, int lineNumber) {

[MSG]Violation in class DefaultStackTracePrinter. Method parameter [lineNumber] is never referenced in the method formatCodeSnippetEnd of class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter

UnnecessaryDefInMethodDeclaration3139

[SRC]protected def printCausedByMessage(PrintWriter sb, Throwable e) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. The def keyword is unneeded when a method is marked protected

UnnecessaryDefInMethodDeclaration3144

[SRC]protected def printHeader(PrintWriter sb, String header) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. The def keyword is unneeded when a method is marked protected

UnnecessaryGetter3164

[SRC]res == null ? te.className : res.getFilename()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getFilename() can probably be rewritten as filename

UnnecessaryGetter3284

[SRC]Object message = mcee.getErrorCollector().getErrors().it..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getErrors() can probably be rewritten as errors

UnnecessaryGetter3284

[SRC]Object message = mcee.getErrorCollector().getErrors().it..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getErrorCollector() can probably be rewritten as errorCollector

UnnecessaryGetter3287

[SRC]final tmp = new FileSystemResource(sem.getCause().getSourceLocator())

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getSourceLocator() can probably be rewritten as sourceLocator

UnnecessaryGetter3287

[SRC]final tmp = new FileSystemResource(sem.getCause().getSourceLocator())

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getCause() can probably be rewritten as cause

UnnecessaryGetter3309

[SRC]Object message = mcee.getErrorCollector().getErrors().it..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getErrors() can probably be rewritten as errors

UnnecessaryGetter3309

[SRC]Object message = mcee.getErrorCollector().getErrors().it..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getErrorCollector() can probably be rewritten as errorCollector

UnnecessaryGetter3312

[SRC]lineNumber = sem.getCause().getLine()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getLine() can probably be rewritten as line

UnnecessaryGetter3312

[SRC]lineNumber = sem.getCause().getLine()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getCause() can probably be rewritten as cause

UnnecessaryGetter3344

[SRC]while (ex.getCause() != null && !ex.equals(ex.getCause())) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getCause() can probably be rewritten as cause

UnnecessaryGetter3344

[SRC]while (ex.getCause() != null && !ex.equals(ex.getCause())) {

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getCause() can probably be rewritten as cause

UnnecessaryGetter3345

[SRC]ex = ex.getCause()

[MSG]Violation in class org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter. getCause() can probably be rewritten as cause

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.plugins

➥ CoreGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter345

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter380

[SRC]if (getParentCtx()?.containsBean('pluginManager')) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPlugin. getParentCtx() can probably be rewritten as parentCtx

UnnecessaryCollectCall399

[SRC]def locations = new ArrayList(settings.pluginDirectories..olutePath })

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPlugin. The call to collect could probably be rewritten as a spread expression: settings.pluginDirectories*.absolutePath

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.plugins.publishing

➥ DefaultPluginPublisher.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2157

[SRC]protected GPathResult getPluginMetadata(String pluginName) {

[MSG]Violation in class DefaultPluginPublisher. Method parameter [pluginName] is never referenced in the method getPluginMetadata of class org.codehaus.groovy.grails.plugins.publishing.DefaultPluginPublisher

UnnecessaryCallForLastElement3120

[SRC]def lastPlugin = allPlugins[allPlugins.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to allPlugins.last() or allPlugins[-1]

UnnecessaryGetter3140

[SRC]InputStream stream = pluginsListFile.getInputStream()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.publishing.DefaultPluginPublisher. getInputStream() can probably be rewritten as inputStream

➥ PluginDescriptorGenerator.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity283

[SRC]protected void generatePluginXml(pluginProps, MarkupBuilder xml) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.publishing.PluginDescriptorGenerator. The cyclomatic complexity for method [generatePluginXml] is [28]

UnusedImport327

[SRC]import org.apache.ivy.plugins.resolver.URLResolver

[MSG]The [org.apache.ivy.plugins.resolver.URLResolver] import is never referenced

➥ PluginPackager.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2139

[SRC]String packageSource(String pluginName, File classesDir,..targetDir) {

[MSG]Violation in class PluginPackager. Method parameter [classesDir] is never referenced in the method packageSource of class org.codehaus.groovy.grails.plugins.publishing.PluginPackager

UnusedMethodParameter2139

[SRC]String packageSource(String pluginName, File classesDir,..targetDir) {

[MSG]Violation in class PluginPackager. Method parameter [targetDir] is never referenced in the method packageSource of class org.codehaus.groovy.grails.plugins.publishing.PluginPackager

UnusedVariable2149

[SRC]def pluginGrailsVersion = "${GrailsUtil.grailsVersion} > *"

[MSG]The variable [pluginGrailsVersion] in class org.codehaus.groovy.grails.plugins.publishing.PluginPackager is not used

Package: grails-core.src.main.groovy.org.codehaus.groovy.grails.plugins.support

➥ GrailsPluginUtils.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter313

[SRC]return GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.support.GrailsPluginUtils. getGrailsVersion() can probably be rewritten as grailsVersion

➥ WatchPattern.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock259

[SRC]} catch (e) {

[MSG]The catch block is empty

Package: grails-crud.src.main.groovy.org.codehaus.groovy.grails.scaffolding

➥ DefaultGrailsTemplateGenerator.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethod2144

[SRC]private generateListView(domainClass, destDir) {

[MSG]The method generateListView is not used within DefaultGrailsTemplateGenerator.groovy

UnusedPrivateMethod2154

[SRC]private generateShowView(domainClass, destDir) {

[MSG]The method generateShowView is not used within DefaultGrailsTemplateGenerator.groovy

UnusedPrivateMethod2164

[SRC]private generateEditView(domainClass, destDir) {

[MSG]The method generateEditView is not used within DefaultGrailsTemplateGenerator.groovy

UnusedPrivateMethod2174

[SRC]private generateCreateView(domainClass, destDir) {

[MSG]The method generateCreateView is not used within DefaultGrailsTemplateGenerator.groovy

UnnecessaryGetter3113

[SRC]for (t in getTemplateNames()) {

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator. getTemplateNames() can probably be rewritten as templateNames

UnnecessaryGetter3255

[SRC]def response = GrailsConsole.getInstance().userInput("Fi..as String[])

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator. getInstance() can probably be rewritten as instance

UnnecessaryGetter3284

[SRC]return templateFile.inputStream.getText()

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator. getText() can probably be rewritten as text

UnnecessarySubstring3306

[SRC]template = template.substring(1)

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator. The String.substring(int) method can be replaced with the subscript operator

Package: grails-docs.src.main.groovy.grails.doc

➥ DocEngine.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2227

[SRC]void appendCreateLink(StringBuffer buffer, String name, String view) {

[MSG]Violation in class DocEngine. Method parameter [view] is never referenced in the method appendCreateLink of class grails.doc.DocEngine

UnusedMethodParameter2301

[SRC]void handleMatch(StringBuffer buffer, MatchResult result..t context) {

[MSG]Violation in class BlockQuoteFilter. Method parameter [context] is never referenced in the method handleMatch of class grails.doc.BlockQuoteFilter

UnusedMethodParameter2310

[SRC]void handleMatch(StringBuffer buffer, MatchResult result..t context) {

[MSG]Violation in class ItalicFilter. Method parameter [context] is never referenced in the method handleMatch of class grails.doc.ItalicFilter

UnusedMethodParameter2319

[SRC]void handleMatch(StringBuffer buffer, MatchResult result..t context) {

[MSG]Violation in class BoldFilter. Method parameter [context] is never referenced in the method handleMatch of class grails.doc.BoldFilter

UnusedMethodParameter2329

[SRC]void handleMatch(StringBuffer buffer, MatchResult result..t context) {

[MSG]Violation in class CodeFilter. Method parameter [context] is never referenced in the method handleMatch of class grails.doc.CodeFilter

UnusedMethodParameter2363

[SRC]void handleMatch(StringBuffer buffer, MatchResult result..t context) {

[MSG]Violation in class TextileLinkFilter. Method parameter [context] is never referenced in the method handleMatch of class grails.doc.TextileLinkFilter

UnusedImport321

[SRC]import java.util.regex.Pattern

[MSG]The [java.util.regex.Pattern] import is never referenced

UnusedImport330

[SRC]import org.radeox.macro.CodeMacro

[MSG]The [org.radeox.macro.CodeMacro] import is never referenced

UnusedImport332

[SRC]import org.radeox.macro.parameter.BaseMacroParameter

[MSG]The [org.radeox.macro.parameter.BaseMacroParameter] import is never referenced

UnusedImport336

[SRC]import org.radeox.util.Encoder

[MSG]The [org.radeox.util.Encoder] import is never referenced

➥ DocPublisher.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2101

[SRC]catch (e) {

[MSG]The catch block is empty

CyclomaticComplexity2130

[SRC]private void catPublish() {

[MSG]Violation in class grails.doc.DocPublisher. The cyclomatic complexity for method [catPublish] is [28]

UnusedVariable2251

[SRC]def fullToc = new StringBuilder()

[MSG]The variable [fullToc] in class grails.doc.DocPublisher is not used

UnusedVariable2295

[SRC]def reference = [:]

[MSG]The variable [reference] in class grails.doc.DocPublisher is not used

UnnecessaryObjectReferences3404

[SRC]varsCopy.content = engine.render(sourceFile.text, context)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3586

[SRC]URL url = getClass().getClassLoader().getResource(src)

[MSG]Violation in class grails.doc.DocPublisher. getClassLoader() can probably be rewritten as classLoader

➥ PdfBuilder.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField225

[SRC]private static final String LIVE_DOC_SITE = 'http://grails.org'

[MSG]The field LIVE_DOC_SITE is not used within the class grails.doc.PdfBuilder

UnusedMethodParameter227

[SRC]static void build(String baseDir, String styleDir = null) {

[MSG]Violation in class PdfBuilder. Method parameter [styleDir] is never referenced in the method build of class grails.doc.PdfBuilder

UnnecessaryGetter373

[SRC]Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()))

[MSG]Violation in class grails.doc.PdfBuilder. getBytes() can probably be rewritten as bytes

Package: grails-docs.src.main.groovy.grails.doc.filters

➥ HeaderFilter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter232

[SRC]void handleMatch(StringBuffer out, MatchResult matchResu..erContext) {

[MSG]Violation in class HeaderFilter. Method parameter [filterContext] is never referenced in the method handleMatch of class grails.doc.filters.HeaderFilter

UnusedImport317

[SRC]import org.radeox.filter.regex.RegexFilter

[MSG]The [org.radeox.filter.regex.RegexFilter] import is never referenced

➥ LinkTestFilter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable254

[SRC]Writer writer = new StringBufferWriter(buffer)

[MSG]The variable [writer] in class grails.doc.filters.LinkTestFilter is not used

UnusedImport322

[SRC]import org.radeox.filter.interwiki.InterWiki

[MSG]The [org.radeox.filter.interwiki.InterWiki] import is never referenced

UnnecessaryGetter348

[SRC]def engine = context.getRenderContext().getRenderEngine()

[MSG]Violation in class grails.doc.filters.LinkTestFilter. getRenderEngine() can probably be rewritten as renderEngine

UnnecessaryGetter348

[SRC]def engine = context.getRenderContext().getRenderEngine()

[MSG]Violation in class grails.doc.filters.LinkTestFilter. getRenderContext() can probably be rewritten as renderContext

UnnecessarySubstring371

[SRC]alias = name.substring(0, pipeIndex)

[MSG]Violation in class grails.doc.filters.LinkTestFilter. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessarySubstring372

[SRC]name = name.substring(pipeIndex + 1)

[MSG]Violation in class grails.doc.filters.LinkTestFilter. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring379

[SRC]hash = name.substring(hashIndex + 1)

[MSG]Violation in class grails.doc.filters.LinkTestFilter. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring380

[SRC]name = name.substring(0, hashIndex)

[MSG]Violation in class grails.doc.filters.LinkTestFilter. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessaryGetter3106

[SRC]context.getRenderContext().setCacheable(false)

[MSG]Violation in class grails.doc.filters.LinkTestFilter. getRenderContext() can probably be rewritten as renderContext

Package: grails-docs.src.main.groovy.grails.doc.gradle

➥ PublishGuide.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences356

[SRC]publisher.css = project.file("${resourcesDir}/css")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences357

[SRC]publisher.js = project.file("${resourcesDir}/js")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences358

[SRC]publisher.style = project.file("${resourcesDir}/style")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences359

[SRC]publisher.version = props."grails.version"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences360

[SRC]publisher.logo = '<a href="http://grails.org" target="_b..r="0"/></a>'

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences361

[SRC]publisher.sponsorLogo = '<a href="http://springsource.co..r="0"/></a>'

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-docs.src.main.groovy.grails.doc.macros

➥ GspTagSourceMacro.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable227

[SRC]String code

[MSG]The variable [code] in class grails.doc.macros.GspTagSourceMacro is not used

Package: grails-hibernate.src.main.groovy.org.codehaus.groovy.grails.orm.hibernate

➥ GrailsHibernateTransactionManager.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.hibernate.Session

[MSG]The [org.hibernate.Session] import is never referenced

➥ HibernateGormEnhancer.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2194

[SRC]} catch (e) {

[MSG]The catch block is empty

ThrowExceptionFromFinallyBlock2961

[SRC]throw e

[MSG]Throwing an exception from a finally block can hide an underlying error

UnnecessaryGetter3148

[SRC]this.sessionFactory = datastore.getSessionFactory()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormStaticApi. getSessionFactory() can probably be rewritten as sessionFactory

UnnecessaryGetter3156

[SRC]grailsApplication = domainClassMappingContext.getGrailsApplication()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormStaticApi. getGrailsApplication() can probably be rewritten as grailsApplication

UnnecessaryGetter3668

[SRC]def sessionFactory = datastore.getSessionFactory()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormValidationApi. getSessionFactory() can probably be rewritten as sessionFactory

UnnecessaryGetter3673

[SRC]def grailsApplication = domainClassMappingContext.getGra..pplication()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormValidationApi. getGrailsApplication() can probably be rewritten as grailsApplication

UnnecessaryGetter3736

[SRC]sessionFactory = datastore.getSessionFactory()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormInstanceApi. getSessionFactory() can probably be rewritten as sessionFactory

UnnecessaryGetter3741

[SRC]def grailsApplication = domainClassMappingContext.getGra..pplication()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateGormInstanceApi. getGrailsApplication() can probably be rewritten as grailsApplication

Package: grails-hibernate.src.main.groovy.org.codehaus.groovy.grails.orm.hibernate.cfg

➥ GORMEnhancingBeanPostProcessor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter243

[SRC]def postProcessBeforeInitialization(Object bean, String ..me) { bean }

[MSG]Violation in class GORMEnhancingBeanPostProcessor. Method parameter [beanName] is never referenced in the method postProcessBeforeInitialization of class org.codehaus.groovy.grails.orm.hibernate.cfg.GORMEnhancingBeanPostProcessor

UnusedMethodParameter245

[SRC]Object postProcessAfterInitialization(Object bean, String beanName) {

[MSG]Violation in class GORMEnhancingBeanPostProcessor. Method parameter [beanName] is never referenced in the method postProcessAfterInitialization of class org.codehaus.groovy.grails.orm.hibernate.cfg.GORMEnhancingBeanPostProcessor

➥ HibernateMappingBuilder.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2373

[SRC]private handleMethodMissing = { String name, args ->

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.HibernateMappingBuilder. The cyclomatic complexity for method [handleMethodMissing] is [46]

UnnecessaryObjectReferences3382

[SRC]property.cascade = namedArgs.cascade ?: property.cascade

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3383

[SRC]property.sort = namedArgs.sort ?: property.sort

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3384

[SRC]property.order = namedArgs.order ?: property.order

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3385

[SRC]property.batchSize = namedArgs.batchSize instanceof Inte..ty.batchSize

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3386

[SRC]property.ignoreNotFound = namedArgs.ignoreNotFound != nu..noreNotFound

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3387

[SRC]property.typeParams = namedArgs.params ?: property.typeParams

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3577

[SRC]column.length = args["length"] ?: -1

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3578

[SRC]column.precision = args["precision"] ?: -1

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3579

[SRC]column.scale = args["scale"] ?: -1

[MSG]The code could be more concise by using a with() or identity() block

➥ HibernateNamedQueriesBuilder.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3231

[SRC]def preparedClosure = getPreparedCriteriaClosure()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.NamedCriteriaProxy. getPreparedCriteriaClosure() can probably be rewritten as preparedCriteriaClosure

UnnecessaryGetter3287

[SRC]def previousClosure = previousInChain.getPreparedCriteriaClosure()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.NamedCriteriaProxy. getPreparedCriteriaClosure() can probably be rewritten as preparedCriteriaClosure

Package: grails-hibernate.src.main.groovy.org.codehaus.groovy.grails.plugins.orm.hibernate

➥ HibernatePluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity279

[SRC]static doWithSpring = {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. The cyclomatic complexity for method [doWithSpring] is [55]

UnusedVariable2186

[SRC]def cacheClass = getClass().classLoader.loadClass(cacheProvider)

[MSG]The variable [cacheClass] in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport is not used

UnusedVariable2349

[SRC]String prefix = isDefault ? '' : datasourceName + '_'

[MSG]The variable [prefix] in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport is not used

UnusedPrivateMethod2590

[SRC]private static List<String> removeNullNames(Map query) {

[MSG]The method removeNullNames is not used within HibernatePluginSupport.groovy

ThrowExceptionFromFinallyBlock2612

[SRC]throw e

[MSG]Throwing an exception from a finally block can hide an underlying error

EmptyCatchBlock2638

[SRC]} catch (TypeMismatchException e) {

[MSG]The catch block is empty

EmptyCatchBlock2669

[SRC]} catch (FileNotFoundException fnfe) {

[MSG]The catch block is empty

UnusedImport332

[SRC]import org.codehaus.groovy.grails.orm.hibernate.cfg.Defa..onfiguration

[MSG]The [org.codehaus.groovy.grails.orm.hibernate.cfg.DefaultGrailsDomainConfiguration] import is never referenced

UnusedImport367

[SRC]import org.codehaus.groovy.grails.domain.GrailsDomainCla..istentEntity

[MSG]The [org.codehaus.groovy.grails.domain.GrailsDomainClassPersistentEntity] import is never referenced

UnnecessaryGetter381

[SRC]if (getSpringConfig().containsBean(ConstraintsEvaluator.BEAN_NAME)) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter396

[SRC]if (getSpringConfig().containsBean('dataSource')) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3107

[SRC]new PersistentConstraintFactory(getSpringConfig().getUnr..onContext(),

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext

UnnecessaryGetter3107

[SRC]new PersistentConstraintFactory(getSpringConfig().getUnr..onContext(),

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryCollectCall3252

[SRC]hibConfigLocations.addAll(explicitLocations.collect { it.toString() })

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. The call to collect could probably be rewritten as a spread expression: explicitLocations*.toString()

UnnecessaryGetter3320

[SRC]if (getSpringConfig().containsBean("controllerHandlerMappings")) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3323

[SRC]if (getSpringConfig().containsBean("annotationHandlerMapping")) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3510

[SRC]for (PersistentEntity entity in mappingContext.getPersis..ntities()) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport. getPersistentEntities() can probably be rewritten as persistentEntities

UnnecessaryObjectReferences3701

[SRC]validateMethods.remove 'setValidateMethod'

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-plugin-async.src.main.groovy.org.codehaus.groovy.grails.plugins.web.async

➥ ControllersAsyncGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.ControllersAsyncGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

➥ GrailsAsyncContext.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport325

[SRC]import org.codehaus.groovy.grails.web.sitemesh.SpringMVCViewDecorator

[MSG]The [org.codehaus.groovy.grails.web.sitemesh.SpringMVCViewDecorator] import is never referenced

UnnecessaryGetter345

[SRC]def applicationContext = webRequest.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.GrailsAsyncContext. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter358

[SRC]GrailsWebRequest webRequest = new GrailsWebRequest(reque..etContext())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.GrailsAsyncContext. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter384

[SRC]def targetResponse = bufferingResponse.getTargetResponse()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.GrailsAsyncContext. getTargetResponse() can probably be rewritten as targetResponse

UnnecessaryGetter385

[SRC]def content = bufferingResponse.getContent()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.GrailsAsyncContext. getContent() can probably be rewritten as content

UnnecessaryGetter391

[SRC]content.writeOriginal(targetResponse.getWriter())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.async.GrailsAsyncContext. getWriter() can probably be rewritten as writer

Package: grails-plugin-async.src.main.groovy.org.codehaus.groovy.grails.plugins.web.async.api

➥ ControllersAsyncApi.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter239

[SRC]AsyncContext startAsync(instance) {

[MSG]Violation in class ControllersAsyncApi. Method parameter [instance] is never referenced in the method startAsync of class org.codehaus.groovy.grails.plugins.web.async.api.ControllersAsyncApi

Package: grails-plugin-codecs.src.main.groovy.org.codehaus.groovy.grails.plugins

➥ CodecsGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter332

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CodecsGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter372

[SRC]def encodeMethod = codecClass.getEncodeMethod()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CodecsGrailsPlugin. getEncodeMethod() can probably be rewritten as encodeMethod

UnnecessaryGetter384

[SRC]def decodeMethod = codecClass.getDecodeMethod()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CodecsGrailsPlugin. getDecodeMethod() can probably be rewritten as decodeMethod

Package: grails-plugin-codecs.src.main.groovy.org.codehaus.groovy.grails.plugins.codecs

➥ Base64Codec.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.codehaus.groovy.runtime.DefaultGroovyMethods

[MSG]The [org.codehaus.groovy.runtime.DefaultGroovyMethods] import is never referenced

UnnecessaryGetter349

[SRC]return Base64.decodeBase64(theTarget.toString().getBytes())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.Base64Codec. getBytes() can probably be rewritten as bytes

➥ HexCodec.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryParenthesesForMethodCallWithClosure332

[SRC]theTarget.each() {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.HexCodec. Parentheses in the 'each' method call are unnecessary and can be removed.

➥ SHA256Codec.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import java.security.MessageDigest

[MSG]The [java.security.MessageDigest] import is never referenced

➥ URLCodec.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport318

[SRC]import java.net.URLEncoder

UnnecessaryGroovyImport319

[SRC]import java.net.URLDecoder

UnnecessaryGetter330

[SRC]URLEncoder.encode(obj.toString(), URLCodec.getEncoding())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.URLCodec. getEncoding() can probably be rewritten as encoding

UnnecessaryGetter334

[SRC]URLDecoder.decode(obj.toString(), URLCodec.getEncoding())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.URLCodec. getEncoding() can probably be rewritten as encoding

UnnecessaryDefInMethodDeclaration337

[SRC]private static def getEncoding() {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.URLCodec. The def keyword is unneeded when a method is marked private

UnnecessaryGetter338

[SRC]def request = RequestContextHolder.getRequestAttributes()?.request

[MSG]Violation in class org.codehaus.groovy.grails.plugins.codecs.URLCodec. getRequestAttributes() can probably be rewritten as requestAttributes

Package: grails-plugin-codecs.src.test.groovy.org.codehaus.groovy.grails.web.codecs

➥ Base64CodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper214

[SRC]protected void setUp() {

[MSG]Violation in class Base64CodecTests. The method setUp() does not call super.setUp()

➥ HexCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertNullInsteadOfAssertEquals321

[SRC]assertEquals(codec.encode(null), null)

[MSG]Violation in class org.codehaus.groovy.grails.web.codecs.HexCodecTests. assertEquals can be simplified using assertNull

UseAssertNullInsteadOfAssertEquals330

[SRC]assertEquals(codec.decode(null), null)

[MSG]Violation in class org.codehaus.groovy.grails.web.codecs.HexCodecTests. assertEquals can be simplified using assertNull

➥ URLCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper214

[SRC]protected void setUp() {

[MSG]Violation in class URLCodecTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper219

[SRC]protected void tearDown() {

[MSG]Violation in class URLCodecTests. The method tearDown() does not call super.tearDown()

Package: grails-plugin-controllers.src.main.groovy.org.codehaus.groovy.grails.plugins.web

➥ ControllersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2109

[SRC]def basedir = System.getProperty("base.dir")

[MSG]The variable [basedir] in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin is not used

UnusedVariable2110

[SRC]def grailsEnv = Environment.current.name

[MSG]The variable [grailsEnv] in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin is not used

UnusedMethodParameter2201

[SRC]static void enhanceDomainWithBinding(ApplicationContext ..aClass mc) {

[MSG]Violation in class ControllersGrailsPlugin. Method parameter [ctx] is never referenced in the method enhanceDomainWithBinding of class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin

UnnecessaryGetter350

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryCallForLastElement3113

[SRC]mappingElement = mappingElement[mappingElement.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1]

UnnecessaryCallForLastElement3113

[SRC]mappingElement = mappingElement[mappingElement.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1]

UnnecessaryCallForLastElement3125

[SRC]def lastFilter = filters[filters.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1]

UnnecessaryCallForLastElement3125

[SRC]def lastFilter = filters[filters.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1]

UnnecessaryCallForLastElement3126

[SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1]

UnnecessaryCallForLastElement3126

[SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1]

UnnecessaryGetter3169

[SRC]Object gspEnc = application.getFlatConfig().get("grails....encoding");

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin. getFlatConfig() can probably be rewritten as flatConfig

UnnecessaryDotClass3175

[SRC]def redirectListeners = ctx.getBeansOfType(RedirectEvent..tener.class)

[MSG]RedirectEventListener.class can be rewritten as RedirectEventListener

UnnecessaryGetter3178

[SRC]Object o = application.getFlatConfig().get(RedirectDynam..JSESSIONID);

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin. getFlatConfig() can probably be rewritten as flatConfig

Package: grails-plugin-controllers.src.main.groovy.org.codehaus.groovy.grails.web.metaclass

➥ ChainMethod.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter346

[SRC]def flash = webRequest.getFlashScope()

[MSG]Violation in class org.codehaus.groovy.grails.web.metaclass.ChainMethod. getFlashScope() can probably be rewritten as flashScope

UnnecessaryGetter365

[SRC]def appCtx = webRequest.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.metaclass.ChainMethod. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter374

[SRC]def response = webRequest.getCurrentResponse()

[MSG]Violation in class org.codehaus.groovy.grails.web.metaclass.ChainMethod. getCurrentResponse() can probably be rewritten as currentResponse

➥ WithFormMethod.groovy

Rule NamePriorityLine #Source Line / Message
SynchronizedMethod266

[SRC]protected synchronized boolean isTokenValid(GrailsWebReq..ebRequest) {

[MSG]Violation in class WithFormMethod. The method isTokenValid is synchronized at the method level

SynchronizedMethod288

[SRC]protected synchronized resetToken(GrailsWebRequest webRequest) {

[MSG]Violation in class WithFormMethod. The method resetToken is synchronized at the method level

UnusedMethodParameter2118

[SRC]protected Object invalidTokenInternal(Closure callable) { model }

[MSG]Violation in class ValidResponseHandler. Method parameter [callable] is never referenced in the method invalidTokenInternal of class org.codehaus.groovy.grails.web.metaclass.ValidResponseHandler

UnusedImport317

[SRC]import javax.servlet.http.HttpServletRequest

[MSG]The [javax.servlet.http.HttpServletRequest] import is never referenced

UnnecessaryGetter367

[SRC]final request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.metaclass.WithFormMethod. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter389

[SRC]final request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.metaclass.WithFormMethod. getCurrentRequest() can probably be rewritten as currentRequest

Package: grails-plugin-controllers.src.main.groovy.org.codehaus.groovy.grails.web.plugins.support

➥ WebMetaUtils.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter285

[SRC]static void prepareCommandObjectBindingAction(Method act..ntext ctx) {

[MSG]Violation in class WebMetaUtils. Method parameter [action] is never referenced in the method prepareCommandObjectBindingAction of class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils

UnusedMethodParameter2230

[SRC]static registerCommonWebProperties(MetaClass mc, GrailsA..plication) {

[MSG]Violation in class WebMetaUtils. Method parameter [application] is never referenced in the method registerCommonWebProperties of class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils

UnnecessaryGetter3101

[SRC]def paramTypes = originalAction.getParameterTypes()

[MSG]Violation in class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils. getParameterTypes() can probably be rewritten as parameterTypes

UnnecessaryGetter3137

[SRC]constrainedProperty.getPropertyName()), errors)

[MSG]Violation in class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils. getPropertyName() can probably be rewritten as propertyName

UnnecessarySubstring3164

[SRC]return result.substring(0, result.size() - 8)

[MSG]Violation in class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessaryObjectReferences3250

[SRC]mc.getResponse = responseObject

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3252

[SRC]mc.getGrailsAttributes = grailsAttrsObject

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3254

[SRC]mc.getGrailsApplication = {-> RCH.currentRequestAttribut..pplication }

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3256

[SRC]mc.getActionName = {-> RCH.currentRequestAttributes().actionName }

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3257

[SRC]mc.getControllerName = {-> RCH.currentRequestAttributes(..rollerName }

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3258

[SRC]mc.getWebRequest = {-> RCH.currentRequestAttributes() }

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3264

[SRC]final MetaClass mc = taglib.getMetaClass()

[MSG]Violation in class org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils. getMetaClass() can probably be rewritten as metaClass

Package: grails-plugin-converters.src.main.groovy.org.codehaus.groovy.grails.plugins.converters

➥ ConvertersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter340

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.converters.ConvertersGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter352

[SRC]controllers: GrailsUtil.getGrailsVersion(),

[MSG]Violation in class org.codehaus.groovy.grails.plugins.converters.ConvertersGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter353

[SRC]domainClass: GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.converters.ConvertersGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

➥ ConvertersPluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter244

[SRC]static void enhanceApplication(GrailsApplication applica..onContext) {

[MSG]Violation in class ConvertersPluginSupport. Method parameter [application] is never referenced in the method enhanceApplication of class org.codehaus.groovy.grails.plugins.converters.ConvertersPluginSupport

Package: grails-plugin-converters.src.main.groovy.org.codehaus.groovy.grails.web.converters

➥ JSONParsingParameterCreationListener.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter336

[SRC]def request = params.getRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.JSONParsingParameterCreationListener. getRequest() can probably be rewritten as request

➥ XMLParsingParameterCreationListener.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter335

[SRC]def request = params.getRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.XMLParsingParameterCreationListener. getRequest() can probably be rewritten as request

Package: grails-plugin-converters.src.main.groovy.org.codehaus.groovy.grails.web.converters.configuration

➥ configtest.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.web.converters.configu..nInitializer

ImportFromSamePackage34

[SRC]import org.codehaus.groovy.grails.web.converters.configu..rationHolder

ImportFromSamePackage36

[SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration

ImportFromSamePackage37

[SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration

UnnecessaryDotClass315

[SRC]def defcfg = ConvertersConfigurationHolder.getConverterC..(JSON.class)

[MSG]JSON.class can be rewritten as JSON

Package: grails-plugin-datasource.src.main.groovy.org.codehaus.groovy.grails.plugins.datasource

➥ DataSourceGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity272

[SRC]def createDatasource = { String datasourceName, ds ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin. The cyclomatic complexity for method [createDatasource] is [22]

ClassForName2186

[SRC]codecClass = Class.forName(encryptionCodec, true, applic..classLoader)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...)

EmptyCatchBlock2275

[SRC]} catch (e) {

[MSG]The catch block is empty

UnnecessaryGetter346

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter347

[SRC]def dependsOn = [core: GrailsUtil.getGrailsVersion()]

[MSG]Violation in class org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryElseStatement3191

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryCallForLastElement3221

[SRC]listeners[listeners.size() - 1] + {

[MSG]Unnecessarily complex access of last element. This can be simplified to listeners.last() or listeners[-1]

UnnecessaryCallForLastElement3221

[SRC]listeners[listeners.size() - 1] + {

[MSG]Unnecessarily complex access of last element. This can be simplified to listeners.last() or listeners[-1]

UnnecessaryGetter3269

[SRC]connection = dataSource.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin. getConnection() can probably be rewritten as connection

Package: grails-plugin-domain-class.src.main.groovy.org.codehaus.groovy.grails.domain

➥ GormApiSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter334

[SRC]PersistentEntity entity = ctx.getPersistentEntity(cls.getName())

[MSG]Violation in class org.codehaus.groovy.grails.domain.GormApiSupport. getName() can probably be rewritten as name

Package: grails-plugin-domain-class.src.main.groovy.org.codehaus.groovy.grails.plugins

➥ DomainClassGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2113

[SRC]} catch (e) {

[MSG]The catch block is empty

CyclomaticComplexity2289

[SRC]public static addRelationshipManagementMethods(GrailsDom..ntext ctx) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. The cyclomatic complexity for method [addRelationshipManagementMethods] is [27]

UnusedImport319

[SRC]import grails.util.ClosureToMapPopulator

[MSG]The [grails.util.ClosureToMapPopulator] import is never referenced

UnusedImport340

[SRC]import org.codehaus.groovy.grails.commons.spring.GrailsR..Configurator

[MSG]The [org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator] import is never referenced

UnnecessaryGetter355

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryPackageReference3112

[SRC]org.grails.datastore.mapping.reflect.ClassPropertyFetche..hers.clear()

[MSG]The org.grails.datastore.mapping.reflect.ClassPropertyFetcher class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3112

[SRC]org.grails.datastore.mapping.reflect.ClassPropertyFetche..hers.clear()

[MSG]The org.grails.datastore.mapping.reflect.ClassPropertyFetcher class was explicitly imported, so specifying the package name is not necessary

UnnecessaryGetter3170

[SRC]for (GrailsDomainClass component in dc.getComponents()) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. getComponents() can probably be rewritten as components

UnnecessaryGetter3225

[SRC]def attributes = rch.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3232

[SRC]def attributes = rch.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3261

[SRC]delegate.setErrors (new BeanPropertyBindingResult(delega...getName()))

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin. getName() can probably be rewritten as name

UnnecessaryElseStatement3306

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

➥ DomainClassPluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.springframework.validation.BeanPropertyBindingResult

[MSG]The [org.springframework.validation.BeanPropertyBindingResult] import is never referenced

UnnecessaryGetter341

[SRC]prop.validate(object, object.getProperty(prop.getPropert..localErrors)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassPluginSupport. getPropertyName() can probably be rewritten as propertyName

UnnecessaryGetter346

[SRC]def fieldName = localError.getField()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.DomainClassPluginSupport. getField() can probably be rewritten as field

Package: grails-plugin-filters.src.main.groovy.org.codehaus.groovy.grails.plugins.web.filters

➥ FilterConfig.groovy

Rule NamePriorityLine #Source Line / Message
ConsecutiveStringConcatenation3100

[SRC]"Invalid filter definition in ${filtersDefinition.getCla..} - trying "

[MSG]String concatenation in class org.codehaus.groovy.grails.plugins.web.filters.FilterConfig can be joined into a single literal

➥ FilterToHandlerAdapter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2116

[SRC]boolean preHandle(HttpServletRequest request, HttpServle.. Object o) {

[MSG]Violation in class FilterToHandlerAdapter. Method parameter [o] is never referenced in the method preHandle of class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter

UnusedMethodParameter2138

[SRC]void postHandle(HttpServletRequest request, HttpServletR..elAndView) {

[MSG]Violation in class FilterToHandlerAdapter. Method parameter [o] is never referenced in the method postHandle of class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter

UnusedMethodParameter2182

[SRC]void afterCompletion(HttpServletRequest request, HttpSer...Exception {

[MSG]Violation in class FilterToHandlerAdapter. Method parameter [response] is never referenced in the method afterCompletion of class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter

UnusedMethodParameter2182

[SRC]void afterCompletion(HttpServletRequest request, HttpSer...Exception {

[MSG]Violation in class FilterToHandlerAdapter. Method parameter [o] is never referenced in the method afterCompletion of class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter

UnnecessaryGetter3112

[SRC]if (!uri) uri = request.getRequestURI()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter. getRequestURI() can probably be rewritten as requestURI

UnnecessaryGetter3113

[SRC]return uri.substring(request.getContextPath().length())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter. getContextPath() can probably be rewritten as contextPath

UnnecessarySubstring3113

[SRC]return uri.substring(request.getContextPath().length())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3223

[SRC]actionName = controllerClass?.getDefaultAction()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.filters.FilterToHandlerAdapter. getDefaultAction() can probably be rewritten as defaultAction

➥ FiltersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2100

[SRC]def filterClass = applicationContext.getBean("${c.fullName}Class")

[MSG]The variable [filterClass] in class org.codehaus.groovy.grails.plugins.web.filters.FiltersGrailsPlugin is not used

UnusedVariable2149

[SRC]def filterClass = applicationContext.getBean("${c.fullName}Class")

[MSG]The variable [filterClass] in class org.codehaus.groovy.grails.plugins.web.filters.FiltersGrailsPlugin is not used

UnnecessaryGetter340

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.filters.FiltersGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-plugin-gsp.src.main.groovy.org.codehaus.groovy.grails.plugins.web

➥ GroovyPagesGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity289

[SRC]def doWithSpring = {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin. The cyclomatic complexity for method [doWithSpring] is [23]

UnusedVariable2289

[SRC]GrailsPluginManager pluginManager = getManager()

[MSG]The variable [pluginManager] in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin is not used

UnusedImport325

[SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils

[MSG]The [org.codehaus.groovy.grails.commons.GrailsClassUtils] import is never referenced

UnusedImport326

[SRC]import org.codehaus.groovy.grails.commons.GrailsTagLibClass

[MSG]The [org.codehaus.groovy.grails.commons.GrailsTagLibClass] import is never referenced

UnnecessaryGetter361

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessarySelfAssignment3167

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3167

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3172

[SRC]jspTagLibraryResolver = jspTagLibraryResolver

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3172

[SRC]jspTagLibraryResolver = jspTagLibraryResolver

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3178

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3178

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3202

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3202

[SRC]groovyPageLocator = groovyPageLocator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter3269

[SRC]if (Modifier.isAbstract(superClass.getModifiers()) && !s..Enhanced)) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin. getModifiers() can probably be rewritten as modifiers

UnnecessaryGetter3278

[SRC]nonEnhancedClasses.each { enhancer.enhance it.getMetaClass() }

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin. getMetaClass() can probably be rewritten as metaClass

UnnecessaryGetter3289

[SRC]GrailsPluginManager pluginManager = getManager()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin. getManager() can probably be rewritten as manager

Package: grails-plugin-gsp.src.main.groovy.org.codehaus.groovy.grails.plugins.web.taglib

➥ ApplicationTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport326

[SRC]import org.codehaus.groovy.runtime.DefaultGroovyMethods;

[MSG]The [org.codehaus.groovy.runtime.DefaultGroovyMethods] import is never referenced

UnnecessaryElseStatement380

[SRC]} else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryElseStatement3203

[SRC]} else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryGetter3233

[SRC]def writer = getOut()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib. getOut() can probably be rewritten as out

UnnecessaryElseStatement3398

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

➥ CountryTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryCollectCall3274

[SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key }

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.CountryTagLib. The call to collect could probably be rewritten as a spread expression: ISO3166_3.entrySet().sort(<not implemented yet for class: org.codehaus.groovy.ast.expr.ClosureExpression>)*.key

UnnecessaryParenthesesForMethodCallWithClosure3274

[SRC]ISO3166_3.entrySet().sort { a, b -> a.value.compareTo(b...) { it.key }

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.CountryTagLib. Parentheses in the 'collect' method call are unnecessary and can be removed.

➥ FormTagLib.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2477

[SRC]Closure datePicker = { attrs ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. The cyclomatic complexity for method [datePicker] is [58]

AddEmptyString2667

[SRC]def h = '' + i

[MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object)

AddEmptyString2696

[SRC]def m = '' + i

[MSG]Concatenating an empty string is an inefficient way to convert an object to a String. Consider using toString() or String.valueOf(Object)

CyclomaticComplexity2813

[SRC]Closure select = { attrs ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. The cyclomatic complexity for method [select] is [26]

EmptyCatchBlock2952

[SRC]catch (e) {

[MSG]The catch block is empty

UnusedImport325

[SRC]import org.codehaus.groovy.grails.web.util.StreamCharBuffer

[MSG]The [org.codehaus.groovy.grails.web.util.StreamCharBuffer] import is never referenced

UnnecessaryGetter3319

[SRC]def writer = getOut()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getOut() can probably be rewritten as out

UnnecessarySelfAssignment3478

[SRC]def out = out // let x = x ?

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3478

[SRC]def out = out // let x = x ?

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter3485

[SRC]xdefault = DateFormat.getInstance().parse(xdefault)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getInstance() can probably be rewritten as instance

UnnecessaryGetter3723

[SRC]attrs.from = TimeZone.getAvailableIDs()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getAvailableIDs() can probably be rewritten as availableIDs

UnnecessaryGetter3724

[SRC]attrs.value = (attrs.value ? attrs.value.ID : TimeZone.g..efault().ID)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getDefault() can probably be rewritten as default

UnnecessaryGetter3755

[SRC]attrs.from = Locale.getAvailableLocales()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getAvailableLocales() can probably be rewritten as availableLocales

UnnecessaryGetter3820

[SRC]def messageSource = grailsAttributes.getApplicationConte..sageSource")

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib. getApplicationContext() can probably be rewritten as applicationContext

➥ FormatTagLib.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2227

[SRC]Closure formatNumber = { attrs ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormatTagLib. The cyclomatic complexity for method [formatNumber] is [26]

UnnecessaryGetter3162

[SRC]timeZone = TimeZone.getDefault()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormatTagLib. getDefault() can probably be rewritten as default

UnnecessaryGetter3281

[SRC]dcfs = decimalFormat.getDecimalFormatSymbols()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormatTagLib. getDecimalFormatSymbols() can probably be rewritten as decimalFormatSymbols

UnnecessaryGetter3338

[SRC]locale = Locale.getDefault()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.FormatTagLib. getDefault() can probably be rewritten as default

➥ JavascriptTagLib.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock255

[SRC]} catch (e) {

[MSG]The catch block is empty

UnusedPrivateMethod262

[SRC]private void initHasResourceProcessor() {

[MSG]The method initHasResourceProcessor is not used within JavascriptTagLib.groovy

UnnecessarySubstring3162

[SRC]reqResCtx = (requestPluginContext.startsWith("/") ? requ..ntext) + '/'

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3193

[SRC]getProvider().doRemoteFunction(owner, attrs, out)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib. getProvider() can probably be rewritten as provider

UnnecessaryGetter3349

[SRC]def p = getProvider()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib. getProvider() can probably be rewritten as provider

UnnecessaryGetter3388

[SRC]def p = getProvider()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib. getProvider() can probably be rewritten as provider

➥ RenderTagLib.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2329

[SRC]Closure paginate = { attrs ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. The cyclomatic complexity for method [paginate] is [40]

UnnecessaryGetter352

[SRC]return getRequest().getAttribute(PAGE)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getRequest() can probably be rewritten as request

UnnecessaryGetter3107

[SRC]def oldPage = getPage()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessaryGetter3151

[SRC]def parser = getFactory().getPageParser(contentType)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getFactory() can probably be rewritten as factory

UnnecessaryGetter3158

[SRC]def decoratorMapper = getFactory().getDecoratorMapper()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getDecoratorMapper() can probably be rewritten as decoratorMapper

UnnecessaryGetter3158

[SRC]def decoratorMapper = getFactory().getDecoratorMapper()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getFactory() can probably be rewritten as factory

UnnecessaryGetter3165

[SRC]def t = groovyPagesTemplateEngine.createTemplate(d.getPage())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessaryGetter3177

[SRC]return FactoryHolder.getFactory()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getFactory() can probably be rewritten as factory

UnnecessaryGetter3197

[SRC]def htmlPage = getPage()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessarySubstring3216

[SRC]out << propertyName.substring(propertyName.lastIndexOf('.') + 1)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3244

[SRC]def htmlPage = getPage()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessaryGetter3291

[SRC]getPage().writeBody(out)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessaryGetter3302

[SRC]getPage().writeHead(out)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPage() can probably be rewritten as page

UnnecessaryGetter3565

[SRC]groovyPagesTemplateRenderer.render(getWebRequest(), getP..y, getOut())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getWebRequest() can probably be rewritten as webRequest

UnnecessaryGetter3565

[SRC]groovyPagesTemplateRenderer.render(getWebRequest(), getP..y, getOut())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getPageScope() can probably be rewritten as pageScope

UnnecessaryGetter3565

[SRC]groovyPagesTemplateRenderer.render(getWebRequest(), getP..y, getOut())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib. getOut() can probably be rewritten as out

➥ SitemeshTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2172

[SRC]def content = captureTagContent(out, 'meta', attrs, body, true)

[MSG]The variable [content] in class org.codehaus.groovy.grails.plugins.web.taglib.SitemeshTagLib is not used

➥ ValidationTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryCollectCall3115

[SRC]checkList = model.findAll {it.value?.errors instanceof E..t {it.value}

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The call to collect could probably be rewritten as a spread expression: model.findAll(<not implemented yet for class: org.codehaus.groovy.ast.expr.ClosureExpression>)*.value

UnnecessaryParenthesesForMethodCallWithClosure3249

[SRC]mkp.errors() {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. Parentheses in the 'errors' method call are unnecessary and can be removed.

UnnecessarySubstring3348

[SRC]def againstClass = attrs.against ?: form.substring(0,1)...substring(1)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessarySubstring3348

[SRC]def againstClass = attrs.against ?: form.substring(0,1)...substring(1)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryCollectCall3356

[SRC]appliedConstraints += it.collect{ it.appliedConstraints }

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The call to collect could probably be rewritten as a spread expression: it*.appliedConstraints

UnnecessarySubstring3384

[SRC]def scriptName = "org/apache/commons/validator/javascrip..g(1) + ".js"

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessarySubstring3384

[SRC]def scriptName = "org/apache/commons/validator/javascrip..g(1) + ".js"

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring3410

[SRC]def validateType = k.substring(0,1).toUpperCase() + k.substring(1)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessarySubstring3410

[SRC]def validateType = k.substring(0,1).toUpperCase() + k.substring(1)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3426

[SRC]PropertyEditorRegistry registry = RequestContextHolder.c..orRegistry()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib. getPropertyEditorRegistry() can probably be rewritten as propertyEditorRegistry

Package: grails-plugin-i18n.src.main.groovy.org.codehaus.groovy.grails.plugins.i18n

➥ I18nGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter346

[SRC]String version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.i18n.I18nGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-plugin-log4j.src.main.groovy.org.codehaus.groovy.grails.plugins.log4j

➥ Log4jConfig.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3181

[SRC]Logger root = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3229

[SRC]BuildSettings settings = BuildSettingsHolder.getSettings()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getSettings() can probably be rewritten as settings

UnnecessaryGetter3230

[SRC]def targetDir = settings?.getProjectTargetDir()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getProjectTargetDir() can probably be rewritten as projectTargetDir

UnnecessaryGetter3240

[SRC]def root = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3320

[SRC]LogLog.error "Appender $appender not found configuring l...getName()}"

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getName() can probably be rewritten as name

UnnecessaryGetter3375

[SRC]Logger.getRootLogger().removeAppender name

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.Log4jConfig. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryDefInMethodDeclaration3444

[SRC]def EnvironmentsLog4JConfig(Log4jConfig config) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.EnvironmentsLog4JConfig. The def keyword is unneeded on constructors

➥ LoggingGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter335

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.log4j.LoggingGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryCallForLastElement355

[SRC]mappingElement = mappingElement[mappingElement.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1]

UnnecessaryCallForLastElement355

[SRC]mappingElement = mappingElement[mappingElement.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to mappingElement.last() or mappingElement[-1]

Package: grails-plugin-mimetypes.src.main.groovy.org.codehaus.groovy.grails.plugins.web.api

➥ ControllersMimeTypesApi.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter250

[SRC]def withFormat(instance, Closure callable) {

[MSG]Violation in class ControllersMimeTypesApi. Method parameter [instance] is never referenced in the method withFormat of class org.codehaus.groovy.grails.plugins.web.api.ControllersMimeTypesApi

➥ RequestMimeTypesApi.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter376

[SRC]parser.configuredMimeTypes = getMimeTypes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.api.RequestMimeTypesApi. getMimeTypes() can probably be rewritten as mimeTypes

➥ ResponseMimeTypesApi.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethodParameter2122

[SRC]private MimeType[] getMimeTypesInternal(HttpServletReque.. response) {

[MSG]Violation in class ResponseMimeTypesApi. Method parameter [response] is never referenced in the method getMimeTypesInternal of class org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi

UnnecessaryGetter372

[SRC]HttpServletRequest request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter377

[SRC]def allMimes = getMimeTypes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi. getMimeTypes() can probably be rewritten as mimeTypes

UnnecessaryGetter379

[SRC]result = mime ? mime.extension : getMimeTypes()[0].extension

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi. getMimeTypes() can probably be rewritten as mimeTypes

UnnecessaryGetter3130

[SRC]parser.configuredMimeTypes = getMimeTypes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi. getMimeTypes() can probably be rewritten as mimeTypes

Package: grails-plugin-mimetypes.src.main.groovy.org.codehaus.groovy.grails.plugins.web.mimes

➥ MimeTypesGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter337

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.mimes.MimeTypesGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-plugin-mimetypes.src.main.groovy.org.codehaus.groovy.grails.web.mime

➥ DefaultAcceptHeaderParser.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable245

[SRC]def qualifiedMimes = []

[MSG]The variable [qualifiedMimes] in class org.codehaus.groovy.grails.web.mime.DefaultAcceptHeaderParser is not used

UnnecessaryGetter343

[SRC]def config = application?.getConfig()

[MSG]Violation in class org.codehaus.groovy.grails.web.mime.DefaultAcceptHeaderParser. getConfig() can probably be rewritten as config

UnnecessaryGetter356

[SRC]return MimeType.getConfiguredMimeTypes()

[MSG]Violation in class org.codehaus.groovy.grails.web.mime.DefaultAcceptHeaderParser. getConfiguredMimeTypes() can probably be rewritten as configuredMimeTypes

Package: grails-plugin-scaffolding.src.main.groovy.org.codehaus.groovy.grails.plugins.scaffolding

➥ ScaffoldingGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2188

[SRC]catch (Exception e) {

[MSG]The catch block is empty

UnusedImport329

[SRC]import org.springframework.beans.factory.config.BeanDefinition

[MSG]The [org.springframework.beans.factory.config.BeanDefinition] import is never referenced

UnnecessaryGetter350

[SRC]def version = grails.util.GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.scaffolding.ScaffoldingGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-plugin-services.src.main.groovy.org.codehaus.groovy.grails.plugins.services

➥ ServicesGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter339

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.services.ServicesGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter390

[SRC]"${serviceClass.propertyName}"(serviceClass.getClazz()) { bean ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.services.ServicesGrailsPlugin. getClazz() can probably be rewritten as clazz

UnnecessaryGetter3158

[SRC]"$serviceName"(serviceClass.getClazz()) { bean ->

[MSG]Violation in class org.codehaus.groovy.grails.plugins.services.ServicesGrailsPlugin. getClazz() can probably be rewritten as clazz

Package: grails-plugin-servlets.src.main.groovy.org.codehaus.groovy.grails.plugins.web

➥ ServletsGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter331

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ServletsGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-plugin-testing.src.main.groovy.grails.test

➥ AbstractCliTestCase.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField222

[SRC]private final Condition waiting = lock.newCondition()

[MSG]The field waiting is not used within the class grails.test.AbstractCliTestCase

JUnitPublicNonTestMethod291

[SRC]String getOutput() {

[MSG]Violation in class AbstractCliTestCase. The method getOutput is public but not a test method

JUnitPublicNonTestMethod295

[SRC]void setOutput(String output) {

[MSG]Violation in class AbstractCliTestCase. The method setOutput is public but not a test method

JUnitPublicNonTestMethod2103

[SRC]File getWorkDir() {

[MSG]Violation in class AbstractCliTestCase. The method getWorkDir is public but not a test method

JUnitPublicNonTestMethod2107

[SRC]void setWorkDir(File dir) {

[MSG]Violation in class AbstractCliTestCase. The method setWorkDir is public but not a test method

JUnitPublicNonTestMethod2117

[SRC]void enterInput(String input) {

[MSG]Violation in class AbstractCliTestCase. The method enterInput is public but not a test method

JUnitPublicNonTestMethod2127

[SRC]int waitForProcess() {

[MSG]Violation in class AbstractCliTestCase. The method waitForProcess is public but not a test method

UnusedVariable2129

[SRC]final monitor = "monitor"

[MSG]The variable [monitor] in class grails.test.AbstractCliTestCase is not used

EmptyCatchBlock2139

[SRC]catch (InterruptedException ex) {

[MSG]The catch block is empty

JUnitPublicNonTestMethod2214

[SRC]public boolean isWindows() {

[MSG]Violation in class AbstractCliTestCase. The method isWindows is public but not a test method

➥ ControllerUnitTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod258

[SRC]Class getControllerClass() {

[MSG]Violation in class ControllerUnitTestCase. The method getControllerClass is public but not a test method

➥ GroovyPagesTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod237

[SRC]void setControllerName(String name) {

[MSG]Violation in class GroovyPagesTestCase. The method setControllerName is public but not a test method

JUnitPublicNonTestMethod249

[SRC]void assertOutputEquals(expected, template, params = [:]..tring() }) {

[MSG]Violation in class GroovyPagesTestCase. The method assertOutputEquals is public but not a test method

JUnitPublicNonTestMethod261

[SRC]String applyTemplate(template, params = [:]) {

[MSG]Violation in class GroovyPagesTestCase. The method applyTemplate is public but not a test method

JUnitPublicNonTestMethod267

[SRC]void applyTemplate(StringWriter sw, template, params = [:]) {

[MSG]Violation in class GroovyPagesTestCase. The method applyTemplate is public but not a test method

➥ MockUtils.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethodParameter2567

[SRC]private static void addDynamicFinders(Class clazz, List ..Instances) {

[MSG]Violation in class MockUtils. Method parameter [testInstances] is never referenced in the method addDynamicFinders of class grails.test.MockUtils

UnusedPrivateMethodParameter2655

[SRC]private static void addCountMethods(Class clazz, GrailsD..Instances) {

[MSG]Violation in class MockUtils. Method parameter [dc] is never referenced in the method addCountMethods of class grails.test.MockUtils

UnusedPrivateMethodParameter2732

[SRC]private static void addOtherStaticMethods(Class clazz, L..Instances) {

[MSG]Violation in class MockUtils. Method parameter [testInstances] is never referenced in the method addOtherStaticMethods of class grails.test.MockUtils

CyclomaticComplexity2752

[SRC]private static void addDynamicInstanceMethods(Class claz..Instances) {

[MSG]Violation in class grails.test.MockUtils. The cyclomatic complexity for method [addDynamicInstanceMethods] is [24]

CyclomaticComplexity2917

[SRC]private static void addValidateMethod(

[MSG]Violation in class grails.test.MockUtils. The cyclomatic complexity for method [addValidateMethod] is [27]

CyclomaticComplexity21097

[SRC]private static processInstances(instances, property, com..tor, args) {

[MSG]Violation in class grails.test.MockUtils. The cyclomatic complexity for method [processInstances] is [26]

UnusedImport342

[SRC]import org.springframework.validation.BeanPropertyBindingResult

[MSG]The [org.springframework.validation.BeanPropertyBindingResult] import is never referenced

ConstantAssertExpression3295

[SRC]assert false : "'template' attribute must be provided."

[MSG]The assert statement within class grails.test.MockUtils has a constant boolean expression [false]

UnnecessaryGetter3315

[SRC]clazz.metaClass.getSession = {-> mockRequest.getSession() }

[MSG]Violation in class grails.test.MockUtils. getSession() can probably be rewritten as session

UnnecessarySubstring3359

[SRC]def shortName = clazz.name.substring(pos + 1)

[MSG]Violation in class grails.test.MockUtils. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryElseStatement3633

[SRC]} else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryDotClass3945

[SRC]while (clazz != Object.class) {

[MSG]Object.class can be rewritten as Object

UnnecessaryGetter3947

[SRC]clazz = clazz.getSuperclass()

[MSG]Violation in class grails.test.MockUtils. getSuperclass() can probably be rewritten as superclass

UnnecessaryDotClass31322

[SRC]if (value instanceof Number && Long.class.equals(targetType)) {

[MSG]Long.class can be rewritten as Long

➥ MvcUnitTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod285

[SRC]Class getTestClass() {

[MSG]Violation in class MvcUnitTestCase. The method getTestClass is public but not a test method

UnusedImport317

[SRC]import grails.util.GrailsNameUtils

[MSG]The [grails.util.GrailsNameUtils] import is never referenced

UnnecessaryDefInMethodDeclaration3122

[SRC]protected def bindMockWebRequest(GrailsMockHttpServletRe..kResponse) {

[MSG]Violation in class grails.test.MvcUnitTestCase. The def keyword is unneeded when a method is marked protected

➥ TagLibUnitTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod265

[SRC]Class getTagLibClass() {

[MSG]Violation in class TagLibUnitTestCase. The method getTagLibClass is public but not a test method

Package: grails-plugin-testing.src.main.groovy.grails.test.mixin.domain

➥ DomainClassUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryDotClass3153

[SRC]def validator = applicationContext.getBean(validationBea..dator.class)

[MSG]Validator.class can be rewritten as Validator

Package: grails-plugin-testing.src.main.groovy.grails.test.mixin.support

➥ GrailsUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryDotClass380

[SRC]CachedIntrospectionResults.clearClassLoader(GrailsUnitTe..classLoader)

[MSG]GrailsUnitTestMixin.class can be rewritten as GrailsUnitTestMixin

UnnecessaryGetter3169

[SRC]result = ScriptBytecodeAdapter.unwrap(gre).getMessage()

[MSG]Violation in class grails.test.mixin.support.GrailsUnitTestMixin. getMessage() can probably be rewritten as message

UnnecessaryGetter3173

[SRC]result = e.getMessage()

[MSG]Violation in class grails.test.mixin.support.GrailsUnitTestMixin. getMessage() can probably be rewritten as message

UnnecessaryGetter3201

[SRC]throw new AssertionFailedError("Closure " + code + " sho..z.getName())

[MSG]Violation in class grails.test.mixin.support.GrailsUnitTestMixin. getName() can probably be rewritten as name

UnnecessaryGetter3203

[SRC]throw new AssertionFailedError("Closure " + code + " sho..ion " + th);

[MSG]Violation in class grails.test.mixin.support.GrailsUnitTestMixin. getName() can probably be rewritten as name

UnnecessaryGetter3205

[SRC]return th.getMessage();

[MSG]Violation in class grails.test.mixin.support.GrailsUnitTestMixin. getMessage() can probably be rewritten as message

Package: grails-plugin-testing.src.main.groovy.grails.test.mixin.web

➥ ControllerUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3124

[SRC]webRequest.getParams()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getParams() can probably be rewritten as params

UnnecessaryGetter3159

[SRC]webRequest.getFlashScope()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getFlashScope() can probably be rewritten as flashScope

UnnecessaryGetter3184

[SRC]final classLoader = ControllerUnitTestMixin.class.getClassLoader()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getClassLoader() can probably be rewritten as classLoader

UnnecessaryDotClass3184

[SRC]final classLoader = ControllerUnitTestMixin.class.getClassLoader()

[MSG]ControllerUnitTestMixin.class can be rewritten as ControllerUnitTestMixin

UnnecessaryGetter3252

[SRC]request = webRequest.getCurrentRequest()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter3253

[SRC]response = webRequest.getCurrentResponse()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getCurrentResponse() can probably be rewritten as currentResponse

UnnecessaryGetter3254

[SRC]servletContext = webRequest.getServletContext()

[MSG]Violation in class grails.test.mixin.web.ControllerUnitTestMixin. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter3349

[SRC]return factory.getObject()

[MSG]Violation in class grails.test.mixin.web.TestResponseMimeTypesApi. getObject() can probably be rewritten as object

UnnecessaryGetter3359

[SRC]return factory.getObject()

[MSG]Violation in class grails.test.mixin.web.TestRequestMimeTypesApi. getObject() can probably be rewritten as object

➥ FiltersUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter364

[SRC]getCompositeInterceptor().handlers?.clear()

[MSG]Violation in class grails.test.mixin.web.FiltersUnitTestMixin. getCompositeInterceptor() can probably be rewritten as compositeInterceptor

UnnecessaryGetter394

[SRC]return getCompositeInterceptor()

[MSG]Violation in class grails.test.mixin.web.FiltersUnitTestMixin. getCompositeInterceptor() can probably be rewritten as compositeInterceptor

UnnecessaryGetter3116

[SRC]final interceptor = getCompositeInterceptor()

[MSG]Violation in class grails.test.mixin.web.FiltersUnitTestMixin. getCompositeInterceptor() can probably be rewritten as compositeInterceptor

➥ GroovyPageUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter397

[SRC]MetaClass mc = tagLib.getMetaClass()

[MSG]Violation in class grails.test.mixin.web.GroovyPageUnitTestMixin. getMetaClass() can probably be rewritten as metaClass

➥ UrlMappingsUnitTestMixin.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2182

[SRC]void assertForwardUrlMapping(assertions, url, paramAssertions) {

[MSG]Violation in class grails.test.mixin.web.UrlMappingsUnitTestMixin. The cyclomatic complexity for method [assertForwardUrlMapping] is [23]

MisorderedStaticImports328

[SRC]import static junit.framework.Assert.assertEquals

[MSG]Static imports should appear before normal imports

MisorderedStaticImports329

[SRC]import static junit.framework.Assert.assertNotNull

[MSG]Static imports should appear before normal imports

UnnecessarySelfAssignment354

[SRC]grailsApplication = grailsApplication

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter360

[SRC]getUrlMappingsHolder()

[MSG]Violation in class grails.test.mixin.web.UrlMappingsUnitTestMixin. getUrlMappingsHolder() can probably be rewritten as urlMappingsHolder

UnnecessaryGetter377

[SRC]UrlMappingsHolder mappingsHolder = getUrlMappingsHolder()

[MSG]Violation in class grails.test.mixin.web.UrlMappingsUnitTestMixin. getUrlMappingsHolder() can probably be rewritten as urlMappingsHolder

UnnecessarySubstring3217

[SRC]if (actual[0] == "/") actual = actual.substring(1)

[MSG]Violation in class grails.test.mixin.web.UrlMappingsUnitTestMixin. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring3218

[SRC]if (expected[0] == "/") expected = expected.substring(1)

[MSG]Violation in class grails.test.mixin.web.UrlMappingsUnitTestMixin. The String.substring(int) method can be replaced with the subscript operator

Package: grails-plugin-tomcat.src.main.groovy.org.grails.plugins.tomcat

➥ InlineExplodedTomcatServer.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock255

[SRC]} catch (e) {

[MSG]The catch block is empty

MisorderedStaticImports325

[SRC]import static grails.build.logging.GrailsConsole.instance as CONSOLE

[MSG]Static imports should appear before normal imports

UnnecessaryGetter373

[SRC]def pluginManager = PluginManagerHolder.getPluginManager()

[MSG]Violation in class org.grails.plugins.tomcat.InlineExplodedTomcatServer. getPluginManager() can probably be rewritten as pluginManager

UnnecessaryObjectReferences3120

[SRC]sslConnector.setAttribute("keystorePass", keyPassword)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3121

[SRC]sslConnector.URIEncoding = 'UTF-8'

[MSG]The code could be more concise by using a with() or identity() block

➥ IsolatedWarTomcatServer.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock295

[SRC]try { err = errFile.text } catch (IOException e) {}

[MSG]The catch block is empty

EmptyCatchBlock2126

[SRC]} catch(e) {

[MSG]The catch block is empty

UnnecessaryGetter375

[SRC]for (entry in getConfigParams()) {

[MSG]Violation in class org.grails.plugins.tomcat.IsolatedWarTomcatServer. getConfigParams() can probably be rewritten as configParams

➥ TomcatLoader.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod252

[SRC]void addPropertyChangeListener(PropertyChangeListener listener) {}

[MSG]Violation in class TomcatLoader. The method addPropertyChangeListener is both empty and not marked with @Override

UnusedMethodParameter252

[SRC]void addPropertyChangeListener(PropertyChangeListener listener) {}

[MSG]Violation in class TomcatLoader. Method parameter [listener] is never referenced in the method addPropertyChangeListener of class org.grails.plugins.tomcat.TomcatLoader

EmptyMethod258

[SRC]void backgroundProcess() {}

[MSG]Violation in class TomcatLoader. The method backgroundProcess is both empty and not marked with @Override

EmptyMethod268

[SRC]void removePropertyChangeListener(PropertyChangeListener listener) {}

[MSG]Violation in class TomcatLoader. The method removePropertyChangeListener is both empty and not marked with @Override

UnusedMethodParameter268

[SRC]void removePropertyChangeListener(PropertyChangeListener listener) {}

[MSG]Violation in class TomcatLoader. Method parameter [listener] is never referenced in the method removePropertyChangeListener of class org.grails.plugins.tomcat.TomcatLoader

UnnecessaryGetter382

[SRC]log.info("Dual registration of jndi stream handler: " + ..etMessage())

[MSG]Violation in class org.grails.plugins.tomcat.TomcatLoader. getMessage() can probably be rewritten as message

UnnecessaryGetter386

[SRC]DirContextURLStreamHandler.bind(classLoader, container.getResources())

[MSG]Violation in class org.grails.plugins.tomcat.TomcatLoader. getResources() can probably be rewritten as resources

➥ TomcatServer.groovy

Rule NamePriorityLine #Source Line / Message
ClassForName2161

[SRC]Class.forName('sun.security.tools.KeyTool')

[MSG]Violation in class org.grails.plugins.tomcat.TomcatServer. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...)

ClassForName2164

[SRC]Class.forName('com.ibm.crypto.tools.KeyTool')

[MSG]Violation in class org.grails.plugins.tomcat.TomcatServer. Methods calls to Class.forName(...) can create resource leaks and should almost always be replaced with calls to ClassLoader.loadClass(...)

MisorderedStaticImports323

[SRC]import static grails.build.logging.GrailsConsole.instance as CONSOLE

[MSG]Static imports should appear before normal imports

UnnecessaryGetter350

[SRC]buildSettings = BuildSettingsHolder.getSettings()

[MSG]Violation in class org.grails.plugins.tomcat.TomcatServer. getSettings() can probably be rewritten as settings

UnnecessaryGetter351

[SRC]pluginSettings = GrailsPluginUtils.getPluginBuildSettings()

[MSG]Violation in class org.grails.plugins.tomcat.TomcatServer. getPluginBuildSettings() can probably be rewritten as pluginBuildSettings

UnnecessaryGetter3145

[SRC]getKeyToolClass().main(

[MSG]Violation in class org.grails.plugins.tomcat.TomcatServer. getKeyToolClass() can probably be rewritten as keyToolClass

Package: grails-plugin-url-mappings.src.main.groovy.grails.test

➥ GrailsUrlMappingsTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod256

[SRC]def createMappingsHolder() {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method createMappingsHolder is public but not a test method

JUnitPublicNonTestMethod263

[SRC]def createControllerMap() {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method createControllerMap is public but not a test method

JUnitPublicNonTestMethod271

[SRC]def getUrlMappingEvaluatees() {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method getUrlMappingEvaluatees is public but not a test method

JUnitSetUpCallsSuper284

[SRC]void setUp() {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper291

[SRC]void tearDown() {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method tearDown() does not call super.tearDown()

JUnitPublicNonTestMethod295

[SRC]def getActions(controller) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method getActions is public but not a test method

JUnitPublicNonTestMethod2104

[SRC]def getDefaultAction(controllerName) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method getDefaultAction is public but not a test method

JUnitPublicNonTestMethod2109

[SRC]def assertController(controller, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertController is public but not a test method

JUnitPublicNonTestMethod2115

[SRC]def assertAction(controller, action, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertAction is public but not a test method

JUnitPublicNonTestMethod2121

[SRC]def assertView(controller, view, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertView is public but not a test method

JUnitPublicNonTestMethod2129

[SRC]void assertUrlMapping(assertions, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertUrlMapping is public but not a test method

JUnitPublicNonTestMethod2133

[SRC]void assertUrlMapping(assertions, url, paramAssertions) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertUrlMapping is public but not a test method

JUnitPublicNonTestMethod2140

[SRC]void assertForwardUrlMapping(assertions, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertForwardUrlMapping is public but not a test method

JUnitPublicNonTestMethod2144

[SRC]void assertForwardUrlMapping(assertions, url, paramAssertions) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertForwardUrlMapping is public but not a test method

CyclomaticComplexity2144

[SRC]void assertForwardUrlMapping(assertions, url, paramAssertions) {

[MSG]Violation in class grails.test.GrailsUrlMappingsTestCase. The cyclomatic complexity for method [assertForwardUrlMapping] is [21]

JUnitPublicNonTestMethod2202

[SRC]void assertReverseUrlMapping(assertions, url) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertReverseUrlMapping is public but not a test method

JUnitPublicNonTestMethod2206

[SRC]void assertReverseUrlMapping(assertions, url, paramAssertions) {

[MSG]Violation in class GrailsUrlMappingsTestCase. The method assertReverseUrlMapping is public but not a test method

UnusedImport318

[SRC]import grails.util.GrailsWebUtil

[MSG]The [grails.util.GrailsWebUtil] import is never referenced

UnusedImport320

[SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsApplication

[MSG]The [org.codehaus.groovy.grails.commons.DefaultGrailsApplication] import is never referenced

UnusedImport321

[SRC]import org.codehaus.groovy.grails.commons.GrailsApplication

[MSG]The [org.codehaus.groovy.grails.commons.GrailsApplication] import is never referenced

UnusedImport324

[SRC]import org.codehaus.groovy.grails.plugins.web.mapping.Ur..GrailsPlugin

[MSG]The [org.codehaus.groovy.grails.plugins.web.mapping.UrlMappingsGrailsPlugin] import is never referenced

UnusedImport325

[SRC]import org.codehaus.groovy.grails.support.MockApplicationContext

[MSG]The [org.codehaus.groovy.grails.support.MockApplicationContext] import is never referenced

UnusedImport328

[SRC]import org.codehaus.groovy.grails.web.multipart.ContentL..partResolver

[MSG]The [org.codehaus.groovy.grails.web.multipart.ContentLengthAwareCommonsMultipartResolver] import is never referenced

UnusedImport330

[SRC]import org.springframework.web.context.WebApplicationContext

[MSG]The [org.springframework.web.context.WebApplicationContext] import is never referenced

UnusedImport332

[SRC]import org.springframework.web.servlet.DispatcherServlet

[MSG]The [org.springframework.web.servlet.DispatcherServlet] import is never referenced

UnusedImport334

[SRC]import org.springframework.web.context.ServletContextAware

[MSG]The [org.springframework.web.context.ServletContextAware] import is never referenced

UnusedImport335

[SRC]import javax.servlet.ServletContext

[MSG]The [javax.servlet.ServletContext] import is never referenced

DuplicateImport336

[SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils

UnnecessarySubstring3176

[SRC]if (actual[0] == "/") actual = actual.substring(1)

[MSG]Violation in class grails.test.GrailsUrlMappingsTestCase. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring3177

[SRC]if (expected[0] == "/") expected = expected.substring(1)

[MSG]Violation in class grails.test.GrailsUrlMappingsTestCase. The String.substring(int) method can be replaced with the subscript operator

Package: grails-plugin-url-mappings.src.main.groovy.org.codehaus.groovy.grails.plugins.web.mapping

➥ UrlMappingsGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethodParameter2161

[SRC]private UrlMappingsHolder createUrlMappingsHolder(Grails..inManager) {

[MSG]Violation in class UrlMappingsGrailsPlugin. Method parameter [application] is never referenced in the method createUrlMappingsHolder of class org.codehaus.groovy.grails.plugins.web.mapping.UrlMappingsGrailsPlugin

UnusedPrivateMethodParameter2161

[SRC]private UrlMappingsHolder createUrlMappingsHolder(Grails..inManager) {

[MSG]Violation in class UrlMappingsGrailsPlugin. Method parameter [pluginManager] is never referenced in the method createUrlMappingsHolder of class org.codehaus.groovy.grails.plugins.web.mapping.UrlMappingsGrailsPlugin

UnnecessaryGetter347

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.mapping.UrlMappingsGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryPackageReference363

[SRC]urlMappingsTargetSource(org.springframework.aop.target.H..)) { bean ->

[MSG]The org.springframework.aop.target.HotSwappableTargetSource class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference363

[SRC]urlMappingsTargetSource(org.springframework.aop.target.H..)) { bean ->

[MSG]The org.springframework.aop.target.HotSwappableTargetSource class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference369

[SRC]proxyInterfaces = [org.codehaus.groovy.grails.web.mappin..pingsHolder]

[MSG]The org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference369

[SRC]proxyInterfaces = [org.codehaus.groovy.grails.web.mappin..pingsHolder]

[MSG]The org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder class was explicitly imported, so specifying the package name is not necessary

UnnecessaryCallForLastElement375

[SRC]def lastFilter = filters[filters.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1]

UnnecessaryCallForLastElement375

[SRC]def lastFilter = filters[filters.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filters.last() or filters[-1]

UnnecessaryCallForLastElement385

[SRC]def lastServlet = servlets[servlets.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to servlets.last() or servlets[-1]

UnnecessaryCallForLastElement385

[SRC]def lastServlet = servlets[servlets.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to servlets.last() or servlets[-1]

UnnecessaryCallForLastElement395

[SRC]def lastMapping = servletMappings[servletMappings.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to servletMappings.last() or servletMappings[-1]

UnnecessaryCallForLastElement395

[SRC]def lastMapping = servletMappings[servletMappings.size()-1]

[MSG]Unnecessarily complex access of last element. This can be simplified to servletMappings.last() or servletMappings[-1]

UnnecessaryCallForLastElement3124

[SRC]welcomeFileList = welcomeFileList[welcomeFileList.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to welcomeFileList.last() or welcomeFileList[-1]

UnnecessaryCallForLastElement3124

[SRC]welcomeFileList = welcomeFileList[welcomeFileList.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to welcomeFileList.last() or welcomeFileList[-1]

UnnecessaryCallForLastElement3132

[SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1]

UnnecessaryCallForLastElement3132

[SRC]def lastFilterMapping = filterMappings[filterMappings.size() - 1]

[MSG]Unnecessarily complex access of last element. This can be simplified to filterMappings.last() or filterMappings[-1]

UnnecessaryGetter3166

[SRC]final urlMappingsHolder = factory.getObject()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.mapping.UrlMappingsGrailsPlugin. getObject() can probably be rewritten as object

Package: grails-plugin-validation.src.main.groovy.org.codehaus.groovy.grails.plugins

➥ ValidationGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethodParameter255

[SRC]private static addValidationMethods(application, validat..lass, ctx) {

[MSG]Violation in class ValidationGrailsPlugin. Method parameter [ctx] is never referenced in the method addValidationMethods of class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin

UnusedImport326

[SRC]import org.springframework.core.type.filter.AnnotationTypeFilter

[MSG]The [org.springframework.core.type.filter.AnnotationTypeFilter] import is never referenced

UnnecessaryGetter333

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryGetter364

[SRC]def attributes = rch.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter371

[SRC]def attributes = rch.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter390

[SRC]errors = new BeanPropertyBindingResult(delegate, delegat..).getName())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin. getName() can probably be rewritten as name

UnnecessaryGetter3100

[SRC]delegate.setErrors(new BeanPropertyBindingResult(delegat...getName()))

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin. getName() can probably be rewritten as name

Package: grails-plugin-validation.src.test.groovy.org.codehaus.groovy.grails.plugins

➥ ValidationGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin

UnnecessaryGetter312

[SRC]def registry = GroovySystem.getMetaClassRegistry()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.ValidationGrailsPluginTests. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

Package: grails-spring.src.main.groovy.grails.spring

➥ DynamicElementReader.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod275

[SRC]protected void afterInvocation() {

[MSG]Violation in class DynamicElementReader. The method afterInvocation is both empty and not marked with @Override

UnnecessaryGetter353

[SRC]EntityResolver entityResolver = new DelegatingEntityReso..assLoader())

[MSG]Violation in class grails.spring.DynamicElementReader. getClassLoader() can probably be rewritten as classLoader

UnnecessaryDotClass353

[SRC]EntityResolver entityResolver = new DelegatingEntityReso..assLoader())

[MSG]DynamicElementReader.class can be rewritten as DynamicElementReader

UnnecessaryGetter3121

[SRC]Element element = documentLoader.loadDocument(is, entity..entElement()

[MSG]Violation in class grails.spring.DynamicElementReader. getDocumentElement() can probably be rewritten as documentElement

UnnecessaryGetter3126

[SRC]BeanDefinitionHolder holder = new BeanDefinitionHolder(b..n.getName())

[MSG]Violation in class grails.spring.DynamicElementReader. getBeanDefinition() can probably be rewritten as beanDefinition

UnnecessaryGetter3126

[SRC]BeanDefinitionHolder holder = new BeanDefinitionHolder(b..n.getName())

[MSG]Violation in class grails.spring.DynamicElementReader. getName() can probably be rewritten as name

UnnecessaryGetter3128

[SRC]beanConfiguration.setBeanDefinition(holder.getBeanDefinition())

[MSG]Violation in class grails.spring.DynamicElementReader. getBeanDefinition() can probably be rewritten as beanDefinition

Package: grails-test-suite-base.src.main.groovy.org.codehaus.groovy.grails.plugins.web

➥ AbstractGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper282

[SRC]protected final void tearDown() {

[MSG]Violation in class AbstractGrailsPluginTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter350

[SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(),gcl)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.AbstractGrailsPluginTests. getLoadedClasses() can probably be rewritten as loadedClasses

UnnecessaryGetter375

[SRC]appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.AbstractGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-test-suite-base.src.main.groovy.org.codehaus.groovy.grails.web.servlet.mvc

➥ AbstractGrailsControllerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2150

[SRC]def withConfig(String text, Closure callable) {

[MSG]Violation in class AbstractGrailsControllerTests. The method withConfig is public but not a test method

JUnitPublicNonTestMethod2162

[SRC]GrailsWebRequest buildMockRequest(ConfigObject config) t.. Exception {

[MSG]Violation in class AbstractGrailsControllerTests. The method buildMockRequest is public but not a test method

JUnitPublicNonTestMethod2174

[SRC]void runTest(Closure callable) {

[MSG]Violation in class AbstractGrailsControllerTests. The method runTest is public but not a test method

UnnecessaryGetter376

[SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl)

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests. getLoadedClasses() can probably be rewritten as loadedClasses

UnnecessaryGetter3112

[SRC]servletContext = ctx.getServletContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter3119

[SRC]appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter3169

[SRC]appCtx.getServletContext().setAttribute(GrailsApplicatio..EXT, appCtx)

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter3170

[SRC]appCtx.getServletContext().setAttribute(WebApplicationCo..UTE, appCtx)

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests. getServletContext() can probably be rewritten as servletContext

Package: grails-test-suite-base.src.main.groovy.org.codehaus.groovy.grails.web.taglib

➥ AbstractGrailsTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod268

[SRC]def withConfig(String text, Closure callable) {

[MSG]Violation in class AbstractGrailsTagTests. The method withConfig is public but not a test method

JUnitPublicNonTestMethod280

[SRC]GrailsWebRequest buildMockRequest(ConfigObject config) t.. Exception {

[MSG]Violation in class AbstractGrailsTagTests. The method buildMockRequest is public but not a test method

JUnitPublicNonTestMethod289

[SRC]def profile(String name, Closure callable) {

[MSG]Violation in class AbstractGrailsTagTests. The method profile is public but not a test method

JUnitPublicNonTestMethod299

[SRC]def withTag(String tagName, Writer out, Closure callable) {

[MSG]Violation in class AbstractGrailsTagTests. The method withTag is public but not a test method

UnusedVariable2122

[SRC]GroovyPageOutputStack stack=GroovyPageOutputStack.createNew(out)

[MSG]The variable [stack] in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests is not used

JUnitSetUpCallsSuper2150

[SRC]protected void setUp() throws Exception {

[MSG]Violation in class AbstractGrailsTagTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper2240

[SRC]protected void tearDown() {

[MSG]Violation in class AbstractGrailsTagTests. The method tearDown() does not call super.tearDown()

JUnitPublicNonTestMethod2265

[SRC]void runTest(Closure callable) {

[MSG]Violation in class AbstractGrailsTagTests. The method runTest is public but not a test method

JUnitPublicNonTestMethod2269

[SRC]void printCompiledSource(template, params = [:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method printCompiledSource is public but not a test method

JUnitPublicNonTestMethod2275

[SRC]def getCompiledSource(template, params = [:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method getCompiledSource is public but not a test method

UnusedVariable2289

[SRC]String text = sw.toString()

[MSG]The variable [text] in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests is not used

JUnitPublicNonTestMethod2292

[SRC]def assertCompiledSourceContains(expected, template, params = [:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method assertCompiledSourceContains is public but not a test method

JUnitPublicNonTestMethod2297

[SRC]void assertOutputContains(expected, template, params = [:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method assertOutputContains is public but not a test method

JUnitPublicNonTestMethod2302

[SRC]void assertOutputNotContains(expected, template, params = [:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method assertOutputNotContains is public but not a test method

JUnitPublicNonTestMethod2320

[SRC]void assertOutputEquals(expected, template, params = [:]..tring() }) {

[MSG]Violation in class AbstractGrailsTagTests. The method assertOutputEquals is public but not a test method

JUnitPublicNonTestMethod2356

[SRC]def applyTemplate(template, params = [:], target = null,..me = null) {

[MSG]Violation in class AbstractGrailsTagTests. The method applyTemplate is public but not a test method

JUnitPublicNonTestMethod2381

[SRC]String sitemeshPreprocess(String template) {

[MSG]Violation in class AbstractGrailsTagTests. The method sitemeshPreprocess is public but not a test method

JUnitPublicNonTestMethod2386

[SRC]String applyLayout(String layout, String template, Map params=[:]) {

[MSG]Violation in class AbstractGrailsTagTests. The method applyLayout is public but not a test method

UnnecessaryGetter385

[SRC]initThemeSource(request.getCurrentRequest(), messageSource)

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter3204

[SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests. getRequest() can probably be rewritten as request

UnnecessaryGetter3215

[SRC]appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryDefInMethodDeclaration3235

[SRC]private def initThemeSource(request, StaticMessageSource..ageSource) {

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests. The def keyword is unneeded when a method is marked private

UnnecessaryDefInMethodDeclaration3343

[SRC]protected def assertTemplateOutputEquals(expected, Groov..tring() }) {

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.AbstractGrailsTagTests. The def keyword is unneeded when a method is marked protected

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate

➥ AbstractGrailsHibernateTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2121

[SRC]void onApplicationCreated() {}

[MSG]Violation in class AbstractGrailsHibernateTests. The method onApplicationCreated is public but not a test method

JUnitPublicNonTestMethod2137

[SRC]GrailsWebRequest buildMockRequest(ConfigObject config = .. Exception {

[MSG]Violation in class AbstractGrailsHibernateTests. The method buildMockRequest is public but not a test method

EmptyCatchBlock2158

[SRC]catch(e) {

[MSG]The catch block is empty

EmptyCatchBlock2165

[SRC]catch(e) {

[MSG]The catch block is empty

UnnecessaryGetter372

[SRC]ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateTests. getLoadedClasses() can probably be rewritten as loadedClasses

UnnecessaryGetter386

[SRC]ga.setMainContext(springConfig.getUnrefreshedApplicationContext())

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateTests. getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext

UnnecessaryGetter387

[SRC]appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter3162

[SRC]getClass().classLoader.loadClass("net.sf.ehcache.CacheManager")

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateTests. getInstance() can probably be rewritten as instance

UnnecessaryGetter3198

[SRC]GroovySystem.getMetaClassRegistry().removeMetaClass meta..tyMode.POJO)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateTests. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

➥ AbstractInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable283

[SRC]def Abstract = ga.getDomainClass("AbstractInheritanceAbs..Base").clazz

[MSG]The variable [Abstract] in class org.codehaus.groovy.grails.orm.hibernate.AbstractInheritanceTests is not used

UnusedVariable2104

[SRC]def Comment = ga.getDomainClass("AbstractInheritanceComment").clazz

[MSG]The variable [Comment] in class org.codehaus.groovy.grails.orm.hibernate.AbstractInheritanceTests is not used

➥ AllDeleteOrphanMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert236

[SRC]void testDeleteOrphanMapping() {

[MSG]Violation in class AllDeleteOrphanMappingTests. Test method 'testDeleteOrphanMapping' makes no assertions

➥ AssertionFailureInEventTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert216

[SRC]void testNoAssertionErrorInEvent() {

[MSG]Violation in class AssertionFailureInEventTests. Test method 'testNoAssertionErrorInEvent' makes no assertions

➥ AutoImportPackedDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertEqualsInsteadOfAssertTrue327

[SRC]assertTrue models.size() == 1

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AutoImportPackedDomainTests. Replace assertTrue with a call to assertEquals()

UseAssertEqualsInsteadOfAssertTrue330

[SRC]assertTrue models.size() == 1

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AutoImportPackedDomainTests. Replace assertTrue with a call to assertEquals()

UseAssertEqualsInsteadOfAssertTrue333

[SRC]assertTrue models.size() == 1

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.AutoImportPackedDomainTests. Replace assertTrue with a call to assertEquals()

➥ BidirectionalHasOneMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert227

[SRC]void testRefreshHasOneAssociation() {

[MSG]Violation in class BidirectionalHasOneMappingTests. Test method 'testRefreshHasOneAssociation' makes no assertions

➥ BidirectionalListMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper222

[SRC]protected void setUp() {

[MSG]Violation in class BidirectionalListMappingTests. The method setUp() does not call super.setUp()

UnusedVariable259

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

[MSG]The variable [faqSection] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

UnusedVariable297

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

[MSG]The variable [faqSection] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

UnusedVariable2147

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

[MSG]The variable [faqSection] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

UnusedVariable2169

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

[MSG]The variable [faqSection] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

UnusedVariable2188

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

[MSG]The variable [faqSection] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

UnusedVariable2276

[SRC]SimpleValue indexColumnValue = indexColumn.getValue()

[MSG]The variable [indexColumnValue] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests is not used

JUnitUnnecessaryTearDown354

[SRC]protected void tearDown() {

[MSG]Violation in class BidirectionalListMappingTests. The tearDown() method contains no logic and can be removed

UnnecessaryOverridingMethod354

[SRC]protected void tearDown() {

[MSG]Violation in class BidirectionalListMappingTests. The method tearDown contains no logic and can be safely deleted

UnnecessaryGetter374

[SRC]assertNull elementsIndexBackref.getCascade()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascade() can probably be rewritten as cascade

UnnecessaryGetter375

[SRC]assertEquals CascadeStyle.NONE, elementsIndexBackref.getCascadeStyle()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascadeStyle() can probably be rewritten as cascadeStyle

UnnecessaryGetter376

[SRC]assertEquals "TestFaqSection.elements", elementsIndexBa..ectionRole()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCollectionRole() can probably be rewritten as collectionRole

UnnecessaryGetter377

[SRC]assertEquals 1, elementsIndexBackref.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter378

[SRC]assertEquals "TestFaqSection", elementsIndexBackref.getEntityName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getEntityName() can probably be rewritten as entityName

UnnecessaryGetter379

[SRC]assertEquals PropertyGeneration.NEVER, elementsIndexBack..Generation()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getGeneration() can probably be rewritten as generation

UnnecessaryGetter380

[SRC]assertEquals "_elementsIndexBackref", elementsIndexBackref.getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getName() can probably be rewritten as name

UnnecessaryGetter381

[SRC]assertNull elementsIndexBackref.getNodeName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNodeName() can probably be rewritten as nodeName

UnnecessaryGetter382

[SRC]assertNull elementsIndexBackref.getPropertyAccessorName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getPropertyAccessorName() can probably be rewritten as propertyAccessorName

UnnecessaryGetter383

[SRC]assertEquals IntegerType, elementsIndexBackref.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter384

[SRC]assertEquals SimpleValue, elementsIndexBackref.getValue().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter386

[SRC]SimpleValue value = elementsIndexBackref.getValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter3112

[SRC]assertNull elementsBackref.getCascade()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascade() can probably be rewritten as cascade

UnnecessaryGetter3113

[SRC]assertEquals CascadeStyle.NONE, elementsBackref.getCascadeStyle()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascadeStyle() can probably be rewritten as cascadeStyle

UnnecessaryGetter3114

[SRC]assertEquals "TestFaqSection.elements", elementsBackref...ectionRole()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCollectionRole() can probably be rewritten as collectionRole

UnnecessaryGetter3115

[SRC]assertEquals 1, elementsBackref.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3116

[SRC]assertEquals "TestFaqSection", elementsBackref.getEntityName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getEntityName() can probably be rewritten as entityName

UnnecessaryGetter3117

[SRC]assertEquals PropertyGeneration.NEVER, elementsBackref.getGeneration()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getGeneration() can probably be rewritten as generation

UnnecessaryGetter3118

[SRC]assertEquals "_TestFaqSection_elementsBackref", elements..ef.getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getName() can probably be rewritten as name

UnnecessaryGetter3119

[SRC]assertNull elementsBackref.getNodeName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNodeName() can probably be rewritten as nodeName

UnnecessaryGetter3120

[SRC]assertEquals "TestFaqElement", elementsBackref.getPersis..tClassName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getClassName() can probably be rewritten as className

UnnecessaryGetter3120

[SRC]assertEquals "TestFaqElement", elementsBackref.getPersis..tClassName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getPersistentClass() can probably be rewritten as persistentClass

UnnecessaryGetter3121

[SRC]assertNull elementsBackref.getPropertyAccessorName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getPropertyAccessorName() can probably be rewritten as propertyAccessorName

UnnecessaryGetter3122

[SRC]assertEquals LongType, elementsBackref.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter3123

[SRC]assertEquals DependantValue, elementsBackref.getValue().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter3125

[SRC]DependantValue value = elementsBackref.getValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter3133

[SRC]assertEquals 1,value.getColumnInsertability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3134

[SRC]assertTrue value.getColumnInsertability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3135

[SRC]assertEquals 1,value.getColumnUpdateability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3136

[SRC]assertTrue value.getColumnUpdateability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3138

[SRC]assertEquals 1, value.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3139

[SRC]assertEquals FetchMode.SELECT, value.getFetchMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3140

[SRC]assertNull value.getForeignKeyName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getForeignKeyName() can probably be rewritten as foreignKeyName

UnnecessaryGetter3141

[SRC]assertEquals "assigned", value.getIdentifierGeneratorStrategy()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy

UnnecessaryGetter3142

[SRC]assertNull value.getNullValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNullValue() can probably be rewritten as nullValue

UnnecessaryGetter3143

[SRC]assertEquals LongType, value.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter3161

[SRC]assertEquals "none", section.getCascade()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascade() can probably be rewritten as cascade

UnnecessaryGetter3162

[SRC]assertEquals CascadeStyle.NONE, section.getCascadeStyle()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCascadeStyle() can probably be rewritten as cascadeStyle

UnnecessaryGetter3163

[SRC]assertEquals 1, section.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3164

[SRC]assertEquals PropertyGeneration.NEVER, section.getGeneration()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getGeneration() can probably be rewritten as generation

UnnecessaryGetter3165

[SRC]assertEquals "section", section.getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getName() can probably be rewritten as name

UnnecessaryGetter3172

[SRC]Column sectionColumn = section.getColumnIterator().next()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnIterator() can probably be rewritten as columnIterator

UnnecessaryGetter3174

[SRC]assertEquals "section_id", sectionColumn.getCanonicalName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCanonicalName() can probably be rewritten as canonicalName

UnnecessaryGetter3175

[SRC]assertNull sectionColumn.getCheckConstraint()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCheckConstraint() can probably be rewritten as checkConstraint

UnnecessaryGetter3176

[SRC]assertNull sectionColumn.getComment()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getComment() can probably be rewritten as comment

UnnecessaryGetter3177

[SRC]assertNull sectionColumn.getDefaultValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getDefaultValue() can probably be rewritten as defaultValue

UnnecessaryGetter3178

[SRC]assertEquals 255, sectionColumn.getLength()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getLength() can probably be rewritten as length

UnnecessaryGetter3179

[SRC]assertEquals "section_id", sectionColumn.getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getName() can probably be rewritten as name

UnnecessaryGetter3180

[SRC]assertEquals 19, sectionColumn.getPrecision()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getPrecision() can probably be rewritten as precision

UnnecessaryGetter3181

[SRC]assertEquals "section_id", sectionColumn.getQuotedName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getQuotedName() can probably be rewritten as quotedName

UnnecessaryGetter3182

[SRC]assertEquals 2, sectionColumn.getScale()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getScale() can probably be rewritten as scale

UnnecessaryGetter3183

[SRC]assertEquals "section_id", sectionColumn.getText()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getText() can probably be rewritten as text

UnnecessaryGetter3184

[SRC]assertEquals 0, sectionColumn.getTypeIndex()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getTypeIndex() can probably be rewritten as typeIndex

UnnecessaryGetter3192

[SRC]ManyToOne manyToOne = section.getValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter3193

[SRC]assertEquals 1,manyToOne.getColumnInsertability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3194

[SRC]assertTrue manyToOne.getColumnInsertability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3195

[SRC]assertEquals 1,manyToOne.getColumnUpdateability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3196

[SRC]assertTrue manyToOne.getColumnUpdateability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3208

[SRC]assertEquals 1, manyToOne.getConstraintColumns().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getConstraintColumns() can probably be rewritten as constraintColumns

UnnecessaryGetter3209

[SRC]assertEquals FetchMode.DEFAULT, manyToOne.getFetchMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3210

[SRC]assertNull manyToOne.getForeignKeyName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getForeignKeyName() can probably be rewritten as foreignKeyName

UnnecessaryGetter3211

[SRC]assertEquals "assigned", manyToOne.getIdentifierGeneratorStrategy()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy

UnnecessaryGetter3212

[SRC]assertNull manyToOne.getNullValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNullValue() can probably be rewritten as nullValue

UnnecessaryGetter3213

[SRC]assertEquals "TestFaqSection", manyToOne.getReferencedEntityName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getReferencedEntityName() can probably be rewritten as referencedEntityName

UnnecessaryGetter3214

[SRC]assertNull manyToOne.getReferencedPropertyName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getReferencedPropertyName() can probably be rewritten as referencedPropertyName

UnnecessaryGetter3215

[SRC]assertEquals ManyToOneType, manyToOne.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter3216

[SRC]assertEquals "TestFaqSection", manyToOne.getTypeName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getTypeName() can probably be rewritten as typeName

UnnecessaryGetter3246

[SRC]assertEquals 0,list.getBaseIndex()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getBaseIndex() can probably be rewritten as baseIndex

UnnecessaryGetter3248

[SRC]Table t = list.getCollectionTable()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCollectionTable() can probably be rewritten as collectionTable

UnnecessaryGetter3250

[SRC]assertEquals 0, list.getColumnInsertability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3251

[SRC]assertNull list.getCacheConcurrencyStrategy()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCacheConcurrencyStrategy() can probably be rewritten as cacheConcurrencyStrategy

UnnecessaryGetter3252

[SRC]assertEquals "TestFaqSection.elements", list.getCacheRegionName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCacheRegionName() can probably be rewritten as cacheRegionName

UnnecessaryGetter3253

[SRC]assertEquals 0,list.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3254

[SRC]assertEquals 0, list.getColumnUpdateability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3255

[SRC]assertNull list.getElementNodeName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getElementNodeName() can probably be rewritten as elementNodeName

UnnecessaryGetter3256

[SRC]SimpleValue index = list.getIndex()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getIndex() can probably be rewritten as index

UnnecessaryGetter3258

[SRC]assertEquals 1,index.getColumnInsertability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3259

[SRC]assertTrue index.getColumnInsertability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3260

[SRC]assertEquals 1,index.getColumnUpdateability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3261

[SRC]assertTrue index.getColumnUpdateability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3263

[SRC]assertEquals 1, index.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3265

[SRC]Column indexColumn = index.getColumnIterator().next()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnIterator() can probably be rewritten as columnIterator

UnnecessaryGetter3266

[SRC]assertEquals "elements_idx", indexColumn.getCanonicalName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCanonicalName() can probably be rewritten as canonicalName

UnnecessaryGetter3267

[SRC]assertNull indexColumn.getCheckConstraint()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getCheckConstraint() can probably be rewritten as checkConstraint

UnnecessaryGetter3268

[SRC]assertNull indexColumn.getComment()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getComment() can probably be rewritten as comment

UnnecessaryGetter3269

[SRC]assertNull indexColumn.getDefaultValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getDefaultValue() can probably be rewritten as defaultValue

UnnecessaryGetter3270

[SRC]assertEquals 255, indexColumn.getLength()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getLength() can probably be rewritten as length

UnnecessaryGetter3271

[SRC]assertEquals "elements_idx", indexColumn.getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getName() can probably be rewritten as name

UnnecessaryGetter3272

[SRC]assertEquals 19, indexColumn.getPrecision()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getPrecision() can probably be rewritten as precision

UnnecessaryGetter3273

[SRC]assertEquals "elements_idx", indexColumn.getQuotedName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getQuotedName() can probably be rewritten as quotedName

UnnecessaryGetter3274

[SRC]assertEquals 2, indexColumn.getScale()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getScale() can probably be rewritten as scale

UnnecessaryGetter3275

[SRC]assertEquals "elements_idx", indexColumn.getText()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getText() can probably be rewritten as text

UnnecessaryGetter3276

[SRC]SimpleValue indexColumnValue = indexColumn.getValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getValue() can probably be rewritten as value

UnnecessaryGetter3278

[SRC]assertEquals FetchMode.SELECT, index.getFetchMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3279

[SRC]assertNull index.getForeignKeyName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getForeignKeyName() can probably be rewritten as foreignKeyName

UnnecessaryGetter3280

[SRC]assertEquals "assigned", index.getIdentifierGeneratorStrategy()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getIdentifierGeneratorStrategy() can probably be rewritten as identifierGeneratorStrategy

UnnecessaryGetter3281

[SRC]assertNull index.getNullValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNullValue() can probably be rewritten as nullValue

UnnecessaryGetter3282

[SRC]assertEquals IntegerType, index.getType()?.getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter3283

[SRC]assertEquals "integer", index.getTypeName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getTypeName() can probably be rewritten as typeName

UnnecessaryGetter3284

[SRC]assertNull index.getTypeParameters()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getTypeParameters() can probably be rewritten as typeParameters

UnnecessaryGetter3286

[SRC]KeyValue key = list.getKey()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getKey() can probably be rewritten as key

UnnecessaryGetter3288

[SRC]assertEquals 1,key.getColumnInsertability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3289

[SRC]assertTrue key.getColumnInsertability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnInsertability() can probably be rewritten as columnInsertability

UnnecessaryGetter3290

[SRC]assertEquals 1,key.getColumnUpdateability().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3291

[SRC]assertTrue key.getColumnUpdateability()[0]

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnUpdateability() can probably be rewritten as columnUpdateability

UnnecessaryGetter3293

[SRC]assertEquals 1, key.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3294

[SRC]assertEquals FetchMode.SELECT, key.getFetchMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3295

[SRC]assertNull key.getNullValue()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getNullValue() can probably be rewritten as nullValue

UnnecessaryGetter3296

[SRC]assertEquals LongType, key.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

UnnecessaryGetter3298

[SRC]OneToMany element = list.getElement()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getElement() can probably be rewritten as element

UnnecessaryGetter3300

[SRC]assertEquals 1, element.getColumnSpan()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getColumnSpan() can probably be rewritten as columnSpan

UnnecessaryGetter3301

[SRC]assertEquals FetchMode.JOIN, element.getFetchMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3302

[SRC]PersistentClass associatedClass = element.getAssociatedClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getAssociatedClass() can probably be rewritten as associatedClass

UnnecessaryGetter3303

[SRC]assertEquals "TestFaqElement", associatedClass.getClassName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getClassName() can probably be rewritten as className

UnnecessaryGetter3304

[SRC]assertEquals ManyToOneType, element.getType().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests. getType() can probably be rewritten as type

➥ BidirectionalListPersistTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter346

[SRC]section = session.get(sectionClass.getClazz(),1L)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalListPersistTests. getClazz() can probably be rewritten as clazz

➥ BidirectionalOneToManyAndCircularOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter367

[SRC]assertEquals uploadsProperty.getOtherSide(), recipientProperty

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOneToManyAndCircularOneToManyTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter368

[SRC]assertEquals recipientProperty.getOtherSide(), uploadsProperty

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOneToManyAndCircularOneToManyTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter380

[SRC]assertEquals uploadLogsProperty.getOtherSide(), senderProperty

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOneToManyAndCircularOneToManyTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter381

[SRC]assertEquals senderProperty.getOtherSide(), uploadLogsProperty

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOneToManyAndCircularOneToManyTests. getOtherSide() can probably be rewritten as otherSide

➥ BidirectionalOneToManyAndOneToOneTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert230

[SRC]void testSaveAndLoad() {

[MSG]Violation in class BidirectionalOneToManyAndOneToOneTests. Test method 'testSaveAndLoad' makes no assertions

➥ BidirectionalOneToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable252

[SRC]def configItemClass = ga.getDomainClass("ConfigurationItem").clazz

[MSG]The variable [configItemClass] in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOneToManyWithInheritanceTests is not used

➥ BidirectionalOnetoManyWithInheritanceRelationshipManagementTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter344

[SRC]def otherSide = collection.getOtherSide()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.BidirectionalOnetoManyWithInheritanceRelationshipManagementTests. getOtherSide() can probably be rewritten as otherSide

➥ CascadingDeleteBehaviour2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod255

[SRC]void onSetUp() {

[MSG]Violation in class CascadingDeleteBehaviour2Tests. The method onSetUp is public but not a test method

➥ CascadingDeleteBehaviour3Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod237

[SRC]void onSetUp() {

[MSG]Violation in class CascadingDeleteBehaviour3Tests. The method onSetUp is public but not a test method

UnusedImport33

[SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass

[MSG]The [org.codehaus.groovy.grails.commons.GrailsDomainClass] import is never referenced

➥ CascadingDeleteBehaviourTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod285

[SRC]void onSetUp() {

[MSG]Violation in class CascadingDeleteBehaviourTests. The method onSetUp is public but not a test method

➥ CascadingSaveAndUniqueConstraintTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert231

[SRC]void testCascadingSaveAndUniqueConstraint() {

[MSG]Violation in class CascadingSaveAndUniqueConstraintTests. Test method 'testCascadingSaveAndUniqueConstraint' makes no assertions

UnusedVariable234

[SRC]def face = faceClass.newInstance(nose:noseClass.newInstance()).save()

[MSG]The variable [face] in class org.codehaus.groovy.grails.orm.hibernate.CascadingSaveAndUniqueConstraintTests is not used

➥ CircularRelationshipTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

[MSG]Violation in class CircularRelationshipTests. The method onSetUp is public but not a test method

➥ CircularUnidirectionalOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod233

[SRC]void onSetUp() {

[MSG]Violation in class CircularUnidirectionalOneToManyTests. The method onSetUp is public but not a test method

➥ ClassHeirarchyInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod232

[SRC]void onSetUp() {

[MSG]Violation in class ClassHeirarchyInheritanceTests. The method onSetUp is public but not a test method

➥ CreateCriteriaTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod258

[SRC]void onSetUp() {

[MSG]Violation in class CreateCriteriaTests. The method onSetUp is public but not a test method

➥ CreateMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod227

[SRC]void onSetUp() {

[MSG]Violation in class CreateMethodTests. The method onSetUp is public but not a test method

➥ CriteriaBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3135

[SRC]def criteriaInstance = getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.CriteriaBuilderTests. getInstance() can probably be rewritten as instance

UnnecessaryGetter3149

[SRC]def criteriaInstance = getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.CriteriaBuilderTests. getInstance() can probably be rewritten as instance

➥ CriteriaListDistinctTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable232

[SRC]def Plant = ga.getDomainClass("Plant").clazz

[MSG]The variable [Plant] in class org.codehaus.groovy.grails.orm.hibernate.CriteriaListDistinctTests is not used

UnusedVariable266

[SRC]def Plant = ga.getDomainClass("Plant").clazz

[MSG]The variable [Plant] in class org.codehaus.groovy.grails.orm.hibernate.CriteriaListDistinctTests is not used

➥ CustomCascadeMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable238

[SRC]def twoClass = ga.getDomainClass("CustomCascadeMappingTwo").clazz

[MSG]The variable [twoClass] in class org.codehaus.groovy.grails.orm.hibernate.CustomCascadeMappingTests is not used

➥ CyclicManyToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert247

[SRC]void testCyclicManyToManyWithInheritance() {

[MSG]Violation in class CyclicManyToManyWithInheritanceTests. Test method 'testCyclicManyToManyWithInheritance' makes no assertions

➥ DataBindingDynamicConstructorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]void onSetUp() {

[MSG]Violation in class DataBindingDynamicConstructorTests. The method onSetUp is public but not a test method

➥ DataSourceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter327

[SRC]sessionFactoryConnection = sessionFactoryConnection.getW..Connection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. getWrappedConnection() can probably be rewritten as wrappedConnection

UnnecessaryGetter330

[SRC]sessionFactoryConnection = sessionFactoryConnection.getT..Connection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. getTargetConnection() can probably be rewritten as targetConnection

UnnecessaryGetter336

[SRC]dataSourceConnection = dataSourceConnection.getTargetConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. getTargetConnection() can probably be rewritten as targetConnection

UnnecessaryGetter339

[SRC]dataSourceConnection = dataSourceConnection.getWrappedConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. getWrappedConnection() can probably be rewritten as wrappedConnection

UnnecessaryGetter342

[SRC]dataSourceConnection = dataSourceConnection.getTargetConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. getTargetConnection() can probably be rewritten as targetConnection

UseAssertSameInsteadOfAssertTrue348

[SRC]assertTrue sessionFactoryConnection.is(dataSourceConnection)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. assert method can be simplified using the assertSame method

UseAssertSameInsteadOfAssertTrue349

[SRC]assertFalse unproxiedConnection.is(dataSourceConnection)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DataSourceTests. assert method can be simplified using the assertSame method

➥ DeepHierarchyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod280

[SRC]void onSetUp() {

[MSG]Violation in class DeepHierarchyTests. The method onSetUp is public but not a test method

➥ DefaultSortOrderForCollectionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable230

[SRC]def Book = ga.getDomainClass("DefaultSortOrderForCollect..Book").clazz

[MSG]The variable [Book] in class org.codehaus.groovy.grails.orm.hibernate.DefaultSortOrderForCollectionTests is not used

➥ DeleteFromCollectionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable236

[SRC]def bookClass = ga.getDomainClass("DeleteBook").clazz

[MSG]The variable [bookClass] in class org.codehaus.groovy.grails.orm.hibernate.DeleteFromCollectionTests is not used

➥ DeleteMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod225

[SRC]void onSetUp() {

[MSG]Violation in class DeleteMethodTests. The method onSetUp is public but not a test method

➥ DerivedPropertiesTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod246

[SRC]protected void afterPluginInitialization() {

[MSG]Violation in class DerivedPropertiesTests. The method afterPluginInitialization is both empty and not marked with @Override

EmptyMethod249

[SRC]protected void onTearDown() {

[MSG]Violation in class DerivedPropertiesTests. The method onTearDown is both empty and not marked with @Override

UnusedVariable254

[SRC]def mc = mdc.clazz

[MSG]The variable [mc] in class org.codehaus.groovy.grails.orm.hibernate.DerivedPropertiesTests is not used

➥ DirtyTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3126

[SRC]assertEquals 0, d.getDirtyPropertyNames().size()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DirtyTests. getDirtyPropertyNames() can probably be rewritten as dirtyPropertyNames

➥ DiscriminatorColumnMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable245

[SRC]def Child2 = ga.getDomainClass("Child2").clazz

[MSG]The variable [Child2] in class org.codehaus.groovy.grails.orm.hibernate.DiscriminatorColumnMappingTests is not used

➥ DiscriminatorFormulaMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2116

[SRC]def Root = ga.getDomainClass("Root").clazz

[MSG]The variable [Root] in class org.codehaus.groovy.grails.orm.hibernate.DiscriminatorFormulaMappingTests is not used

UseAssertNullInsteadOfAssertEquals3101

[SRC]assertEquals null, rs.getString("tree")

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DiscriminatorFormulaMappingTests. assertEquals can be simplified using assertNull

UnnecessaryObjectReferences3111

[SRC]rs.close()

[MSG]The code could be more concise by using a with() or identity() block

➥ DomainEventsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert240

[SRC]void testNoModifyVersion() {

[MSG]Violation in class DomainEventsTests. Test method 'testNoModifyVersion' makes no assertions

UnusedVariable2154

[SRC]def success = false

[MSG]The variable [success] in class org.codehaus.groovy.grails.orm.hibernate.DomainEventsTests is not used

➥ DomainEventsWithMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2276

[SRC]void onSetUp() {

[MSG]Violation in class DomainEventsWithMethodsTests. The method onSetUp is public but not a test method

➥ DontFlushAfterDataAccessExceptionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter348

[SRC]assertEquals FlushMode.AUTO, session.getFlushMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DontFlushAfterDataAccessExceptionTests. getFlushMode() can probably be rewritten as flushMode

UnnecessaryGetter358

[SRC]assertEquals FlushMode.MANUAL, session.getFlushMode()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.DontFlushAfterDataAccessExceptionTests. getFlushMode() can probably be rewritten as flushMode

➥ EagerFindByQueryTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable233

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

[MSG]The variable [tagClass] in class org.codehaus.groovy.grails.orm.hibernate.EagerFindByQueryTests is not used

UnusedVariable250

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

[MSG]The variable [tagClass] in class org.codehaus.groovy.grails.orm.hibernate.EagerFindByQueryTests is not used

UnusedVariable267

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

[MSG]The variable [tagClass] in class org.codehaus.groovy.grails.orm.hibernate.EagerFindByQueryTests is not used

UnusedVariable283

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

[MSG]The variable [tagClass] in class org.codehaus.groovy.grails.orm.hibernate.EagerFindByQueryTests is not used

➥ EnumMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter381

[SRC]def con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.EnumMappingTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3104

[SRC]def con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.EnumMappingTests. getConnection() can probably be rewritten as connection

➥ ExecuteUpdateTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod220

[SRC]def init() {

[MSG]Violation in class ExecuteUpdateTests. The method init is public but not a test method

➥ ExistsTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.orm.hibernate.Abstract..bernateTests

➥ FindAllMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences350

[SRC]theClass.findAll("from FindAllTest where name = 'Angus'"..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences355

[SRC]theClass.findAll("from FindAllTest where name = 'Malcolm..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences360

[SRC]theClass.findAll("from FindAllTest where name = 'Malcolm..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3103

[SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3108

[SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3113

[SRC]theClass.findAll("from FindAllTest where name = :name", ..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

➥ FindByMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2186

[SRC]def jakeB = new Person(firstName: 'Jake', lastName: 'Bro..: 11).save()

[MSG]The variable [jakeB] in class org.codehaus.groovy.grails.orm.hibernate.FindByMethodTests is not used

➥ FindMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod25

[SRC]void onSetUp() {

[MSG]Violation in class FindMethodTests. The method onSetUp is public but not a test method

UnnecessaryObjectReferences374

[SRC]theClass.find("from FindMethodTestClass where one = 'Ang..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences379

[SRC]theClass.find("from FindMethodTestClass where one = 'Mal..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences384

[SRC]theClass.find("from FindMethodTestClass where one = 'Mal..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences389

[SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences394

[SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences399

[SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3104

[SRC]theClass.find("from FindMethodTestClass where one = :nam..che: false])

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3109

[SRC]theClass.find("from FindMethodTestClass where one = :nam..ache: true])

[MSG]The code could be more concise by using a with() or identity() block

➥ FindOrCreateWherePersistenceMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import grails.persistence.Entity

[MSG]The [grails.persistence.Entity] import is never referenced

➥ FindOrSaveWherePersistenceMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import grails.persistence.Entity

[MSG]The [grails.persistence.Entity] import is never referenced

➥ HibernateCriteriaBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod219

[SRC]List retrieveListOfNames() { ['bart'] }

[MSG]Violation in class HibernateCriteriaBuilderTests. The method retrieveListOfNames is public but not a test method

UnusedVariable21004

[SRC]List results = parse("{ " +

[MSG]The variable [results] in class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests is not used

UnusedVariable21032

[SRC]List results = parse("{ " +

[MSG]The variable [results] in class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests is not used

UnnecessaryGetter3437

[SRC]assertEquals clazzName , result.getClass().getName()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests. getName() can probably be rewritten as name

UnnecessaryGetter31689

[SRC]GroovyClassLoader cl = grailsApplication.getClassLoader()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests. getClassLoader() can probably be rewritten as classLoader

UnnecessaryGetter31706

[SRC]Class tc = grailsApplication.getArtefact(DomainClassArte..).getClazz()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.HibernateCriteriaBuilderTests. getClazz() can probably be rewritten as clazz

➥ HibernateEventListenerTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod251

[SRC]void onPostInsert(PostInsertEvent event) {}

[MSG]Violation in class TestAuditListener. The method onPostInsert is both empty and not marked with @Override

UnusedMethodParameter251

[SRC]void onPostInsert(PostInsertEvent event) {}

[MSG]Violation in class TestAuditListener. Method parameter [event] is never referenced in the method onPostInsert of class org.codehaus.groovy.grails.orm.hibernate.TestAuditListener

EmptyMethod252

[SRC]void onPostDelete(PostDeleteEvent event) {}

[MSG]Violation in class TestAuditListener. The method onPostDelete is both empty and not marked with @Override

UnusedMethodParameter252

[SRC]void onPostDelete(PostDeleteEvent event) {}

[MSG]Violation in class TestAuditListener. Method parameter [event] is never referenced in the method onPostDelete of class org.codehaus.groovy.grails.orm.hibernate.TestAuditListener

EmptyMethod253

[SRC]void onSaveOrUpdate(SaveOrUpdateEvent event) {}

[MSG]Violation in class TestAuditListener. The method onSaveOrUpdate is both empty and not marked with @Override

UnusedMethodParameter253

[SRC]void onSaveOrUpdate(SaveOrUpdateEvent event) {}

[MSG]Violation in class TestAuditListener. Method parameter [event] is never referenced in the method onSaveOrUpdate of class org.codehaus.groovy.grails.orm.hibernate.TestAuditListener

➥ ListDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable29

[SRC]def authorClass = ga.getDomainClass("Author")

[MSG]The variable [authorClass] in class org.codehaus.groovy.grails.orm.hibernate.ListDomainTests is not used

JUnitPublicNonTestMethod223

[SRC]void onSetUp() {

[MSG]Violation in class ListDomainTests. The method onSetUp is public but not a test method

➥ ListMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable245

[SRC]def ids = [a1.id, a2.id, a2.id]

[MSG]The variable [ids] in class org.codehaus.groovy.grails.orm.hibernate.ListMappingTests is not used

JUnitPublicNonTestMethod254

[SRC]void onSetUp() {

[MSG]Violation in class ListMappingTests. The method onSetUp is public but not a test method

➥ LoadMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2107

[SRC]def o = clazz.newInstance()

[MSG]The variable [o] in class org.codehaus.groovy.grails.orm.hibernate.LoadMethodTests is not used

UnusedImport37

[SRC]import org.springframework.orm.hibernate3.HibernateObjec..ureException

[MSG]The [org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException] import is never referenced

UnnecessaryGetter329

[SRC]assertEquals "id is accessible even if object doesn't ex..ance.getId()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.LoadMethodTests. getId() can probably be rewritten as id

UnnecessaryGetter351

[SRC]assertEquals "id is accessible even if object doesn't ex..ance.getId()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.LoadMethodTests. getId() can probably be rewritten as id

UseAssertSameInsteadOfAssertTrue377

[SRC]assertTrue getInstance.is(loadInstance)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.LoadMethodTests. assert method can be simplified using the assertSame method

UseAssertSameInsteadOfAssertTrue396

[SRC]assertFalse getInstance.is(loadInstance)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.LoadMethodTests. assert method can be simplified using the assertSame method

➥ ManyToManyCompositeIdTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod272

[SRC]void onSetUp() {

[MSG]Violation in class ManyToManyCompositeIdTests. The method onSetUp is public but not a test method

UnusedImport33

[SRC]import junit.framework.TestCase

[MSG]The [junit.framework.TestCase] import is never referenced

➥ ManyToManyLazinessTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

[MSG]Violation in class ManyToManyLazinessTests. The method onSetUp is public but not a test method

➥ ManyToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2114

[SRC]void onSetUp() {

[MSG]Violation in class ManyToManyTests. The method onSetUp is public but not a test method

➥ ManyToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable232

[SRC]def ShapeAttribute = ga.getDomainClass("ShapeAttribute").clazz

[MSG]The variable [ShapeAttribute] in class org.codehaus.groovy.grails.orm.hibernate.ManyToManyWithInheritanceTests is not used

➥ MapDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

[MSG]Violation in class MapDomainTests. The method onSetUp is public but not a test method

➥ MapMappingJoinTableTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod230

[SRC]void onSetUp() {

[MSG]Violation in class MapMappingJoinTableTests. The method onSetUp is public but not a test method

➥ MapMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertFalseInsteadOfNegation226

[SRC]assertTrue !book.hasErrors()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MapMappingTests. assertTrue(!book.hasErrors()) can be simplified to assertFalse(book.hasErrors())

JUnitPublicNonTestMethod290

[SRC]void onSetUp() {

[MSG]Violation in class MapMappingTests. The method onSetUp is public but not a test method

➥ MappedByColumn2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod226

[SRC]void onSetUp() {

[MSG]Violation in class MappedByColumn2Tests. The method onSetUp is public but not a test method

➥ MappedByColumnTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod242

[SRC]void onSetUp() {

[MSG]Violation in class MappedByColumnTests. The method onSetUp is public but not a test method

➥ MappingDefaultsTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertFalseInsteadOfNegation273

[SRC]assertTrue "should have inherited blank from shared cons..", !cp.blank

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDefaultsTests. assertTrue(!cp.blank) can be simplified to assertFalse(cp.blank)

UseAssertFalseInsteadOfNegation275

[SRC]assertTrue "should not have inherited matches from [anot..", !cp.email

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDefaultsTests. assertTrue(!cp.email) can be simplified to assertFalse(cp.email)

ChainedTest279

[SRC]testMappingDefaults()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDefaultsTests. The test method testMappingDefaults() is being invoked explicitly from within a unit test. Tests should be isolated and not dependent on one another

UseAssertEqualsInsteadOfAssertTrue374

[SRC]assertTrue "size should have been in the specified range..0 == cp.size

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDefaultsTests. Replace assertTrue with a call to assertEquals()

➥ MappingDefinitionInheritedBySubclassTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertTrueInsteadOfAssertEquals348

[SRC]assert rs.next() == true

[MSG]The expression '(rs.next() == true)' can be simplified to 'rs.next()'

➥ MappingDslTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert212

[SRC]void testTableMapping() {

[MSG]Violation in class MappingDslTests. Test method 'testTableMapping' makes no assertions

UnusedVariable2113

[SRC]DataSource ds = applicationContext.dataSource

[MSG]The variable [ds] in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests is not used

UnusedVariable2203

[SRC]def personClass = ga.getDomainClass("MappedPerson").clazz

[MSG]The variable [personClass] in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests is not used

JUnitTestMethodWithoutAssert2283

[SRC]void testCompositeIdAssignedGenerator_GRAILS_6289() {

[MSG]Violation in class MappingDslTests. Test method 'testCompositeIdAssignedGenerator_GRAILS_6289' makes no assertions

UnnecessaryGetter317

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter335

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter382

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3121

[SRC]final cmd = session.getSessionFactory().getClassMetadata..Class.clazz)

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getSessionFactory() can probably be rewritten as sessionFactory

UnnecessaryGetter3153

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3192

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3220

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3248

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3273

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

UnnecessaryGetter3303

[SRC]connection = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.MappingDslTests. getConnection() can probably be rewritten as connection

➥ MultipleDataSourceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2348

[SRC]def Library = ga.getDomainClass('MdsLibrary').clazz

[MSG]The variable [Library] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

UnusedVariable2349

[SRC]def Visit = ga.getDomainClass('MdsVisit').clazz

[MSG]The variable [Visit] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

UnusedVariable2379

[SRC]def Library = ga.getDomainClass('MdsLibrary').clazz

[MSG]The variable [Library] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

UnusedVariable2380

[SRC]def Visit = ga.getDomainClass('MdsVisit').clazz

[MSG]The variable [Visit] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

UnusedVariable2409

[SRC]def Library = ga.getDomainClass('MdsLibrary').clazz

[MSG]The variable [Library] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

UnusedVariable2410

[SRC]def Visit = ga.getDomainClass('MdsVisit').clazz

[MSG]The variable [Visit] in class org.codehaus.groovy.grails.orm.hibernate.MultipleDataSourceTests is not used

➥ NamedCriteriaInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import grails.persistence.Entity

[MSG]The [grails.persistence.Entity] import is never referenced

➥ NamedCriteriaPublication.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryParenthesesForMethodCallWithClosure379

[SRC]thisWeeksPaperbacks() {

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.NamedCriteriaPublication. Parentheses in the 'thisWeeksPaperbacks' method call are unnecessary and can be removed.

➥ NamedCriteriaTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2504

[SRC]def titles = publications.title

[MSG]The variable [titles] in class org.codehaus.groovy.grails.orm.hibernate.NamedCriteriaTests is not used

➥ NamingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessarySubstring377

[SRC]names << ddl.substring(0, ddl.indexOf(' '))

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.NamingTests. The String.substring(int, int) method can be replaced with the subscript operator

➥ OneToManySelfInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable235

[SRC]def Root = ga.getDomainClass("onetomanyselfinheritancete..Root").clazz

[MSG]The variable [Root] in class org.codehaus.groovy.grails.orm.hibernate.OneToManySelfInheritanceTests is not used

➥ OneToManyWithComposideIdentifierTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert247

[SRC]void testPersistAssociationWithCompositeId() {

[MSG]Violation in class OneToManyWithComposideIdentifierTests. Test method 'testPersistAssociationWithCompositeId' makes no assertions

JUnitTestMethodWithoutAssert257

[SRC]void testUpdateInverseSide() {

[MSG]Violation in class OneToManyWithComposideIdentifierTests. Test method 'testUpdateInverseSide' makes no assertions

➥ OneToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.springframework.util.Log4jConfigurer

[MSG]The [org.springframework.util.Log4jConfigurer] import is never referenced

➥ OneToManyWithSelfAndInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable239

[SRC]def orgB = Organization.newInstance(name:'Org B', descri..org1).save()

[MSG]The variable [orgB] in class org.codehaus.groovy.grails.orm.hibernate.OneToManyWithSelfAndInheritanceTests is not used

UnusedVariable240

[SRC]def orgaa = Organization.newInstance(name:'Org aa', desc..orgA).save()

[MSG]The variable [orgaa] in class org.codehaus.groovy.grails.orm.hibernate.OneToManyWithSelfAndInheritanceTests is not used

UnusedVariable244

[SRC]def xorgB = ExtOrganization.newInstance(name:'ExtOrg B',..org1).save()

[MSG]The variable [xorgB] in class org.codehaus.groovy.grails.orm.hibernate.OneToManyWithSelfAndInheritanceTests is not used

UnusedVariable245

[SRC]def xorgaa = ExtOrganization.newInstance(name:'ExtOrg aa..orgA).save()

[MSG]The variable [xorgaa] in class org.codehaus.groovy.grails.orm.hibernate.OneToManyWithSelfAndInheritanceTests is not used

➥ PersistenceMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2750

[SRC]MetaClass domain = obj.getMetaClass()

[MSG]The variable [domain] in class org.codehaus.groovy.grails.orm.hibernate.PersistenceMethodTests is not used

UnnecessaryGetter3438

[SRC]returnValue = domainClass.getAll()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.PersistenceMethodTests. getAll() can probably be rewritten as all

UnnecessaryGetter3750

[SRC]MetaClass domain = obj.getMetaClass()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.PersistenceMethodTests. getMetaClass() can probably be rewritten as metaClass

➥ PessimisticLockingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert211

[SRC]void testLockMethod() {

[MSG]Violation in class PessimisticLockingTests. Test method 'testLockMethod' makes no assertions

JUnitPublicNonTestMethod243

[SRC]void onSetUp() {

[MSG]Violation in class PessimisticLockingTests. The method onSetUp is public but not a test method

➥ SavePersistentMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3159

[SRC]datastore.getEventTriggeringInterceptor().failOnError = true

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.SavePersistentMethodTests. getEventTriggeringInterceptor() can probably be rewritten as eventTriggeringInterceptor

UnnecessaryGetter3177

[SRC]def interceptor = datastore.getEventTriggeringInterceptor()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.SavePersistentMethodTests. getEventTriggeringInterceptor() can probably be rewritten as eventTriggeringInterceptor

➥ SimpleBelongsToMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable210

[SRC]def bookClass = ga.getDomainClass("Book")

[MSG]The variable [bookClass] in class org.codehaus.groovy.grails.orm.hibernate.SimpleBelongsToMappingTests is not used

JUnitPublicNonTestMethod215

[SRC]void onSetUp() {

[MSG]Violation in class SimpleBelongsToMappingTests. The method onSetUp is public but not a test method

➥ TablePerHierarchyAssocationTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable236

[SRC]def sub1Class = ga.getDomainClass("TablePerHierarchSub1").clazz

[MSG]The variable [sub1Class] in class org.codehaus.groovy.grails.orm.hibernate.TablePerHierarchyAssocationTests is not used

➥ TablePerSubclassIdentityMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert237

[SRC]void testMappedIdentityForSubclass() {

[MSG]Violation in class TablePerSubclassIdentityMappingTests. Test method 'testMappedIdentityForSubclass' makes no assertions

UnnecessaryGetter342

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.TablePerSubclassIdentityMappingTests. getConnection() can probably be rewritten as connection

➥ TablePerSubclassWithCustomTableNameTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert237

[SRC]void testGeneratedTables() {

[MSG]Violation in class TablePerSubclassWithCustomTableNameTests. Test method 'testGeneratedTables' makes no assertions

UnnecessaryGetter342

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.TablePerSubclassWithCustomTableNameTests. getConnection() can probably be rewritten as connection

➥ TwoManyToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2100

[SRC]void onSetUp() {

[MSG]Violation in class TwoManyToManyTests. The method onSetUp is public but not a test method

➥ TwoUnidirectionalOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert27

[SRC]void testTwoUniOneToManys() {

[MSG]Violation in class TwoUnidirectionalOneToManyTests. Test method 'testTwoUniOneToManys' makes no assertions

JUnitPublicNonTestMethod223

[SRC]void onSetUp() {

[MSG]Violation in class TwoUnidirectionalOneToManyTests. The method onSetUp is public but not a test method

➥ URLMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod222

[SRC]void onSetUp() {

[MSG]Violation in class URLMappingTests. The method onSetUp is public but not a test method

UnnecessaryObjectReferences316

[SRC]b.discard()

[MSG]The code could be more concise by using a with() or identity() block

➥ UnidirectionalOneToManyHibernateMappedTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert212

[SRC]void testAnnotatedOneToManyDomain() {

[MSG]Violation in class UnidirectionalOneToManyHibernateMappedTests. Test method 'testAnnotatedOneToManyDomain' makes no assertions

➥ UnidirectionalOneToManyWithJoinTableTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert226

[SRC]void testUnidirectionalOneToManyWithExplicityJoinTable() {

[MSG]Violation in class UnidirectionalOneToManyWithJoinTableTests. Test method 'testUnidirectionalOneToManyWithExplicityJoinTable' makes no assertions

➥ UserTypeMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3148

[SRC]con = ds.getConnection()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.UserTypeMappingTests. getConnection() can probably be rewritten as connection

➥ ValidationFailureTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod25

[SRC]void onSetUp() {

[MSG]Violation in class ValidationFailureTests. The method onSetUp is public but not a test method

➥ VersionColumnTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert240

[SRC]void testVersionColumnMapping() {

[MSG]Violation in class VersionColumnTests. Test method 'testVersionColumnMapping' makes no assertions

UnusedImport33

[SRC]import java.sql.Connection

[MSG]The [java.sql.Connection] import is never referenced

➥ WithCriteriaMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod224

[SRC]void onSetUp() {

[MSG]Violation in class WithCriteriaMethodTests. The method onSetUp is public but not a test method

➥ WithTransactionMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod233

[SRC]void onSetUp() {

[MSG]Violation in class WithTransactionMethodTests. The method onSetUp is public but not a test method

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate.binding

➥ AssociationDataBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2197

[SRC]def book = Book.newInstance(title: "Pattern Recognition"..Error: true)

[MSG]The variable [book] in class org.codehaus.groovy.grails.orm.hibernate.binding.AssociationDataBindingTests is not used

UnnecessaryObjectReferences3332

[SRC]request.addParameter("books[0].reviewers['bob'].name", "Bob Bloggs")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3333

[SRC]request.addParameter("books[0].reviewers['chuck'].name",..uck Bloggs")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3334

[SRC]request.addParameter("books[1].title", "The Stand")

[MSG]The code could be more concise by using a with() or identity() block

➥ NonDomainCollectionBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]void onSetUp() {

[MSG]Violation in class NonDomainCollectionBindingTests. The method onSetUp is public but not a test method

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate.cfg

➥ GrailsDomainBinderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3672

[SRC]ConstrainedProperty constrainedProperty = getConstrained..ngProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedStringProperty() can probably be rewritten as constrainedStringProperty

UnnecessaryGetter3677

[SRC]constrainedProperty = getConstrainedStringProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedStringProperty() can probably be rewritten as constrainedStringProperty

UnnecessaryGetter3682

[SRC]constrainedProperty = getConstrainedStringProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedStringProperty() can probably be rewritten as constrainedStringProperty

UnnecessaryGetter3686

[SRC]constrainedProperty = getConstrainedStringProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedStringProperty() can probably be rewritten as constrainedStringProperty

UnnecessaryGetter3692

[SRC]constrainedProperty = getConstrainedStringProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedStringProperty() can probably be rewritten as constrainedStringProperty

UnnecessaryGetter3702

[SRC]ConstrainedProperty constrainedProperty = getConstrained..alProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryGetter3709

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3710

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...l("123.45"))

[MSG]Can be rewritten as 123.45 or 123.45G

UnnecessaryGetter3715

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3717

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...("-123.45"))

[MSG]Can be rewritten as -123.45 or -123.45G

UnnecessaryGetter3721

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3722

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...("123.45")))

[MSG]Can be rewritten as 123.45 or 123.45G

UnnecessaryGetter3726

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3727

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...mal("123")))

[MSG]Can be rewritten as -123.45 or -123.45G

UnnecessaryGetter3731

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryGetter3737

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3738

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...l("123.45"))

[MSG]Can be rewritten as 123.45 or 123.45G

UnnecessaryGetter3744

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3745

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty..."123.4567"))

[MSG]Can be rewritten as 123.4567 or 123.4567G

UnnecessaryGetter3751

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3752

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty..."123.4567"))

[MSG]Can be rewritten as 123.4567 or 123.4567G

UnnecessaryGetter3754

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3755

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...7890.4567"))

[MSG]Can be rewritten as 12345678901234567890.4567 or 12345678901234567890.4567G

UnnecessaryGetter3757

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3758

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...-123.4567"))

[MSG]Can be rewritten as -123.4567 or -123.4567G

UnnecessaryGetter3760

[SRC]constrainedProperty = getConstrainedBigDecimalProperty()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinderTests. getConstrainedBigDecimalProperty() can probably be rewritten as constrainedBigDecimalProperty

UnnecessaryBigDecimalInstantiation3761

[SRC]constrainedProperty.applyConstraint(ConstrainedProperty...7890.4567"))

[MSG]Can be rewritten as -12345678901234567890.4567 or -12345678901234567890.4567G

➥ GrailsHibernateUtilTests.groovy

Rule NamePriorityLine #Source Line / Message
MisorderedStaticImports34

[SRC]import static org.codehaus.groovy.grails.orm.hibernate.c..ernateUtil.*

[MSG]Static imports should appear before normal imports

JUnitUnnecessarySetUp38

[SRC]@Override protected void setUp() {

[MSG]Violation in class GrailsHibernateUtilTests. The setUp() method contains no logic and can be removed

UnnecessaryOverridingMethod38

[SRC]@Override protected void setUp() {

[MSG]Violation in class GrailsHibernateUtilTests. The method setUp contains no logic and can be safely deleted

JUnitUnnecessaryTearDown312

[SRC]@Override protected void tearDown() {

[MSG]Violation in class GrailsHibernateUtilTests. The tearDown() method contains no logic and can be removed

UnnecessaryOverridingMethod312

[SRC]@Override protected void tearDown() {

[MSG]Violation in class GrailsHibernateUtilTests. The method tearDown contains no logic and can be safely deleted

➥ MonetaryAmountUserType.groovy

Rule NamePriorityLine #Source Line / Message
EqualsOverloaded216

[SRC]boolean equals(Object x, Object y) { x == y }

[MSG]Violation in class MonetaryAmountUserType. The class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmountUserType overloads the equals method, it does not override it.

UnusedMethodParameter221

[SRC]Object nullSafeGet(ResultSet resultSet, String[] names, ..LException {

[MSG]Violation in class MonetaryAmountUserType. Method parameter [owner] is never referenced in the method nullSafeGet of class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmountUserType

UnusedMethodParameter244

[SRC]Object assemble(Serializable cached, Object owner) { cached }

[MSG]Violation in class MonetaryAmountUserType. Method parameter [owner] is never referenced in the method assemble of class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmountUserType

UnusedMethodParameter246

[SRC]Object replace(Object original, Object target, Object ow..{ original }

[MSG]Violation in class MonetaryAmountUserType. Method parameter [target] is never referenced in the method replace of class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmountUserType

UnusedMethodParameter246

[SRC]Object replace(Object original, Object target, Object ow..{ original }

[MSG]Violation in class MonetaryAmountUserType. Method parameter [owner] is never referenced in the method replace of class org.codehaus.groovy.grails.orm.hibernate.cfg.MonetaryAmountUserType

➥ MyUserType.groovy

Rule NamePriorityLine #Source Line / Message
EqualsOverloaded222

[SRC]boolean equals(Object x, Object y) { x.name == y.name }

[MSG]Violation in class MyUserType. The class org.codehaus.groovy.grails.orm.hibernate.cfg.MyUserType overloads the equals method, it does not override it.

UnusedMethodParameter227

[SRC]Object nullSafeGet(ResultSet resultSet, String[] names, ..LException {

[MSG]Violation in class MyUserType. Method parameter [owner] is never referenced in the method nullSafeGet of class org.codehaus.groovy.grails.orm.hibernate.cfg.MyUserType

UnusedMethodParameter243

[SRC]Object assemble(Serializable cached, Object owner) { cached }

[MSG]Violation in class MyUserType. Method parameter [owner] is never referenced in the method assemble of class org.codehaus.groovy.grails.orm.hibernate.cfg.MyUserType

UnusedMethodParameter245

[SRC]Object replace(Object original, Object target, Object ow..{ original }

[MSG]Violation in class MyUserType. Method parameter [target] is never referenced in the method replace of class org.codehaus.groovy.grails.orm.hibernate.cfg.MyUserType

UnusedMethodParameter245

[SRC]Object replace(Object original, Object target, Object ow..{ original }

[MSG]Violation in class MyUserType. Method parameter [owner] is never referenced in the method replace of class org.codehaus.groovy.grails.orm.hibernate.cfg.MyUserType

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate.metaclass

➥ BeforeValidateHelperTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter265

[SRC]def beforeValidate(List properties) {

[MSG]Violation in class ClassWithListArgBeforeValidate. Method parameter [properties] is never referenced in the method beforeValidate of class org.codehaus.groovy.grails.orm.hibernate.metaclass.ClassWithListArgBeforeValidate

UnusedMethodParameter276

[SRC]def beforeValidate(List properties) {

[MSG]Violation in class ClassWithOverloadedBeforeValidate. Method parameter [properties] is never referenced in the method beforeValidate of class org.codehaus.groovy.grails.orm.hibernate.metaclass.ClassWithOverloadedBeforeValidate

UnusedImport33

[SRC]import groovy.mock.interceptor.MockFor

[MSG]The [groovy.mock.interceptor.MockFor] import is never referenced

ImportFromSamePackage34

[SRC]import org.codehaus.groovy.grails.orm.hibernate.metaclas..idateHelper;

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate.support

➥ FlushOnRedirectTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest] import is never referenced

➥ HibernatePersistenceContextInterceptorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import org.springframework.orm.hibernate3.SessionHolder

[MSG]The [org.springframework.orm.hibernate3.SessionHolder] import is never referenced

UnnecessaryGetter328

[SRC]def interceptor = getInterceptor()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptorTests. getInterceptor() can probably be rewritten as interceptor

UseAssertTrueInsteadOfAssertEquals329

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals331

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals333

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals335

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals337

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UnnecessaryGetter341

[SRC]def interceptor = getInterceptor()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptorTests. getInterceptor() can probably be rewritten as interceptor

UseAssertTrueInsteadOfAssertEquals342

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals345

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals347

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals349

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals351

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals354

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UnnecessaryObjectReferences355

[SRC]interceptor.destroy()

[MSG]The code could be more concise by using a with() or identity() block

UseAssertTrueInsteadOfAssertEquals356

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UnnecessaryGetter360

[SRC]def interceptor = getInterceptor()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptorTests. getInterceptor() can probably be rewritten as interceptor

UseAssertTrueInsteadOfAssertEquals370

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals372

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals374

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UnnecessaryGetter381

[SRC]def interceptor = getInterceptor()

[MSG]Violation in class org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptorTests. getInterceptor() can probably be rewritten as interceptor

UseAssertTrueInsteadOfAssertEquals393

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals395

[SRC]assertEquals("interceptor open", true, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals397

[SRC]assertEquals("interceptor open", false, interceptor.open)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.hibernate.validation

➥ UniqueConstraintTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable215

[SRC]def userClass = ga.getDomainClass("User")

[MSG]The variable [userClass] in class org.codehaus.groovy.grails.orm.hibernate.validation.UniqueConstraintTests is not used

JUnitPublicNonTestMethod2265

[SRC]void onSetUp() {

[MSG]Violation in class UniqueConstraintTests. The method onSetUp is public but not a test method

UnnecessaryObjectReferences350

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences352

[SRC]user.save(true)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences363

[SRC]user.organization = "organization1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences364

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences368

[SRC]user.id = 123L

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences369

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences379

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences383

[SRC]user.code = "321"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences384

[SRC]user.login = "login1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences385

[SRC]user.grp = "group1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences386

[SRC]user.department = "department1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences387

[SRC]user.organization = "organization2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences388

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences392

[SRC]user.grp = "group2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences393

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences397

[SRC]user.grp = "group1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences398

[SRC]user.department = "department2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences399

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3103

[SRC]user.login = "login2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3104

[SRC]user.grp = "group2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3105

[SRC]user.department = "department1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3106

[SRC]user.organization = "organization1"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3107

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3111

[SRC]user.organization = "organization2"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3112

[SRC]user.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3228

[SRC]user1.save(true)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3236

[SRC]user2.save(true)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3244

[SRC]user3.save(true)

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.orm.support

➥ TransactionManagerPostProcessorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessarySelfAssignment328

[SRC]dataSource = dataSource

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.plugins

➥ RelationshipManagementMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable259

[SRC]def addressClass = ga.getDomainClass("Address")

[MSG]The variable [addressClass] in class org.codehaus.groovy.grails.plugins.RelationshipManagementMethodsTests is not used

JUnitPublicNonTestMethod2142

[SRC]void onSetUp() {

[MSG]Violation in class RelationshipManagementMethodsTests. The method onSetUp is public but not a test method

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.plugins.scaffolding

➥ ScaffoldingGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter375

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.scaffolding.ScaffoldingGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter387

[SRC]gcl.getLoadedClasses().find { it.name.endsWith("TagLib") })

[MSG]Violation in class org.codehaus.groovy.grails.plugins.scaffolding.ScaffoldingGrailsPluginTests. getLoadedClasses() can probably be rewritten as loadedClasses

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.plugins.services

➥ ScopedProxyAndServiceClassTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport35

[SRC]import org.springframework.web.context.support.WebApplic..ContextUtils

[MSG]The [org.springframework.web.context.support.WebApplicationContextUtils] import is never referenced

➥ ServicesGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod212

[SRC]void onSetUp() {

[MSG]Violation in class ServicesGrailsPluginTests. The method onSetUp is public but not a test method

UnnecessaryGetter3110

[SRC]springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.services.ServicesGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.reload

➥ ServiceReloadTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod246

[SRC]void onSetUp() {

[MSG]Violation in class ServiceReloadTests. The method onSetUp is public but not a test method

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.scaffolding

➥ DefaultGrailsTemplateGeneratorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper226

[SRC]protected void setUp() {

[MSG]Violation in class DefaultGrailsTemplateGeneratorTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper233

[SRC]protected void tearDown() {

[MSG]Violation in class DefaultGrailsTemplateGeneratorTests. The method tearDown() does not call super.tearDown()

UnusedImport314

[SRC]import org.codehaus.groovy.grails.plugins.PluginManagerHolder

[MSG]The [org.codehaus.groovy.grails.plugins.PluginManagerHolder] import is never referenced

UseAssertTrueInsteadOfAssertEquals368

[SRC]assert sw.toString().contains('g:datePicker name="regula..}"') == true

[MSG]The expression '(sw.toString().contains(g:datePicker name="regularDate" precision="day" value="${scaffoldingTestInstance?.regularDate}") == true)' can be simplified to 'sw.toString().contains(g:datePicker name="regularDate" precision="day" value="${scaffoldingTestInstance?.regularDate}")'

UseAssertTrueInsteadOfAssertEquals369

[SRC]assert sw.toString().contains('datePicker name="sqlDate"..e}') == true

[MSG]The expression '(sw.toString().contains(datePicker name="sqlDate" precision="day" value="${scaffoldingTestInstance?.sqlDate}) == true)' can be simplified to 'sw.toString().contains(datePicker name="sqlDate" precision="day" value="${scaffoldingTestInstance?.sqlDate})'

➥ TemplateGeneratingResponseHandlerTests.groovy

Rule NamePriorityLine #Source Line / Message
DuplicateImport37

[SRC]import org.springframework.web.context.request.*

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.scaffolding.view

➥ ScaffoldedGroovyPageViewTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper233

[SRC]void tearDown() {

[MSG]Violation in class ScaffoldedGroovyPageViewTests. The method tearDown() does not call super.tearDown()

➥ ScaffoldingViewResolverTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter260

[SRC]protected String generateViewSource(String viewName, Gra..mainClass) {

[MSG]Violation in class TestScaffoldingViewResolver. Method parameter [domainClass] is never referenced in the method generateViewSource of class org.codehaus.groovy.grails.scaffolding.view.TestScaffoldingViewResolver

UnnecessaryGetter338

[SRC]viewResolver.servletContext = webRequest.getServletContext()

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolverTests. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter348

[SRC]def view = viewResolver.loadView("/foo/list", Locale.getDefault())

[MSG]Violation in class org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolverTests. getDefault() can probably be rewritten as default

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.validation

➥ VetoingNullableBehaviourTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertEqualsInsteadOfAssertTrue3100

[SRC]assertTrue("Error not found for field ${field}, errors w..ld) == null)

[MSG]Violation in class org.codehaus.groovy.grails.validation.VetoingNullableBehaviourTests. Replace assertTrue with a call to assertEquals()

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.web.binding

➥ DataBindingWithAssociationTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable293

[SRC]def Book = ga.getDomainClass("databindingwithassociation..ook3").clazz

[MSG]The variable [Book] in class org.codehaus.groovy.grails.web.binding.DataBindingWithAssociationTests is not used

UnusedVariable2120

[SRC]def Book = ga.getDomainClass("databindingwithassociation..ook3").clazz

[MSG]The variable [Book] in class org.codehaus.groovy.grails.web.binding.DataBindingWithAssociationTests is not used

➥ DataBindingWithEmbeddedTests.groovy

Rule NamePriorityLine #Source Line / Message
MisorderedStaticImports36

[SRC]import static org.hamcrest.CoreMatchers.*

[MSG]Static imports should appear before normal imports

MisorderedStaticImports37

[SRC]import static org.junit.Assert.assertThat

[MSG]Static imports should appear before normal imports

Package: grails-test-suite-persistence.src.test.groovy.org.codehaus.groovy.grails.web.converters

➥ ConvertsWithHibernateProxiesTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable255

[SRC]def converter = parent as JSON

[MSG]The variable [converter] in class org.codehaus.groovy.grails.web.converters.ConvertsWithHibernateProxiesTests is not used

UnusedVariable274

[SRC]def converter = parent as XML

[MSG]The variable [converter] in class org.codehaus.groovy.grails.web.converters.ConvertsWithHibernateProxiesTests is not used

Package: grails-test-suite-uber.src.test.groovy.grails.ant

➥ GrailsTaskTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod210

[SRC]void testWithClasspath() {

[MSG]Violation in class GrailsTaskTests. The method testWithClasspath is both empty and not marked with @Override

JUnitTestMethodWithoutAssert210

[SRC]void testWithClasspath() {

[MSG]Violation in class GrailsTaskTests. Test method 'testWithClasspath' makes no assertions

Package: grails-test-suite-uber.src.test.groovy.grails.spring

➥ BeanBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2706

[SRC]def dataSource = ctx.getBean("dataSource")

[MSG]The variable [dataSource] in class grails.spring.BeanBuilderTests is not used

JUnitTestMethodWithoutAssert2709

[SRC]void testHolyGrailWiring() {

[MSG]Violation in class BeanBuilderTests. Test method 'testHolyGrailWiring' makes no assertions

JUnitTestMethodWithoutAssert2760

[SRC]void testBeanBuilderWithScript() {

[MSG]Violation in class BeanBuilderTests. Test method 'testBeanBuilderWithScript' makes no assertions

EmptyMethod2867

[SRC]Object remove(String name) {

[MSG]Violation in class TestScope. The method remove is both empty and not marked with @Override

UnusedMethodParameter2867

[SRC]Object remove(String name) {

[MSG]Violation in class TestScope. Method parameter [name] is never referenced in the method remove of class grails.spring.TestScope

EmptyMethod2871

[SRC]void registerDestructionCallback(String name, Runnable callback) {}

[MSG]Violation in class TestScope. The method registerDestructionCallback is both empty and not marked with @Override

UnusedMethodParameter2871

[SRC]void registerDestructionCallback(String name, Runnable callback) {}

[MSG]Violation in class TestScope. Method parameter [name] is never referenced in the method registerDestructionCallback of class grails.spring.TestScope

UnusedMethodParameter2871

[SRC]void registerDestructionCallback(String name, Runnable callback) {}

[MSG]Violation in class TestScope. Method parameter [callback] is never referenced in the method registerDestructionCallback of class grails.spring.TestScope

UnusedMethodParameter2875

[SRC]Object get(String name, ObjectFactory<?> objectFactory) {

[MSG]Violation in class TestScope. Method parameter [name] is never referenced in the method get of class grails.spring.TestScope

UnusedMethodParameter2880

[SRC]Object resolveContextualObject(String s) { null }

[MSG]Violation in class TestScope. Method parameter [s] is never referenced in the method resolveContextualObject of class grails.spring.TestScope

UnusedImport318

[SRC]import org.codehaus.groovy.grails.plugins.GrailsPluginManager;

[MSG]The [org.codehaus.groovy.grails.plugins.GrailsPluginManager] import is never referenced

UnnecessaryGetter3149

[SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext

UnnecessaryGetter3149

[SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3150

[SRC]appCtx.getBeanFactory().registerScope("test", scope)

[MSG]Violation in class grails.spring.BeanBuilderTests. getBeanFactory() can probably be rewritten as beanFactory

UnnecessaryGetter3176

[SRC]appCtx = bb.getSpringConfig().getUnrefreshedApplicationContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext

UnnecessaryGetter3176

[SRC]appCtx = bb.getSpringConfig().getUnrefreshedApplicationContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3177

[SRC]appCtx.getBeanFactory().registerScope("test", scope)

[MSG]Violation in class grails.spring.BeanBuilderTests. getBeanFactory() can probably be rewritten as beanFactory

UnnecessaryGetter3237

[SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getUnrefreshedApplicationContext() can probably be rewritten as unrefreshedApplicationContext

UnnecessaryGetter3237

[SRC]GenericApplicationContext appCtx = bb.getSpringConfig()...ionContext()

[MSG]Violation in class grails.spring.BeanBuilderTests. getSpringConfig() can probably be rewritten as springConfig

UnnecessaryGetter3239

[SRC]appCtx.getBeanFactory().registerScope("test", scope)

[MSG]Violation in class grails.spring.BeanBuilderTests. getBeanFactory() can probably be rewritten as beanFactory

UnnecessarySelfAssignment3305

[SRC]quest = quest

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryPackageReference3312

[SRC]shouldFail(org.springframework.beans.factory.BeanIsAbstr..Exception) {

[MSG]The org.springframework.beans.factory.BeanIsAbstractException class was explicitly imported, so specifying the package name is not necessary

UnnecessarySelfAssignment3327

[SRC]quest = quest

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UseAssertTrueInsteadOfAssertEquals3376

[SRC]assertEquals true, bean1.props?.overweight

[MSG]assertEquals can be simplified using assertTrue or assertFalse

ConstantAssertExpression3590

[SRC]assert "marge", marge.person

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [marge]

ConstantAssertExpression3608

[SRC]assert "marge", marge.person

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [marge]

ConstantAssertExpression3632

[SRC]assert "homer", homer.person

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [homer]

ConstantAssertExpression3633

[SRC]assert 45, homer.age

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [45]

ConstantAssertExpression3635

[SRC]assert "marge", ctx.getBean("marge").person

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [marge]

ConstantAssertExpression3637

[SRC]assert "mcBain", ctx.getBean("mcBain").person

[MSG]The assert statement within class grails.spring.BeanBuilderTests has a constant boolean expression [mcBain]

UnnecessaryGetter3877

[SRC]objectFactory.getObject()

[MSG]Violation in class grails.spring.TestScope. getObject() can probably be rewritten as object

Package: grails-test-suite-uber.src.test.groovy.grails.test

➥ ControllerUnitTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert210

[SRC]void testControllerClass() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testControllerClass' makes no assertions

JUnitTestMethodWithoutAssert217

[SRC]void testExplicitControllerClass() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testExplicitControllerClass' makes no assertions

JUnitTestMethodWithoutAssert225

[SRC]void testMockCommandObject() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testMockCommandObject' makes no assertions

JUnitTestMethodWithoutAssert232

[SRC]void testGetSetModelAndView() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testGetSetModelAndView' makes no assertions

JUnitTestMethodWithoutAssert239

[SRC]void testResetWithResponseNotCommitted() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testResetWithResponseNotCommitted' makes no assertions

JUnitTestMethodWithoutAssert246

[SRC]void testResetWithResponseCommitted() {

[MSG]Violation in class ControllerUnitTestCaseTests. Test method 'testResetWithResponseCommitted' makes no assertions

JUnitTestMethodWithoutAssert256

[SRC]void testModelAndView() {

[MSG]Violation in class UnitTestControllerTestCase. Test method 'testModelAndView' makes no assertions

JUnitTestMethodWithoutAssert289

[SRC]void testResetWithResponseNotCommitted() {

[MSG]Violation in class UnitTestControllerTestCase. Test method 'testResetWithResponseNotCommitted' makes no assertions

➥ GrailsMockTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2386

[SRC]String multiMethod(String str) { "static" }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [str] is never referenced in the method multiMethod of class grails.test.GrailsMockCollaborator

UnusedMethodParameter2388

[SRC]String multiMethod(String str, Map map) { "static" }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [str] is never referenced in the method multiMethod of class grails.test.GrailsMockCollaborator

UnusedMethodParameter2388

[SRC]String multiMethod(String str, Map map) { "static" }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [map] is never referenced in the method multiMethod of class grails.test.GrailsMockCollaborator

UnusedMethodParameter2390

[SRC]String someMethod(String str1, Object[] args, String str..{ 'static' }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [str1] is never referenced in the method someMethod of class grails.test.GrailsMockCollaborator

UnusedMethodParameter2390

[SRC]String someMethod(String str1, Object[] args, String str..{ 'static' }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [args] is never referenced in the method someMethod of class grails.test.GrailsMockCollaborator

UnusedMethodParameter2390

[SRC]String someMethod(String str1, Object[] args, String str..{ 'static' }

[MSG]Violation in class GrailsMockCollaborator. Method parameter [str2] is never referenced in the method someMethod of class grails.test.GrailsMockCollaborator

UnnecessaryParenthesesForMethodCallWithClosure397

[SRC]mockControl.demand.update() { -> "Success!"}

[MSG]Violation in class grails.test.GrailsMockTests. Parentheses in the 'update' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3151

[SRC]mockControl.demand.static.findByNothing() { -> "Success!"}

[MSG]Violation in class grails.test.GrailsMockTests. Parentheses in the 'findByNothing' method call are unnecessary and can be removed.

UnnecessaryGetter3407

[SRC]setMetaClass(GroovySystem.getMetaClassRegistry().getMeta..erty.class);

[MSG]Violation in class grails.test.GrailsMockWithMetaClassGetProperty. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

UnnecessaryDotClass3407

[SRC]setMetaClass(GroovySystem.getMetaClassRegistry().getMeta..erty.class);

[MSG]GrailsMockWithMetaClassGetProperty.class can be rewritten as GrailsMockWithMetaClassGetProperty

UnnecessaryDotClass3407

[SRC]setMetaClass(GroovySystem.getMetaClassRegistry().getMeta..erty.class);

[MSG]GrailsMockWithMetaClassGetProperty.class can be rewritten as GrailsMockWithMetaClassGetProperty

UnnecessaryGetter3417

[SRC]GroovySystem.getMetaClassRegistry().setMetaClass(nodeCla..wMetaClass);

[MSG]Violation in class grails.test.GrailsMockWithMetaClassGetProperty. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

➥ GrailsUnitTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper232

[SRC]protected void setUp() {

[MSG]Violation in class GrailsUnitTestCaseTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper237

[SRC]protected void tearDown() {

[MSG]Violation in class GrailsUnitTestCaseTests. The method tearDown() does not call super.tearDown()

JUnitTestMethodWithoutAssert242

[SRC]void testMockConfig() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockConfig' makes no assertions

JUnitTestMethodWithoutAssert265

[SRC]void testMockConfigReturnsConfig() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockConfigReturnsConfig' makes no assertions

JUnitTestMethodWithoutAssert272

[SRC]void testMockLogging() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockLogging' makes no assertions

JUnitTestMethodWithoutAssert282

[SRC]void testMockLoggingWithDebugEnabled() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockLoggingWithDebugEnabled' makes no assertions

JUnitTestMethodWithoutAssert292

[SRC]void testMockDomainErrors() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockDomainErrors' makes no assertions

JUnitTestMethodWithoutAssert2106

[SRC]void testMockForConstraintsTests() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockForConstraintsTests' makes no assertions

JUnitTestMethodWithoutAssert2118

[SRC]void testMockFor() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockFor' makes no assertions

JUnitTestMethodWithoutAssert2141

[SRC]void testCascadingValidation() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testCascadingValidation' makes no assertions

JUnitTestMethodWithoutAssert2148

[SRC]void testMockDynamicMethodsWithInstanceList() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testMockDynamicMethodsWithInstanceList' makes no assertions

JUnitTestMethodWithoutAssert2162

[SRC]void testLoadCodec() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testLoadCodec' makes no assertions

JUnitTestMethodWithoutAssert2169

[SRC]void testConverters() {

[MSG]Violation in class GrailsUnitTestCaseTests. Test method 'testConverters' makes no assertions

UnusedMethodParameter2412

[SRC]def foo(s) { 1 }

[MSG]Violation in class ClassToMock. Method parameter [s] is never referenced in the method foo of class grails.test.ClassToMock

UnnecessaryObjectReferences3126

[SRC]testCase.tearDown()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3128

[SRC]testCase.setUp()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3129

[SRC]testCase.testMockInterface1()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3130

[SRC]testCase.tearDown()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3132

[SRC]testCase.setUp()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3133

[SRC]testCase.testMockInterface2()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3134

[SRC]testCase.tearDown()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3177

[SRC]testCase.tearDown()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryParenthesesForMethodCallWithClosure3223

[SRC]mocker.demand.foo() {s -> 1 }

[MSG]Violation in class grails.test.TestUnitTestCase. Parentheses in the 'foo' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3231

[SRC]mocker.demand.foo() {s -> 1 }

[MSG]Violation in class grails.test.TestUnitTestCase. Parentheses in the 'foo' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3239

[SRC]mocker.demand.foo() {s -> 1 }

[MSG]Violation in class grails.test.TestUnitTestCase. Parentheses in the 'foo' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3247

[SRC]mocker.demand.foo() {s -> 1 }

[MSG]Violation in class grails.test.TestUnitTestCase. Parentheses in the 'foo' method call are unnecessary and can be removed.

UnnecessaryObjectReferences3365

[SRC]log.warn "Test warning with exception", new Exception("s..ent wrong!")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3366

[SRC]log.info "Test info message"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3367

[SRC]log.info "Test info message with exception", new Excepti..ent wrong!")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3368

[SRC]log.debug "Test debug"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3369

[SRC]log.debug "Test debug with exception", new Exception("so..ent wrong!")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3370

[SRC]log.trace "Test trace"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3371

[SRC]log.trace "Test trace with exception", new Exception("so..ent wrong!")

[MSG]The code could be more concise by using a with() or identity() block

➥ MockDomainWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper214

[SRC]protected void tearDown() {

[MSG]Violation in class MockDomainWithInheritanceTests. The method tearDown() does not call super.tearDown()

JUnitTestMethodWithoutAssert218

[SRC]void testMockDomainWithInheritance() {

[MSG]Violation in class MockDomainWithInheritanceTests. Test method 'testMockDomainWithInheritance' makes no assertions

JUnitTearDownCallsSuper234

[SRC]protected void tearDown() {

[MSG]Violation in class PersonTests. The method tearDown() does not call super.tearDown()

➥ MockForTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert211

[SRC]void testUnregisteredMockedStaticMethods() {

[MSG]Violation in class MockForTests. Test method 'testUnregisteredMockedStaticMethods' makes no assertions

UnnecessaryObjectReferences319

[SRC]testcase.tearDown()

[MSG]The code could be more concise by using a with() or identity() block

➥ MockUtilsAndHasManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper217

[SRC]protected void setUp() {

[MSG]Violation in class MockUtilsAndHasManyTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper222

[SRC]protected void tearDown() {

[MSG]Violation in class MockUtilsAndHasManyTests. The method tearDown() does not call super.tearDown()

JUnitTestMethodWithoutAssert226

[SRC]void testMockDomainWithHasMany() {

[MSG]Violation in class MockUtilsAndHasManyTests. Test method 'testMockDomainWithHasMany' makes no assertions

JUnitTearDownCallsSuper236

[SRC]protected void tearDown() {

[MSG]Violation in class MagazineTests. The method tearDown() does not call super.tearDown()

➥ MockUtilsDeleteDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper230

[SRC]void setUp() {

[MSG]Violation in class MockUtilsDeleteDomainTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper235

[SRC]void tearDown() {

[MSG]Violation in class MockUtilsDeleteDomainTests. The method tearDown() does not call super.tearDown()

➥ MockUtilsSaveDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper234

[SRC]protected void setUp() {

[MSG]Violation in class MockUtilsSaveDomainTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper241

[SRC]protected void tearDown() {

[MSG]Violation in class MockUtilsSaveDomainTests. The method tearDown() does not call super.tearDown()

UnusedVariable278

[SRC]def domain1 = new TestDomainWithUUID(name: "Alice Doe", ..: 35).save()

[MSG]The variable [domain1] in class grails.test.MockUtilsSaveDomainTests is not used

➥ MockUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertFalseInsteadOfNegation21135

[SRC]assertTrue !model

[MSG]Violation in class grails.test.MockUtilsTests. assertTrue(!model) can be simplified to assertFalse(model)

EqualsAndHashCode21589

[SRC]class TestDomain {

[MSG]The class grails.test.TestDomain defines equals(Object) but not hashCode()

EqualsAndHashCode21685

[SRC]class TestDomainWithUUID {

[MSG]The class grails.test.TestDomainWithUUID defines equals(Object) but not hashCode()

UnusedMethodParameter21882

[SRC]def beforeValidate(List properties) {

[MSG]Violation in class ClassWithListArgBeforeValidate. Method parameter [properties] is never referenced in the method beforeValidate of class grails.test.ClassWithListArgBeforeValidate

UnusedMethodParameter21896

[SRC]def beforeValidate(List properties) {

[MSG]Violation in class ClassWithOverloadedBeforeValidate. Method parameter [properties] is never referenced in the method beforeValidate of class grails.test.ClassWithOverloadedBeforeValidate

UnnecessaryObjectReferences31202

[SRC]cmd.validate()

[MSG]The code could be more concise by using a with() or identity() block

➥ TagLibUnitTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert28

[SRC]void testTagThatPopulatesPageScope() {

[MSG]Violation in class TagLibUnitTestCaseTests. Test method 'testTagThatPopulatesPageScope' makes no assertions

JUnitTestMethodWithoutAssert216

[SRC]void testTagThatAccessesPageScope() {

[MSG]Violation in class TagLibUnitTestCaseTests. Test method 'testTagThatAccessesPageScope' makes no assertions

Package: grails-test-suite-uber.src.test.groovy.grails.test.mixin

➥ AstEnhancedControllerUnitTestMixinTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter322

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter334

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter342

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter350

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter360

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter370

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter381

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3104

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3112

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3121

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3131

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3149

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3159

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3168

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3178

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3188

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3196

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.AstEnhancedControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

➥ AutowireServiceViaDefineBeansTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert216

[SRC]void testThatBeansAreWired() {

[MSG]Violation in class AutowireServiceViaDefineBeansTests. Test method 'testThatBeansAreWired' makes no assertions

UnusedImport33

[SRC]import org.junit.Before

[MSG]The [org.junit.Before] import is never referenced

UnusedImport37

[SRC]import org.junit.BeforeClass

[MSG]The [org.junit.BeforeClass] import is never referenced

➥ BidirectionalOneToManyUnitTestTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert212

[SRC]void testRelationship() {

[MSG]Violation in class BidirectionalOneToManyUnitTestTests. Test method 'testRelationship' makes no assertions

➥ ControllerAndFilterMixinInteractionTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod225

[SRC]def index() { }

[MSG]Violation in class SecureUserController. The method index is both empty and not marked with @Override

➥ ControllerAndMockForTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert29

[SRC]void testIndexWithoutUsingMockFor() {

[MSG]Violation in class ControllerAndMockForTests. Test method 'testIndexWithoutUsingMockFor' makes no assertions

JUnitTestMethodWithoutAssert229

[SRC]void testIndexWithoutUsingMockForAgain() {

[MSG]Violation in class ControllerAndMockForTests. Test method 'testIndexWithoutUsingMockForAgain' makes no assertions

➥ ControllerUnitTestMixinTests.groovy

Rule NamePriorityLine #Source Line / Message
BrokenOddnessCheck2564

[SRC]if(val.size() % 2 == 1) {

[MSG]The code uses '(val.size() % 2 == 1)' to check for oddness, which does not work for negative numbers. Use (val.size() & 1 == 1) or (val.size() % 2 != 0) instead

BrokenOddnessCheck2564

[SRC]if(val.size() % 2 == 1) {

[MSG]The code uses '(val.size() % 2 == 1)' to check for oddness, which does not work for negative numbers. Use (val.size() & 1 == 1) or (val.size() % 2 != 0) instead

UnnecessaryGetter326

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter347

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter355

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter363

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter373

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter383

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter394

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3117

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3125

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3134

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3143

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3154

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3172

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3182

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3191

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3201

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3211

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3219

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3229

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryGetter3251

[SRC]def controller = getMockController()

[MSG]Violation in class grails.test.mixin.ControllerUnitTestMixinTests. getMockController() can probably be rewritten as mockController

UnnecessaryOverridingMethod3552

[SRC]def method1() {

[MSG]Violation in class SubController. The method method1 contains no logic and can be safely deleted

➥ ControllerWithMockCollabTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert212

[SRC]void testFirstCall() {

[MSG]Violation in class ControllerWithMockCollabTests. Test method 'testFirstCall' makes no assertions

JUnitTestMethodWithoutAssert217

[SRC]void testSecondCall() {

[MSG]Violation in class ControllerWithMockCollabTests. Test method 'testSecondCall' makes no assertions

UseAssertTrueInsteadOfAssertEquals335

[SRC]assert called == true

[MSG]The expression '(called == true)' can be simplified to 'called'

➥ DomainClassAnnotatedSetupMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod216

[SRC]void testSaveInSetup() {

[MSG]Violation in class DomainClassAnnotatedSetupMethodTests. The method testSaveInSetup is both empty and not marked with @Override

JUnitTestMethodWithoutAssert216

[SRC]void testSaveInSetup() {

[MSG]Violation in class DomainClassAnnotatedSetupMethodTests. Test method 'testSaveInSetup' makes no assertions

➥ DomainClassControllerUnitTestMixinTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import grails.validation.ValidationErrors

[MSG]The [grails.validation.ValidationErrors] import is never referenced

UseAssertTrueInsteadOfAssertEquals357

[SRC]assert book.validate() == false

[MSG]The expression '(book.validate() == false)' can be simplified to '!book.validate()'

➥ DomainClassSetupMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper212

[SRC]void setUp() {

[MSG]Violation in class DomainClassSetupMethodTests. The method setUp() does not call super.setUp()

➥ MockForTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter246

[SRC]void request(HttpServletRequest request) {

[MSG]Violation in class SolrServer. Method parameter [request] is never referenced in the method request of class grails.test.mixin.SolrServer

➥ ServiceAndMockForTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert235

[SRC]void testIndexWithoutUsingMockForAgain() {

[MSG]Violation in class ServiceAndMockForTests. Test method 'testIndexWithoutUsingMockForAgain' makes no assertions

➥ UrlMappingsTestMixinTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock273

[SRC]catch (e) {}

[MSG]The catch block is empty

EmptyMethod2151

[SRC]@Action def action1(){}

[MSG]Violation in class GrailsUrlMappingsTestCaseFakeController. The method action1 is both empty and not marked with @Override

EmptyMethod2152

[SRC]@Action def action2(){}

[MSG]Violation in class GrailsUrlMappingsTestCaseFakeController. The method action2 is both empty and not marked with @Override

EmptyMethod2153

[SRC]@Action def action3(){}

[MSG]Violation in class GrailsUrlMappingsTestCaseFakeController. The method action3 is both empty and not marked with @Override

EmptyMethod2157

[SRC]@Action def publicProfile() {}

[MSG]Violation in class UserController. The method publicProfile is both empty and not marked with @Override

Package: grails-test-suite-uber.src.test.groovy.grails.util

➥ BuildScopeTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper29

[SRC]protected void tearDown() {

[MSG]Violation in class BuildScopeTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter314

[SRC]assertEquals BuildScope.ALL, BuildScope.getCurrent()

[MSG]Violation in class grails.util.BuildScopeTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter318

[SRC]assertEquals BuildScope.WAR, BuildScope.getCurrent()

[MSG]Violation in class grails.util.BuildScopeTests. getCurrent() can probably be rewritten as current

➥ BuildSettingsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper215

[SRC]protected void setUp() {

[MSG]Violation in class BuildSettingsTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper229

[SRC]protected void tearDown() {

[MSG]Violation in class BuildSettingsTests. The method tearDown() does not call super.tearDown()

EmptyMethod2332

[SRC]void receiveGrailsBuildEvent(String name, Object[] args) {}

[MSG]Violation in class BuildSettingsTestsGrailsBuildListener. The method receiveGrailsBuildEvent is both empty and not marked with @Override

UnusedMethodParameter2332

[SRC]void receiveGrailsBuildEvent(String name, Object[] args) {}

[MSG]Violation in class BuildSettingsTestsGrailsBuildListener. Method parameter [name] is never referenced in the method receiveGrailsBuildEvent of class grails.util.BuildSettingsTestsGrailsBuildListener

UnusedMethodParameter2332

[SRC]void receiveGrailsBuildEvent(String name, Object[] args) {}

[MSG]Violation in class BuildSettingsTestsGrailsBuildListener. Method parameter [args] is never referenced in the method receiveGrailsBuildEvent of class grails.util.BuildSettingsTestsGrailsBuildListener

➥ EnvironmentTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper29

[SRC]protected void tearDown() {

[MSG]Violation in class EnvironmentTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter314

[SRC]Metadata.getCurrent().clear()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter320

[SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter351

[SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter368

[SRC]assertEquals Environment.CUSTOM, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter388

[SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3107

[SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3126

[SRC]assertEquals Environment.CUSTOM, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3148

[SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3151

[SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3154

[SRC]assertEquals Environment.CUSTOM, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3169

[SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3172

[SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3175

[SRC]assertEquals Environment.PRODUCTION, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3178

[SRC]assertEquals Environment.DEVELOPMENT, Environment.getCurrent()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3186

[SRC]assertFalse "reload should be disabled by default in pro..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3189

[SRC]assertFalse "reload should be disabled by default in dev..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3192

[SRC]assertTrue "reload should be enabled by default in devel..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3196

[SRC]assertFalse "reload should be disabled by default in pro..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter3199

[SRC]assertFalse "reload should be disabled by default in pro..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

UnnecessaryObjectReferences3201

[SRC]System.setProperty(Environment.RELOAD_LOCATION, ".")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3202

[SRC]assertTrue "reload should be enabled by default in produ..oadEnabled()

[MSG]Violation in class grails.util.EnvironmentTests. getCurrent() can probably be rewritten as current

➥ MetadataTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter315

[SRC]assertEquals "1.1", m.getInstalledPlugins().tomcat

[MSG]Violation in class grails.util.MetadataTests. getInstalledPlugins() can probably be rewritten as installedPlugins

UnnecessaryGetter316

[SRC]assertEquals "1.2", m.getInstalledPlugins().hibernate

[MSG]Violation in class grails.util.MetadataTests. getInstalledPlugins() can probably be rewritten as installedPlugins

➥ PluginBuildSettingsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]PluginBuildSettings createPluginBuildSettings(File proje.._PROJ_DIR) {

[MSG]Violation in class PluginBuildSettingsTests. The method createPluginBuildSettings is public but not a test method

UseAssertFalseInsteadOfNegation2277

[SRC]assertTrue("should not be a plugin-two dir in same dir a..pp.exists())

[MSG]Violation in class grails.util.PluginBuildSettingsTests. assertTrue(!pluginTwoInSameDirAsRootApp.exists()) can be simplified to assertFalse(pluginTwoInSameDirAsRootApp.exists())

UnnecessaryGetter371

[SRC]def sourceFiles = pluginSettings.getPluginSourceFiles()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginSourceFiles() can probably be rewritten as pluginSourceFiles

UnnecessaryGetter3102

[SRC]assertEquals 2, pluginSettings.getPluginLibDirectories().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginLibDirectories() can probably be rewritten as pluginLibDirectories

UnnecessaryGetter3103

[SRC]assertEquals 2, pluginSettings.getPluginLibDirectories().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginLibDirectories() can probably be rewritten as pluginLibDirectories

UnnecessaryGetter3108

[SRC]assertEquals 2, pluginSettings.getPluginDescriptors().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginDescriptors() can probably be rewritten as pluginDescriptors

UnnecessaryGetter3109

[SRC]assertEquals 2, pluginSettings.getPluginDescriptors().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginDescriptors() can probably be rewritten as pluginDescriptors

UnnecessaryGetter3116

[SRC]assertEquals 6, pluginSettings.getArtefactResources().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3117

[SRC]assertEquals 6, pluginSettings.getArtefactResources().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getArtefactResources() can probably be rewritten as artefactResources

UnnecessaryGetter3131

[SRC]def scripts = pluginSettings.getAvailableScripts()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getAvailableScripts() can probably be rewritten as availableScripts

UnnecessaryGetter3143

[SRC]def scripts = pluginSettings.getPluginScripts()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginScripts() can probably be rewritten as pluginScripts

UnnecessaryGetter3151

[SRC]assertEquals 2, pluginSettings.getPluginXmlMetadata().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata

UnnecessaryGetter3152

[SRC]assertEquals 2, pluginSettings.getPluginXmlMetadata().size()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginXmlMetadata() can probably be rewritten as pluginXmlMetadata

UnnecessaryGetter3158

[SRC]def pluginInfos = pluginSettings.getPluginInfos()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginInfos() can probably be rewritten as pluginInfos

UnnecessaryGetter3177

[SRC]def pluginDirs = createPluginBuildSettings().getImplicit..irectories()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories

UnnecessaryGetter3199

[SRC]def pluginDirs = pluginSettings.getPluginDirectories()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3282

[SRC]def pluginInfos = pluginSettings.getPluginInfos()

[MSG]Violation in class grails.util.PluginBuildSettingsTests. getPluginInfos() can probably be rewritten as pluginInfos

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.cli

➥ AbstractCliTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper242

[SRC]protected void setUp() {

[MSG]Violation in class AbstractCliTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper251

[SRC]protected void tearDown() {

[MSG]Violation in class AbstractCliTests. The method tearDown() does not call super.tearDown()

UnnecessaryObjectReferences3100

[SRC]settings.resourcesDir = new File("$projectDir/resources")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3101

[SRC]settings.testClassesDir = new File("$projectDir/test-classes")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3102

[SRC]settings.projectPluginsDir = new File("$projectDir/plugins")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3103

[SRC]settings.globalPluginsDir = new File("$workDir/global-plugins")

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.cli.support

➥ GrailsBuildHelperTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert213

[SRC]void testSetDepedenciesExternallyConfigured() {

[MSG]Violation in class GrailsBuildHelperTests. Test method 'testSetDepedenciesExternallyConfigured' makes no assertions

UnnecessaryObjectReferences342

[SRC]testHelper.projectPluginsDir = new File("plugins")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences343

[SRC]testHelper.globalPluginsDir = new File("global-work/plugins")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences344

[SRC]testHelper.testReportsDir = new File("target/test-reports")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences345

[SRC]testHelper.compileDependencies = testCompileDeps

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences346

[SRC]testHelper.testDependencies = testTestDeps

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences347

[SRC]testHelper.runtimeDependencies = testRuntimeDeps

[MSG]The code could be more concise by using a with() or identity() block

➥ JndiBindingSupportTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import javax.naming.Context

[MSG]The [javax.naming.Context] import is never referenced

UnusedImport35

[SRC]import javax.naming.spi.ObjectFactory

[MSG]The [javax.naming.spi.ObjectFactory] import is never referenced

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.commons

➥ DefaultGrailsCodecClassTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper29

[SRC]protected void setUp() {

[MSG]Violation in class DefaultGrailsCodecClassTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper213

[SRC]protected void tearDown() {

[MSG]Violation in class DefaultGrailsCodecClassTests. The method tearDown() does not call super.tearDown()

UnusedMethodParameter236

[SRC]def encode(obj) { "encoded" }

[MSG]Violation in class CodecWithMethodsCodec. Method parameter [obj] is never referenced in the method encode of class org.codehaus.groovy.grails.commons.CodecWithMethodsCodec

UnusedMethodParameter237

[SRC]def decode(obj) { "decoded" }

[MSG]Violation in class CodecWithMethodsCodec. Method parameter [obj] is never referenced in the method decode of class org.codehaus.groovy.grails.commons.CodecWithMethodsCodec

UnnecessaryGetter319

[SRC]assertEquals "encoded", codecClass.getEncodeMethod().call("stuff")

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsCodecClassTests. getEncodeMethod() can probably be rewritten as encodeMethod

UnnecessaryGetter320

[SRC]assertEquals "decoded", codecClass.getDecodeMethod().call("stuff")

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsCodecClassTests. getDecodeMethod() can probably be rewritten as decodeMethod

➥ DefaultGrailsDomainClassPropertyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper213

[SRC]void setUp() {

[MSG]Violation in class DefaultGrailsDomainClassPropertyTests. The method setUp() does not call super.setUp()

ComparisonWithSelf224

[SRC]assertTrue(prop1Child.equals(prop1Child))

[MSG]Comparing an object to itself is useless and may indicate a bug: prop1Child.equals(prop1Child)

UnnecessaryGroovyImport33

[SRC]import groovy.util.GroovyTestCase

UnnecessaryDotClass315

[SRC]parentClass = new DefaultGrailsDomainClass(ParentClass.class)

[MSG]ParentClass.class can be rewritten as ParentClass

UnnecessaryDotClass316

[SRC]childClass = new DefaultGrailsDomainClass(ChildClass.class)

[MSG]ChildClass.class can be rewritten as ChildClass

➥ DefaultGrailsDomainClassTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2272

[SRC]Class topClass = gcl.parseClass("class Top {\n" +

[MSG]The variable [topClass] in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests is not used

UnusedVariable2279

[SRC]Class middleClass = gcl.parseClass("class Middle extends Top {\n" +

[MSG]The variable [middleClass] in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests is not used

UnusedVariable2284

[SRC]Class bottomClass = gcl.parseClass("class Bottom extends Middle {\n" +

[MSG]The variable [bottomClass] in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests is not used

EmptyCatchBlock2372

[SRC]catch(InvalidPropertyException ipe) {

[MSG]The catch block is empty

UnnecessaryGetter338

[SRC]assertEquals(GrailsDomainClassProperty.FETCH_EAGER, test..FetchMode())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter341

[SRC]assertEquals(GrailsDomainClassProperty.FETCH_LAZY, other..FetchMode())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getFetchMode() can probably be rewritten as fetchMode

UnnecessaryGetter3200

[SRC]domainMap.put(dc.getFullName(),dc)

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getFullName() can probably be rewritten as fullName

UnnecessaryGetter3207

[SRC]assertTrue(dc.getPropertyByName("children").getOtherSide..("parent")))

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter3208

[SRC]assertTrue(dc.getPropertyByName("parent").getOtherSide()..children")))

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter3256

[SRC]assertEquals(c1dc.getPropertyByName("ones").getOtherSide..me("other"))

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter3263

[SRC]assertEquals(c2dc.getPropertyByName("other").getOtherSid..ame("ones"))

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getOtherSide() can probably be rewritten as otherSide

UnnecessaryGetter3362

[SRC]assertEquals("UserTest",domainClass.getName())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getName() can probably be rewritten as name

UnnecessaryGetter3364

[SRC]assertNotNull(domainClass.getIdentifier())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getIdentifier() can probably be rewritten as identifier

UnnecessaryGetter3365

[SRC]assertNotNull(domainClass.getVersion())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getVersion() can probably be rewritten as version

UnnecessaryGetter3366

[SRC]assertTrue(domainClass.getIdentifier().isIdentity())

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getIdentifier() can probably be rewritten as identifier

UnnecessaryGetter3390

[SRC]GrailsDomainClassProperty[] persistantProperties = domai..Properties()

[MSG]Violation in class org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassTests. getPersistentProperties() can probably be rewritten as persistentProperties

➥ GrailsMetaClassUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter315

[SRC]assertNotNull(GrailsMetaClassUtils.getRegistry())

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsMetaClassUtilsTests. getRegistry() can probably be rewritten as registry

UnnecessaryGetter339

[SRC]assertEquals "bar", d.getFoo()

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsMetaClassUtilsTests. getFoo() can probably be rewritten as foo

UnnecessaryGetter348

[SRC]assertEquals "bar", d.getFoo()

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsMetaClassUtilsTests. getFoo() can probably be rewritten as foo

➥ GrailsPluginManagerDescriptorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert28

[SRC]void testDoWithWebDescriptor() {

[MSG]Violation in class GrailsPluginManagerDescriptorTests. Test method 'testDoWithWebDescriptor' makes no assertions

UnusedVariable220

[SRC]def xml = new XmlSlurper().parseText(text)

[MSG]The variable [xml] in class org.codehaus.groovy.grails.commons.GrailsPluginManagerDescriptorTests is not used

JUnitTestMethodWithoutAssert223

[SRC]void testDevelopmentDescriptor() {

[MSG]Violation in class GrailsPluginManagerDescriptorTests. Test method 'testDevelopmentDescriptor' makes no assertions

UnusedVariable236

[SRC]def xml = new XmlSlurper().parseText(text)

[MSG]The variable [xml] in class org.codehaus.groovy.grails.commons.GrailsPluginManagerDescriptorTests is not used

➥ GrailsPluginManagerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert2122

[SRC]void testWithLoadLastPlugin() {

[MSG]Violation in class GrailsPluginManagerTests. Test method 'testWithLoadLastPlugin' makes no assertions

JUnitTestMethodWithoutAssert2134

[SRC]void testDependencyResolutionSucces() {

[MSG]Violation in class GrailsPluginManagerTests. Test method 'testDependencyResolutionSucces' makes no assertions

UnusedImport35

[SRC]import org.codehaus.groovy.grails.plugins.exceptions.PluginException

[MSG]The [org.codehaus.groovy.grails.plugins.exceptions.PluginException] import is never referenced

UnnecessaryGetter3103

[SRC]assertEquals(1, manager.getPluginResources().length)

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsPluginManagerTests. getPluginResources() can probably be rewritten as pluginResources

UnnecessaryGetter3112

[SRC]assertEquals("classEditor",plugin.getName())

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsPluginManagerTests. getName() can probably be rewritten as name

UnnecessaryGetter3113

[SRC]assertEquals("1.1", plugin.getVersion())

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsPluginManagerTests. getVersion() can probably be rewritten as version

UnnecessaryGetter3153

[SRC]def ctx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsPluginManagerTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter3171

[SRC]def ctx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.commons.GrailsPluginManagerTests. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.commons.metaclass

➥ DynamicMethodsExpandoMetaClassTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.springframework.beans.BeanUtils

[MSG]The [org.springframework.beans.BeanUtils] import is never referenced

UnnecessaryDotClass326

[SRC]def metaClass = new DynamicMethodsExpandoMetaClass(Book.class)

[MSG]Book.class can be rewritten as Book

UnnecessaryDotClass344

[SRC]def metaClass = new DynamicMethodsExpandoMetaClass(Book.class, true)

[MSG]Book.class can be rewritten as Book

UnnecessaryDotClass357

[SRC]def metaClass = new DynamicMethodsExpandoMetaClass(Book.class, true)

[MSG]Book.class can be rewritten as Book

UnnecessaryGetter376

[SRC]assertEquals "bar", b.getFoo()

[MSG]Violation in class org.codehaus.groovy.grails.commons.metaclass.DynamicMethodsExpandoMetaClassTests. getFoo() can probably be rewritten as foo

➥ LazyMetaPropertyMapTests.groovy

Rule NamePriorityLine #Source Line / Message
CoupledTestCase211

[SRC]def obj = new PropertyMapTest(name:"Homer", age:45)

[MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase219

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..er:"stuff"))

[MSG]new PropertyMapTest([name:Bart, age:11, other:stuff]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase228

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest())

[MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase233

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest())

[MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase238

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest())

[MSG]new PropertyMapTest() creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase246

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..r", age:45))

[MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase254

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..r", age:45))

[MSG]new PropertyMapTest([name:Homer, age:45]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase270

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11))

[MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase285

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11))

[MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

CoupledTestCase294

[SRC]def map = new LazyMetaPropertyMap(new PropertyMapTest(na..t", age:11))

[MSG]new PropertyMapTest([name:Bart, age:11]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

➥ MetaClassEnhancerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper241

[SRC]protected void tearDown() throws Exception {

[MSG]Violation in class MetaClassEnhancerTests. The method tearDown() does not call super.tearDown()

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.compiler

➥ GrailsClassLoaderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.control.CompilerConfiguration

[MSG]The [org.codehaus.groovy.control.CompilerConfiguration] import is never referenced

UnusedImport34

[SRC]import org.codehaus.groovy.grails.compiler.support.Grail..sourceLoader

[MSG]The [org.codehaus.groovy.grails.compiler.support.GrailsResourceLoader] import is never referenced

UnnecessaryGetter332

[SRC]assert e == gcl.getCompilationError() : "should have sto..ation error"

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsClassLoaderTests. getCompilationError() can probably be rewritten as compilationError

UnnecessaryGetter338

[SRC]assert !gcl.getCompilationError() : "shouldn't have any ..tion errors"

[MSG]Violation in class org.codehaus.groovy.grails.compiler.GrailsClassLoaderTests. getCompilationError() can probably be rewritten as compilationError

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.compiler.injection

➥ GrailsASTUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertTrueInsteadOfAssertEquals364

[SRC]assert true == firstNameBindableExpression.value

[MSG]The expression '(true == firstNameBindableExpression.value)' can be simplified to 'firstNameBindableExpression.value'

UseAssertTrueInsteadOfAssertEquals372

[SRC]assert false == lastNameBindableExpression.value

[MSG]The expression '(false == lastNameBindableExpression.value)' can be simplified to '!lastNameBindableExpression.value'

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.context.support

➥ PluginAwareResourceBundleMessageSourceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper216

[SRC]protected void setUp() {

[MSG]Violation in class PluginAwareResourceBundleMessageSourceTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper220

[SRC]protected void tearDown() {

[MSG]Violation in class PluginAwareResourceBundleMessageSourceTests. The method tearDown() does not call super.tearDown()

UnusedMethodParameter261

[SRC]protected Resource[] getPluginBundles(String pluginName) {

[MSG]Violation in class TestPluginAwareResourceBundleMessageSource. Method parameter [pluginName] is never referenced in the method getPluginBundles of class org.codehaus.groovy.grails.context.support.TestPluginAwareResourceBundleMessageSource

UnnecessaryGetter317

[SRC]Metadata.getCurrent().put(Metadata.WAR_DEPLOYED, "true")

[MSG]Violation in class org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSourceTests. getCurrent() can probably be rewritten as current

UnnecessaryGetter321

[SRC]Metadata.getCurrent().put(Metadata.WAR_DEPLOYED, "")

[MSG]Violation in class org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSourceTests. getCurrent() can probably be rewritten as current

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.documentation

➥ MetadataGeneratingExpandoMetaClassTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import groovy.xml.StreamingMarkupBuilder

[MSG]The [groovy.xml.StreamingMarkupBuilder] import is never referenced

UnusedImport35

[SRC]import org.codehaus.groovy.grails.commons.ControllerArtefactHandler

[MSG]The [org.codehaus.groovy.grails.commons.ControllerArtefactHandler] import is never referenced

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins

➥ CoreGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert212

[SRC]void testComponentScan() {

[MSG]Violation in class CoreGrailsPluginTests. Test method 'testComponentScan' makes no assertions

UnusedVariable225

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]The variable [appCtx] in class org.codehaus.groovy.grails.plugins.CoreGrailsPluginTests is not used

UnnecessaryGetter325

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter338

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter355

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter3119

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.CoreGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

➥ DomainClassGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod212

[SRC]void onSetUp() {

[MSG]Violation in class DomainClassGrailsPluginTests. The method onSetUp is public but not a test method

UnusedMethodParameter2202

[SRC]boolean shouldInject(URL url) { true }

[MSG]Violation in class AlwaysInjector. Method parameter [url] is never referenced in the method shouldInject of class org.codehaus.groovy.grails.plugins.AlwaysInjector

UnusedMethodParameter2204

[SRC]protected boolean isDomainClass(ClassNode classNode, Sou..e) { true }

[MSG]Violation in class AlwaysInjector. Method parameter [classNode] is never referenced in the method isDomainClass of class org.codehaus.groovy.grails.plugins.AlwaysInjector

UnusedMethodParameter2204

[SRC]protected boolean isDomainClass(ClassNode classNode, Sou..e) { true }

[MSG]Violation in class AlwaysInjector. Method parameter [sourceNode] is never referenced in the method isDomainClass of class org.codehaus.groovy.grails.plugins.AlwaysInjector

UnusedMethodParameter2206

[SRC]protected boolean shouldInjectClass(ClassNode classNode) { true }

[MSG]Violation in class AlwaysInjector. Method parameter [classNode] is never referenced in the method shouldInjectClass of class org.codehaus.groovy.grails.plugins.AlwaysInjector

UnnecessaryObjectReferences343

[SRC]gcl.parseClass("""class Child3 extends grails.test.Parent2 {

[MSG]The code could be more concise by using a with() or identity() block

➥ GrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import grails.util.BuildSettings

[MSG]The [grails.util.BuildSettings] import is never referenced

UnnecessaryGetter3181

[SRC]System.setProperty(Environment.KEY, Environment.PRODUCTION.getName())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginTests. getName() can probably be rewritten as name

➥ GrailsPluginUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper217

[SRC]protected void setUp() {

[MSG]Violation in class GrailsPluginUtilsTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper237

[SRC]void tearDown() {

[MSG]Violation in class GrailsPluginUtilsTests. The method tearDown() does not call super.tearDown()

UnusedImport36

[SRC]import org.apache.commons.io.FileUtils

[MSG]The [org.apache.commons.io.FileUtils] import is never referenced

UnnecessaryGetter3146

[SRC]def pluginDirs = GrailsPluginUtils.getPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtilsTests. getPluginDirectories() can probably be rewritten as pluginDirectories

UnnecessaryGetter3155

[SRC]def pluginDirs = GrailsPluginUtils.getImplicitPluginDirectories()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.GrailsPluginUtilsTests. getImplicitPluginDirectories() can probably be rewritten as implicitPluginDirectories

➥ PluginDescriptorReaderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter250

[SRC]Resource createRelative(String relativePath) { new ByteA..xml.bytes) }

[MSG]Violation in class PluginDescriptorReaderTests$1. Method parameter [relativePath] is never referenced in the method createRelative of class org.codehaus.groovy.grails.plugins.PluginDescriptorReaderTests$1

➥ PluginInfoTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter238

[SRC]GPathResult parseMetadata(Resource pluginDir) { null }

[MSG]Violation in class MockPluginInfo. Method parameter [pluginDir] is never referenced in the method parseMetadata of class org.codehaus.groovy.grails.plugins.MockPluginInfo

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins.i18n

➥ I18nGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences320

[SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/sub/di..properties")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences321

[SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences322

[SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle.txt")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences323

[SRC]ctx.registerMockResource("WEB-INF/grails-app/i18n/nobundle.xml")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter334

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.i18n.I18nGrailsPluginTests. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins.logging

➥ Log4jDslTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2201

[SRC]def consoleAppender

[MSG]The variable [consoleAppender] in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests is not used

UnnecessaryGetter3120

[SRC]def r = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3139

[SRC]r = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3158

[SRC]r = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3178

[SRC]def root = Logger.getRootLogger()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests. getRootLogger() can probably be rewritten as rootLogger

UnnecessaryGetter3181

[SRC]def appenders = root.getAllAppenders()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.logging.Log4jDslTests. getAllAppenders() can probably be rewritten as allAppenders

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins.publishing

➥ DefaultPluginPublisherTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2249

[SRC]protected GPathResult getPluginMetadata(String pluginName) {

[MSG]Violation in class TestPluginPublisher. Method parameter [pluginName] is never referenced in the method getPluginMetadata of class org.codehaus.groovy.grails.plugins.publishing.TestPluginPublisher

UnusedMethodParameter2253

[SRC]GPathResult parsePluginList(Resource pluginsListFile) {

[MSG]Violation in class TestPluginPublisher. Method parameter [pluginsListFile] is never referenced in the method parsePluginList of class org.codehaus.groovy.grails.plugins.publishing.TestPluginPublisher

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins.web

➥ ControllersGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2180

[SRC]Class parseTestBean() {

[MSG]Violation in class ControllersGrailsPluginTests. The method parseTestBean is public but not a test method

UseAssertEqualsInsteadOfAssertTrue3115

[SRC]assertTrue ga.config.grails.disableCommonsMultipart.size() == 0

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. Replace assertTrue with a call to assertEquals()

UnnecessaryGetter3131

[SRC]assertNotNull beanDef.getPropertyValues().getPropertyVal..seResource')

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. getPropertyValues() can probably be rewritten as propertyValues

UnnecessaryGetter3133

[SRC]assertEquals "file:.", beanDef.getPropertyValues().getPr..).getValue()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. getValue() can probably be rewritten as value

UnnecessaryGetter3133

[SRC]assertEquals "file:.", beanDef.getPropertyValues().getPr..).getValue()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. getPropertyValues() can probably be rewritten as propertyValues

UnnecessaryGetter3136

[SRC]assertEquals "groovyPageLocator", beanDef.getPropertyVal..()?.beanName

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. getValue() can probably be rewritten as value

UnnecessaryGetter3136

[SRC]assertEquals "groovyPageLocator", beanDef.getPropertyVal..()?.beanName

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ControllersGrailsPluginTests. getPropertyValues() can probably be rewritten as propertyValues

➥ LoggingGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable241

[SRC]def registry = GroovySystem.metaClassRegistry

[MSG]The variable [registry] in class org.codehaus.groovy.grails.plugins.web.LoggingGrailsPluginTests is not used

UnusedVariable247

[SRC]def registry = GroovySystem.metaClassRegistry

[MSG]The variable [registry] in class org.codehaus.groovy.grails.plugins.web.LoggingGrailsPluginTests is not used

UnusedVariable253

[SRC]def registry = GroovySystem.metaClassRegistry

[MSG]The variable [registry] in class org.codehaus.groovy.grails.plugins.web.LoggingGrailsPluginTests is not used

➥ ServletsGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable260

[SRC]def httpSessionMetaClass = GroovySystem.getMetaClassRegi..HttpSession)

[MSG]The variable [httpSessionMetaClass] in class org.codehaus.groovy.grails.plugins.web.ServletsGrailsPluginTests is not used

UnusedVariable261

[SRC]def metaClass = GroovySystem.getMetaClassRegistry().getM...getClass())

[MSG]The variable [metaClass] in class org.codehaus.groovy.grails.plugins.web.ServletsGrailsPluginTests is not used

UnnecessaryGroovyImport33

[SRC]import groovy.lang.GroovySystem;

UnnecessaryGetter360

[SRC]def httpSessionMetaClass = GroovySystem.getMetaClassRegi..HttpSession)

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ServletsGrailsPluginTests. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

UnnecessaryGetter361

[SRC]def metaClass = GroovySystem.getMetaClassRegistry().getM...getClass())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.web.ServletsGrailsPluginTests. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.plugins.web.mapping

➥ UrlMappingsGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper287

[SRC]protected void tearDown() {

[MSG]Violation in class UrlMappingsGrailsPluginTests. The method tearDown() does not call super.tearDown()

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.reload

➥ TagLibReloadTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable218

[SRC]Class oldClass = ga.getTagLibClass("TestTagLib").getClazz()

[MSG]The variable [oldClass] in class org.codehaus.groovy.grails.reload.TagLibReloadTests is not used

UnusedVariable219

[SRC]def result

[MSG]The variable [result] in class org.codehaus.groovy.grails.reload.TagLibReloadTests is not used

JUnitPublicNonTestMethod245

[SRC]void onInit() {

[MSG]Violation in class TagLibReloadTests. The method onInit is public but not a test method

UnnecessaryGetter318

[SRC]Class oldClass = ga.getTagLibClass("TestTagLib").getClazz()

[MSG]Violation in class org.codehaus.groovy.grails.reload.TagLibReloadTests. getClazz() can probably be rewritten as clazz

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.resolve

➥ IvyDependencyManagerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper223

[SRC]protected void setUp() {

[MSG]Violation in class IvyDependencyManagerTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper227

[SRC]protected void tearDown() {

[MSG]Violation in class IvyDependencyManagerTests. The method tearDown() does not call super.tearDown()

JUnitTestMethodWithoutAssert2119

[SRC]void testPluginResolve() {

[MSG]Violation in class IvyDependencyManagerTests. Test method 'testPluginResolve' makes no assertions

UnusedVariable2132

[SRC]def report = manager.resolveDependencies()

[MSG]The variable [report] in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests is not used

JUnitTestMethodWithoutAssert2449

[SRC]void testResolveApplicationDependencies() {

[MSG]Violation in class IvyDependencyManagerTests. Test method 'testResolveApplicationDependencies' makes no assertions

UnusedVariable2638

[SRC]def grailsVersion = getCurrentGrailsVersion()

[MSG]The variable [grailsVersion] in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests is not used

JUnitPublicNonTestMethod2671

[SRC]def getCurrentGrailsVersion() {

[MSG]Violation in class IvyDependencyManagerTests. The method getCurrentGrailsVersion is public but not a test method

JUnitTestMethodWithoutAssert2799

[SRC]void testResolve() {

[MSG]Violation in class IvyDependencyManagerTests. Test method 'testResolve' makes no assertions

UnusedVariable2831

[SRC]ModuleRevisionId junit = manager.dependencies.find { Mo.. == 'junit'}

[MSG]The variable [junit] in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests is not used

UseAssertTrueInsteadOfAssertEquals338

[SRC]assert manager.ivySettings.defaultUseOrigin == true

[MSG]The expression '(manager.ivySettings.defaultUseOrigin == true)' can be simplified to 'manager.ivySettings.defaultUseOrigin'

UnnecessaryGetter3219

[SRC]assertEquals "1.5", dd.getDependencyRevisionId().revision

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyRevisionId() can probably be rewritten as dependencyRevisionId

UnnecessaryGetter3226

[SRC]assertEquals "0.5.5", dd.getDependencyRevisionId().revision

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyRevisionId() can probably be rewritten as dependencyRevisionId

UnnecessaryGetter3233

[SRC]assertEquals "0.5.6", dd.getDependencyRevisionId().revision

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyRevisionId() can probably be rewritten as dependencyRevisionId

UnnecessaryGetter3298

[SRC]assertEquals 1, dep.getModuleConfigurations().length

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getModuleConfigurations() can probably be rewritten as moduleConfigurations

UnnecessaryGetter3486

[SRC]assertEquals 2, manager.getApplicationDependencyDescriptors().size()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getApplicationDependencyDescriptors() can probably be rewritten as applicationDependencyDescriptors

UnnecessaryGetter3617

[SRC]def grailsVersion = getCurrentGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getCurrentGrailsVersion() can probably be rewritten as currentGrailsVersion

UnnecessaryGetter3638

[SRC]def grailsVersion = getCurrentGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getCurrentGrailsVersion() can probably be rewritten as currentGrailsVersion

UnnecessaryGetter3741

[SRC]DefaultDependencyDescriptor dd = manager.getDependencyDe..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyDescriptors() can probably be rewritten as dependencyDescriptors

UnnecessaryGetter3757

[SRC]dd = manager.getDependencyDescriptors().iterator().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyDescriptors() can probably be rewritten as dependencyDescriptors

UnnecessaryGetter3772

[SRC]DefaultDependencyDescriptor dd = manager.getPluginDepend..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors

UnnecessaryGetter3786

[SRC]DefaultDependencyDescriptor dd = manager.getPluginDepend..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getPluginDependencyDescriptors() can probably be rewritten as pluginDependencyDescriptors

UnnecessaryGetter3850

[SRC]DefaultDependencyDescriptor dd = manager.getDependencyDe..tor().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyDescriptors() can probably be rewritten as dependencyDescriptors

UnnecessaryGetter3866

[SRC]dd = manager.getDependencyDescriptors().iterator().next()

[MSG]Violation in class org.codehaus.groovy.grails.resolve.IvyDependencyManagerTests. getDependencyDescriptors() can probably be rewritten as dependencyDescriptors

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.validation

➥ ConstrainedPropertyBuilderForCommandsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences3106

[SRC]gcl.parseClass('''

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3119

[SRC]gcl.parseClass('''

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3132

[SRC]gcl.parseClass('''

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3153

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3154

[SRC]assertEquals(5, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3155

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3156

[SRC]assertNotNull(personCommand.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3160

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3161

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3162

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3163

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryObjectReferences3181

[SRC]personCommand.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3184

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3184

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3185

[SRC]assertEquals(1, personCommand.getErrors().getFieldErrors..me").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3186

[SRC]assertNull(personCommand.getErrors().getFieldErrors("fir..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3186

[SRC]assertNull(personCommand.getErrors().getFieldErrors("fir..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryObjectReferences3199

[SRC]person.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3202

[SRC]assertEquals(1, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3202

[SRC]assertEquals(1, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3203

[SRC]assertEquals(1, person.getErrors().getFieldErrors("firstName").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3204

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3204

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3214

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3215

[SRC]assertEquals(2, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3216

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3217

[SRC]assertNotNull(personCommand.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3221

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3222

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3223

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3224

[SRC]assertNotNull(person.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3225

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryObjectReferences3243

[SRC]personCommand.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3246

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3246

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3247

[SRC]assertEquals(1, personCommand.getErrors().getFieldErrors..me").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3248

[SRC]assertNull(personCommand.getErrors().getFieldErrors("fir..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3248

[SRC]assertNull(personCommand.getErrors().getFieldErrors("fir..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryObjectReferences3261

[SRC]person.email = "wrongEmail"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3262

[SRC]person.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3265

[SRC]assertEquals(1, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3265

[SRC]assertEquals(1, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3266

[SRC]assertEquals(1, person.getErrors().getFieldErrors("email").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3267

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3267

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3277

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3278

[SRC]assertEquals(5, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3279

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3280

[SRC]assertNotNull(personCommand.getConstraints().get("telephone"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3282

[SRC]assertEquals(30, personCommand.getConstraints().get("fir..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3282

[SRC]assertEquals(30, personCommand.getConstraints().get("fir..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3283

[SRC]assertEquals(50, personCommand.getConstraints().get("las..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3283

[SRC]assertEquals(50, personCommand.getConstraints().get("las..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3286

[SRC]personCommand.getConstraints().get("telephone").getAppli..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3286

[SRC]personCommand.getConstraints().get("telephone").getAppli..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3290

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3291

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3292

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3293

[SRC]assertNotNull(person.getConstraints().get("telephone"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3295

[SRC]assertEquals(30, person.getConstraints().get("firstName"..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3295

[SRC]assertEquals(30, person.getConstraints().get("firstName"..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3296

[SRC]assertEquals(50, person.getConstraints().get("lastName")..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3296

[SRC]assertEquals(50, person.getConstraints().get("lastName")..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3297

[SRC]assertEquals("123123", person.getConstraints().get("tele..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3297

[SRC]assertEquals("123123", person.getConstraints().get("tele..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryObjectReferences3315

[SRC]personCommand.lastName = null

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3316

[SRC]personCommand.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3319

[SRC]assertEquals(2, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3319

[SRC]assertEquals(2, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryObjectReferences3332

[SRC]person.firstName = null

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3333

[SRC]person.email = "wrongEmail"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3334

[SRC]person.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3337

[SRC]assertEquals(2, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3337

[SRC]assertEquals(2, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3338

[SRC]assertEquals(1, person.getErrors().getFieldErrors("firstName").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3339

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3339

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3340

[SRC]assertEquals(1, person.getErrors().getFieldErrors("email").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3341

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3341

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3351

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3352

[SRC]assertEquals(5, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3353

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3354

[SRC]assertNotNull(personCommand.getConstraints().get("telephone"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3356

[SRC]assertEquals(10, personCommand.getConstraints().get("fir..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3356

[SRC]assertEquals(10, personCommand.getConstraints().get("fir..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3357

[SRC]assertEquals(20, personCommand.getConstraints().get("las..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3357

[SRC]assertEquals(20, personCommand.getConstraints().get("las..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3360

[SRC]personCommand.getConstraints().get("telephone").getAppli..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3360

[SRC]personCommand.getConstraints().get("telephone").getAppli..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3364

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3365

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3366

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3367

[SRC]assertNotNull(person.getConstraints().get("telephone"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3369

[SRC]assertEquals(30, person.getConstraints().get("firstName"..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3369

[SRC]assertEquals(30, person.getConstraints().get("firstName"..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3370

[SRC]assertEquals(50, person.getConstraints().get("lastName")..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3370

[SRC]assertEquals(50, person.getConstraints().get("lastName")..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3371

[SRC]assertEquals("123123", person.getConstraints().get("tele..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getParameter() can probably be rewritten as parameter

UnnecessaryGetter3371

[SRC]assertEquals("123123", person.getConstraints().get("tele..Parameter())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryObjectReferences3389

[SRC]personCommand.firstName = null

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3390

[SRC]personCommand.lastName = null

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3391

[SRC]personCommand.email = "wrongEmail"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3392

[SRC]personCommand.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3395

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3395

[SRC]assertEquals(1, personCommand.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryObjectReferences3408

[SRC]person.firstName = null

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3409

[SRC]person.email = "wrongEmail"

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3410

[SRC]person.validate()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3413

[SRC]assertEquals(2, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrorCount() can probably be rewritten as errorCount

UnnecessaryGetter3413

[SRC]assertEquals(2, person.getErrors().getErrorCount())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3414

[SRC]assertEquals(1, person.getErrors().getFieldErrors("firstName").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3415

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3415

[SRC]assertNull(person.getErrors().getFieldErrors("firstName"..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3416

[SRC]assertEquals(1, person.getErrors().getFieldErrors("email").size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3417

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getRejectedValue() can probably be rewritten as rejectedValue

UnnecessaryGetter3417

[SRC]assertEquals("wrongEmail", person.getErrors().getFieldEr..ctedValue())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getErrors() can probably be rewritten as errors

UnnecessaryGetter3427

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3428

[SRC]assertEquals(2, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3429

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3430

[SRC]assertNotNull(personCommand.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3431

[SRC]assertNull(personCommand.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3435

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3436

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3437

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3438

[SRC]assertNotNull(person.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3439

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3449

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3450

[SRC]assertEquals(3, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3451

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3452

[SRC]assertNull(personCommand.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3453

[SRC]assertNull(personCommand.getConstraints().get("lastName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3454

[SRC]assertNotNull(personCommand.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3458

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3459

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3460

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3461

[SRC]assertNotNull(person.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3462

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3472

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3473

[SRC]assertEquals(3, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3474

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3475

[SRC]assertNotNull(personCommand.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3476

[SRC]assertNotNull(personCommand.getConstraints().get("lastName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3477

[SRC]assertNotNull(personCommand.getConstraints().get("middleName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3478

[SRC]assertNull(personCommand.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3482

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3483

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3484

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3485

[SRC]assertNotNull(person.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3486

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3497

[SRC]assertNotNull(personCommand.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3498

[SRC]assertEquals(2, personCommand.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3499

[SRC]assertNull(personCommand.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3500

[SRC]assertNotNull(personCommand.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3501

[SRC]assertNotNull(personCommand.getConstraints().get("lastName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3502

[SRC]assertNull(personCommand.getConstraints().get("middleName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3503

[SRC]assertNull(personCommand.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3507

[SRC]assertNotNull(person.getConstraints())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3508

[SRC]assertEquals(5, person.getConstraints().size())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3509

[SRC]assertNull(person.getConstraints().get("importFrom"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3510

[SRC]assertNotNull(person.getConstraints().get("firstName"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

UnnecessaryGetter3511

[SRC]assertNotNull(person.getConstraints().get("email"))

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilderForCommandsTests. getConstraints() can probably be rewritten as constraints

➥ ConstraintMessageTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter254

[SRC]void processValidate(Object target, Object propertyValue..rs errors) {

[MSG]Violation in class TestConstraint. Method parameter [propertyValue] is never referenced in the method processValidate of class org.codehaus.groovy.grails.validation.TestConstraint

UnusedMethodParameter258

[SRC]boolean supports(Class type) { true }

[MSG]Violation in class TestConstraint. Method parameter [type] is never referenced in the method supports of class org.codehaus.groovy.grails.validation.TestConstraint

UnnecessaryGetter339

[SRC]'test'] as String[], errors.getFieldError().getCodes())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstraintMessageTests. getCodes() can probably be rewritten as codes

UnnecessaryGetter339

[SRC]'test'] as String[], errors.getFieldError().getCodes())

[MSG]Violation in class org.codehaus.groovy.grails.validation.ConstraintMessageTests. getFieldError() can probably be rewritten as fieldError

➥ ConstraintsBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod274

[SRC]Errors validateInstance(instance, validator) {

[MSG]Violation in class ConstraintsBuilderTests. The method validateInstance is public but not a test method

JUnitPublicNonTestMethod280

[SRC]GrailsDomainClassValidator configureValidator(theClass, instance) {

[MSG]Violation in class ConstraintsBuilderTests. The method configureValidator is public but not a test method

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.context

➥ GrailsConfigUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable264

[SRC]def configurator = GrailsConfigUtils.determineGrailsRunt..ontext, ctx)

[MSG]The variable [configurator] in class org.codehaus.groovy.grails.web.context.GrailsConfigUtilsTests is not used

JUnitTearDownCallsSuper279

[SRC]protected void tearDown() {

[MSG]Violation in class GrailsConfigUtilsTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter348

[SRC]servletContext.addInitParameter("grailsConfiguratorClass..s.getName())

[MSG]Violation in class org.codehaus.groovy.grails.web.context.GrailsConfigUtilsTests. getName() can probably be rewritten as name

UnnecessaryDotClass348

[SRC]servletContext.addInitParameter("grailsConfiguratorClass..s.getName())

[MSG]MyGrailsRuntimeConfigurator.class can be rewritten as MyGrailsRuntimeConfigurator

UnnecessaryDotClass353

[SRC]assertEquals configurator.class.name, MyGrailsRuntimeCon..r.class.name

[MSG]MyGrailsRuntimeConfigurator.class can be rewritten as MyGrailsRuntimeConfigurator

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.errors

➥ GrailsExceptionResolverTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper237

[SRC]protected void tearDown() {

[MSG]Violation in class GrailsExceptionResolverTests. The method tearDown() does not call super.tearDown()

UnusedMethodParameter2264

[SRC]View resolveViewName(String viewName, Locale locale) {

[MSG]Violation in class DummyViewResolver. Method parameter [locale] is never referenced in the method resolveViewName of class org.codehaus.groovy.grails.web.errors.DummyViewResolver

UnnecessaryGetter3120

[SRC]assertEquals "/grails/foo/bar.dispatch",response.getForwardedUrl()

[MSG]Violation in class org.codehaus.groovy.grails.web.errors.GrailsExceptionResolverTests. getForwardedUrl() can probably be rewritten as forwardedUrl

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.filters

➥ HiddenHttpMethodFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.springframework.mock.web.MockServletContext;

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

UnusedImport35

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..nAttributes;

[MSG]The [org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes] import is never referenced

UnusedImport36

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest;

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest] import is never referenced

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.i18n

➥ ParamsAwareLocaleChangeInterceptorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper216

[SRC]protected void tearDown() {

[MSG]Violation in class ParamsAwareLocaleChangeInterceptorTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter324

[SRC]def request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter325

[SRC]def response = webRequest.getCurrentResponse()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentResponse() can probably be rewritten as currentResponse

UnnecessaryGetter347

[SRC]assertEquals "de", locale.getLanguage()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getLanguage() can probably be rewritten as language

UnnecessaryGetter348

[SRC]assertEquals "DE", locale.getCountry()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCountry() can probably be rewritten as country

UnnecessaryGetter355

[SRC]def request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter356

[SRC]def response = webRequest.getCurrentResponse()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentResponse() can probably be rewritten as currentResponse

UnnecessaryGetter378

[SRC]assertEquals "de", locale.getLanguage()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getLanguage() can probably be rewritten as language

UnnecessaryGetter379

[SRC]assertEquals "DE", locale.getCountry()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCountry() can probably be rewritten as country

UnnecessaryGetter386

[SRC]MockHttpServletRequest request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter387

[SRC]def response = webRequest.getCurrentResponse()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCurrentResponse() can probably be rewritten as currentResponse

UnnecessaryGetter3109

[SRC]assertEquals "de", locale.getLanguage()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getLanguage() can probably be rewritten as language

UnnecessaryGetter3110

[SRC]assertEquals "DE", locale.getCountry()

[MSG]Violation in class org.codehaus.groovy.grails.web.i18n.ParamsAwareLocaleChangeInterceptorTests. getCountry() can probably be rewritten as country

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.json

➥ JSONObjectTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertEqualsInsteadOfAssertTrue332

[SRC]assertTrue j1 == j2

[MSG]Violation in class org.codehaus.groovy.grails.web.json.JSONObjectTests. Replace assertTrue with a call to assertEquals()

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.metaclass

➥ WithFormMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper230

[SRC]@Override protected void tearDown() {

[MSG]Violation in class WithFormMethodTests. The method tearDown() does not call super.tearDown()

UnusedVariable2146

[SRC]def result = withForm.withForm(request) {

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.metaclass.WithFormMethodTests is not used

UnusedVariable2170

[SRC]def result = withForm.withForm(request) {

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.metaclass.WithFormMethodTests is not used

UnusedImport320

[SRC]import org.apache.commons.lang.StringUtils;

[MSG]The [org.apache.commons.lang.StringUtils] import is never referenced

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.servlet

➥ BindDataMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2160

[SRC]void onSetUp() {

[MSG]Violation in class BindDataMethodTests. The method onSetUp is public but not a test method

UnnecessaryParenthesesForMethodCallWithClosure334

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure346

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure360

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure374

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure386

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3100

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3113

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3117

[SRC]input.each() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3133

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3147

[SRC]runTest() {

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.BindDataMethodTests. Parentheses in the 'runTest' method call are unnecessary and can be removed.

➥ DefaultGrailsApplicationAttributesTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper212

[SRC]void setUp() {

[MSG]Violation in class DefaultGrailsApplicationAttributesTests. The method setUp() does not call super.setUp()

➥ FlashScopeWithErrorsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport321

[SRC]import org.springframework.mock.web.MockHttpServletRequest

[MSG]The [org.springframework.mock.web.MockHttpServletRequest] import is never referenced

➥ GrailsHttpSessionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod230

[SRC]void onSetUp() {

[MSG]Violation in class GrailsHttpSessionTests. The method onSetUp is public but not a test method

UnusedVariable242

[SRC]def mock = new MockHttpSession()

[MSG]The variable [mock] in class org.codehaus.groovy.grails.web.servlet.GrailsHttpSessionTests is not used

➥ RenderMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2199

[SRC]def resopnse = mockController.response

[MSG]The variable [resopnse] in class org.codehaus.groovy.grails.web.servlet.RenderMethodTests is not used

UnusedVariable2213

[SRC]def resopnse = mockController.response

[MSG]The variable [resopnse] in class org.codehaus.groovy.grails.web.servlet.RenderMethodTests is not used

JUnitPublicNonTestMethod2291

[SRC]String toString() { foo }

[MSG]Violation in class RenderTest. The method toString is public but not a test method

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.servlet.filter

➥ AbstractServletFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper254

[SRC]void tearDown() {

[MSG]Violation in class AbstractServletFilterTests. The method tearDown() does not call super.tearDown()

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.servlet.mvc

➥ CommandObjectEnhancementAppliedOnceTests.groovy

Rule NamePriorityLine #Source Line / Message
UseAssertTrueInsteadOfAssertEquals319

[SRC]assert WebMetaUtils.isCommandObjectAction(action) == true

[MSG]The expression '(WebMetaUtils.isCommandObjectAction(action) == true)' can be simplified to 'WebMetaUtils.isCommandObjectAction(action)'

UseAssertTrueInsteadOfAssertEquals323

[SRC]assert WebMetaUtils.isCommandObjectAction(fresh.index) == false

[MSG]The expression '(WebMetaUtils.isCommandObjectAction(fresh.index) == false)' can be simplified to '!WebMetaUtils.isCommandObjectAction(fresh.index)'

➥ ControllerInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert223

[SRC]void testCallSuperMethod() {

[MSG]Violation in class ControllerInheritanceTests. Test method 'testCallSuperMethod' makes no assertions

➥ ControllersDynamicMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

[MSG]Violation in class ControllersDynamicMethodsTests. The method onSetUp is public but not a test method

JUnitPublicNonTestMethod228

[SRC]void runTest(Closure callable) {

[MSG]Violation in class ControllersDynamicMethodsTests. The method runTest is public but not a test method

JUnitTestMethodWithoutAssert2135

[SRC]void testRenderMethod() {

[MSG]Violation in class ControllersDynamicMethodsTests. Test method 'testRenderMethod' makes no assertions

UnnecessaryGetter353

[SRC]def appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.servlet.mvc.ControllersDynamicMethodsTests. getApplicationContext() can probably be rewritten as applicationContext

➥ GrailsParameterMapTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert2240

[SRC]void testIterateOverMapContainingDate() {

[MSG]Violation in class GrailsParameterMapTests. Test method 'testIterateOverMapContainingDate' makes no assertions

UnusedImport34

[SRC]import grails.util.GrailsWebUtil

[MSG]The [grails.util.GrailsWebUtil] import is never referenced

UnusedImport36

[SRC]import org.springframework.web.context.WebApplicationContext

[MSG]The [org.springframework.web.context.WebApplicationContext] import is never referenced

UnnecessaryPackageReference321

[SRC]final webRequest = grails.util.GrailsWebUtil.bindMockWebRequest(ctx)

[MSG]The grails.util.GrailsWebUtil class was explicitly imported, so specifying the package name is not necessary

UnnecessaryObjectReferences3112

[SRC]map.aList = [1,2]

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3113

[SRC]map.array = ["one", "two" ] as String[]

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3114

[SRC]map.longNumber = 1234567890

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3115

[SRC]map.z = 'z'

[MSG]The code could be more concise by using a with() or identity() block

UseAssertTrueInsteadOfAssertEquals3209

[SRC]assertEquals false, map.boolean('one')

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals3210

[SRC]assertEquals true, map.boolean('nonexistent', Boolean.TRUE)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals3211

[SRC]assertEquals false, map.boolean('nonexistent', Boolean.FALSE)

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UseAssertTrueInsteadOfAssertEquals3212

[SRC]assertEquals true, map.boolean('bool')

[MSG]assertEquals can be simplified using assertTrue or assertFalse

UnnecessaryObjectReferences3262

[SRC]mockRequest.addParameter("a.e.g", "gValue")

[MSG]The code could be more concise by using a with() or identity() block

➥ ParamsObjectTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences324

[SRC]request.addParameter("book.id", "10")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences325

[SRC]request.addParameter("publisher.name", "Apress")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences326

[SRC]request.addParameter("publisher.authors[0].name", "Fred")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences327

[SRC]request.addParameter("publisher.authors[1].name", "Joe")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences328

[SRC]request.addParameter("test..foo..bar", "Stuff")

[MSG]The code could be more concise by using a with() or identity() block

➥ RenderDynamicMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
ConsecutiveStringConcatenation3107

[SRC]render "${'te' + 'xt'}"

[MSG]String concatenation in class org.codehaus.groovy.grails.web.servlet.mvc.RenderDynamicMethodTestController can be joined into the literal 'text'

ConsecutiveStringConcatenation3107

[SRC]render "${'te' + 'xt'}"

[MSG]String concatenation in class org.codehaus.groovy.grails.web.servlet.mvc.RenderDynamicMethodTestController can be joined into the literal 'text'

➥ TagLibDynamicMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

[MSG]Violation in class TagLibDynamicMethodsTests. The method onSetUp is public but not a test method

ImportFromSamePackage38

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.*

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.sitemesh

➥ FactoryHolderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter236

[SRC]boolean isPathExcluded(String path) { false }

[MSG]Violation in class DummyFactory. Method parameter [path] is never referenced in the method isPathExcluded of class org.codehaus.groovy.grails.web.sitemesh.DummyFactory

UnusedMethodParameter237

[SRC]boolean shouldParsePage(String contentType) { false }

[MSG]Violation in class DummyFactory. Method parameter [contentType] is never referenced in the method shouldParsePage of class org.codehaus.groovy.grails.web.sitemesh.DummyFactory

EmptyMethod239

[SRC]void refresh() {}

[MSG]Violation in class DummyFactory. The method refresh is both empty and not marked with @Override

UnusedMethodParameter240

[SRC]PageParser getPageParser(String contentType) { null }

[MSG]Violation in class DummyFactory. Method parameter [contentType] is never referenced in the method getPageParser of class org.codehaus.groovy.grails.web.sitemesh.DummyFactory

UnnecessaryGetter312

[SRC]assertSame factory, FactoryHolder.getFactory()

[MSG]Violation in class org.codehaus.groovy.grails.web.sitemesh.FactoryHolderTests. getFactory() can probably be rewritten as factory

UnnecessaryGetter318

[SRC]FactoryHolder.getFactory()

[MSG]Violation in class org.codehaus.groovy.grails.web.sitemesh.FactoryHolderTests. getFactory() can probably be rewritten as factory

➥ GSPSitemeshPageTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable215

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable223

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable231

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable239

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable252

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable261

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable279

[SRC]def result = applyTemplate(template, [:], target1)

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable296

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

UnusedVariable2113

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPageTests is not used

JUnitTearDownCallsSuper2125

[SRC]void tearDown() {

[MSG]Violation in class GSPSitemeshPageTests. The method tearDown() does not call super.tearDown()

Package: grails-test-suite-uber.src.test.groovy.org.codehaus.groovy.grails.web.util

➥ StreamCharBufferGroovyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]protected void setUp() {

[MSG]Violation in class StreamCharBufferGroovyTests. The method setUp() does not call super.setUp()

➥ WebUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper222

[SRC]protected void setUp() {

[MSG]Violation in class WebUtilsTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper242

[SRC]protected void tearDown() {

[MSG]Violation in class WebUtilsTests. The method tearDown() does not call super.tearDown()

JUnitPublicNonTestMethod2141

[SRC]void clearGrailsWebRequest() {

[MSG]Violation in class WebUtilsTests. The method clearGrailsWebRequest is public but not a test method

UnnecessaryDefInMethodDeclaration361

[SRC]private def bindMockRequest(DefaultGrailsApplication ga) {

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. The def keyword is unneeded when a method is marked private

UnnecessaryGetter367

[SRC]ctx.registerMockBean(MimeType.BEAN_NAME, factory.getObject())

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getObject() can probably be rewritten as object

UnnecessaryGetter3103

[SRC]assertNull RequestContextHolder.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3123

[SRC]assertNull RequestContextHolder.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3137

[SRC]assertEquals mockWebRequest, RequestContextHolder.getReq..Attributes()

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3154

[SRC]assertNull RequestContextHolder.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3160

[SRC]assertNull RequestContextHolder.getRequestAttributes()

[MSG]Violation in class org.codehaus.groovy.grails.web.util.WebUtilsTests. getRequestAttributes() can probably be rewritten as requestAttributes

Package: grails-test-suite-uber.src.test.resources.org.codehaus.groovy.grails.plugins

➥ ClassEditorGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod25

[SRC]def withSpring() {}

[MSG]Violation in class ClassEditorGrailsPlugin. The method withSpring is both empty and not marked with @Override

EmptyMethod27

[SRC]def withApplicationContext(ctx) {}

[MSG]Violation in class ClassEditorGrailsPlugin. The method withApplicationContext is both empty and not marked with @Override

UnusedMethodParameter27

[SRC]def withApplicationContext(ctx) {}

[MSG]Violation in class ClassEditorGrailsPlugin. Method parameter [ctx] is never referenced in the method withApplicationContext of class ClassEditorGrailsPlugin

Package: grails-test-suite-web.src.test.groovy.grails.test

➥ GrailsUrlMappingsTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert263

[SRC]void testSetup() {

[MSG]Violation in class GrailsUrlMappingsTestCaseTests. Test method 'testSetup' makes no assertions

JUnitTestMethodWithoutAssert273

[SRC]void testSetupExplicitMappingClass() {

[MSG]Violation in class GrailsUrlMappingsTestCaseTests. Test method 'testSetupExplicitMappingClass' makes no assertions

JUnitTestMethodWithoutAssert2176

[SRC]void test_GRAILS_3571_Bug() {

[MSG]Violation in class GrailsUrlMappingsTestCaseTests. Test method 'test_GRAILS_3571_Bug' makes no assertions

EmptyCatchBlock2209

[SRC]catch (e) {}

[MSG]The catch block is empty

JUnitTestMethodWithoutAssert2265

[SRC]void testGrails5786() {

[MSG]Violation in class GrailsUrlMappingsTestCaseTests. Test method 'testGrails5786' makes no assertions

JUnitTestMethodWithoutAssert2272

[SRC]void testGrails5222() {

[MSG]Violation in class GrailsUrlMappingsTestCaseTests. Test method 'testGrails5222' makes no assertions

JUnitPublicNonTestMethod2353

[SRC]def assertView(controller, view, url) {

[MSG]Violation in class MultipleMappingsTestCase. The method assertView is public but not a test method

UnusedMethodParameter2353

[SRC]def assertView(controller, view, url) {

[MSG]Violation in class MultipleMappingsTestCase. Method parameter [controller] is never referenced in the method assertView of class grails.test.MultipleMappingsTestCase

UnusedMethodParameter2353

[SRC]def assertView(controller, view, url) {

[MSG]Violation in class MultipleMappingsTestCase. Method parameter [view] is never referenced in the method assertView of class grails.test.MultipleMappingsTestCase

UnusedMethodParameter2353

[SRC]def assertView(controller, view, url) {

[MSG]Violation in class MultipleMappingsTestCase. Method parameter [url] is never referenced in the method assertView of class grails.test.MultipleMappingsTestCase

EqualsAndHashCode2396

[SRC]class MockUrlMapping implements UrlMapping {

[MSG]The class grails.test.MockUrlMapping defines equals(Object) but not hashCode()

UnusedMethodParameter2410

[SRC]UrlMappingInfo match(String uri) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [uri] is never referenced in the method match of class grails.test.MockUrlMapping

UnusedMethodParameter2414

[SRC]int compareTo(Object o) { 0 }

[MSG]Violation in class MockUrlMapping. Method parameter [o] is never referenced in the method compareTo of class grails.test.MockUrlMapping

UnusedMethodParameter2416

[SRC]String createURL(Map parameterValues, String encoding) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2416

[SRC]String createURL(Map parameterValues, String encoding) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2418

[SRC]String createURL(Map parameterValues, String encoding, S..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2418

[SRC]String createURL(Map parameterValues, String encoding, S..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2418

[SRC]String createURL(Map parameterValues, String encoding, S..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [fragment] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2420

[SRC]String createURL(String controller, String action, Map p..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [controller] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2420

[SRC]String createURL(String controller, String action, Map p..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [action] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2420

[SRC]String createURL(String controller, String action, Map p..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2420

[SRC]String createURL(String controller, String action, Map p..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2422

[SRC]String createRelativeURL(String controller, String actio..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [controller] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2422

[SRC]String createRelativeURL(String controller, String actio..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [action] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2422

[SRC]String createRelativeURL(String controller, String actio..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2422

[SRC]String createRelativeURL(String controller, String actio..ng) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2424

[SRC]String createRelativeURL(String controller, String actio..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [controller] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2424

[SRC]String createRelativeURL(String controller, String actio..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [action] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2424

[SRC]String createRelativeURL(String controller, String actio..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2424

[SRC]String createRelativeURL(String controller, String actio..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2424

[SRC]String createRelativeURL(String controller, String actio..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [fragment] is never referenced in the method createRelativeURL of class grails.test.MockUrlMapping

UnusedMethodParameter2426

[SRC]String createURL(String controller, String action, Map p..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [controller] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2426

[SRC]String createURL(String controller, String action, Map p..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [action] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2426

[SRC]String createURL(String controller, String action, Map p..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2426

[SRC]String createURL(String controller, String action, Map p..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [encoding] is never referenced in the method createURL of class grails.test.MockUrlMapping

UnusedMethodParameter2426

[SRC]String createURL(String controller, String action, Map p..nt) { null }

[MSG]Violation in class MockUrlMapping. Method parameter [fragment] is never referenced in the method createURL of class grails.test.MockUrlMapping

EmptyMethod2436

[SRC]void setParameterValues(Map parameterValues) {}

[MSG]Violation in class MockUrlMapping. The method setParameterValues is both empty and not marked with @Override

UnusedMethodParameter2436

[SRC]void setParameterValues(Map parameterValues) {}

[MSG]Violation in class MockUrlMapping. Method parameter [parameterValues] is never referenced in the method setParameterValues of class grails.test.MockUrlMapping

EmptyMethod2438

[SRC]void setParseRequest(boolean shouldParse) {

[MSG]Violation in class MockUrlMapping. The method setParseRequest is both empty and not marked with @Override

UnusedMethodParameter2438

[SRC]void setParseRequest(boolean shouldParse) {

[MSG]Violation in class MockUrlMapping. Method parameter [shouldParse] is never referenced in the method setParseRequest of class grails.test.MockUrlMapping

EmptyMethod2444

[SRC]void setMappingName(String name) {}

[MSG]Violation in class MockUrlMapping. The method setMappingName is both empty and not marked with @Override

UnusedMethodParameter2444

[SRC]void setMappingName(String name) {}

[MSG]Violation in class MockUrlMapping. Method parameter [name] is never referenced in the method setMappingName of class grails.test.MockUrlMapping

UnusedMethodParameter2446

[SRC]boolean hasRuntimeVariable(String name) { false }

[MSG]Violation in class MockUrlMapping. Method parameter [name] is never referenced in the method hasRuntimeVariable of class grails.test.MockUrlMapping

UnnecessaryObjectReferences3224

[SRC]test.assertUrlMapping(500, controller: "grailsUrlMapping..: "action1")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3226

[SRC]test.assertForwardUrlMapping("/controllerView", controll..iew: "view")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3235

[SRC]test.assertUrlMapping("/absoluteView", view: "view")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3236

[SRC]test.assertUrlMapping("/absoluteView", view: "/view")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3237

[SRC]test.assertUrlMapping("/absoluteViewWithSlash", view: "view")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3238

[SRC]test.assertUrlMapping("/absoluteViewWithSlash", view: "/view")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3240

[SRC]test.assertUrlMapping("/params/value1/value2", controlle.."action3") {

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3260

[SRC]test.assertUrlMapping("/params/value1", controller: "gra.."action3") {

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-test-suite-web.src.test.groovy.grails.test.mixin

➥ TagLibWithServiceMockTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryConstructor326

[SRC]TimeTagLib() {

[MSG]The constructor can be safely deleted

➥ UrlMappingsTestForTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod223

[SRC]def list() { }

[MSG]Violation in class BookController. The method list is both empty and not marked with @Override

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.plugins.web.filters

➥ FilterConfigTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper227

[SRC]void setUp() {

[MSG]Violation in class FilterConfigTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper2135

[SRC]void tearDown() {

[MSG]Violation in class FilterConfigTests. The method tearDown() does not call super.tearDown()

UseAssertTrueInsteadOfAssertEquals380

[SRC]assert mockDefinition.generateNumberCalled == true

[MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled'

UseAssertTrueInsteadOfAssertEquals385

[SRC]assert mockDefinition.generateNumberCalled == true

[MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled'

UseAssertTrueInsteadOfAssertEquals390

[SRC]assert mockDefinition.generateNumberCalled == true

[MSG]The expression '(mockDefinition.generateNumberCalled == true)' can be simplified to 'mockDefinition.generateNumberCalled'

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.plugins.webflow

➥ MockWebFlowGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter329

[SRC]def version = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.webflow.MockWebFlowGrailsPlugin. getGrailsVersion() can probably be rewritten as grailsVersion

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.binding

➥ BindingToNullableTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable248

[SRC]def model = controller.update()

[MSG]The variable [model] in class org.codehaus.groovy.grails.web.binding.BindingToNullableTests is not used

UnusedImport34

[SRC]import org.springframework.web.context.request.RequestContextHolder

[MSG]The [org.springframework.web.context.request.RequestContextHolder] import is never referenced

➥ DataBindingLazyMetaPropertyMapTests.groovy

Rule NamePriorityLine #Source Line / Message
CoupledTestCase223

[SRC]def map = new DataBindingLazyMetaPropertyMap(new Propert..er:"stuff"))

[MSG]new PropertyMapTest([name:Bart, age:11, other:stuff]) creates an instance of a test case. Test cases should not be coupled. Move this method to a helper object

➥ DataBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2185

[SRC]def error = b.errors.getFieldError('site')

[MSG]The variable [error] in class org.codehaus.groovy.grails.web.binding.DataBindingTests is not used

UnusedVariable2246

[SRC]def authorClass = ga.getDomainClass("databindingtests.Au..).getClazz()

[MSG]The variable [authorClass] in class org.codehaus.groovy.grails.web.binding.DataBindingTests is not used

UnnecessaryGetter3246

[SRC]def authorClass = ga.getDomainClass("databindingtests.Au..).getClazz()

[MSG]Violation in class org.codehaus.groovy.grails.web.binding.DataBindingTests. getClazz() can probably be rewritten as clazz

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.converters

➥ JSONArrayTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter312

[SRC]assertEquals(getJSONArray(), getJSONArray())

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.JSONArrayTests. getJSONArray() can probably be rewritten as JSONArray

UnnecessaryGetter312

[SRC]assertEquals(getJSONArray(), getJSONArray())

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.JSONArrayTests. getJSONArray() can probably be rewritten as JSONArray

UnnecessaryGetter317

[SRC]assertEquals(getJSONArray().hashCode(), getJSONArray().hashCode())

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.JSONArrayTests. getJSONArray() can probably be rewritten as JSONArray

UnnecessaryGetter317

[SRC]assertEquals(getJSONArray().hashCode(), getJSONArray().hashCode())

[MSG]Violation in class org.codehaus.groovy.grails.web.converters.JSONArrayTests. getJSONArray() can probably be rewritten as JSONArray

➥ JSONConverterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2100

[SRC]void onSetUp() {

[MSG]Violation in class JSONConverterTests. The method onSetUp is public but not a test method

UnnecessaryPackageReference382

[SRC]enumClass.metaClass.asType = {java.lang.Class clazz ->

[MSG]Specifying the package name is not necessary for java.lang.Class

➥ XMLConverterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable292

[SRC]def proxy = [getHibernateLazyInitializer:{hibernateIniti..bernateProxy

[MSG]The variable [proxy] in class org.codehaus.groovy.grails.web.converters.XMLConverterTests is not used

JUnitPublicNonTestMethod2106

[SRC]void onSetUp() {

[MSG]Violation in class XMLConverterTests. The method onSetUp is public but not a test method

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.filters

➥ FilterToHandlerAdapterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitUnnecessarySetUp316

[SRC]protected void setUp() {

[MSG]Violation in class FilterToHandlerAdapterTests. The setUp() method contains no logic and can be removed

UnnecessaryOverridingMethod316

[SRC]protected void setUp() {

[MSG]Violation in class FilterToHandlerAdapterTests. The method setUp contains no logic and can be safely deleted

JUnitUnnecessaryTearDown320

[SRC]protected void tearDown() {

[MSG]Violation in class FilterToHandlerAdapterTests. The tearDown() method contains no logic and can be removed

UnnecessaryOverridingMethod320

[SRC]protected void tearDown() {

[MSG]Violation in class FilterToHandlerAdapterTests. The method tearDown contains no logic and can be safely deleted

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.mapping

➥ DefaultUrlCreatorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper233

[SRC]void tearDown() {

[MSG]Violation in class DefaultUrlCreatorTests. The method tearDown() does not call super.tearDown()

➥ DoubleWildcardUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

UnusedImport35

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

UnnecessaryGetter372

[SRC]assertEquals 'wrong controller name', 'someOther', info...rollerName()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DoubleWildcardUrlMappingTests. getControllerName() can probably be rewritten as controllerName

➥ DynamicParameterValuesTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

UnusedImport35

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

➥ IdUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod226

[SRC]void onSetUp() {

[MSG]Violation in class IdUrlMappingTests. The method onSetUp is public but not a test method

UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

UnusedImport35

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

➥ RegexUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert2357

[SRC]void testInit() {

[MSG]Violation in class RegexUrlMappingTests. Test method 'testInit' makes no assertions

UnusedVariable2359

[SRC]def m = new RegexUrlMapping(parser.parse("/(*)/hello"), ..vletContext)

[MSG]The variable [m] in class org.codehaus.groovy.grails.web.mapping.RegexUrlMappingTests is not used

UnusedImport36

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

UnnecessaryGetter372

[SRC]assertEquals "/x/y", info.getURI()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.RegexUrlMappingTests. getURI() can probably be rewritten as URI

UnnecessaryDotClass3308

[SRC]def cp = new ConstrainedProperty(RegexUrlMappingTests.cl..tring.class)

[MSG]RegexUrlMappingTests.class can be rewritten as RegexUrlMappingTests

UnnecessaryDotClass3308

[SRC]def cp = new ConstrainedProperty(RegexUrlMappingTests.cl..tring.class)

[MSG]String.class can be rewritten as String

UnnecessaryDotClass3325

[SRC]def cp = new ConstrainedProperty(RegexUrlMappingTests.cl..tring.class)

[MSG]RegexUrlMappingTests.class can be rewritten as RegexUrlMappingTests

UnnecessaryDotClass3325

[SRC]def cp = new ConstrainedProperty(RegexUrlMappingTests.cl..tring.class)

[MSG]String.class can be rewritten as String

➥ ResponseCodeUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

UnusedImport38

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

UnnecessaryDefInFieldDeclaration322

[SRC]def UrlMappingsHolder holder

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMappingTests. The def keyword is unneeded when a field type is specified

UnnecessaryGetter359

[SRC]assertEquals("errors", info.getControllerName());

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMappingTests. getControllerName() can probably be rewritten as controllerName

UnnecessaryGetter360

[SRC]assertEquals("error404", info.getActionName());

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMappingTests. getActionName() can probably be rewritten as actionName

UnnecessaryGetter366

[SRC]assertEquals("errors", info.getControllerName());

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMappingTests. getControllerName() can probably be rewritten as controllerName

UnnecessaryGetter367

[SRC]assertEquals("error500", info.getActionName());

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMappingTests. getActionName() can probably be rewritten as actionName

➥ RestfulMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

[MSG]The [org.codehaus.groovy.grails.validation.ConstrainedProperty] import is never referenced

UnusedImport36

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

➥ RestfulReverseUrlRenderingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

➥ ReverseMappingWithDefaultActionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]void onSetUp() {

[MSG]Violation in class ReverseMappingWithDefaultActionTests. The method onSetUp is public but not a test method

➥ UrlMappingParameterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests] import is never referenced

UnusedImport34

[SRC]import org.springframework.core.io.ByteArrayResource

[MSG]The [org.springframework.core.io.ByteArrayResource] import is never referenced

UnusedImport35

[SRC]import org.springframework.mock.web.MockServletContext

[MSG]The [org.springframework.mock.web.MockServletContext] import is never referenced

➥ UrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

[MSG]The [org.codehaus.groovy.grails.validation.ConstrainedProperty] import is never referenced

➥ UrlMappingWithCustomValidatorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryDefInFieldDeclaration321

[SRC]def UrlMappingsHolder holder

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.UrlMappingWithCustomValidatorTests. The def keyword is unneeded when a field type is specified

➥ UrlMappingsHolderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

[MSG]The [org.codehaus.groovy.grails.validation.ConstrainedProperty] import is never referenced

➥ ViewUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryDefInFieldDeclaration320

[SRC]def UrlMappingsHolder holder

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ViewUrlMappingTests. The def keyword is unneeded when a field type is specified

UnnecessaryGetter340

[SRC]assertEquals "book.gsp", info.getViewName()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ViewUrlMappingTests. getViewName() can probably be rewritten as viewName

UnnecessaryGetter347

[SRC]assertEquals "book.gsp", info.getViewName()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.ViewUrlMappingTests. getViewName() can probably be rewritten as viewName

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.mapping.filter

➥ RestfulMappingsFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport37

[SRC]import org.codehaus.groovy.grails.commons.ControllerArtefactHandler;

[MSG]The [org.codehaus.groovy.grails.commons.ControllerArtefactHandler] import is never referenced

UnusedImport38

[SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsApplication

[MSG]The [org.codehaus.groovy.grails.commons.DefaultGrailsApplication] import is never referenced

UnnecessaryGetter352

[SRC]def mappings = evaluator.evaluateMappings(new ByteArrayR..getBytes()))

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.filter.RestfulMappingsFilterTests. getBytes() can probably be rewritten as bytes

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.mime

➥ AcceptHeaderParserTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper213

[SRC]protected void setUp() {

[MSG]Violation in class AcceptHeaderParserTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper230

[SRC]protected void tearDown() {

[MSG]Violation in class AcceptHeaderParserTests. The method tearDown() does not call super.tearDown()

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.pages

➥ GroovyPageBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter315

[SRC]assertEquals binding.getMetaClass(), binding.metaClass

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageBindingTests. getMetaClass() can probably be rewritten as metaClass

UnnecessaryGetter326

[SRC]assertEquals(shouldbe, binding.getVariables())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageBindingTests. getVariables() can probably be rewritten as variables

UnnecessaryGetter328

[SRC]for(e in binding.getVariables().entrySet()) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageBindingTests. getVariables() can probably be rewritten as variables

➥ GroovyPageLineNumberTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert214

[SRC]void testSpanningMultipleLines() {

[MSG]Violation in class GroovyPageLineNumberTests. Test method 'testSpanningMultipleLines' makes no assertions

➥ GroovyPageMethodDispatchWithNamespaceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod28

[SRC]void onSetUp() {

[MSG]Violation in class GroovyPageMethodDispatchWithNamespaceTests. The method onSetUp is public but not a test method

➥ GroovyPageTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod267

[SRC]def runPageCode(pageCode) {

[MSG]Violation in class GroovyPageTests. The method runPageCode is public but not a test method

JUnitPublicNonTestMethod2146

[SRC]def getBinding(out) {

[MSG]Violation in class GroovyPageTests. The method getBinding is public but not a test method

UnnecessaryGetter3157

[SRC]binding.setVariable(GroovyPage.SESSION, request.getSession())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageTests. getSession() can probably be rewritten as session

UnnecessaryObjectReferences3160

[SRC]binding.setVariable(GroovyPage.OUT, out)

[MSG]The code could be more concise by using a with() or identity() block

➥ GroovyPagesTemplateEngineTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2188

[SRC]def webRequest = GrailsWebUtil.bindMockWebRequest()

[MSG]The variable [webRequest] in class org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngineTests is not used

JUnitTearDownCallsSuper2570

[SRC]void tearDown() {

[MSG]Violation in class GroovyPagesTemplateEngineTests. The method tearDown() does not call super.tearDown()

JUnitSetUpCallsSuper2574

[SRC]void setUp() {

[MSG]Violation in class GroovyPagesTemplateEngineTests. The method setUp() does not call super.setUp()

UnusedImport38

[SRC]import org.codehaus.groovy.grails.plugins.MockGrailsPluginManager;

[MSG]The [org.codehaus.groovy.grails.plugins.MockGrailsPluginManager] import is never referenced

UseAssertEqualsInsteadOfAssertTrue340

[SRC]assertTrue(sw.toString().indexOf("should not be in the output") == -1)

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngineTests. Replace assertTrue with a call to assertEquals()

➥ GroovyPagesWhitespaceParsingTagTests.groovy

Rule NamePriorityLine #Source Line / Message
ComparisonOfTwoConstants229

[SRC]test="${2 > 1}">rejoice</g:if>"""

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants236

[SRC]<g:if test="${2 > 1}">rejoice</g:if>

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants246

[SRC]<g:if test="${2 > 1}">testing</g:if>

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants259

[SRC]<g:if test="${2 > 1}">testing</g:if>

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants271

[SRC]def template = """Hello <g:if test="${2 > 1}">one</g:if>..ee</g:if>"""

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants271

[SRC]def template = """Hello <g:if test="${2 > 1}">one</g:if>..ee</g:if>"""

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants271

[SRC]def template = """Hello <g:if test="${2 > 1}">one</g:if>..ee</g:if>"""

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants277

[SRC]def template = """Hello <g:if test="${2 > 1}">one</g:if>

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants278

[SRC]<g:if test="${2 > 1}">two</g:if>

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

ComparisonOfTwoConstants279

[SRC]<g:if test="${2 > 1}">three</g:if>"""

[MSG]Comparing two constants or constant literals is useless and may indicate a bug: (2 > 1)

➥ ModifyOurScopeWithBodyTagTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport35

[SRC]import junit.framework.TestCase

[MSG]The [junit.framework.TestCase] import is never referenced

➥ StaticContentRenderingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.codehaus.groovy.grails.commons.ConfigurationHolder

[MSG]The [org.codehaus.groovy.grails.commons.ConfigurationHolder] import is never referenced

➥ TagLibNamespaceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod222

[SRC]void onTearDown() {

[MSG]Violation in class TagLibNamespaceTests. The method onTearDown is public but not a test method

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.pages.ext.jsp

➥ GroovyPageWithJSPTagsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter322

[SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPageWithJSPTagsTests. getContextClassLoader() can probably be rewritten as contextClassLoader

UnnecessaryGetter324

[SRC]rootLoader.addURL res.getURL()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPageWithJSPTagsTests. getURL() can probably be rewritten as URL

UnnecessaryGetter326

[SRC]rootLoader.addURL it.getURL()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPageWithJSPTagsTests. getURL() can probably be rewritten as URL

UnnecessaryGetter330

[SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPageWithJSPTagsTests. getCurrentRequest() can probably be rewritten as currentRequest

➥ GroovyPagesPageContextTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper213

[SRC]protected void setUp() {

[MSG]Violation in class GroovyPagesPageContextTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper217

[SRC]protected void tearDown() {

[MSG]Violation in class GroovyPagesPageContextTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter325

[SRC]assert pageContext.getServletConfig()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContextTests. getServletConfig() can probably be rewritten as servletConfig

UnnecessaryGetter326

[SRC]assert pageContext.getServletContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContextTests. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter327

[SRC]assert pageContext.getRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContextTests. getRequest() can probably be rewritten as request

UnnecessaryGetter328

[SRC]assert pageContext.getResponse()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContextTests. getResponse() can probably be rewritten as response

UnnecessaryGetter329

[SRC]assert pageContext.getPage()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContextTests. getPage() can probably be rewritten as page

➥ IterativeJspTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper221

[SRC]protected void setUp() {

[MSG]Violation in class IterativeJspTagTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper226

[SRC]protected void tearDown() {

[MSG]Violation in class IterativeJspTagTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter323

[SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.IterativeJspTagTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter334

[SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.IterativeJspTagTests. getContextClassLoader() can probably be rewritten as contextClassLoader

UnnecessaryGetter336

[SRC]rootLoader.addURL res.getURL()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.IterativeJspTagTests. getURL() can probably be rewritten as URL

UnnecessaryGetter352

[SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.IterativeJspTagTests. getRequest() can probably be rewritten as request

UnnecessaryGetter355

[SRC]def pageContext = PageContextFactory.getCurrent()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.IterativeJspTagTests. getCurrent() can probably be rewritten as current

➥ MockRootLoaderTagLibraryResolver.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter315

[SRC]def rootLoader = new RootLoader([] as URL[], Thread.curr..assLoader())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockRootLoaderTagLibraryResolver. getContextClassLoader() can probably be rewritten as contextClassLoader

UnnecessaryGetter317

[SRC]rootLoader.addURL res.getURL()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockRootLoaderTagLibraryResolver. getURL() can probably be rewritten as URL

➥ SimpleJspTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper222

[SRC]protected void setUp() {

[MSG]Violation in class SimpleJspTagTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper227

[SRC]protected void tearDown() {

[MSG]Violation in class SimpleJspTagTests. The method tearDown() does not call super.tearDown()

UnusedImport39

[SRC]import org.springframework.core.io.FileSystemResource

[MSG]The [org.springframework.core.io.FileSystemResource] import is never referenced

UnnecessaryGetter324

[SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.SimpleJspTagTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter347

[SRC]JstlUtils.exposeLocalizationContext webRequest.getRequest(),null

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.SimpleJspTagTests. getRequest() can probably be rewritten as request

➥ SimpleTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper221

[SRC]protected void setUp() {

[MSG]Violation in class SimpleTagTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper226

[SRC]protected void tearDown() {

[MSG]Violation in class SimpleTagTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter323

[SRC]webRequest.getCurrentRequest().setAttribute(GroovyPagesS..esServlet())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.SimpleTagTests. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter361

[SRC]getJspContext().getOut().println("extendsSimpleTagSupport:output");

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.ExtendsSimpleTagSupport. getOut() can probably be rewritten as out

UnnecessaryGetter361

[SRC]getJspContext().getOut().println("extendsSimpleTagSupport:output");

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.ExtendsSimpleTagSupport. getJspContext() can probably be rewritten as jspContext

UnnecessaryGetter368

[SRC]JspWriter out = getJspContext().getOut()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.BodySimpleTagSupport. getOut() can probably be rewritten as out

UnnecessaryGetter368

[SRC]JspWriter out = getJspContext().getOut()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.BodySimpleTagSupport. getJspContext() can probably be rewritten as jspContext

UnnecessaryGetter370

[SRC]super.getJspBody().invoke(out)

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.BodySimpleTagSupport. getJspBody() can probably be rewritten as jspBody

➥ TagLibraryResolverTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter365

[SRC]new RootLoader([] as URL[], Thread.currentThread().getCo..assLoader())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockWebXmlTagLibraryResolver. getContextClassLoader() can probably be rewritten as contextClassLoader

UnnecessaryGetter372

[SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?>

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockWebXmlTagLibraryResolver. getInputStream() can probably be rewritten as inputStream

UnnecessaryGetter372

[SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?>

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockWebXmlTagLibraryResolver. getBytes() can probably be rewritten as bytes

UnnecessaryGetter3118

[SRC]new ByteArrayResource('''<?xml version="1.0" encoding="UTF-8"?>

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.MockWebXmlTagLibraryResolver. getBytes() can probably be rewritten as bytes

➥ TldReaderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter328

[SRC]def is = new InputSource(res.getInputStream())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReaderTests. getInputStream() can probably be rewritten as inputStream

UnnecessaryGetter333

[SRC]def reader = factory.newSAXParser().getXMLReader()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReaderTests. getXMLReader() can probably be rewritten as XMLReader

➥ WebXmlTagLibraryReaderTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage320

[SRC]import org.codehaus.groovy.grails.web.pages.ext.jsp.WebX..ibraryReader

UnnecessaryGetter331

[SRC]def reader = factory.newSAXParser().getXMLReader()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReaderTests. getXMLReader() can probably be rewritten as XMLReader

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.servlet.view

➥ GroovyPageViewTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper245

[SRC]void tearDown() {

[MSG]Violation in class GroovyPageViewTests. The method tearDown() does not call super.tearDown()

DuplicateImport37

[SRC]import org.springframework.web.context.request.*

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.web.taglib

➥ ApplicationTagLibResourcesTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod221

[SRC]void onInitMockBeans() {

[MSG]Violation in class ApplicationTagLibResourcesTests. The method onInitMockBeans is public but not a test method

JUnitPublicNonTestMethod225

[SRC]def replaceMetaClass(Object o) {

[MSG]Violation in class ApplicationTagLibResourcesTests. The method replaceMetaClass is public but not a test method

UnusedImport33

[SRC]import grails.util.GrailsUtil

[MSG]The [grails.util.GrailsUtil] import is never referenced

UnusedImport35

[SRC]import javax.servlet.http.Cookie

[MSG]The [javax.servlet.http.Cookie] import is never referenced

UnusedImport37

[SRC]import groovy.mock.interceptor.StubFor

[MSG]The [groovy.mock.interceptor.StubFor] import is never referenced

UnusedImport39

[SRC]import org.codehaus.groovy.grails.commons.ConfigurationHolder

[MSG]The [org.codehaus.groovy.grails.commons.ConfigurationHolder] import is never referenced

UnusedImport311

[SRC]import org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib;

[MSG]The [org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib] import is never referenced

UnusedImport312

[SRC]import org.codehaus.groovy.grails.web.pages.GroovyPageBinding

[MSG]The [org.codehaus.groovy.grails.web.pages.GroovyPageBinding] import is never referenced

UnusedImport313

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..onAttributes

[MSG]The [org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes] import is never referenced

UnusedImport314

[SRC]import org.codehaus.groovy.grails.web.taglib.exceptions...TagException

[MSG]The [org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException] import is never referenced

UnusedImport316

[SRC]import org.codehaus.groovy.grails.commons.TagLibArtefactHandler

[MSG]The [org.codehaus.groovy.grails.commons.TagLibArtefactHandler] import is never referenced

UnusedImport317

[SRC]import org.springframework.mock.web.MockHttpServletResponse

[MSG]The [org.springframework.mock.web.MockHttpServletResponse] import is never referenced

UnnecessaryDotClass340

[SRC]def taglib = appCtx.getBean(ApplicationTagLib.class.name)

[MSG]ApplicationTagLib.class can be rewritten as ApplicationTagLib

UnnecessaryDotClass360

[SRC]def taglib = appCtx.getBean(ApplicationTagLib.class.name)

[MSG]ApplicationTagLib.class can be rewritten as ApplicationTagLib

➥ ApplicationTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport37

[SRC]import groovy.mock.interceptor.StubFor

[MSG]The [groovy.mock.interceptor.StubFor] import is never referenced

UnusedImport315

[SRC]import org.codehaus.groovy.grails.commons.TagLibArtefactHandler

[MSG]The [org.codehaus.groovy.grails.commons.TagLibArtefactHandler] import is never referenced

UnnecessaryGetter323

[SRC]assertOutputEquals "/test/plugins/controllers-${GrailsUt..g", template

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.ApplicationTagLibTests. getGrailsVersion() can probably be rewritten as grailsVersion

➥ CoreTagsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import grails.util.GrailsUtil

[MSG]The [grails.util.GrailsUtil] import is never referenced

➥ CountryTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod288

[SRC]void assertResultContains(result, expectedSubstring) {

[MSG]Violation in class CountryTagLibTests. The method assertResultContains is public but not a test method

➥ FormRenderingTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod226

[SRC]void assertOutputEquals(expected, template, params = [:]) {

[MSG]Violation in class FormRenderingTagLibTests. The method assertOutputEquals is public but not a test method

➥ FormTagLib2Tests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField216

[SRC]private static final def SELECT_TAG_NAME = "testSelect"

[MSG]The field SELECT_TAG_NAME is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests

JUnitTestMethodWithoutAssert223

[SRC]void testDatePickerTagWithDefaultDateAndPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithDefaultDateAndPrecision' makes no assertions

JUnitTestMethodWithoutAssert227

[SRC]void testDatePickerTagWithYearPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithYearPrecision' makes no assertions

JUnitTestMethodWithoutAssert231

[SRC]void testDatePickerTagWithMonthPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithMonthPrecision' makes no assertions

JUnitTestMethodWithoutAssert235

[SRC]void testDatePickerTagWithDayPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithDayPrecision' makes no assertions

JUnitTestMethodWithoutAssert239

[SRC]void testDatePickerTagWithHourPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithHourPrecision' makes no assertions

JUnitTestMethodWithoutAssert243

[SRC]void testDatePickerTagWithMinutePrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithMinutePrecision' makes no assertions

JUnitTestMethodWithoutAssert247

[SRC]void testDatePickerTagWithCustomDate() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithCustomDate' makes no assertions

JUnitTestMethodWithoutAssert274

[SRC]void testDatePickerTagWithCustomDateAndPrecision() {

[MSG]Violation in class FormTagLib2Tests. Test method 'testDatePickerTagWithCustomDateAndPrecision' makes no assertions

UnusedVariable2121

[SRC]String xp

[MSG]The variable [xp] in class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests is not used

UnusedPrivateMethod2230

[SRC]private void assertSelectFieldPresentWithValue(Document ..ing value) {

[MSG]The method assertSelectFieldPresentWithValue is not used within FormTagLib2Tests.groovy

UnusedPrivateMethod2236

[SRC]private void assertSelectFieldPresentWithValueAndText(Do..ing label) {

[MSG]The method assertSelectFieldPresentWithValueAndText is not used within FormTagLib2Tests.groovy

UnusedPrivateMethod2248

[SRC]private void assertSelectPresent(Document document, Stri..fieldName) {

[MSG]The method assertSelectPresent is not used within FormTagLib2Tests.groovy

UnnecessaryDefInFieldDeclaration316

[SRC]private static final def SELECT_TAG_NAME = "testSelect"

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests. The def keyword is unneeded when a field is marked private

UnnecessaryGetter352

[SRC]def defaultDate = Calendar.getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests. getInstance() can probably be rewritten as instance

UnnecessaryGetter354

[SRC]Document document = getDatePickerOutput(null, 'day', def..e.getTime())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests. getTime() can probably be rewritten as time

UnnecessaryGetter369

[SRC]DateFormat defaultFormat = DateFormat.getInstance()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib2Tests. getInstance() can probably be rewritten as instance

➥ FormTagLib3Tests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField217

[SRC]private static final String DATE_PICKER_TAG_NAME = "testDatePicker"

[MSG]The field DATE_PICKER_TAG_NAME is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests

UnusedPrivateField219

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN..s String[]))

[MSG]The field DATE_PRECISIONS_INCLUDING_MINUTE is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests

UnusedPrivateField220

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN..s String[]))

[MSG]The field DATE_PRECISIONS_INCLUDING_HOUR is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests

UnusedPrivateField221

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN..s String[]))

[MSG]The field DATE_PRECISIONS_INCLUDING_DAY is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests

UnusedPrivateField222

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN..s String[]))

[MSG]The field DATE_PRECISIONS_INCLUDING_MONTH is not used within the class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests

UnnecessaryGetter3207

[SRC]final Element inputElement = document.getDocumentElement()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests. getDocumentElement() can probably be rewritten as documentElement

UnnecessaryGetter3233

[SRC]final Element inputElement = document.getDocumentElement()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests. getDocumentElement() can probably be rewritten as documentElement

UnnecessaryGetter3262

[SRC]final Element inputElement = document.getDocumentElement()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests. getDocumentElement() can probably be rewritten as documentElement

UnnecessaryGetter3288

[SRC]final Element inputElement = document.getDocumentElement()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormTagLib3Tests. getDocumentElement() can probably be rewritten as documentElement

➥ FormTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert2234

[SRC]void testBooleanAttributes() {

[MSG]Violation in class FormTagLibTests. Test method 'testBooleanAttributes' makes no assertions

➥ FormatTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter332

[SRC]assertOutputEquals("1980-02-03", template, [date:calender.getTime()])

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormatTagLibTests. getTime() can probably be rewritten as time

UnnecessaryGetter338

[SRC]assertOutputEquals("February 3, 1980", template, [date:c...getTime()])

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormatTagLibTests. getTime() can probably be rewritten as time

UnnecessaryGetter344

[SRC]assertOutputEquals("February 3, 1980 12:00 AM", template...getTime()])

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormatTagLibTests. getTime() can probably be rewritten as time

UnnecessaryGetter379

[SRC]assertOutputEquals("1980-02-03", template, [date:calender.getTime()])

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.FormatTagLibTests. getTime() can probably be rewritten as time

➥ GroovyEachTagTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.taglib.exceptions...TagException

[MSG]The [org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException] import is never referenced

UnnecessaryGetter321

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyEachTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter321

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyEachTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter337

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyEachTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter337

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyEachTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

➥ GroovyFindAllTagTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport33

[SRC]import java.io.ByteArrayInputStream

UnnecessaryGroovyImport34

[SRC]import java.io.PrintWriter

UnnecessaryGroovyImport35

[SRC]import java.util.HashMap

UnnecessaryGroovyImport36

[SRC]import java.util.Map

UnnecessaryDotClass325

[SRC]context.put(GroovyPageParser.class, parser);

[MSG]GroovyPageParser.class can be rewritten as GroovyPageParser

UnnecessaryGetter355

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in eval...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyFindAllTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter355

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in eval...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyFindAllTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter364

[SRC]assertEquals("findAll", tag.getName())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyFindAllTagTests. getName() can probably be rewritten as name

➥ GroovyGrepTagTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock215

[SRC]catch(Exception e) {

[MSG]The catch block is empty

UnnecessaryGetter323

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyGrepTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

UnnecessaryGetter323

[SRC]assertEquals("for( "+tag.getForeachRenamedIt()+" in test...toString())

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.GroovyGrepTagTests. getForeachRenamedIt() can probably be rewritten as foreachRenamedIt

➥ GroovySyntaxTagTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod256

[SRC]void doEndTag() {}

[MSG]Violation in class MyGroovySyntaxTag. The method doEndTag is both empty and not marked with @Override

EmptyMethod258

[SRC]void doStartTag() {}

[MSG]Violation in class MyGroovySyntaxTag. The method doStartTag is both empty and not marked with @Override

➥ InvokeTagLibAsMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod25

[SRC]void onSetUp() {

[MSG]Violation in class InvokeTagLibAsMethodTests. The method onSetUp is public but not a test method

➥ JavascriptTagLibResourcesTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod27

[SRC]def replaceMetaClass(o) {

[MSG]Violation in class JavascriptTagLibResourcesTests. The method replaceMetaClass is public but not a test method

JUnitPublicNonTestMethod218

[SRC]void onInitMockBeans() {

[MSG]Violation in class JavascriptTagLibResourcesTests. The method onInitMockBeans is public but not a test method

UnusedVariable272

[SRC]def result = applyTemplate(template, [:])

[MSG]The variable [result] in class org.codehaus.groovy.grails.web.taglib.JavascriptTagLibResourcesTests is not used

➥ JavascriptTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable246

[SRC]String newLine = EOL

[MSG]The variable [newLine] in class org.codehaus.groovy.grails.web.taglib.JavascriptTagLibTests is not used

JUnitPublicNonTestMethod293

[SRC]def replaceMetaClass(Object o) {

[MSG]Violation in class JavascriptTagLibTests. The method replaceMetaClass is public but not a test method

JUnitPublicNonTestMethod2287

[SRC]def setRequestContext() {

[MSG]Violation in class JavascriptTagLibTests. The method setRequestContext is public but not a test method

JUnitPublicNonTestMethod2291

[SRC]def setRequestContext(path) {

[MSG]Violation in class JavascriptTagLibTests. The method setRequestContext is public but not a test method

JUnitPublicNonTestMethod2295

[SRC]def setupPluginController(tag) {

[MSG]Violation in class JavascriptTagLibTests. The method setupPluginController is public but not a test method

UnusedMethodParameter2295

[SRC]def setupPluginController(tag) {

[MSG]Violation in class JavascriptTagLibTests. Method parameter [tag] is never referenced in the method setupPluginController of class org.codehaus.groovy.grails.web.taglib.JavascriptTagLibTests

UnusedMethodParameter2312

[SRC]def doRemoteFunction(Object taglib, Object attrs, Object out) {

[MSG]Violation in class TestProvider. Method parameter [taglib] is never referenced in the method doRemoteFunction of class org.codehaus.groovy.grails.web.taglib.TestProvider

UnusedMethodParameter2312

[SRC]def doRemoteFunction(Object taglib, Object attrs, Object out) {

[MSG]Violation in class TestProvider. Method parameter [attrs] is never referenced in the method doRemoteFunction of class org.codehaus.groovy.grails.web.taglib.TestProvider

EmptyMethod2316

[SRC]def prepareAjaxForm(Object attrs) {}

[MSG]Violation in class TestProvider. The method prepareAjaxForm is both empty and not marked with @Override

UnusedMethodParameter2316

[SRC]def prepareAjaxForm(Object attrs) {}

[MSG]Violation in class TestProvider. Method parameter [attrs] is never referenced in the method prepareAjaxForm of class org.codehaus.groovy.grails.web.taglib.TestProvider

UnusedImport313

[SRC]import org.codehaus.groovy.grails.commons.TagLibArtefactHandler

[MSG]The [org.codehaus.groovy.grails.commons.TagLibArtefactHandler] import is never referenced

UnnecessaryGetter352

[SRC]def grailsVersion = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.JavascriptTagLibTests. getGrailsVersion() can probably be rewritten as grailsVersion

➥ LayoutWriterStackTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod245

[SRC]void assertEqualsIgnoreWhiteSpace(String s1, String s2) {

[MSG]Violation in class LayoutWriterStackTests. The method assertEqualsIgnoreWhiteSpace is public but not a test method

➥ LinkRenderingTagLib2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod238

[SRC]void assertOutputEquals(expected, template, params = [:]) {

[MSG]Violation in class LinkRenderingTagLib2Tests. The method assertOutputEquals is public but not a test method

UnusedImport33

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

[MSG]The [org.codehaus.groovy.runtime.InvokerHelper] import is never referenced

➥ LinkRenderingTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
DuplicateMapKey246

[SRC]assertOutputEquals '<a href="/demo" class="B">demo</a>',..'7', x: '4']

[MSG]Key 'x' is duplicated.

UnusedImport33

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

[MSG]The [org.codehaus.groovy.runtime.InvokerHelper] import is never referenced

➥ NamespacedTagLibMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.springframework.validation.MapBindingResult

[MSG]The [org.springframework.validation.MapBindingResult] import is never referenced

➥ PluginTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter313

[SRC]def grailsVersion = GrailsUtil.getGrailsVersion()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.PluginTagLibTests. getGrailsVersion() can probably be rewritten as grailsVersion

➥ PropertyEditorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryCollectCall384

[SRC]assertEquals(["grails", "groovy"], obj.tags.collect {it.name})

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.PropertyEditorTests. The call to collect could probably be rewritten as a spread expression: obj.tags*.name

UnnecessaryGetter3119

[SRC]Object v = getValue()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.TestCustomPropertyEditor. getValue() can probably be rewritten as value

➥ RenderTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert241

[SRC]void testPaginateTag() {

[MSG]Violation in class RenderTagLibTests. Test method 'testPaginateTag' makes no assertions

UnusedVariable2103

[SRC]def head = ""

[MSG]The variable [head] in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests is not used

JUnitTestMethodWithoutAssert2205

[SRC]void testSortableColumnTag() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTag' makes no assertions

JUnitTestMethodWithoutAssert2219

[SRC]void testSortableColumnTagWithTitleKey() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTagWithTitleKey' makes no assertions

JUnitTestMethodWithoutAssert2265

[SRC]void testSortableColumnTagWithAction() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTagWithAction' makes no assertions

JUnitTestMethodWithoutAssert2279

[SRC]void testSortableColumnTagWithDefaultOrder() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTagWithDefaultOrder' makes no assertions

JUnitTestMethodWithoutAssert2323

[SRC]void testSortableColumnTagWithAdditionalAttributes() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTagWithAdditionalAttributes' makes no assertions

JUnitTestMethodWithoutAssert2338

[SRC]void testSortableColumnTagSorted() {

[MSG]Violation in class RenderTagLibTests. Test method 'testSortableColumnTagSorted' makes no assertions

JUnitPublicNonTestMethod2422

[SRC]void checkTagOutput(output, expectedClassValue, expected..edContent) {

[MSG]Violation in class RenderTagLibTests. The method checkTagOutput is public but not a test method

JUnitPublicNonTestMethod2463

[SRC]void checkTagOutput(output, expectedClassValue, expected..therAttrs) {

[MSG]Violation in class RenderTagLibTests. The method checkTagOutput is public but not a test method

UnnecessaryGetter3347

[SRC]webRequest.getParams().put("sort", "title")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3348

[SRC]webRequest.getParams().put("order", "asc")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3364

[SRC]webRequest.getParams().put("sort", "title")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3365

[SRC]webRequest.getParams().put("order", "desc")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3381

[SRC]webRequest.getParams().put("sort", "price")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3382

[SRC]webRequest.getParams().put("order", "desc")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3398

[SRC]webRequest.getParams().put("sort", "price")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3399

[SRC]webRequest.getParams().put("order", "desc")

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getParams() can probably be rewritten as params

UnnecessaryGetter3553

[SRC]assertEquals 'my/contenttype', response.getContentType()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getContentType() can probably be rewritten as contentType

UseAssertNullInsteadOfAssertEquals3557

[SRC]assertEquals null, response.getContentType()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. assertEquals can be simplified using assertNull

UnnecessaryGetter3557

[SRC]assertEquals null, response.getContentType()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getContentType() can probably be rewritten as contentType

UnnecessaryGetter3560

[SRC]assertEquals 'my/contenttype', response.getContentType()

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.RenderTagLibTests. getContentType() can probably be rewritten as contentType

➥ ReturnValueTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod24

[SRC]void onSetUp() {

[MSG]Violation in class ReturnValueTagLibTests. The method onSetUp is public but not a test method

➥ SelectTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTestMethodWithoutAssert2255

[SRC]void testMultipleSelect() {

[MSG]Violation in class SelectTagTests. Test method 'testMultipleSelect' makes no assertions

JUnitTestMethodWithoutAssert2267

[SRC]void testMultipleSelectWithObjectValues() {

[MSG]Violation in class SelectTagTests. Test method 'testMultipleSelectWithObjectValues' makes no assertions

JUnitPublicNonTestMethod2281

[SRC]void checkMultiSelect(List categories, List selected, Cl..sSelected) {

[MSG]Violation in class SelectTagTests. The method checkMultiSelect is public but not a test method

UnusedPrivateMethod2370

[SRC]private void assertSelectFieldNotPresent(Document docume..fieldName) {

[MSG]The method assertSelectFieldNotPresent is not used within SelectTagTests.groovy

UnnecessaryParenthesesForMethodCallWithClosure3136

[SRC]range.each() {

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3154

[SRC]range.each() {

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3201

[SRC]range.each() {

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3227

[SRC]categoryMap.each() { value, text ->

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3233

[SRC]categoryMap.each() { value, text ->

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3250

[SRC]categoryMap.each() { value, text ->

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3306

[SRC]categories.each() { cat ->

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.SelectTagTests. Parentheses in the 'each' method call are unnecessary and can be removed.

➥ ValidationTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryObjectReferences3214

[SRC]b.publisherURL = new URL("http://canoo.com/gia")

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3215

[SRC]b.releaseDate = new Date()

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3216

[SRC]b.usPrice = 10.99

[MSG]The code could be more concise by using a with() or identity() block

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.webflow

➥ FlowCommandObjectsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod287

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowCommandObjectsTests. The method getFlowClosure is public but not a test method

UnusedImport34

[SRC]import org.springframework.webflow.definition.FlowDefinition

[MSG]The [org.springframework.webflow.definition.FlowDefinition] import is never referenced

UnusedImport35

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

[MSG]The [org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder] import is never referenced

UnusedImport36

[SRC]import org.springframework.webflow.context.servlet.Servl..ernalContext

[MSG]The [org.springframework.webflow.context.servlet.ServletExternalContext] import is never referenced

UnnecessaryGetter323

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowCommandObjectsTests. getFlowScope() can probably be rewritten as flowScope

UnnecessaryGetter351

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowCommandObjectsTests. getFlowScope() can probably be rewritten as flowScope

UnnecessaryGetter374

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowCommandObjectsTests. getFlowScope() can probably be rewritten as flowScope

➥ FlowRedirectTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod252

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowRedirectTests. The method getFlowClosure is public but not a test method

UnusedImport310

[SRC]import org.springframework.webflow.definition.FlowDefinition

[MSG]The [org.springframework.webflow.definition.FlowDefinition] import is never referenced

UnnecessaryGetter323

[SRC]assertEquals "contextRelative:/test/foo",context.getExte..edirectUrl()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowRedirectTests. getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl

UnnecessaryGetter332

[SRC]assertEquals "contextRelative:/test/foo/1",context.getEx..edirectUrl()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowRedirectTests. getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl

UnnecessaryGetter344

[SRC]assertEquals "contextRelative:/mycontroller/foo",context..edirectUrl()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowRedirectTests. getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl

➥ FlowTagInvokationTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod233

[SRC]void onInit() {

[MSG]Violation in class FlowTagInvokationTests. The method onInit is public but not a test method

JUnitPublicNonTestMethod242

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowTagInvokationTests. The method getFlowClosure is public but not a test method

UnusedImport34

[SRC]import org.springframework.webflow.definition.FlowDefinition

[MSG]The [org.springframework.webflow.definition.FlowDefinition] import is never referenced

UnusedImport35

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

[MSG]The [org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder] import is never referenced

UnnecessaryGetter320

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowTagInvokationTests. getFlowScope() can probably be rewritten as flowScope

UnnecessaryGetter329

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.FlowTagInvokationTests. getFlowScope() can probably be rewritten as flowScope

➥ SubflowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod229

[SRC]Closure getFlowClosure() {

[MSG]Violation in class SubflowExecutionTests. The method getFlowClosure is public but not a test method

➥ SubflowExecutionWithExternalSubflowTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod221

[SRC]Closure getFlowClosure() {

[MSG]Violation in class SubflowExecutionWithExternalSubflowTests. The method getFlowClosure is public but not a test method

UnusedImport33

[SRC]import junit.framework.TestCase

[MSG]The [junit.framework.TestCase] import is never referenced

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.webflow.engine.builder

➥ FlowBuilderDecisionExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderDecisionExecutionTests. The method getFlowClosure is public but not a test method

➥ FlowBuilderDynamicTransitionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod233

[SRC]String getFlowId() { "myFlow" }

[MSG]Violation in class FlowBuilderDynamicTransitionTests. The method getFlowId is public but not a test method

JUnitPublicNonTestMethod235

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderDynamicTransitionTests. The method getFlowClosure is public but not a test method

UnnecessaryGetter312

[SRC]def startState = flowDefinition.getStartState()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderDynamicTransitionTests. getStartState() can probably be rewritten as startState

➥ FlowBuilderExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderExecutionTests. The method getFlowClosure is public but not a test method

UnnecessaryGetter341

[SRC]def model = getFlowScope()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderExecutionTests. getFlowScope() can probably be rewritten as flowScope

➥ FlowBuilderSubFlowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod229

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderSubFlowExecutionTests. The method getFlowClosure is public but not a test method

JUnitPublicNonTestMethod259

[SRC]def foo() { "bar" }

[MSG]Violation in class FlowBuilderSubFlowExecutionTests. The method foo is public but not a test method

UnnecessaryGetter373

[SRC]def theFlow = getFlowDefinition()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderSubFlowExecutionTests. getFlowDefinition() can probably be rewritten as flowDefinition

➥ FlowBuilderSubFlowExecutionWithInputOuputTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod247

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderSubFlowExecutionWithInputOuputTests. The method getFlowClosure is public but not a test method

UnusedVariable289

[SRC]GrailsWebRequest webrequest = grails.util.GrailsWebUtil...WebRequest()

[MSG]The variable [webrequest] in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderSubFlowExecutionWithInputOuputTests is not used

EmptyCatchBlock2124

[SRC]catch (FlowInputMappingException e) {}

[MSG]The catch block is empty

➥ FlowBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper216

[SRC]void setUp() {

[MSG]Violation in class FlowBuilderTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper226

[SRC]void tearDown() {

[MSG]Violation in class FlowBuilderTests. The method tearDown() does not call super.tearDown()

UnnecessaryGetter323

[SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderTests. getExpressionParser() can probably be rewritten as expressionParser

UnnecessaryGetter3154

[SRC]def flow = new FlowBuilder("myFlow",getFlowBuilderServic..pl()).flow {

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilderTests. getFlowBuilderServices() can probably be rewritten as flowBuilderServices

➥ FlowBuilderTransitionCriteriaTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod27

[SRC]Closure getFlowClosure() {

[MSG]Violation in class FlowBuilderTransitionCriteriaTests. The method getFlowClosure is public but not a test method

➥ RuntimeRedirectActionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter327

[SRC]context.getFlowScope().put("id", "1")

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectActionTests. getFlowScope() can probably be rewritten as flowScope

UnnecessaryGetter329

[SRC]assert "contextRelative:/book/show/1" == ext.getExternalRedirectUrl()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectActionTests. getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl

UnnecessaryGetter331

[SRC]context.getFlowScope().put("id", "2")

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectActionTests. getFlowScope() can probably be rewritten as flowScope

UnnecessaryGetter333

[SRC]assert "contextRelative:/book/show/2" == ext.getExternalRedirectUrl()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectActionTests. getExternalRedirectUrl() can probably be rewritten as externalRedirectUrl

Package: grails-test-suite-web.src.test.groovy.org.codehaus.groovy.grails.webflow.support

➥ AbstractGrailsTagAwareFlowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper264

[SRC]final void setUp() throws Exception {

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method setUp() does not call super.setUp()

JUnitTearDownCallsSuper2138

[SRC]final void tearDown() {

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method tearDown() does not call super.tearDown()

JUnitPublicNonTestMethod2158

[SRC]FlowDefinition registerFlow(String flowId, Closure flowClosure) {

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method registerFlow is public but not a test method

JUnitPublicNonTestMethod2167

[SRC]FlowDefinition getFlowDefinition() {

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method getFlowDefinition is public but not a test method

JUnitPublicNonTestMethod2175

[SRC]String getFlowId() { 'testFlow' }

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method getFlowId is public but not a test method

JUnitPublicNonTestMethod2177

[SRC]abstract Closure getFlowClosure()

[MSG]Violation in class AbstractGrailsTagAwareFlowExecutionTests. The method getFlowClosure is public but not a test method

UnusedImport315

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

[MSG]The [org.codehaus.groovy.runtime.InvokerHelper] import is never referenced

UnusedImport340

[SRC]import org.springframework.webflow.definition.registry.F..itionLocator

[MSG]The [org.springframework.webflow.definition.registry.FlowDefinitionLocator] import is never referenced

UnnecessaryGetter3111

[SRC]appCtx = springConfig.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getApplicationContext() can probably be rewritten as applicationContext

UnnecessaryGetter3120

[SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getExpressionParser() can probably be rewritten as expressionParser

UnnecessaryGetter3159

[SRC]FlowBuilder builder = new FlowBuilder(flowId, flowClosur..nRegistry())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry

UnnecessaryGetter3162

[SRC]FlowAssembler assembler = new FlowAssembler(builder, bui..erContext())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowBuilderContext() can probably be rewritten as flowBuilderContext

UnnecessaryGetter3163

[SRC]getFlowDefinitionRegistry().registerFlowDefinition(new D..(assembler))

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry

UnnecessaryGetter3164

[SRC]return getFlowDefinitionRegistry().getFlowDefinition(flowId)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowDefinitionRegistry() can probably be rewritten as flowDefinitionRegistry

UnnecessaryGetter3168

[SRC]return registerFlow(getFlowId(), getFlowClosure())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowId() can probably be rewritten as flowId

UnnecessaryGetter3168

[SRC]return registerFlow(getFlowId(), getFlowClosure())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.support.AbstractGrailsTagAwareFlowExecutionTests. getFlowClosure() can probably be rewritten as flowClosure

Package: grails-test.src.main.groovy.grails.test

➥ GrailsMock.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3140

[SRC]def methods = demand.mockMetaClass.getMetaMethods()

[MSG]Violation in class grails.test.GrailsMock. getMetaMethods() can probably be rewritten as metaMethods

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.plugins.testing

➥ AbstractGrailsMockHttpServletResponse.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter343

[SRC]HttpServletRequest request = GrailsWebRequest.lookup().g..entRequest()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.AbstractGrailsMockHttpServletResponse. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter389

[SRC]webRequest.setOut(getWriter())

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.AbstractGrailsMockHttpServletResponse. getWriter() can probably be rewritten as writer

UnnecessaryGetter394

[SRC]getRedirectedUrl()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.AbstractGrailsMockHttpServletResponse. getRedirectedUrl() can probably be rewritten as redirectedUrl

UnnecessaryGetter3106

[SRC]if (getStatus() in [301, 302]) {

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.AbstractGrailsMockHttpServletResponse. getStatus() can probably be rewritten as status

UnnecessaryGetter3110

[SRC]return super.getRedirectedUrl()

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.AbstractGrailsMockHttpServletResponse. getRedirectedUrl() can probably be rewritten as redirectedUrl

➥ GrailsMockErrors.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils

[MSG]The [org.codehaus.groovy.grails.commons.GrailsClassUtils] import is never referenced

➥ GrailsMockHttpServletRequest.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod2455

[SRC]void delete() {

[MSG]Violation in class MockPart. The method delete is both empty and not marked with @Override

UnusedMethodParameter2497

[SRC]void dispatch(javax.servlet.ServletContext context, String path) {

[MSG]Violation in class MockAsyncContext. Method parameter [context] is never referenced in the method dispatch of class org.codehaus.groovy.grails.plugins.testing.MockAsyncContext

EmptyMethod2501

[SRC]void complete() {

[MSG]Violation in class MockAsyncContext. The method complete is both empty and not marked with @Override

UnusedImport334

[SRC]import javax.servlet.DispatcherType

[MSG]The [javax.servlet.DispatcherType] import is never referenced

UnnecessaryPackageReference363

[SRC]javax.servlet.DispatcherType dispatcherType;

[MSG]The javax.servlet.DispatcherType class was explicitly imported, so specifying the package name is not necessary

UnnecessaryGetter3339

[SRC]multipartFiles.add(file.getName(), file);

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.GrailsMockHttpServletRequest. getName() can probably be rewritten as name

UnnecessaryGetter3396

[SRC]getFileMap().values().collect {new MockPart(it)}

[MSG]Violation in class org.codehaus.groovy.grails.plugins.testing.GrailsMockHttpServletRequest. getFileMap() can probably be rewritten as fileMap

UnnecessaryPackageReference3399

[SRC]javax.servlet.http.Part getPart(String name) {

[MSG]The javax.servlet.http.Part class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3406

[SRC]javax.servlet.AsyncContext startAsync() {

[MSG]The javax.servlet.AsyncContext class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3415

[SRC]javax.servlet.AsyncContext startAsync(javax.servlet.Serv..tResponse) {

[MSG]The javax.servlet.AsyncContext class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3415

[SRC]javax.servlet.AsyncContext startAsync(javax.servlet.Serv..tResponse) {

[MSG]The javax.servlet.ServletRequest class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3415

[SRC]javax.servlet.AsyncContext startAsync(javax.servlet.Serv..tResponse) {

[MSG]The javax.servlet.ServletResponse class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3526

[SRC]void addListener(javax.servlet.AsyncListener listener) {

[MSG]The javax.servlet.AsyncListener class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3530

[SRC]void addListener(javax.servlet.AsyncListener listener, j..tResponse) {

[MSG]The javax.servlet.AsyncListener class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3530

[SRC]void addListener(javax.servlet.AsyncListener listener, j..tResponse) {

[MSG]The javax.servlet.ServletRequest class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference3530

[SRC]void addListener(javax.servlet.AsyncListener listener, j..tResponse) {

[MSG]The javax.servlet.ServletResponse class was explicitly imported, so specifying the package name is not necessary

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test

➥ GrailsTestTargetPattern.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessarySubstring361

[SRC]methodName = rawPattern.substring(pos + 1)

[MSG]Violation in class org.codehaus.groovy.grails.test.GrailsTestTargetPattern. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring362

[SRC]classPattern = rawPattern.substring(0, pos)

[MSG]Violation in class org.codehaus.groovy.grails.test.GrailsTestTargetPattern. The String.substring(int, int) method can be replaced with the subscript operator

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test.event

➥ GrailsTestEventConsoleReporter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter242

[SRC]protected doTestFailure(String name, failure, boolean isError) {

[MSG]Violation in class GrailsTestEventConsoleReporter. Method parameter [failure] is never referenced in the method doTestFailure of class org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter

UnusedMethodParameter242

[SRC]protected doTestFailure(String name, failure, boolean isError) {

[MSG]Violation in class GrailsTestEventConsoleReporter. Method parameter [isError] is never referenced in the method doTestFailure of class org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter

UnusedMethodParameter247

[SRC]protected doTestCaseEnd(String name, String out, String err) {

[MSG]Violation in class GrailsTestEventConsoleReporter. Method parameter [name] is never referenced in the method doTestCaseEnd of class org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter

UnusedMethodParameter247

[SRC]protected doTestCaseEnd(String name, String out, String err) {

[MSG]Violation in class GrailsTestEventConsoleReporter. Method parameter [err] is never referenced in the method doTestCaseEnd of class org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test.junit4

➥ JUnit4GrailsTestType.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter353

[SRC]def testClasses = getTestClasses()

[MSG]Violation in class org.codehaus.groovy.grails.test.junit4.JUnit4GrailsTestType. getTestClasses() can probably be rewritten as testClasses

UnnecessaryGetter376

[SRC]new GrailsTestCaseRunnerBuilder(mode, getApplicationCont..getPatterns)

[MSG]Violation in class org.codehaus.groovy.grails.test.junit4.JUnit4GrailsTestType. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test.junit4.listener

➥ SuiteRunListener.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod246

[SRC]void testRunStarted(Description description) {

[MSG]Violation in class SuiteRunListener. The method testRunStarted is both empty and not marked with @Override

UnusedMethodParameter246

[SRC]void testRunStarted(Description description) {

[MSG]Violation in class SuiteRunListener. Method parameter [description] is never referenced in the method testRunStarted of class org.codehaus.groovy.grails.test.junit4.listener.SuiteRunListener

UnusedMethodParameter268

[SRC]void testRunFinished(Result result) {

[MSG]Violation in class SuiteRunListener. Method parameter [result] is never referenced in the method testRunFinished of class org.codehaus.groovy.grails.test.junit4.listener.SuiteRunListener

EmptyMethod272

[SRC]void testIgnored(Description description) {

[MSG]Violation in class SuiteRunListener. The method testIgnored is both empty and not marked with @Override

UnusedMethodParameter272

[SRC]void testIgnored(Description description) {

[MSG]Violation in class SuiteRunListener. Method parameter [description] is never referenced in the method testIgnored of class org.codehaus.groovy.grails.test.junit4.listener.SuiteRunListener

UnnecessaryGetter369

[SRC]getPerTestRunListener().finish()

[MSG]Violation in class org.codehaus.groovy.grails.test.junit4.listener.SuiteRunListener. getPerTestRunListener() can probably be rewritten as perTestRunListener

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test.junit4.runner

➥ GrailsTestCaseRunner.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport325

[SRC]import org.junit.runner.notification.RunNotifier

[MSG]The [org.junit.runner.notification.RunNotifier] import is never referenced

UnusedImport335

[SRC]import org.codehaus.groovy.grails.test.support.GrailsTestInterceptor

[MSG]The [org.codehaus.groovy.grails.test.support.GrailsTestInterceptor] import is never referenced

Package: grails-test.src.main.groovy.org.codehaus.groovy.grails.test.support

➥ GrailsTestInterceptor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter281

[SRC]protected initRequestEnvironmentIfNecessary(Closure body) {

[MSG]Violation in class GrailsTestInterceptor. Method parameter [body] is never referenced in the method initRequestEnvironmentIfNecessary of class org.codehaus.groovy.grails.test.support.GrailsTestInterceptor

UnnecessaryGetter384

[SRC]def controllerName = getControllerName()

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestInterceptor. getControllerName() can probably be rewritten as controllerName

➥ GrailsTestTransactionInterceptor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.springframework.web.context.request.RequestContextHolder

[MSG]The [org.springframework.web.context.request.RequestContextHolder] import is never referenced

➥ GrailsTestTypeSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter3117

[SRC]Thread.currentThread().contextClassLoader = getTestClassLoader()

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport. getTestClassLoader() can probably be rewritten as testClassLoader

UnnecessaryGetter3157

[SRC]def classPathAdditions = [getSourceDir()]

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport. getSourceDir() can probably be rewritten as sourceDir

UnnecessaryGetter3210

[SRC]def basePath = getSourceDir().canonicalPath

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport. getSourceDir() can probably be rewritten as sourceDir

UnnecessarySubstring3216

[SRC]def relativePath = filePath.substring(basePath.size() + 1)

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3250

[SRC]getTestClassLoader().loadClass(className)

[MSG]Violation in class org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport. getTestClassLoader() can probably be rewritten as testClassLoader

Package: grails-web.src.jsp21.groovy.org.codehaus.groovy.grails.web.pages.ext.jsp

➥ GroovyPagesJspFactory21.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter317

[SRC]def jspCtx = servletContext.getAttribute(GroovyPagesJspA..t.getName())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory21. getName() can probably be rewritten as name

UnnecessaryGetter321

[SRC]if (!servletContext.getAttribute(GroovyPagesJspApplicati..etName())) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory21. getName() can probably be rewritten as name

UnnecessaryGetter323

[SRC]servletContext.setAttribute(GroovyPagesJspApplicationCon..e(), jspCtx)

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory21. getName() can probably be rewritten as name

➥ GroovyPagesPageContext21.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter330

[SRC]if (JspFactory.getDefaultFactory() == null) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContext21. getDefaultFactory() can probably be rewritten as defaultFactory

UnnecessaryGetter339

[SRC]def jspContext = JspFactory.getDefaultFactory().getJspAp..etContext())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContext21. getDefaultFactory() can probably be rewritten as defaultFactory

UnnecessaryGetter339

[SRC]def jspContext = JspFactory.getDefaultFactory().getJspAp..etContext())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesPageContext21. getServletContext() can probably be rewritten as servletContext

Package: grails-web.src.main.groovy.grails.gsp

➥ PageRenderer.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter2165

[SRC]long getDateHeader(String name) { -1L }

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [name] is never referenced in the method getDateHeader of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2167

[SRC]String getHeader(String name) { null }

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [name] is never referenced in the method getHeader of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2169

[SRC]Enumeration getHeaders(String name) {

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [name] is never referenced in the method getHeaders of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2177

[SRC]int getIntHeader(String name) { -1 }

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [name] is never referenced in the method getIntHeader of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2191

[SRC]boolean isUserInRole(String role) { false }

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [role] is never referenced in the method isUserInRole of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2205

[SRC]HttpSession getSession(boolean create) { throw new Unsup..erations") }

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [create] is never referenced in the method getSession of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2264

[SRC]String[] getParameterValues(String name) {

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [name] is never referenced in the method getParameterValues of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2318

[SRC]RequestDispatcher getRequestDispatcher(String path) {

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [path] is never referenced in the method getRequestDispatcher of class grails.gsp.PageRenderer$PageRenderRequest

UnusedMethodParameter2322

[SRC]String getRealPath(String path) {

[MSG]Violation in class PageRenderer$PageRenderRequest. Method parameter [path] is never referenced in the method getRealPath of class grails.gsp.PageRenderer$PageRenderRequest

EmptyMethod2389

[SRC]void addCookie(Cookie cookie) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method addCookie is both empty and not marked with @Override

UnusedMethodParameter2389

[SRC]void addCookie(Cookie cookie) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [cookie] is never referenced in the method addCookie of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2393

[SRC]boolean containsHeader(String name) { false }

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method containsHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2403

[SRC]void sendError(int sc, String msg) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method sendError is both empty and not marked with @Override

UnusedMethodParameter2403

[SRC]void sendError(int sc, String msg) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [sc] is never referenced in the method sendError of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2403

[SRC]void sendError(int sc, String msg) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [msg] is never referenced in the method sendError of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2407

[SRC]void sendError(int sc) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method sendError is both empty and not marked with @Override

UnusedMethodParameter2407

[SRC]void sendError(int sc) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [sc] is never referenced in the method sendError of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2411

[SRC]void sendRedirect(String location) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method sendRedirect is both empty and not marked with @Override

UnusedMethodParameter2411

[SRC]void sendRedirect(String location) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [location] is never referenced in the method sendRedirect of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2415

[SRC]void setDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setDateHeader is both empty and not marked with @Override

UnusedMethodParameter2415

[SRC]void setDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method setDateHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2415

[SRC]void setDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [date] is never referenced in the method setDateHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2419

[SRC]void addDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method addDateHeader is both empty and not marked with @Override

UnusedMethodParameter2419

[SRC]void addDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method addDateHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2419

[SRC]void addDateHeader(String name, long date) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [date] is never referenced in the method addDateHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2423

[SRC]void setHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setHeader is both empty and not marked with @Override

UnusedMethodParameter2423

[SRC]void setHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method setHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2423

[SRC]void setHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [value] is never referenced in the method setHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2427

[SRC]void addHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method addHeader is both empty and not marked with @Override

UnusedMethodParameter2427

[SRC]void addHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method addHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2427

[SRC]void addHeader(String name, String value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [value] is never referenced in the method addHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2431

[SRC]void setIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setIntHeader is both empty and not marked with @Override

UnusedMethodParameter2431

[SRC]void setIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method setIntHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2431

[SRC]void setIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [value] is never referenced in the method setIntHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2435

[SRC]void addIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method addIntHeader is both empty and not marked with @Override

UnusedMethodParameter2435

[SRC]void addIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method addIntHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2435

[SRC]void addIntHeader(String name, int value) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [value] is never referenced in the method addIntHeader of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2439

[SRC]void setStatus(int sc) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setStatus is both empty and not marked with @Override

UnusedMethodParameter2439

[SRC]void setStatus(int sc) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [sc] is never referenced in the method setStatus of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2443

[SRC]void setStatus(int sc, String sm) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setStatus is both empty and not marked with @Override

UnusedMethodParameter2443

[SRC]void setStatus(int sc, String sm) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [sc] is never referenced in the method setStatus of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2443

[SRC]void setStatus(int sc, String sm) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [sm] is never referenced in the method setStatus of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2451

[SRC]String getHeader(String name) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method getHeader of class grails.gsp.PageRenderer$PageRenderResponse

UnusedMethodParameter2455

[SRC]Collection<String> getHeaders(String name) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [name] is never referenced in the method getHeaders of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2467

[SRC]void setContentLength(int len) {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method setContentLength is both empty and not marked with @Override

UnusedMethodParameter2467

[SRC]void setContentLength(int len) {

[MSG]Violation in class PageRenderer$PageRenderResponse. Method parameter [len] is never referenced in the method setContentLength of class grails.gsp.PageRenderer$PageRenderResponse

EmptyMethod2471

[SRC]void flushBuffer() {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method flushBuffer is both empty and not marked with @Override

EmptyMethod2475

[SRC]void resetBuffer() {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method resetBuffer is both empty and not marked with @Override

EmptyMethod2481

[SRC]void reset() {

[MSG]Violation in class PageRenderer$PageRenderResponse. The method reset is both empty and not marked with @Override

UnusedImport320

[SRC]import java.util.concurrent.ConcurrentLinkedQueue

[MSG]The [java.util.concurrent.ConcurrentLinkedQueue] import is never referenced

UnusedImport332

[SRC]import org.codehaus.groovy.grails.web.pages.GroovyPagesUriSupport

[MSG]The [org.codehaus.groovy.grails.web.pages.GroovyPagesUriSupport] import is never referenced

UnusedImport337

[SRC]import org.springframework.core.io.ResourceLoader

[MSG]The [org.springframework.core.io.ResourceLoader] import is never referenced

UnusedImport340

[SRC]import org.springframework.web.context.support.ServletCo..sourceLoader

[MSG]The [org.springframework.web.context.support.ServletContextResourceLoader] import is never referenced

UnusedImport343

[SRC]import org.codehaus.groovy.grails.web.pages.discovery.Gr..ScriptSource

[MSG]The [org.codehaus.groovy.grails.web.pages.discovery.GroovyPageResourceScriptSource] import is never referenced

UnusedImport344

[SRC]import org.codehaus.groovy.grails.web.pages.discovery.Gr..ScriptSource

[MSG]The [org.codehaus.groovy.grails.web.pages.discovery.GroovyPageCompiledScriptSource] import is never referenced

UnnecessaryGetter3126

[SRC]def oldRequestAttributes = RequestContextHolder.getRequestAttributes()

[MSG]Violation in class grails.gsp.PageRenderer. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter3198

[SRC]return new StringBuffer(getRequestURI())

[MSG]Violation in class grails.gsp.PageRenderer$PageRenderRequest. getRequestURI() can probably be rewritten as requestURI

UnnecessaryGetter3309

[SRC]return Locale.getDefault()

[MSG]Violation in class grails.gsp.PageRenderer$PageRenderRequest. getDefault() can probably be rewritten as default

UnnecessaryGetter3313

[SRC]return new IteratorEnumeration(Locale.getAvailableLocale...iterator())

[MSG]Violation in class grails.gsp.PageRenderer$PageRenderRequest. getAvailableLocales() can probably be rewritten as availableLocales

UnnecessaryGetter3381

[SRC]Locale locale = Locale.getDefault()

[MSG]Violation in class grails.gsp.PageRenderer$PageRenderResponse. getDefault() can probably be rewritten as default

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.mapping

➥ DefaultLinkGenerator.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity264

[SRC]String link(Map attrs, String encoding = 'UTF-8') {

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. The cyclomatic complexity for method [link] is [27]

EmptyCatchBlock2142

[SRC]} catch(e){}

[MSG]The catch block is empty

UnnecessaryGetter374

[SRC]if (cp == null) cp = getContextPath()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. getContextPath() can probably be rewritten as contextPath

UnnecessaryGetter397

[SRC]def controller = controllerAttribute != null ? controlle..rollerName()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. getControllerName() can probably be rewritten as controllerName

UnnecessaryGetter3149

[SRC]final cp = contextPathAttribute != null ? contextPathAtt..ontextPath()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. getContextPath() can probably be rewritten as contextPath

UnnecessaryGetter3177

[SRC]final cp = contextPathAttribute == null ? getContextPath..athAttribute

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. getContextPath() can probably be rewritten as contextPath

UnnecessaryGetter3216

[SRC]contextPath = requestStateLookupStrategy.getContextPath()

[MSG]Violation in class org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator. getContextPath() can probably be rewritten as contextPath

UnnecessaryElseStatement3259

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

UnnecessaryElseStatement3263

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

➥ ForwardUrlMappingInfo.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

[MSG]The [org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest] import is never referenced

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.mime

➥ MimeType.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter362

[SRC]def context = webRequest?.getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.mime.MimeType. getApplicationContext() can probably be rewritten as applicationContext

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.pages

➥ GroovyPageCompiler.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter387

[SRC]def relPackagePath = relativePath(viewsDir, gspfile.getParentFile())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompiler. getParentFile() can probably be rewritten as parentFile

UnnecessaryGetter3119

[SRC]gspgroovyfile.getParentFile().mkdirs()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompiler. getParentFile() can probably be rewritten as parentFile

➥ GroovyPageCompilerTask.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter358

[SRC]classpath = new Path(getProject())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompilerTask. getProject() can probably be rewritten as project

UnnecessaryGetter381

[SRC]throw new BuildException("destination [${destdir}] direc..tLocation())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompilerTask. getLocation() can probably be rewritten as location

UnnecessaryGetter387

[SRC]throw new BuildException("source [${srcdir}] directory d..tLocation())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompilerTask. getLocation() can probably be rewritten as location

UnnecessaryGetter3100

[SRC]GrailsConsole.getInstance().updateStatus("Compiling ${gs..kagename}]")

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPageCompilerTask. getInstance() can probably be rewritten as instance

➥ GroovyPagesMetaUtils.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport34

[SRC]import groovy.lang.MetaClass

UnnecessaryGetter320

[SRC]methodMissingForTagLib(mc, mc.getTheClass(), gspTagLibra..ToMetaClass)

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.GroovyPagesMetaUtils. getTheClass() can probably be rewritten as theClass

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.pages.ext.jsp

➥ GroovyPagesJspFactory.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [servlet] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [servletRequest] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [servletResponse] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [s] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [b] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [i] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter216

[SRC]PageContext getPageContext(Servlet servlet, ServletReque..oolean b1) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [b1] is never referenced in the method getPageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnusedMethodParameter219

[SRC]void releasePageContext(PageContext pageContext) {

[MSG]Violation in class GroovyPagesJspFactory. Method parameter [pageContext] is never referenced in the method releasePageContext of class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory

UnnecessaryGetter324

[SRC]return { getSpecificationVersion() } as JspEngineInfo

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspFactory. getSpecificationVersion() can probably be rewritten as specificationVersion

➥ JspTagImpl.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity260

[SRC]void doTag(Writer targetWriter, Map attributes, Closure body) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.JspTagImpl. The cyclomatic complexity for method [doTag] is [23]

UnusedMethodParameter2153

[SRC]protected handleSimpleTag(SimpleTag tag, Map attributes,..pageContext,

[MSG]Violation in class JspTagImpl. Method parameter [attributes] is never referenced in the method handleSimpleTag of class org.codehaus.groovy.grails.web.pages.ext.jsp.JspTagImpl

UnnecessaryGetter362

[SRC]GroovyPagesPageContext pageContext = PageContextFactory.getCurrent();

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.JspTagImpl. getCurrent() can probably be rewritten as current

UnnecessaryGetter399

[SRC]def out = pageContext.getOut()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.JspTagImpl. getOut() can probably be rewritten as out

UnnecessaryGetter3121

[SRC]LOG.warn "Tag ${tag.getClass().getName()} returned SKIP_..rted in GSP"

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.JspTagImpl. getName() can probably be rewritten as name

➥ PageContextFactory.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter338

[SRC]def classLoader = Thread.currentThread().getContextClassLoader()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.PageContextFactory. getContextClassLoader() can probably be rewritten as contextClassLoader

UnnecessaryGetter351

[SRC]def request = webRequest.getCurrentRequest()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.PageContextFactory. getCurrentRequest() can probably be rewritten as currentRequest

UnnecessaryGetter356

[SRC]ServletContext servletContext = webRequest.getServletContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.PageContextFactory. getServletContext() can probably be rewritten as servletContext

➥ TagLibraryResolver.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter364

[SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getJarsFromServletContext() can probably be rewritten as jarsFromServletContext

UnnecessaryGetter364

[SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getURLs() can probably be rewritten as URLs

UnnecessaryGetter370

[SRC]ZipEntry entry = zipInput.getNextEntry()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getNextEntry() can probably be rewritten as nextEntry

UnnecessaryGetter376

[SRC]entry = zipInput.getNextEntry()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getNextEntry() can probably be rewritten as nextEntry

UnnecessaryGetter386

[SRC]Resource webXml = getWebXmlFromServletContext()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getWebXmlFromServletContext() can probably be rewritten as webXmlFromServletContext

UnnecessaryGetter398

[SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getJarsFromServletContext() can probably be rewritten as jarsFromServletContext

UnnecessaryGetter398

[SRC]def jarURLs = grailsApplication.isWarDeployed() ? getJar..().getURLs()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getURLs() can probably be rewritten as URLs

UnnecessaryGetter3115

[SRC]def source = new InputSource(webXml.getInputStream())

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getInputStream() can probably be rewritten as inputStream

UnnecessaryGetter3120

[SRC]def reader = factory.newSAXParser().getXMLReader()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getXMLReader() can probably be rewritten as XMLReader

UnnecessaryGetter3126

[SRC]for (entry in webXmlReader.getTagLocations()) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getTagLocations() can probably be rewritten as tagLocations

UnnecessaryGetter3157

[SRC]ZipEntry entry = zipInput.getNextEntry()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getNextEntry() can probably be rewritten as nextEntry

UnnecessaryGetter3159

[SRC]def name = entry.getName()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getName() can probably be rewritten as name

UnnecessaryGetter3169

[SRC]if ("taglib".equals(pullParser.getName())) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getName() can probably be rewritten as name

UnnecessaryGetter3175

[SRC]if (token == XmlPullParser.START_TAG && "uri".equals(pul..etName())) {

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getName() can probably be rewritten as name

UnnecessaryGetter3177

[SRC]tagLibURI = pullParser.getText()?.trim()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getText() can probably be rewritten as text

UnnecessaryGetter3191

[SRC]entry = zipInput.getNextEntry()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getNextEntry() can probably be rewritten as nextEntry

UnnecessaryGetter3216

[SRC]def reader = factory.newSAXParser().getXMLReader()

[MSG]Violation in class org.codehaus.groovy.grails.web.pages.ext.jsp.TagLibraryResolver. getXMLReader() can probably be rewritten as XMLReader

➥ TldReader.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter236

[SRC]void startElement(String nsuri, String localName, String..ttributes) {

[MSG]Violation in class TldReader. Method parameter [nsuri] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReader

UnusedMethodParameter236

[SRC]void startElement(String nsuri, String localName, String..ttributes) {

[MSG]Violation in class TldReader. Method parameter [localName] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReader

UnusedMethodParameter236

[SRC]void startElement(String nsuri, String localName, String..ttributes) {

[MSG]Violation in class TldReader. Method parameter [attributes] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReader

UnusedMethodParameter246

[SRC]void endElement(String nsuri, String localName, String qName) {

[MSG]Violation in class TldReader. Method parameter [nsuri] is never referenced in the method endElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReader

UnusedMethodParameter246

[SRC]void endElement(String nsuri, String localName, String qName) {

[MSG]Violation in class TldReader. Method parameter [localName] is never referenced in the method endElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.TldReader

➥ WebXmlTagLibraryReader.groovy

Rule NamePriorityLine #Source Line / Message
UnusedMethodParameter241

[SRC]void startElement(String ns, String localName, String qN..ttributes) {

[MSG]Violation in class WebXmlTagLibraryReader. Method parameter [ns] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReader

UnusedMethodParameter241

[SRC]void startElement(String ns, String localName, String qN..ttributes) {

[MSG]Violation in class WebXmlTagLibraryReader. Method parameter [localName] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReader

UnusedMethodParameter241

[SRC]void startElement(String ns, String localName, String qN..ttributes) {

[MSG]Violation in class WebXmlTagLibraryReader. Method parameter [attributes] is never referenced in the method startElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReader

UnusedMethodParameter251

[SRC]void endElement(String ns, String localName, String qName) {

[MSG]Violation in class WebXmlTagLibraryReader. Method parameter [ns] is never referenced in the method endElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReader

UnusedMethodParameter251

[SRC]void endElement(String ns, String localName, String qName) {

[MSG]Violation in class WebXmlTagLibraryReader. Method parameter [localName] is never referenced in the method endElement of class org.codehaus.groovy.grails.web.pages.ext.jsp.WebXmlTagLibraryReader

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.taglib

➥ NamespacedTagDispatcher.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter359

[SRC]GroovyPagesMetaUtils.methodMissingForTagLib(getMetaClass..lopmentMode)

[MSG]Violation in class org.codehaus.groovy.grails.web.taglib.NamespacedTagDispatcher. getMetaClass() can probably be rewritten as metaClass

➥ TemplateNamespacedTagDispatcher.groovy

Rule NamePriorityLine #Source Line / Message
SynchronizedOnThis222

[SRC]synchronized(this) {

[MSG]The synchronized statement uses the 'this' reference

UnusedImport33

[SRC]import grails.util.CollectionUtils;

[MSG]The [grails.util.CollectionUtils] import is never referenced

UnnecessaryGroovyImport35

[SRC]import java.util.Map;

Package: grails-web.src.main.groovy.org.codehaus.groovy.grails.web.util

➥ TypeConvertingMap.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.apache.commons.lang.builder.HashCodeBuilder

[MSG]The [org.apache.commons.lang.builder.HashCodeBuilder] import is never referenced

Package: grails-webflow.src.main.groovy.grails.test

➥ WebFlowTestCase.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod260

[SRC]abstract getFlow()

[MSG]Violation in class WebFlowTestCase. The method getFlow is public but not a test method

JUnitPublicNonTestMethod265

[SRC]String getFlowId() { "test" }

[MSG]Violation in class WebFlowTestCase. The method getFlowId is public but not a test method

JUnitPublicNonTestMethod2106

[SRC]FlowDefinition registerFlow(String flowId, Closure flowClosure) {

[MSG]Violation in class WebFlowTestCase. The method registerFlow is public but not a test method

JUnitPublicNonTestMethod2115

[SRC]FlowDefinition getFlowDefinition() {

[MSG]Violation in class WebFlowTestCase. The method getFlowDefinition is public but not a test method

UnnecessaryGetter369

[SRC]GrailsWebRequest webRequest = RequestContextHolder.getRe..Attributes()

[MSG]Violation in class grails.test.WebFlowTestCase. getRequestAttributes() can probably be rewritten as requestAttributes

UnnecessaryGetter374

[SRC]mockServletContext = webRequest.getServletContext()

[MSG]Violation in class grails.test.WebFlowTestCase. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter375

[SRC]applicationContext = WebApplicationContextUtils.getWebAp..etContext())

[MSG]Violation in class grails.test.WebFlowTestCase. getServletContext() can probably be rewritten as servletContext

UnnecessaryGetter395

[SRC]flowBuilderServices.expressionParser = DefaultExpression..sionParser()

[MSG]Violation in class grails.test.WebFlowTestCase. getExpressionParser() can probably be rewritten as expressionParser

UnnecessaryGetter3110

[SRC]FlowAssembler assembler = new FlowAssembler(builder, bui..erContext())

[MSG]Violation in class grails.test.WebFlowTestCase. getFlowBuilderContext() can probably be rewritten as flowBuilderContext

UnnecessaryGetter3116

[SRC]def flow = getFlow()

[MSG]Violation in class grails.test.WebFlowTestCase. getFlow() can probably be rewritten as flow

UnnecessaryGetter3123

[SRC]return registerFlow(getFlowId(), flow)

[MSG]Violation in class grails.test.WebFlowTestCase. getFlowId() can probably be rewritten as flowId

Package: grails-webflow.src.main.groovy.org.codehaus.groovy.grails.webflow

➥ WebFlowPluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport324

[SRC]import org.codehaus.groovy.grails.webflow.persistence.Fl..ssionContext

[MSG]The [org.codehaus.groovy.grails.webflow.persistence.FlowAwareCurrentSessionContext] import is never referenced

UnusedImport325

[SRC]import org.codehaus.groovy.grails.webflow.persistence.Se..tionListener

[MSG]The [org.codehaus.groovy.grails.webflow.persistence.SessionAwareHibernateFlowExecutionListener] import is never referenced

UnusedImport340

[SRC]import org.springframework.webflow.execution.factory.Sta..stenerLoader

[MSG]The [org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader] import is never referenced

UnnecessarySelfAssignment371

[SRC]viewFactoryCreator = viewFactoryCreator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment371

[SRC]viewFactoryCreator = viewFactoryCreator

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryPackageReference380

[SRC]hibernateConversationListener(org.codehaus.groovy.grails..tionManager)

[MSG]The org.codehaus.groovy.grails.webflow.persistence.SessionAwareHibernateFlowExecutionListener class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference380

[SRC]hibernateConversationListener(org.codehaus.groovy.grails..tionManager)

[MSG]The org.codehaus.groovy.grails.webflow.persistence.SessionAwareHibernateFlowExecutionListener class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference381

[SRC]executionListenerLoader(org.springframework.webflow.exec..ionListener)

[MSG]The org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference381

[SRC]executionListenerLoader(org.springframework.webflow.exec..ionListener)

[MSG]The org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference382

[SRC]sessionFactory.currentSessionContextClass = org.codehaus..ssionContext

[MSG]The org.codehaus.groovy.grails.webflow.persistence.FlowAwareCurrentSessionContext class was explicitly imported, so specifying the package name is not necessary

UnnecessaryPackageReference382

[SRC]sessionFactory.currentSessionContextClass = org.codehaus..ssionContext

[MSG]The org.codehaus.groovy.grails.webflow.persistence.FlowAwareCurrentSessionContext class was explicitly imported, so specifying the package name is not necessary

UnnecessarySelfAssignment3103

[SRC]flowExecutor = flowExecutor

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessarySelfAssignment3103

[SRC]flowExecutor = flowExecutor

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter3122

[SRC]def assembler = new FlowAssembler(builder, builder.getFl..erContext())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getFlowBuilderContext() can probably be rewritten as flowBuilderContext

UnnecessaryGetter3170

[SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getWrappedInstance() can probably be rewritten as wrappedInstance

UnnecessaryGetter3170

[SRC]controller.getReference().getWrappedInstance().metaClass..rollerClass)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getReference() can probably be rewritten as reference

UnnecessaryDefInVariableDeclaration3172

[SRC]def FlowBuilder builder = new FlowBuilder(("${controller..lowRegistry)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. The def keyword is unneeded when a variable is declared with a type

UnnecessaryDefInVariableDeclaration3172

[SRC]def FlowBuilder builder = new FlowBuilder(("${controller..lowRegistry)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. The def keyword is unneeded when a variable is declared with a type

UnnecessaryGetter3176

[SRC]FlowAssembler flowAssembler = new FlowAssembler(builder,..erContext())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getFlowBuilderContext() can probably be rewritten as flowBuilderContext

UnnecessaryGetter3182

[SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getWrappedInstance() can probably be rewritten as wrappedInstance

UnnecessaryGetter3182

[SRC]controller.getReference().getWrappedInstance().metaClass..entMetaClass

[MSG]Violation in class org.codehaus.groovy.grails.webflow.WebFlowPluginSupport. getReference() can probably be rewritten as reference

Package: grails-webflow.src.main.groovy.org.codehaus.groovy.grails.webflow.context.servlet

➥ GrailsFlowUrlHandler.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport326

[SRC]import org.springframework.webflow.execution.repository...onRepository

[MSG]The [org.springframework.webflow.execution.repository.FlowExecutionRepository] import is never referenced

UnusedImport332

[SRC]import org.codehaus.groovy.grails.webflow.execution.Grai..ExecutorImpl

[MSG]The [org.codehaus.groovy.grails.webflow.execution.GrailsFlowExecutorImpl] import is never referenced

UnnecessarySubstring368

[SRC]String actionName = flowId.substring(flowId.lastIndexOf('/')+1)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.context.servlet.GrailsFlowUrlHandler. The String.substring(int) method can be replaced with the subscript operator

UnnecessarySubstring3107

[SRC]String actionName = flowId.substring(flowId.lastIndexOf('/') + 1)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.context.servlet.GrailsFlowUrlHandler. The String.substring(int) method can be replaced with the subscript operator

Package: grails-webflow.src.main.groovy.org.codehaus.groovy.grails.webflow.engine.builder

➥ AbstractDelegate.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryDefInVariableDeclaration366

[SRC]def MetaProperty property = metaClass.getMetaProperty(name)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.AbstractDelegate. The def keyword is unneeded when a variable is declared with a type

UnnecessaryGetter367

[SRC]def ctx = getApplicationContext()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.AbstractDelegate. getApplicationContext() can probably be rewritten as applicationContext

➥ AbstractMapper.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod2123

[SRC]void setValue(Object context, Object value) {}

[MSG]Violation in class KeyExpression. The method setValue is both empty and not marked with @Override

UnusedMethodParameter2123

[SRC]void setValue(Object context, Object value) {}

[MSG]Violation in class KeyExpression. Method parameter [context] is never referenced in the method setValue of class org.codehaus.groovy.grails.webflow.engine.builder.KeyExpression

UnusedMethodParameter2123

[SRC]void setValue(Object context, Object value) {}

[MSG]Violation in class KeyExpression. Method parameter [value] is never referenced in the method setValue of class org.codehaus.groovy.grails.webflow.engine.builder.KeyExpression

UnusedMethodParameter2125

[SRC]Class getValueType(Object context) {Object}

[MSG]Violation in class KeyExpression. Method parameter [context] is never referenced in the method getValueType of class org.codehaus.groovy.grails.webflow.engine.builder.KeyExpression

➥ ClosureExpression.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable235

[SRC]def attrs = context?.attributes ? context.attributes : [:]

[MSG]The variable [attrs] in class org.codehaus.groovy.grails.webflow.engine.builder.ClosureExpression is not used

EmptyMethod241

[SRC]void setValue(Object context, Object value) {

[MSG]Violation in class ClosureExpression. The method setValue is both empty and not marked with @Override

UnusedMethodParameter241

[SRC]void setValue(Object context, Object value) {

[MSG]Violation in class ClosureExpression. Method parameter [context] is never referenced in the method setValue of class org.codehaus.groovy.grails.webflow.engine.builder.ClosureExpression

UnusedMethodParameter241

[SRC]void setValue(Object context, Object value) {

[MSG]Violation in class ClosureExpression. Method parameter [value] is never referenced in the method setValue of class org.codehaus.groovy.grails.webflow.engine.builder.ClosureExpression

UnusedMethodParameter245

[SRC]Class getValueType(Object context) { Object }

[MSG]Violation in class ClosureExpression. Method parameter [context] is never referenced in the method getValueType of class org.codehaus.groovy.grails.webflow.engine.builder.ClosureExpression

➥ ClosureInvokingAction.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField241

[SRC]private static final String RESULT = "result"

[MSG]The field RESULT is not used within the class org.codehaus.groovy.grails.webflow.engine.builder.ClosureInvokingAction

EmptyCatchBlock2154

[SRC]catch (MissingPropertyException e) {

[MSG]The catch block is empty

UnnecessaryDotClass353

[SRC]this.hasCommandObjects = noOfParams > 1 || (noOfParams =..ntext.class)

[MSG]Object.class can be rewritten as Object

UnnecessaryDotClass353

[SRC]this.hasCommandObjects = noOfParams > 1 || (noOfParams =..ntext.class)

[MSG]RequestContext.class can be rewritten as RequestContext

UnnecessaryGetter373

[SRC]prop.validate(delegate, delegate.getProperty(prop.getPro..localErrors)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.ClosureInvokingAction. getPropertyName() can probably be rewritten as propertyName

➥ FlowBuilder.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2252

[SRC]catch (MissingPropertyException mpe) {

[MSG]The catch block is empty

EmptyCatchBlock2262

[SRC]catch (MissingPropertyException mpe) {

[MSG]The catch block is empty

UnnecessaryGetter3100

[SRC]this.metaClass = GroovySystem.getMetaClassRegistry().get..ilder.class)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getMetaClassRegistry() can probably be rewritten as metaClassRegistry

UnnecessaryDotClass3100

[SRC]this.metaClass = GroovySystem.getMetaClassRegistry().get..ilder.class)

[MSG]FlowBuilder.class can be rewritten as FlowBuilder

UnnecessaryGetter3113

[SRC]super.getContext()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getContext() can probably be rewritten as context

UnnecessaryGetter3124

[SRC]Flow flow = super.getFlow()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3130

[SRC]FlowArtifactFactory flowFactory = getContext().getFlowAr..actFactory()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlowArtifactFactory() can probably be rewritten as flowArtifactFactory

UnnecessaryGetter3130

[SRC]FlowArtifactFactory flowFactory = getContext().getFlowAr..actFactory()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getContext() can probably be rewritten as context

UnnecessaryGetter3171

[SRC]state = flowFactory.createEndState(name, getFlow(), getA..ntryAction),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3195

[SRC]state.getExceptionHandlerSet().add(eh)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getExceptionHandlerSet() can probably be rewritten as exceptionHandlerSet

UnnecessaryGetter3201

[SRC]getFlow().setStartState(startFlow)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessarySubstring3246

[SRC]key = key.substring(GrailsApplicationAttributes.ERRORS.length() + 1)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. The String.substring(int) method can be replaced with the subscript operator

UnnecessaryGetter3276

[SRC]getFlow(),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3294

[SRC]def controllerClass = flowInfo.subflow.getThisObject().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getThisObject() can probably be rewritten as thisObject

UnnecessaryGetter3306

[SRC]Class controllerClass = flowClosure.getThisObject().getClass()

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getThisObject() can probably be rewritten as thisObject

UnnecessaryGetter3313

[SRC]return flowFactory.createSubflowState(stateId, getFlow()..on(subflow),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3321

[SRC]getFlow(),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3333

[SRC]return flowFactory.createEndState(stateId, getFlow(),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getFlow() can probably be rewritten as flow

UnnecessaryGetter3346

[SRC]ViewFactory viewFactory = flowBuilderServices.getViewFac..ViewFactory(

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getViewFactoryCreator() can probably be rewritten as viewFactoryCreator

UnnecessaryGetter3348

[SRC]flowBuilderServices.getExpressionParser(),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getExpressionParser() can probably be rewritten as expressionParser

UnnecessaryGetter3349

[SRC]flowBuilderServices.getConversionService(),

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder. getConversionService() can probably be rewritten as conversionService

UnnecessaryGetter3454

[SRC]throw new FlowDefinitionException("Event handler in flow..etFlowId() +

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.FlowInfoCapturer. getFlowId() can probably be rewritten as flowId

➥ GrailsSubflowAttributeMapper.groovy

Rule NamePriorityLine #Source Line / Message
EmptyMethod247

[SRC]void mapSubflowOutput(AttributeMap output, RequestContext context) {}

[MSG]Violation in class GrailsSubflowAttributeMapper. The method mapSubflowOutput is both empty and not marked with @Override

UnusedMethodParameter247

[SRC]void mapSubflowOutput(AttributeMap output, RequestContext context) {}

[MSG]Violation in class GrailsSubflowAttributeMapper. Method parameter [output] is never referenced in the method mapSubflowOutput of class org.codehaus.groovy.grails.webflow.engine.builder.GrailsSubflowAttributeMapper

UnusedMethodParameter247

[SRC]void mapSubflowOutput(AttributeMap output, RequestContext context) {}

[MSG]Violation in class GrailsSubflowAttributeMapper. Method parameter [context] is never referenced in the method mapSubflowOutput of class org.codehaus.groovy.grails.webflow.engine.builder.GrailsSubflowAttributeMapper

➥ InputMapper.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryElseStatement341

[SRC]else {

[MSG]When an if statement block ends with a return statement the else is unnecessary

➥ RuntimeRedirectAction.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter352

[SRC]return new GroovyShell(new BeanBinding(delegate)).evalua...getValue())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectAction. getValue() can probably be rewritten as value

UnnecessaryGetter369

[SRC]context.getExternalContext().requestExternalRedirect("co..ative:$url")

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.RuntimeRedirectAction. getExternalContext() can probably be rewritten as externalContext

➥ UriRedirectAction.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.codehaus.groovy.grails.web.mapping.UrlCreator

[MSG]The [org.codehaus.groovy.grails.web.mapping.UrlCreator] import is never referenced

UnusedImport320

[SRC]import org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder

[MSG]The [org.codehaus.groovy.grails.web.mapping.UrlMappingsHolder] import is never referenced

UnnecessarySelfAssignment337

[SRC]def uri = uri

[MSG]Assignment a variable to itself should be unnecessary. Remove this dead code

UnnecessaryGetter340

[SRC]uri = new GroovyShell(new BeanBinding(delegate)).evaluat...getValue())

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.UriRedirectAction. getValue() can probably be rewritten as value

UnnecessaryGetter343

[SRC]context.getExternalContext().requestExternalRedirect(uri)

[MSG]Violation in class org.codehaus.groovy.grails.webflow.engine.builder.UriRedirectAction. getExternalContext() can probably be rewritten as externalContext

Package: scripts

➥ Console.groovy

Rule NamePriorityLine #Source Line / Message
BusyWait248

[SRC]sleep(Integer.MAX_VALUE)

[MSG]Busy wait detected. Switch the usage of Thread.sleep() to a lock or gate from java.util.concurrent

EmptyMethod280

[SRC]void focusLost(FocusEvent e) {}

[MSG]Violation in class ConsoleFocusListener. The method focusLost is both empty and not marked with @Override

UnusedMethodParameter280

[SRC]void focusLost(FocusEvent e) {}

[MSG]Violation in class ConsoleFocusListener. Method parameter [e] is never referenced in the method focusLost of class ConsoleFocusListener

➥ DependencyReport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable238

[SRC]def ivySettings = ant.project.setProperty("ivy.cache.dir..bsolutePath)

[MSG]The variable [ivySettings] in class None is not used

➥ Help_.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable270

[SRC]def helpText = ""

[MSG]The variable [helpText] in class None is not used

UnnecessaryGetter355

[SRC]String scriptname = script.getName()

[MSG]Violation in class None. getName() can probably be rewritten as name

UnnecessarySubstring356

[SRC]return new File(helpDir, scriptname.substring(0, scriptn..)) + ".txt")

[MSG]Violation in class None. The String.substring(int, int) method can be replaced with the subscript operator

UnnecessaryCollectCall368

[SRC]def scripts = pluginSettings.availableScripts.collect { it.file }

[MSG]Violation in class None. The call to collect could probably be rewritten as a spread expression: pluginSettings.availableScripts*.file

UnnecessaryGetter3112

[SRC]grails ${scriptName} -- ${getDefaultDescription()}

[MSG]Violation in class None. getDefaultDescription() can probably be rewritten as defaultDescription

➥ ListPluginUpdates.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter361

[SRC]def availablePluginVersions = getAvailablePluginVersions()

[MSG]Violation in class None. getAvailablePluginVersions() can probably be rewritten as availablePluginVersions

UnnecessaryGetter362

[SRC]def installedPluginVersions = getInstalledPluginVersions()

[MSG]Violation in class None. getInstalledPluginVersions() can probably be rewritten as installedPluginVersions

➥ ListPlugins_.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter366

[SRC]def pluginInfos = pluginSettings.getPluginInfos()

[MSG]Violation in class None. getPluginInfos() can probably be rewritten as pluginInfos

➥ RefreshDependencies.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import groovy.xml.NamespaceBuilder

[MSG]The [groovy.xml.NamespaceBuilder] import is never referenced

UnusedImport318

[SRC]import org.codehaus.groovy.grails.resolve.IvyDependencyManager

[MSG]The [org.codehaus.groovy.grails.resolve.IvyDependencyManager] import is never referenced

➥ Stats.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessarySubstring371

[SRC]file.path.substring(baseDirPathLength) =~ info.path &&

[MSG]Violation in class None. The String.substring(int) method can be replaced with the subscript operator

➥ Upgrade.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [35]

UnnecessaryParenthesesForMethodCallWithClosure3125

[SRC]['Config.groovy'].each() {template ->

[MSG]Violation in class None. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3131

[SRC]['BuildConfig.groovy'].each() {template ->

[MSG]Violation in class None. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3138

[SRC]['DataSource.groovy'].each() {template ->

[MSG]Violation in class None. Parentheses in the 'each' method call are unnecessary and can be removed.

UnnecessaryParenthesesForMethodCallWithClosure3146

[SRC]['UrlMappings.groovy'].each() {template ->

[MSG]Violation in class None. Parentheses in the 'each' method call are unnecessary and can be removed.

➥ _GrailsArgParsing.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter326

[SRC]if (getBinding().variables.containsKey("_grails_arg_pars..ed")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsBootstrap.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryCollectCall365

[SRC]def locations = new ArrayList(grailsSettings.pluginDirec..olutePath })

[MSG]Violation in class None. The call to collect could probably be rewritten as a spread expression: grailsSettings.pluginDirectories*.absolutePath

➥ _GrailsClasspath.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter329

[SRC]if (getBinding().variables.containsKey("_grails_classpat..ed")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsClean.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter326

[SRC]if (getBinding().variables.containsKey("_grails_clean_called")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

UnnecessaryObjectReferences348

[SRC]ant.delete(dir:classesDirPath)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences349

[SRC]ant.delete(dir:pluginClassesDirPath, failonerror:false)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences350

[SRC]ant.delete(dir:resourcesDirPath)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences351

[SRC]ant.delete(dir:testDirPath)

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences352

[SRC]ant.delete(failonerror:false, includeemptydirs: true) {

[MSG]The code could be more concise by using a with() or identity() block

➥ _GrailsCreateArtifacts.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [26]

➥ _GrailsDocs.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [30]

UnnecessaryGetter3209

[SRC]def context = DocumentationContext.getInstance()

[MSG]Violation in class None. getInstance() can probably be rewritten as instance

UnnecessaryObjectReferences3254

[SRC]publisher.license = ""

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3255

[SRC]publisher.copyright = ""

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3256

[SRC]publisher.footer = ""

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3257

[SRC]publisher.engineProperties = config?.grails?.doc

[MSG]The code could be more concise by using a with() or identity() block

➥ _GrailsEvents.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter328

[SRC]if (getBinding().variables.containsKey("_grails_events_c..ed")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsInit.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport325

[SRC]import org.springframework.core.io.FileSystemResource

[MSG]The [org.springframework.core.io.FileSystemResource] import is never referenced

UnusedImport326

[SRC]import grails.util.GrailsNameUtils

[MSG]The [grails.util.GrailsNameUtils] import is never referenced

UnnecessaryGetter331

[SRC]if (getBinding().variables.containsKey("_init_called")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsPackage.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGetter328

[SRC]if (getBinding().variables.containsKey("_grails_package_..ed")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsPluginDev.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethod2130

[SRC]private loadBasePlugin() {

[MSG]The method loadBasePlugin is not used within _GrailsPluginDev.groovy

UnusedImport317

[SRC]import groovy.xml.MarkupBuilder

[MSG]The [groovy.xml.MarkupBuilder] import is never referenced

UnusedImport318

[SRC]import grails.util.GrailsNameUtils

[MSG]The [grails.util.GrailsNameUtils] import is never referenced

UnusedImport319

[SRC]import grails.util.PluginBuildSettings

[MSG]The [grails.util.PluginBuildSettings] import is never referenced

UnusedImport321

[SRC]import org.apache.commons.io.FilenameUtils

[MSG]The [org.apache.commons.io.FilenameUtils] import is never referenced

UnusedImport322

[SRC]import org.apache.ivy.core.report.ArtifactDownloadReport

[MSG]The [org.apache.ivy.core.report.ArtifactDownloadReport] import is never referenced

UnnecessaryGetter364

[SRC]def descriptor = pluginSettings.getBasePluginDescriptor()

[MSG]Violation in class None. getBasePluginDescriptor() can probably be rewritten as basePluginDescriptor

UnnecessaryCollectCall3104

[SRC]packager.jarFiles = deps.collect { it.localFile }

[MSG]Violation in class None. The call to collect could probably be rewritten as a spread expression: deps*.localFile

➥ _GrailsPlugins.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import groovy.xml.dom.DOMCategory

[MSG]The [groovy.xml.dom.DOMCategory] import is never referenced

UnusedImport319

[SRC]import org.codehaus.groovy.grails.plugins.GrailsPluginInfo

[MSG]The [org.codehaus.groovy.grails.plugins.GrailsPluginInfo] import is never referenced

UnusedImport320

[SRC]import org.codehaus.groovy.grails.resolve.PluginResolveEngine

[MSG]The [org.codehaus.groovy.grails.resolve.PluginResolveEngine] import is never referenced

UnusedImport321

[SRC]import grails.util.BuildSettings

[MSG]The [grails.util.BuildSettings] import is never referenced

➥ _GrailsRun.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [24]

UnusedMethodParameter2183

[SRC]void actionPerformed(ActionEvent e) {

[MSG]Violation in class None$1. Method parameter [e] is never referenced in the method actionPerformed of class None$1

UnnecessaryGroovyImport324

[SRC]import java.net.ServerSocket

UnnecessaryGetter3128

[SRC]Metadata.getCurrent().put(Metadata.WAR_DEPLOYED, "true")

[MSG]Violation in class None. getCurrent() can probably be rewritten as current

➥ _GrailsSettings.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import grails.util.GrailsNameUtils

[MSG]The [grails.util.GrailsNameUtils] import is never referenced

UnusedImport321

[SRC]import grails.util.Metadata

[MSG]The [grails.util.Metadata] import is never referenced

UnusedImport325

[SRC]import org.springframework.core.io.ClassPathResource

[MSG]The [org.springframework.core.io.ClassPathResource] import is never referenced

UnusedImport326

[SRC]import org.springframework.core.io.FileSystemResource

[MSG]The [org.springframework.core.io.FileSystemResource] import is never referenced

UnusedImport327

[SRC]import org.springframework.core.io.Resource

[MSG]The [org.springframework.core.io.Resource] import is never referenced

UnusedImport328

[SRC]import org.springframework.core.io.support.PathMatchingR..ternResolver

[MSG]The [org.springframework.core.io.support.PathMatchingResourcePatternResolver] import is never referenced

UnusedImport329

[SRC]import org.springframework.util.FileCopyUtils

[MSG]The [org.springframework.util.FileCopyUtils] import is never referenced

UnnecessaryGetter340

[SRC]if (getBinding().variables.containsKey("_settings_called")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

UnnecessaryGetter376

[SRC]if (grailsSettings.defaultEnv && getBinding().variables...riptEnv")) {

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

UnnecessaryGetter388

[SRC]if (getBinding().variables.containsKey("scriptScope")) {

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

➥ _GrailsTest.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [53]

UnusedImport317

[SRC]import grails.util.GrailsUtil

[MSG]The [grails.util.GrailsUtil] import is never referenced

UnusedImport327

[SRC]import org.codehaus.groovy.grails.test.report.junit.JUni..portsFactory

[MSG]The [org.codehaus.groovy.grails.test.report.junit.JUnitReportsFactory] import is never referenced

UnusedImport333

[SRC]import org.codehaus.groovy.grails.test.event.GrailsTestE..soleReporter

[MSG]The [org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter] import is never referenced

UnnecessaryGetter3126

[SRC]if (reRunTests) testNames = getFailedTests()

[MSG]Violation in class None. getFailedTests() can probably be rewritten as failedTests

➥ _GrailsWar.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [32]

UnusedVariable2191

[SRC]def compileScopePluginInfo = ps.compileScopePluginInfo

[MSG]The variable [compileScopePluginInfo] in class None is not used

UnnecessaryGetter3192

[SRC]def compileScopePluginInfos = ps.getCompileScopedSupport..luginInfos()

[MSG]Violation in class None. getCompileScopedSupportedPluginInfos() can probably be rewritten as compileScopedSupportedPluginInfos

UnnecessaryGetter3193

[SRC]def resourceList = ps.getCompileScopedArtefactResources()

[MSG]Violation in class None. getCompileScopedArtefactResources() can probably be rewritten as compileScopedArtefactResources

UnnecessaryGetter3219

[SRC]attribute(name:"Bundle-Version",value:"${metadata.getApp..Version()}")

[MSG]Violation in class None. getApplicationVersion() can probably be rewritten as applicationVersion

UnnecessaryGetter3225

[SRC]switch (metadata.getServletVersion()) {

[MSG]Violation in class None. getServletVersion() can probably be rewritten as servletVersion

UnnecessaryGetter3258

[SRC]attribute(name:"Implementation-Version",value:"${metadat..Version()}")

[MSG]Violation in class None. getApplicationVersion() can probably be rewritten as applicationVersion

UnnecessaryGetter3259

[SRC]attribute(name:"Grails-Version",value:"${metadata.getGra..Version()}")

[MSG]Violation in class None. getGrailsVersion() can probably be rewritten as grailsVersion

UnnecessaryDefInMethodDeclaration3334

[SRC]protected def createDescriptorInternal(pluginInfos, resourceList) {

[MSG]Violation in class None. The def keyword is unneeded when a method is marked protected

UnnecessaryDefInMethodDeclaration3395

[SRC]private def warPluginsInternal(pluginInfos) {

[MSG]Violation in class None. The def keyword is unneeded when a method is marked private

UnnecessaryDefInMethodDeclaration3405

[SRC]private def warPluginForPluginInfo(GrailsPluginInfo info) {

[MSG]Violation in class None. The def keyword is unneeded when a method is marked private

UnnecessaryGetter3497

[SRC]def version = metadata.getApplicationVersion()

[MSG]Violation in class None. getApplicationVersion() can probably be rewritten as applicationVersion

➥ _PluginDependencies.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[SRC]true

[MSG]Violation in class None. The cyclomatic complexity for method [run] is [32]

UnusedVariable2151

[SRC]def application

[MSG]The variable [application] in class None is not used

EmptyCatchBlock2302

[SRC]catch (e) {

[MSG]The catch block is empty

UnusedImport317

[SRC]import grails.util.BuildSettings

[MSG]The [grails.util.BuildSettings] import is never referenced

UnusedImport320

[SRC]import grails.util.PluginBuildSettings

[MSG]The [grails.util.PluginBuildSettings] import is never referenced

UnusedImport326

[SRC]import org.codehaus.groovy.control.CompilationUnit

[MSG]The [org.codehaus.groovy.control.CompilationUnit] import is never referenced

UnusedImport328

[SRC]import org.codehaus.groovy.grails.documentation.DocumentationContext

[MSG]The [org.codehaus.groovy.grails.documentation.DocumentationContext] import is never referenced

UnusedImport329

[SRC]import org.codehaus.groovy.grails.documentation.DocumentedMethod

[MSG]The [org.codehaus.groovy.grails.documentation.DocumentedMethod] import is never referenced

UnusedImport330

[SRC]import org.codehaus.groovy.grails.documentation.DocumentedProperty

[MSG]The [org.codehaus.groovy.grails.documentation.DocumentedProperty] import is never referenced

UnnecessaryGetter352

[SRC]if (getBinding().variables.containsKey("_plugin_dependen..ed")) return

[MSG]Violation in class None. getBinding() can probably be rewritten as binding

UnnecessaryGetter3147

[SRC]def pluginFiles = pluginSettings.getPluginDescriptorsFor..nvironment()

[MSG]Violation in class None. getPluginDescriptorsForCurrentEnvironment() can probably be rewritten as pluginDescriptorsForCurrentEnvironment

UnnecessaryObjectReferences3308

[SRC]pluginInstallEngine.pluginDirVariableStore = binding

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryObjectReferences3309

[SRC]pluginInstallEngine.pluginScriptRunner = runPluginScript

[MSG]The code could be more concise by using a with() or identity() block

UnnecessaryGetter3317

[SRC]GrailsResourceLoaderHolder.resourceLoader = new GrailsRe..vironment())

[MSG]Violation in class None. getArtefactResourcesForCurrentEnvironment() can probably be rewritten as artefactResourcesForCurrentEnvironment

Rule Descriptions

#Rule NameDescription
1AddEmptyStringFinds empty string literals which are being added. This is an inefficient way to convert any type to a String.
2AssertWithinFinallyBlockChecks for assert statements within a finally block. An assert can throw an exception, hiding the original exception, if there is one.
3AssignmentInConditionalAn assignment operator (=) was used in a conditional test. This is usually a typo, and the comparison operator (==) was intended.
4BigDecimalInstantiationChecks for calls to the BigDecimal constructors that take a double parameter, which may result in an unexpected BigDecimal value.
5BitwiseOperatorInConditionalChecks for bitwise operations in conditionals, if you need to do a bitwise operation then it is best practive to extract a temp variable.
6BooleanGetBooleanThis rule catches usages of java.lang.Boolean.getBoolean(String) which reads a boolean from the System properties. It is often mistakenly used to attempt to read user input or parse a String into a boolean. It is a poor piece of API to use; replace it with System.properties['prop'].
7BrokenNullCheckLooks for faulty checks for null that can cause a NullPointerException.
8BrokenOddnessCheckThe code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0.
9BusyWaitBusy waiting (forcing a Thread.sleep() while waiting on a condition) should be avoided. Prefer using the gate and barrier objects in the java.util.concurrent package.
10ChainedTestA test method that invokes another test method is a chained test; the methods are dependent on one another. Tests should be isolated, and not be dependent on one another.
11ClassForNameUsing Class.forName(...) is a common way to add dynamic behavior to a system. However, using this method can cause resource leaks because the classes can be pinned in memory for long periods of time.
12ComparisonOfTwoConstantsChecks for expressions where a comparison operator or equals() or compareTo() is used to compare two constants to each other or two literals that contain only constant values., e.g.: 23 == 67, Boolean.FALSE != false, 0.17 <= 0.99, "abc" > "ddd", [a:1] <=> [a:2], [1,2].equals([3,4]) or [a:false, b:true].compareTo(['a':34.5, b:Boolean.TRUE].
13ComparisonWithSelfChecks for expressions where a comparison operator or equals() or compareTo() is used to compare a variable to itself, e.g.: x == x, x != x, x <=> x, x < x, x =>= x, x.equals(x) or x.compareTo(x), where x is a variable.
14ConsecutiveLiteralAppendsViolations occur when method calls to append(Object) are chained together with literals as parameters. The chained calls can be joined into one invocation.
15ConsecutiveStringConcatenationCatches concatenation of two string literals on the same line. These can safely by joined.
16ConstantAssertExpressionChecks for assert statements where the assert boolean condition expression is a constant or literal value.
17ConstantIfExpressionChecks for if statements with a constant value for the if expression, such as true, false, null, or a literal constant value.
18ConstantTernaryExpressionChecks for ternary expressions with a constant value for the boolean expression, such as true, false, null, or a literal constant value.
19CoupledTestCaseThis rule finds test cases that are coupled to other test cases, either by invoking static methods on another test case or by creating instances of another test case. If you require shared logic in test cases then extract that logic to a new class where it can properly be reused.
20CyclomaticComplexityChecks the cyclomatic complexity for methods/classes.A method (or "closure field") with a cyclomatic complexity value greater than the maxMethodComplexity property (20) causes a violation. Likewise, a class that has an (average method) cyclomatic complexityvalue greater than the maxClassAverageMethodComplexity property (20) causes a violation.
21DeadCodeDead code appears after a return statement or an exception is thrown. If code appears after one of these statements then it will never be executed and can be safely deleted.
22DoubleCheckedLockingThis rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block. Double checked locking does not guarantee correctness and is an anti-pattern.
23DoubleNegativeThere is no point in using a double negative, it is always positive. For instance !!x can always be simplified to x. And !(!x) can as well.
24DuplicateCaseStatementCheck for duplicate case statements in a switch block, such as two equal integers or strings.
25DuplicateImportDuplicate import statements are unnecessary.
26DuplicateMapKeyA map literal is created with duplicated key. The map entry will be overwritten.
27DuplicateSetValueA Set literal is created with duplicate constant value. A set cannot contain two elements with the same value.
28EmptyCatchBlockIn most cases, exceptions should not be caught and ignored (swallowed).
29EmptyElseBlockEmpty else blocks are confusing and serve no purpose.
30EmptyFinallyBlockEmpty finally blocks are confusing and serve no purpose.
31EmptyForStatementEmpty for statements are confusing and serve no purpose.
32EmptyIfStatementEmpty if statements are confusing and serve no purpose.
33EmptyInstanceInitializerAn empty class instance initializer was found. It is safe to remove it.
34EmptyMethodA method was found without an implementation. If the method is overriding or implementing a parent method, then mark it with the @Override annotation.
35EmptyStaticInitializerAn empty static initializer was found. It is safe to remove it.
36EmptySwitchStatementEmpty switch statements are confusing and serve no purpose.
37EmptySynchronizedStatementEmpty synchronized statements are confusing and serve no purpose.
38EmptyTryBlockEmpty try blocks are confusing and serve no purpose.
39EmptyWhileStatementEmpty while statements are confusing and serve no purpose.
40EqualsAndHashCodeIf either the boolean equals(Object) or the int hashCode() methods are overridden within a class, then both must be overridden.
41EqualsOverloadedThe class has an equals method, but the parameter of the method is not of type Object. It is not overriding equals but instead overloading it.
42ExplicitGarbageCollectionCalls to System.gc(), Runtime.getRuntime().gc(), and System.runFinalization() are not advised. Code should have the same behavior whether the garbage collection is disabled using the option -Xdisableexplicitgc or not. Moreover, "modern" jvms do a very good job handling garbage collections. If memory usage issues unrelated to memory leaks develop within an application, it should be dealt with JVM options rather than within the code itself.
43ForLoopShouldBeWhileLoopA for loop without an init and update statement can be simplified to a while loop.
44HardCodedWindowsFileSeparatorThis rule finds usages of a Windows file separator within the constructor call of a File object. It is better to use the Unix file separator or use the File.separator constant.
45HardCodedWindowsRootDirectoryThis rule find cases where a File object is constructed with a windows-based path. This is not portable, and using the File.listRoots() method is a better alternative.
46ImportFromSamePackageAn import of a class that is within the same package is unnecessary.
47ImportFromSunPackagesAvoid importing anything from the 'sun.*' packages. These packages are not portable and are likely to change.
48InconsistentPropertyLockingClass contains similarly-named get and set methods where one method of the pair is marked either @WithReadLock or @WithWriteLock and the other is not locked at all.
49InconsistentPropertySynchronizationClass contains similarly-named get and set methods where the set method is synchronized and the get method is not, or the get method is synchronized and the set method is not.
50IntegerGetIntegerThis rule catches usages of java.lang.Integer.getInteger(String, ...) which reads an Integer from the System properties. It is often mistakenly used to attempt to read user input or parse a String into an Integer. It is a poor piece of API to use; replace it with System.properties['prop'].
51JUnitAssertAlwaysFailsChecks for JUnit assert() method calls with constant arguments such that the assertion always fails. This includes: assertTrue(false), assertFalse(true) and assertNull(CONSTANT).
52JUnitAssertAlwaysSucceedsChecks for JUnit assert() method calls with constant arguments such that the assertion always succeeds. This includes: assertTrue(true), assertFalse(false) and assertNull(null).
53JUnitFailWithoutMessageThis rule detects JUnit calling the fail() method without an argument. For better error reporting you should always provide a message.
54JUnitPublicNonTestMethodChecks if a JUnit test class contains public methods other than standard test methods, JUnit framework methods or methods with JUnit annotations.
55JUnitSetUpCallsSuperChecks that if the JUnit setUp() method is defined, that it includes a call to super.setUp().
56JUnitTearDownCallsSuperChecks that if the JUnit tearDown() method is defined, that it includes a call to super.tearDown().
57JUnitTestMethodWithoutAssertThis rule searches for test methods that do not contain assert statements. Either the test method is missing assert statements, which is an error, or the test method contains custom assert statements that do not follow a proper assert naming convention. Test methods are defined as public void methods that begin with the work test or have a @Test annotation. By default this rule applies to the default test class names, but this can be changed using the rule's applyToClassNames property.
58JUnitUnnecessarySetUpChecks for JUnit setUp() methods that contain only a call to super.setUp().
59JUnitUnnecessaryTearDownChecks for JUnit tearDown() methods that contain only a call to super.tearDown().
60MisorderedStaticImportsStatic imports should never be declared after nonstatic imports.
61NestedSynchronizationNested synchronized statements should be avoided. Nested synchronized statements are either useless (if the lock objects are identical) or prone to deadlock.
62RandomDoubleCoercedToZeroThe Math.random() method returns a double result greater than or equal to 0.0 and less than 1.0. If you coerce this result into an Integer or int, then it is coerced to zero. Casting the result to int, or assigning it to an int field is probably a bug.
63RemoveAllOnSelfDon't use removeAll to clear a collection. If you want to remove all elements from a collection c, use c.clear, not c.removeAll(c). Calling c.removeAll(c) to clear a collection is less clear, susceptible to errors from typos, less efficient and for some collections, might throw a ConcurrentModificationException.
64ReturnFromFinallyBlockReturning from a finally block is confusing and can hide the original exception.
65SpockIgnoreRestUsedIf Spock's @IgnoreRest appears on any method, all non-annotated test methods are not executed. This behaviour is almost always unintended. It's fine to use @IgnoreRest locally during development, but when committing code, it should be removed.
66StaticCalendarFieldCalendar objects should not be used as static fields. Calendars are inherently unsafe for multihtreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
67StaticConnectionCreates violations when a java.sql.Connection object is used as a static field. Database connections stored in static fields will be shared between threads, which is unsafe and can lead to race conditions.
68StaticDateFormatFieldDateFormat objects should not be used as static fields. DateFormat are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
69StaticMatcherFieldMatcher objects should not be used as static fields. Matcher instances are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
70StaticSimpleDateFormatFieldSimpleDateFormat objects should not be used as static fields. SimpleDateFormat are inherently unsafe for multi-threaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application.
71SynchronizedMethodThis rule reports uses of the synchronized keyword on methods. Synchronized methods are the same as synchronizing on 'this', which effectively make your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.
72SynchronizedOnBoxedPrimitiveThe code synchronizes on a boxed primitive constant, such as an Integer. Since Integer objects can be cached and shared, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness and possible deadlock
73SynchronizedOnGetClassSynchronization on getClass rather than class literal. This instance method synchronizes on this.getClass(). If this class is subclassed, subclasses will synchronize on the class object for the subclass, which isn't likely what was intended.
74SynchronizedOnReentrantLockSynchronizing on a ReentrantLock field is almost never the intended usage. A ReentrantLock should be obtained using the lock() method and released in a finally block using the unlock() method.
75SynchronizedOnStringSynchronization on a String field can lead to deadlock because Strings are interned by the JVM and can be shared.
76SynchronizedOnThisThis rule reports uses of the synchronized blocks where the synchronization reference is 'this'. Doing this effectively makes your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.
77SynchronizedReadObjectMethodCatches Serializable classes that define a synchronized readObject method. By definition, an object created by deserialization is only reachable by one thread, and thus there is no need for readObject() to be synchronized. If the readObject() method itself is causing the object to become visible to another thread, that is an example of very dubious coding style.
78SystemRunFinalizersOnExitMethod calls to System.runFinalizersOnExit() should not be allowed. This method is inherently non-thread-safe, may result in data corruption, deadlock, and may effect parts of the program far removed from it's call point. It is deprecated, and it's use strongly discouraged.
79ThreadGroupAvoid using ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe.
80ThreadLocalNotStaticFinalThreadLocal fields should be static and final. In the most common case a java.lang.ThreadLocal instance associates state with a thread. A non-static non-final java.lang.ThreadLocal field associates state with an instance-thread combination. This is seldom necessary and often a bug which can cause memory leaks and possibly incorrect behavior.
81ThreadYieldMethod calls to Thread.yield() should not be allowed. This method has no useful guaranteed semantics, and is often used by inexperienced programmers to mask race conditions.
82ThrowExceptionFromFinallyBlockThrowing an exception from a finally block is confusing and can hide the original exception.
83UnnecessaryBigDecimalInstantiationIt is unnecessary to instantiate BigDecimal objects. Instead just use the decimal literal or the 'G' identifier to force the type, such as 123.45 or 123.45G.
84UnnecessaryBigIntegerInstantiationIt is unnecessary to instantiate BigInteger objects. Instead just use the literal with the 'G' identifier to force the type, such as 8G or 42G.
85UnnecessaryBooleanExpressionChecks for unnecessary boolean expressions, including ANDing (&&) or ORing (||) with true, false, null, or a Map/List/String/Number literal. Also checks for negation (!) of true, false, null, or a Map/List/String/Number literal.
86UnnecessaryBooleanInstantiationUse Boolean.valueOf() for variable values or Boolean.TRUE and Boolean.FALSE for constant values instead of calling the Boolean() constructor directly or calling Boolean.valueOf(true) or Boolean.valueOf(false).
87UnnecessaryCallForLastElementThis rule checks for excessively verbose methods of accessing the last element of an array or list. For instance, it is possible to access the last element of an array by performing array[array.length - 1], in Groovy it is simpler to either call array.last() or array[-1]. The same is true for lists. This violation is triggered whenever a get, getAt, or array-style access is used with an object size check.
88UnnecessaryCallToSubstringCalling String.substring(0) always returns the original string. This code is meaningless.
89UnnecessaryCatchBlockViolations are triggered when a catch block does nothing but throw the original exception. In this scenario there is usually no need for a catch block, just let the exception be thrown from the original code. This condition frequently occurs when catching an exception for debugging purposes but then forgetting to take the catch statement out.
90UnnecessaryCollectCallSome method calls to Object.collect(Closure) can be replaced with the spread operator. For instance, list.collect { it.multiply(2) } can be replaced by list*.multiply(2).
91UnnecessaryCollectionCallUseless call to collections. This call doesn't make sense. For any collection c, calling c.containsAll(c) should always be true, and c.retainAll(c) should have no effect.
92UnnecessaryConstructorThis rule detects when a constructor is not necessary; i.e., when there's only one constructor, it's public, has an empty body, and takes no arguments.
93UnnecessaryDefInFieldDeclarationIf a field has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance, 'static def constraints = {}' is redundant and can be simplified to 'static constraints = {}.
94UnnecessaryDefInMethodDeclarationIf a method has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private method() {}' is redundant and can be simplified to 'private method() {}'.
95UnnecessaryDefInVariableDeclarationIf a variable has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private n = 2' is redundant and can be simplified to 'private n = 2'.
96UnnecessaryDotClassTo make a reference to a class, it is unnecessary to specify the '.class' identifier. For instance String.class can be shortened to String.
97UnnecessaryDoubleInstantiationIt is unnecessary to instantiate Double objects. Instead just use the double literal or the 'D' identifier to force the type, such as 123.45d or 0.42d.
98UnnecessaryElseStatementWhen an if statement block ends with a return statement the else is unnecessary. The logic in the else branch can be run without being in a new scope.
99UnnecessaryFailIn a unit test, catching an exception and immediately calling Assert.fail() is pointless and hides the stack trace. It is better to rethrow the exception or not catch the exception at all.
100UnnecessaryFinalOnPrivateMethodA private method is marked final. Private methods cannot be overridden, so marking it final is unnecessary.
101UnnecessaryFloatInstantiationIt is unnecessary to instantiate Float objects. Instead just use the float literal with the 'F' identifier to force the type, such as 123.45F or 0.42f.
102UnnecessaryGetterChecks for explicit calls to getter/accessor methods which can, for the most part, be replaced by property access. A getter is defined as a method call that matches get[A-Z] but not getClass() or get[A-Z][A-Z] such as getURL(). Getters do not take method arguments.
103UnnecessaryGroovyImportA Groovy file does not need to include an import for classes from java.lang, java.util, java.io, java.net, groovy.lang and groovy.util, as well as the classes java.math.BigDecimal and java.math.BigInteger.
104UnnecessaryIfStatementChecks for if statements where the if and else blocks are merely returning true and false constants. These cases can be replaced by a simple return statement.
105UnnecessaryInstanceOfCheckThis rule finds instanceof checks that cannot possibly evaluate to true. For instance, checking that (!variable instanceof String) will never be true because the result of a not expression is always a boolean.
106UnnecessaryInstantiationToGetClassAvoid instantiating an object just to call getClass() on it; use the .class public member instead.
107UnnecessaryIntegerInstantiationIt is unnecessary to instantiate Integer objects. Instead just use the literal with the 'I' identifier to force the type, such as 8I or 42i.
108UnnecessaryLongInstantiationIt is unnecessary to instantiate Long objects. Instead just use the literal with the 'L' identifier to force the type, such as 8L or 42L.
109UnnecessaryModOneAny expression mod 1 (exp % 1) is guaranteed to always return zero. This code is probably an error, and should be either (exp & 1) or (exp % 2).
110UnnecessaryNullCheckGroovy contains the safe dereference operator, which can be used in boolean conditional statements to safely replace explicit "x == null" tests.
111UnnecessaryNullCheckBeforeInstanceOfThere is no need to check for null before an instanceof; the instanceof keyword returns false when given a null argument.
112UnnecessaryObjectReferencesViolations are triggered when an excessive set of consecutive statements all reference the same variable. This can be made more readable by using a with or identity block.
113UnnecessaryOverridingMethodThe overriding method merely calls the same method defined in a superclass
114UnnecessaryPackageReferenceChecks for explicit package reference for classes that Groovy imports by default, such as java.lang.String, java.util.Map and groovy.lang.Closure.
115UnnecessaryParenthesesForMethodCallWithClosureIf a method is called and the only parameter to that method is an inline closure then the parentheses of the method call can be omitted.
116UnnecessarySelfAssignmentMethod contains a pointless self-assignment to a variable or property.
117UnnecessaryStringInstantiationUse a String literal (e.g., "...") instead of calling the corresponding String constructor (new String("..")) directly.
118UnnecessarySubstringThis rule finds usages of String.substring(int) and String.substring(int, int) that can be replaced by use of the subscript operator. For instance, var.substring(5) can be replaced with var[5..-1].
119UnnecessaryTernaryExpressionChecks for ternary expressions where the conditional expression always evaluates to a boolean and the true and false expressions are merely returning true and false constants. Also checks for ternary expressions where both expressions are the same constant or variable.
120UnnecessaryTransientModifierThe field is marked as transient, but the class isn't Serializable, so marking it as transient has no effect.
121UnusedArrayChecks for array allocations that are not assigned or used, unless it is the last statement within a block.
122UnusedImportImports for a class that is never referenced within the source file is unnecessary.
123UnusedMethodParameterThis rule finds instances of method parameters not being used. It does not analyze private methods (that is done by the UnusedPrivateMethodParameter rule) or methods marked @Override.
124UnusedObjectChecks for object allocations that are not assigned or used, unless it is the last statement within a block
125UnusedPrivateFieldChecks for private fields that are not referenced within the same class.
126UnusedPrivateMethodChecks for private methods that are not referenced within the same class.
127UnusedPrivateMethodParameterChecks for parameters to private methods that are not referenced within the method body.
128UnusedVariableChecks for variables that are never referenced.
129UseAssertEqualsInsteadOfAssertTrueThis rule detects JUnit assertions in object equality. These assertions should be made by more specific methods, like assertEquals.
130UseAssertFalseInsteadOfNegationIn unit tests, if a condition is expected to be false then there is no sense using assertTrue with the negation operator. For instance, assertTrue(!condition) can always be simplified to assertFalse(condition)
131UseAssertNullInsteadOfAssertEqualsThis rule detects JUnit calling assertEquals where the first or second parameter is null. These assertion should be made against the assertNull method instead.
132UseAssertSameInsteadOfAssertTrueThis rule detects JUnit calling assertTrue where the first or second parameter is an Object#is() call testing for reference equality. These assertion should be made against the assertSame method instead.
133UseAssertTrueInsteadOfAssertEqualsThis rule detects JUnit calling assertEquals where the first parameter is a boolean. These assertions should be made by more specific methods, like assertTrue or assertFalse.
134UseAssertTrueInsteadOfNegationIn unit tests, if a condition is expected to be true then there is no sense using assertFalse with the negation operator. For instance, assertFalse(!condition) can always be simplified to assertTrue(condition)
135UseOfNotifyMethodThis code calls notify() rather than notifyAll(). Java monitors are often used for multiple conditions. Calling notify() only wakes up one thread, meaning that the thread woken up might not be the one waiting for the condition that the caller just satisfied.
136VolatileArrayFieldVolatile array fields are unsafe because the contents of the array are not treated as volatile. Changing the entire array reference is visible to other threads, but changing an array element is not.
137VolatileLongOrDoubleFieldLong or double fields should not be declared as volatile. Java specifies that reads and writes from such fields are atomic, but many JVM's have violated this specification. Unless you are certain of your JVM, it is better to synchronize access to such fields rather than declare them volatile. This rule flags fields marked volatile when their type is double or long or the name of their type is "Double" or "Long".
138WaitOutsideOfWhileLoopCalls to Object.wait() must be within a while loop. Consider using the Java concurrency utilities instead of wait() and notify().