mirror of https://github.com/apache/maven.git
[MNG-541]. Fix NullPointerException when mojo doesn't have parameters.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@202502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
504e281d0e
commit
b44ec86d40
|
@ -770,6 +770,11 @@ public class DefaultPluginManager
|
||||||
{
|
{
|
||||||
List parameters = goal.getParameters();
|
List parameters = goal.getParameters();
|
||||||
|
|
||||||
|
if ( parameters == null )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for ( int i = 0; i < parameters.size(); i++ )
|
for ( int i = 0; i < parameters.size(); i++ )
|
||||||
{
|
{
|
||||||
Parameter parameter = (Parameter) parameters.get( i );
|
Parameter parameter = (Parameter) parameters.get( i );
|
||||||
|
|
|
@ -149,11 +149,14 @@ public class MojoDescriptor
|
||||||
{
|
{
|
||||||
parameterMap = new HashMap();
|
parameterMap = new HashMap();
|
||||||
|
|
||||||
for ( Iterator iterator = parameters.iterator(); iterator.hasNext(); )
|
if ( parameters == null )
|
||||||
{
|
{
|
||||||
Parameter pd = (Parameter) iterator.next();
|
for ( Iterator iterator = parameters.iterator(); iterator.hasNext(); )
|
||||||
|
{
|
||||||
|
Parameter pd = (Parameter) iterator.next();
|
||||||
|
|
||||||
parameterMap.put( pd.getName(), pd );
|
parameterMap.put( pd.getName(), pd );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue