You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2015/01/02 20:01:22 UTC
maven git commit: [MNG-5702] Final Fields on
DefaultMavenExecutionResult.java
Repository: maven
Updated Branches:
refs/heads/master 6f0318ed6 -> 4d33358be
[MNG-5702] Final Fields on DefaultMavenExecutionResult.java
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4d33358b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4d33358b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4d33358b
Branch: refs/heads/master
Commit: 4d33358be2e82c2b8f35e1a0ce241aff7da882bd
Parents: 6f0318e
Author: Tibor17 <ti...@lycos.com>
Authored: Fri Jan 2 20:01:20 2015 +0100
Committer: Tibor17 <ti...@lycos.com>
Committed: Fri Jan 2 20:01:20 2015 +0100
----------------------------------------------------------------------
.../maven/execution/DefaultMavenExecutionResult.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/4d33358b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
----------------------------------------------------------------------
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 b7599d2..708328a 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
@@ -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 class DefaultMavenExecutionResult
public List<Throwable> getExceptions()
{
- return exceptions == null ? Collections.<Throwable>emptyList() : exceptions;
+ return exceptions;
}
public MavenExecutionResult addException( Throwable t )
@@ -104,10 +104,6 @@ public class DefaultMavenExecutionResult
public void addBuildSummary( BuildSummary summary )
{
- if ( buildSummaries == null )
- {
- buildSummaries = Collections.synchronizedMap( new IdentityHashMap<MavenProject, BuildSummary>() );
- }
buildSummaries.put( summary.getProject(), summary );
}
}