mirror of https://github.com/apache/maven.git
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:
parent
9d94f8d310
commit
3571f9e2ac
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue