You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2019/06/17 15:09:54 UTC
[cxf-xjc-utils] branch master updated: [CXFXJC-35]Maven-Plugin
xsdtojava Task throws NullPointerException if project.build.sourceEncoding
is not set
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf-xjc-utils.git
The following commit(s) were added to refs/heads/master by this push:
new 069b82b [CXFXJC-35]Maven-Plugin xsdtojava Task throws NullPointerException if project.build.sourceEncoding is not set
069b82b is described below
commit 069b82bca041e06f051342886f0082a8534a26b4
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon Jun 17 11:09:30 2019 -0400
[CXFXJC-35]Maven-Plugin xsdtojava Task throws NullPointerException if project.build.sourceEncoding is not set
---
.../java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
index e05290d..2f6667c 100644
--- a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
+++ b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
@@ -432,8 +432,10 @@ public abstract class AbstractXSDToJavaMojo extends AbstractMojo {
if (getLog().isDebugEnabled()) {
list.add("-verbose");
}
- list.add("-encoding");
- list.add(encoding);
+ if (encoding != null) {
+ list.add("-encoding");
+ list.add(encoding);
+ }
String[] xsdFiles = getXsdFiles(option.getXsdDir(), option.getXsd());
for (String xsdFile : xsdFiles) {