diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java index 358b27d7..76096446 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java @@ -445,7 +445,7 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport { /** * @since 2.5 */ - protected CheckstyleExecutor checkstyleExecutor; + protected final CheckstyleExecutor checkstyleExecutor; /** * Internationalization component @@ -455,7 +455,9 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport { protected ByteArrayOutputStream stringOutputStream; public AbstractCheckstyleReport( - ResourceManager locator, @Named("default") CheckstyleExecutor checkstyleExecutor, I18N i18n) { + final ResourceManager locator, + final @Named("default") CheckstyleExecutor checkstyleExecutor, + final I18N i18n) { this.locator = locator; this.checkstyleExecutor = checkstyleExecutor; this.i18n = i18n; diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java index 84c7db6a..76b28b5b 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java @@ -47,7 +47,9 @@ public class CheckstyleReport extends AbstractCheckstyleReport { @Inject public CheckstyleReport( - ResourceManager locator, @Named("default") CheckstyleExecutor checkstyleExecutor, I18N i18n) { + final ResourceManager locator, + final @Named("default") CheckstyleExecutor checkstyleExecutor, + final I18N i18n) { super(locator, checkstyleExecutor, i18n); } diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java index c6598ad9..41abbf5e 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java @@ -63,7 +63,7 @@ * @author Olivier Lamy * @since 2.5 */ -@Named +@Named("default") public class DefaultCheckstyleExecutor extends AbstractLogEnabled implements CheckstyleExecutor { private final ResourceManager locator; diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java b/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java index 29d20a01..1a06f14c 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java @@ -41,7 +41,7 @@ public class LicenseResourceManager extends DefaultResourceManager { private static final Logger LOGGER = LoggerFactory.getLogger(LicenseResourceManager.class); - private Map resourceLoaders; + private final Map resourceLoaders; @Inject public LicenseResourceManager(Map resourceLoaders) { diff --git a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java index 038839b1..d21f8d80 100644 --- a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java +++ b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java @@ -36,7 +36,8 @@ public class CheckstyleReportTest extends AbstractCheckstyleTestCase { public void testNoSource() throws Exception { File generatedReport = generateReport(getGoal(), "no-source-plugin-config.xml"); - assertFalse(FileUtils.fileExists(generatedReport.getAbsolutePath())); + String absolutePath = generatedReport.getAbsolutePath(); + assertFalse(absolutePath + " exists", FileUtils.fileExists(absolutePath)); } public void testMinConfiguration() throws Exception {