elharo commented on a change in pull request #20: [MPLUGIN-353] Use Java 7
APIs and language features (part 2)
URL: https://github.com/apache/maven-plugin-tools/pull/20#discussion_r401538411
##########
File path:
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
##########
@@ -526,8 +524,7 @@ public void renderBody()
tableHeader( new String[]{ goalColumnName,
descriptionColumnName } );
}
- List<MojoDescriptor> mojos = new ArrayList<>();
- mojos.addAll( pluginDescriptor.getMojos() );
+ List<MojoDescriptor> mojos = new ArrayList<>(
pluginDescriptor.getMojos() );
Review comment:
this works, but the existing code didn't make me look up the API docs to be
sure of that. Clearer to use addAll.
----------------------------------------------------------------
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