michael-o commented on a change in pull request #530:
URL: https://github.com/apache/maven/pull/530#discussion_r716916762



##########
File path: 
maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java
##########
@@ -140,15 +167,13 @@ private void getUpstreamProjects( String projectId, 
Collection<String> projectId
     private List<MavenProject> getSortedProjects( Set<String> projectIds )
     {
         List<MavenProject> result = new ArrayList<>( projectIds.size() );
-
-        for ( MavenProject mavenProject : sorter.getSortedProjects() )
+        for ( String projectId : projectIds )
         {
-            if ( projectIds.contains( ProjectSorter.getId( mavenProject ) ) )
-            {
-                result.add( mavenProject );
-            }
+            result.add( projects.get( projectId ) );
         }
 
+        Collections.sort( result, new MavenProjectComparator() );

Review comment:
       Very nice!




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to