You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2012/02/07 07:23:00 UTC

svn commit: r1241358 - in /maven/plugins/trunk/maven-pmd-plugin: pom.xml src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java

Author: dennisl
Date: Tue Feb  7 06:22:59 2012
New Revision: 1241358

URL: http://svn.apache.org/viewvc?rev=1241358&view=rev
Log:
[MPMD-142] PMD Report for maven site fails with ClassCastException 

- Roll back one generics change that was done in r1231523. Typed Lists can only be of type <String>. See http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Mapping_Lists

Modified:
    maven/plugins/trunk/maven-pmd-plugin/pom.xml
    maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java

Modified: maven/plugins/trunk/maven-pmd-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/pom.xml?rev=1241358&r1=1241357&r2=1241358&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/pom.xml Tue Feb  7 06:22:59 2012
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven-pmd-plugin</artifactId>
-  <version>2.8-SNAPSHOT</version>
+  <version>2.7.1-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
 
   <name>Maven PMD Plugin</name>

Modified: maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java?rev=1241358&r1=1241357&r2=1241358&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java (original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/AbstractPmdReport.java Tue Feb  7 06:22:59 2012
@@ -161,7 +161,7 @@ public abstract class AbstractPmdReport
      * @parameter
      * @since 2.2
      */
-    private List<File> excludeRoots;
+    private File[] excludeRoots;
 
     /**
      * Run PMD on the tests.
@@ -276,13 +276,14 @@ public abstract class AbstractPmdReport
 
         if ( excludeRoots == null )
         {
-            excludeRoots = Collections.emptyList();
+            excludeRoots = new File[0];
         }
         
-        Collection<File> excludeRootFiles = new HashSet<File>( excludeRoots.size() );
+        Collection<File> excludeRootFiles = new HashSet<File>( excludeRoots.length );
 
-        for ( File file : excludeRoots )
+        for ( int i = 0; i < excludeRoots.length; i++ )
         {
+            File file = excludeRoots[i];
             if ( file.isDirectory() )
             {
                 excludeRootFiles.add( file );