You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by tr...@apache.org on 2005/06/04 15:24:18 UTC
svn commit: r179987 -
/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
Author: trygvis
Date: Sat Jun 4 06:24:17 2005
New Revision: 179987
URL: http://svn.apache.org/viewcvs?rev=179987&view=rev
Log:
o Fixing a small bug that would cause a NPE if a plugin doesn't contain any mojos.
Modified:
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java?rev=179987&r1=179986&r2=179987&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java Sat Jun 4 06:24:17 2005
@@ -76,10 +76,13 @@
w.startElement( "mojos" );
- for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )
+ if ( pluginDescriptor.getMojos() != null )
{
- MojoDescriptor descriptor = (MojoDescriptor) it.next();
- processMojoDescriptor( descriptor, w );
+ for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )
+ {
+ MojoDescriptor descriptor = (MojoDescriptor) it.next();
+ processMojoDescriptor( descriptor, w );
+ }
}
w.endElement();
@@ -362,4 +365,4 @@
w.endElement();
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org