cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1334142 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
Date Fri, 04 May 2012 19:53:02 GMT
Author: dkulp
Date: Fri May  4 19:53:02 2012
New Revision: 1334142

URL: http://svn.apache.org/viewvc?rev=1334142&view=rev
Log:
Fix possible NPE

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java?rev=1334142&r1=1334141&r2=1334142&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
Fri May  4 19:53:02 2012
@@ -174,8 +174,10 @@ public class WSDL2JavaMojo extends Abstr
     protected List<String> generateCommandLine(GenericWsdlOption wsdlOption)
         throws MojoExecutionException {
         List<String> ret = super.generateCommandLine(wsdlOption);
-        ret.add(0, "-encoding");
-        ret.add(1, encoding);
+        if (encoding != null) {
+            ret.add(0, "-encoding");
+            ret.add(1, encoding);
+        }
         return ret;
     }
 



Mime
View raw message