adangel commented on a change in pull request #11: MPMD-288 Fixed 
NullPointerException
URL: https://github.com/apache/maven-pmd-plugin/pull/11#discussion_r285700352
 
 

 ##########
 File path: src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
 ##########
 @@ -769,7 +769,9 @@ private void configureTypeResolution( PMDConfiguration 
configuration ) throws Ma
                         for ( String path : projectCompileClasspath )
                         {
                             File pathFile = new File( path );
-                            if ( !pathFile.exists() || pathFile.list().length 
== 0 )
+                            String[] children = pathFile.list();
+                            
+                            if ( !pathFile.exists() || children == null || 
children.length == 0 )
 
 Review comment:
   I've changed it to only consider non-existing files or empty directories - 
Jenkins is still happy: 
https://builds.apache.org/view/M-R/view/Maven/job/maven-box/job/maven-pmd-plugin/job/MPMD-288/2/
   
   So, I'll merge this PR, thanks again!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to