mirror of https://github.com/apache/maven.git
[MNG-5702] Final Fields on DefaultMavenExecutionResult.java
This commit is contained in:
parent
6f0318ed68
commit
4d33358be2
|
@ -38,9 +38,9 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
private DependencyResolutionResult dependencyResolutionResult;
|
private DependencyResolutionResult dependencyResolutionResult;
|
||||||
|
|
||||||
private List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
|
private final List<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
|
||||||
|
|
||||||
private Map<MavenProject, BuildSummary> buildSummaries =
|
private final Map<MavenProject, BuildSummary> buildSummaries =
|
||||||
Collections.synchronizedMap( new IdentityHashMap<MavenProject, BuildSummary>() );
|
Collections.synchronizedMap( new IdentityHashMap<MavenProject, BuildSummary>() );
|
||||||
|
|
||||||
public MavenExecutionResult setProject( MavenProject project )
|
public MavenExecutionResult setProject( MavenProject project )
|
||||||
|
@ -82,7 +82,7 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
public List<Throwable> getExceptions()
|
public List<Throwable> getExceptions()
|
||||||
{
|
{
|
||||||
return exceptions == null ? Collections.<Throwable>emptyList() : exceptions;
|
return exceptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MavenExecutionResult addException( Throwable t )
|
public MavenExecutionResult addException( Throwable t )
|
||||||
|
@ -104,10 +104,6 @@ public class DefaultMavenExecutionResult
|
||||||
|
|
||||||
public void addBuildSummary( BuildSummary summary )
|
public void addBuildSummary( BuildSummary summary )
|
||||||
{
|
{
|
||||||
if ( buildSummaries == null )
|
|
||||||
{
|
|
||||||
buildSummaries = Collections.synchronizedMap( new IdentityHashMap<MavenProject, BuildSummary>() );
|
|
||||||
}
|
|
||||||
buildSummaries.put( summary.getProject(), summary );
|
buildSummaries.put( summary.getProject(), summary );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue