[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:
Emmanuel Venisse 2005-06-30 07:53:20 +00:00
parent 504e281d0e
commit b44ec86d40
2 changed files with 11 additions and 3 deletions

View File

@ -770,6 +770,11 @@ public class DefaultPluginManager
{
List parameters = goal.getParameters();
if ( parameters == null )
{
return;
}
for ( int i = 0; i < parameters.size(); i++ )
{
Parameter parameter = (Parameter) parameters.get( i );

View File

@ -149,11 +149,14 @@ public class MojoDescriptor
{
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 );
}
}
}