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:
Olivier Lamy 2011-08-27 13:33:19 +00:00
parent 04f26a7ac8
commit 87d8d34d4a
1 changed files with 2 additions and 6 deletions

View File

@ -24,6 +24,7 @@ import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.maven.project.DependencyResolutionResult;
import org.apache.maven.project.MavenProject;
@ -38,7 +39,7 @@ public class DefaultMavenExecutionResult
private DependencyResolutionResult dependencyResolutionResult;
private List<Throwable> exceptions;
private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>( );
private Map<MavenProject, BuildSummary> buildSummaries;
@ -85,11 +86,6 @@ public class DefaultMavenExecutionResult
public MavenExecutionResult addException( Throwable t )
{
if ( exceptions == null )
{
exceptions = new ArrayList<Throwable>();
}
exceptions.add( t );
return this;