mirror of
https://github.com/apache/maven.git
synced 2025-03-06 08:39:31 +00:00
[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 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>() );
|
||||
|
||||
public MavenExecutionResult setProject( MavenProject project )
|
||||
@ -82,7 +82,7 @@ public MavenExecutionResult setDependencyResolutionResult( DependencyResolutionR
|
||||
|
||||
public List<Throwable> getExceptions()
|
||||
{
|
||||
return exceptions == null ? Collections.<Throwable>emptyList() : exceptions;
|
||||
return exceptions;
|
||||
}
|
||||
|
||||
public MavenExecutionResult addException( Throwable t )
|
||||
@ -104,10 +104,6 @@ public BuildSummary getBuildSummary( MavenProject project )
|
||||
|
||||
public void addBuildSummary( BuildSummary summary )
|
||||
{
|
||||
if ( buildSummaries == null )
|
||||
{
|
||||
buildSummaries = Collections.synchronizedMap( new IdentityHashMap<MavenProject, BuildSummary>() );
|
||||
}
|
||||
buildSummaries.put( summary.getProject(), summary );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user