You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/05/20 10:58:17 UTC

[GitHub] [maven-jxr] elharo commented on a change in pull request #18: fix a few generics warnings

elharo commented on a change in pull request #18:
URL: https://github.com/apache/maven-jxr/pull/18#discussion_r427920608



##########
File path: maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java
##########
@@ -62,15 +62,15 @@ public AggregateTestMavenProjectStub()
         setInceptionYear( model.getInceptionYear() );
 
         String basedir = getBasedir().getAbsolutePath();
-        List compileSourceRoots = new ArrayList();
+        List<String> compileSourceRoots = new ArrayList<>();
         compileSourceRoots.add( basedir + "/src/test/resources/unit/aggregate-test/aggregate/test" );
         setCompileSourceRoots( compileSourceRoots );
 
         //set the report plugins
-        List reportPlugins = new ArrayList();
-        for ( Iterator iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )
+        List<ReportPlugin> reportPlugins = new ArrayList<>();
+        for ( Iterator<ReportPlugin> iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )

Review comment:
       Mostly I was just fixing the warnings, but it turns out we can go even further and remove the loop completely, just use the constructor. Done. 




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