Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Windows XP, J2SDK 1.4.2_10, maven-checkstyle-plugin 2.0-beta-2-SNAPSHOT, Maven 2.0.2-SNAPSHOT
Description
When I provide the Checkstyle plugin with a customised config file, it causes it to crash unpleasantly when generating the report. It appears that this is due to calling the 'remove' method on Arrays$ArrayList, which doesn't implement the method. The call is actually removing the 'severity' property from the list of columns before going on to process the rest. Wrapping the list in an actual ArrayList (java.util.ArrayList) solves the problem.
To replicate, add <configLocation>your-rules.xml</configLocation> to the plugin configuration, and ensure that at least two modules in your-rules.xml have the severity property set, something like:
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="PackageHtml">
<property name="severity" value="warning" />
</module>
<module name="NewlineAtEndOfFile">
<property name="severity" value="info" />
</module>
</module>