o Fixing a small bug that would cause a NPE if a plugin doesn't contain any mojos.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@179987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Trygve Laugstol 2005-06-04 13:24:17 +00:00
parent 177692f82c
commit 40d47927de
1 changed files with 7 additions and 4 deletions

View File

@ -76,10 +76,13 @@ public class PluginDescriptorGenerator
w.startElement( "mojos" ); w.startElement( "mojos" );
for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); ) if ( pluginDescriptor.getMojos() != null )
{ {
MojoDescriptor descriptor = (MojoDescriptor) it.next(); for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )
processMojoDescriptor( descriptor, w ); {
MojoDescriptor descriptor = (MojoDescriptor) it.next();
processMojoDescriptor( descriptor, w );
}
} }
w.endElement(); w.endElement();