mirror of https://github.com/apache/maven.git
prevent ConcurrentModificationException
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1162348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04f26a7ac8
commit
87d8d34d4a
|
@ -24,6 +24,7 @@ import java.util.Collections;
|
||||||
import java.util.IdentityHashMap;
|
import java.util.IdentityHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import org.apache.maven.project.DependencyResolutionResult;
|
import org.apache.maven.project.DependencyResolutionResult;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
|
@ -38,7 +39,7 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
private DependencyResolutionResult dependencyResolutionResult;
|
private DependencyResolutionResult dependencyResolutionResult;
|
||||||
|
|
||||||
private List<Throwable> exceptions;
|
private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>( );
|
||||||
|
|
||||||
private Map<MavenProject, BuildSummary> buildSummaries;
|
private Map<MavenProject, BuildSummary> buildSummaries;
|
||||||
|
|
||||||
|
@ -85,11 +86,6 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
public MavenExecutionResult addException( Throwable t )
|
public MavenExecutionResult addException( Throwable t )
|
||||||
{
|
{
|
||||||
if ( exceptions == null )
|
|
||||||
{
|
|
||||||
exceptions = new ArrayList<Throwable>();
|
|
||||||
}
|
|
||||||
|
|
||||||
exceptions.add( t );
|
exceptions.add( t );
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue