adangel commented on a change in pull request #41:
URL: https://github.com/apache/maven-pmd-plugin/pull/41#discussion_r553814436



##########
File path: src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java
##########
@@ -429,7 +430,7 @@ private void writeFormattedReport( Report report )
             throws MavenReportException
     {
         Renderer renderer = createRenderer( request.getFormat(), 
request.getOutputEncoding() );
-        writeReport( report, renderer, request.getFormat() );
+        writeReport( report, renderer, renderer.defaultFileExtension() );

Review comment:
       Here a NPE might occur (and it does in the integration test 
multi-module), if the request format "none" is used, which means "no report" - 
and then there is no renderer.
   Since write report is a private method, I'll change that to determine the 
file extension after the check that we have a renderer.
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to