[MNG-4633] Changes from review on #maven-dev

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@933799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kristian Rosenvold 2010-04-13 22:00:53 +00:00
parent 12b34781ec
commit 87ff4bf414
1 changed files with 3 additions and 7 deletions

View File

@ -175,7 +175,7 @@ public class MavenProject
private ArtifactFilter extensionArtifactFilter; private ArtifactFilter extensionArtifactFilter;
private Set<String> lifecyclePhases; private final Set<String> lifecyclePhases = Collections.synchronizedSet( new LinkedHashSet<String>() );
public MavenProject() public MavenProject()
{ {
@ -1947,7 +1947,7 @@ public class MavenProject
setManagedVersionMap( new HashMap<String, Artifact>( project.getManagedVersionMap() ) ); setManagedVersionMap( new HashMap<String, Artifact>( project.getManagedVersionMap() ) );
} }
lifecyclePhases = null; lifecyclePhases.addAll( project.lifecyclePhases );
} }
private void addArtifactPath( Artifact artifact, List<String> classpath ) private void addArtifactPath( Artifact artifact, List<String> classpath )
@ -2090,7 +2090,7 @@ public class MavenProject
*/ */
public boolean hasCompletedPhase( String phase ) 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 ) public void addLifecyclePhase( String lifecyclePhase )
{ {
if ( lifecyclePhases == null )
{
lifecyclePhases = Collections.synchronizedSet( new LinkedHashSet<String>() );
}
lifecyclePhases.add( lifecyclePhase ); lifecyclePhases.add( lifecyclePhase );
} }