diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java index c00628319c..d2f8111fb7 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java @@ -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 exceptions; + private List exceptions = new CopyOnWriteArrayList( ); private Map buildSummaries; @@ -85,11 +86,6 @@ public class DefaultMavenExecutionResult public MavenExecutionResult addException( Throwable t ) { - if ( exceptions == null ) - { - exceptions = new ArrayList(); - } - exceptions.add( t ); return this;