Do not return null collections, makes life easier for clients

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@588053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Carlos Sanchez Gonzalez 2007-10-24 22:08:01 +00:00
parent 9d94f8d310
commit 3571f9e2ac
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.reactor.MavenExecutionException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/** @author Jason van Zyl */
@ -83,7 +84,7 @@ public class DefaultMavenExecutionResult
public List getExceptions()
{
return exceptions;
return exceptions == null ? Collections.EMPTY_LIST : exceptions;
}
public MavenExecutionResult addExtensionScanningException( ExtensionScanningException e )
@ -147,7 +148,7 @@ public class DefaultMavenExecutionResult
public boolean hasExceptions()
{
return (( exceptions != null ) && ( exceptions.size() > 0 ) );
return !getExceptions().isEmpty();
}
public ReactorManager getReactorManager()