[MNG-5702] Wrong reactor summary output while using -T option

Fixed by using ConcurrentMap instead non synchronized ones.
This commit is contained in:
Karl Heinz Marbaise 2014-12-29 14:33:47 +01:00
parent 105843e789
commit 3b671d0734
1 changed files with 3 additions and 3 deletions

View File

@ -20,9 +20,9 @@ package org.apache.maven.execution;
*/
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.maven.project.DependencyResolutionResult;
@ -42,7 +42,7 @@ public class DefaultMavenExecutionResult
private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
private Map<MavenProject, BuildSummary> buildSummaries = Maps.newIdentityHashMap();
private Map<MavenProject, BuildSummary> buildSummaries = Maps.newConcurrentMap();
public MavenExecutionResult setProject( MavenProject project )
{
@ -107,7 +107,7 @@ public class DefaultMavenExecutionResult
{
if ( buildSummaries == null )
{
buildSummaries = new IdentityHashMap<MavenProject, BuildSummary>();
buildSummaries = new ConcurrentHashMap<MavenProject, BuildSummary>();
}
buildSummaries.put( summary.getProject(), summary );
}