maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r933799 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
Date Tue, 13 Apr 2010 22:00:53 GMT
Author: krosenvold
Date: Tue Apr 13 22:00:53 2010
New Revision: 933799

URL: http://svn.apache.org/viewvc?rev=933799&view=rev
Log:
[MNG-4633] Changes from review on #maven-dev

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

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java?rev=933799&r1=933798&r2=933799&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
Tue Apr 13 22:00:53 2010
@@ -175,7 +175,7 @@ public class MavenProject
 
     private ArtifactFilter extensionArtifactFilter;
 
-    private Set<String> lifecyclePhases;
+    private final Set<String> lifecyclePhases = Collections.synchronizedSet( new LinkedHashSet<String>()
);
 
     public MavenProject()
     {
@@ -1947,7 +1947,7 @@ public class MavenProject
             setManagedVersionMap( new HashMap<String, Artifact>( project.getManagedVersionMap()
) );
         }
 
-        lifecyclePhases = null;
+        lifecyclePhases.addAll( project.lifecyclePhases );
     }
 
     private void addArtifactPath( Artifact artifact, List<String> classpath )
@@ -2090,7 +2090,7 @@ public class MavenProject
      */
     public boolean hasCompletedPhase( String phase )
     {
-        return lifecyclePhases != null && lifecyclePhases.contains( phase );
+        return lifecyclePhases.contains( phase );
     }
 
     /**
@@ -2103,10 +2103,6 @@ public class MavenProject
      */
     public void addLifecyclePhase( String lifecyclePhase )
     {
-        if ( lifecyclePhases == null )
-        {
-            lifecyclePhases = Collections.synchronizedSet( new LinkedHashSet<String>()
);
-        }
         lifecyclePhases.add( lifecyclePhase );
     }
 



Mime
View raw message