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/02 16:02:48 UTC

[GitHub] [maven] MartinKanters commented on a change in pull request #341: [MNG-6863] Support --also-make flag in combination with --resume-from. - Refactoring

MartinKanters commented on a change in pull request #341:
URL: https://github.com/apache/maven/pull/341#discussion_r418975568



##########
File path: maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
##########
@@ -144,43 +148,27 @@
 
         if ( !request.getSelectedProjects().isEmpty() )
         {
-            result = new ArrayList<>( projects.size() );
+            File reactorDirectory = getReactorDirectory( request );
 
-            File reactorDirectory = null;
-            if ( request.getBaseDirectory() != null )
-            {
-                reactorDirectory = new File( request.getBaseDirectory() );
-            }
-
-            Collection<MavenProject> selectedProjects = new LinkedHashSet<>( projects.size() );
+            Collection<MavenProject> selectedProjects = new LinkedHashSet<>( request.getSelectedProjects().size() );

Review comment:
       Since this set will only get as large as the amount of selected projects (-pl). I should maybe go for this amount * 2 in order for Java not unnecessarily expanding the list. What do you think?




----------------------------------------------------------------
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