mirror of https://github.com/apache/maven.git
[MNG-5702] Wrong reactor summary output while using -T option
Fixed by using ConcurrentMap instead non synchronized ones.
This commit is contained in:
parent
105843e789
commit
3b671d0734
|
@ -20,9 +20,9 @@ package org.apache.maven.execution;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.IdentityHashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import org.apache.maven.project.DependencyResolutionResult;
|
import org.apache.maven.project.DependencyResolutionResult;
|
||||||
|
@ -42,7 +42,7 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
|
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 )
|
public MavenExecutionResult setProject( MavenProject project )
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ public class DefaultMavenExecutionResult
|
||||||
{
|
{
|
||||||
if ( buildSummaries == null )
|
if ( buildSummaries == null )
|
||||||
{
|
{
|
||||||
buildSummaries = new IdentityHashMap<MavenProject, BuildSummary>();
|
buildSummaries = new ConcurrentHashMap<MavenProject, BuildSummary>();
|
||||||
}
|
}
|
||||||
buildSummaries.put( summary.getProject(), summary );
|
buildSummaries.put( summary.getProject(), summary );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue