maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r979808 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java
Date Tue, 27 Jul 2010 19:08:20 GMT
Author: bentmann
Date: Tue Jul 27 19:08:20 2010
New Revision: 979808

URL: http://svn.apache.org/viewvc?rev=979808&view=rev
Log:
[MNG-4740] Maven hangs with big aggregators with lots of inter-modules dependencies
Submitted by: Vincent Latombe

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java?rev=979808&r1=979807&r2=979808&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java
Tue Jul 27 19:08:20 2010
@@ -77,11 +77,12 @@ class DefaultProjectDependencyGraph
     {
         for ( String id : sorter.getDependents( projectId ) )
         {
-            projectIds.add( id );
-
-            if ( transitive )
+            if ( projectIds.add( id ) )
             {
-                getDownstreamProjects( id, projectIds, transitive );
+                if ( transitive )
+                {
+                    getDownstreamProjects( id, projectIds, transitive );
+                }
             }
         }
     }
@@ -104,11 +105,12 @@ class DefaultProjectDependencyGraph
     {
         for ( String id : sorter.getDependencies( projectId ) )
         {
-            projectIds.add( id );
-
-            if ( transitive )
+            if ( projectIds.add( id ) )
             {
-                getUpstreamProjects( id, projectIds, transitive );
+                if ( transitive )
+                {
+                    getUpstreamProjects( id, projectIds, transitive );
+                }
             }
         }
     }



Mime
View raw message