You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2018/06/01 20:08:37 UTC
[cxf] 01/02: [CXF-7751] Make sure completely empty args aren't
output
This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 8541068d1306cfbce4fa8e8ac475e368c707fcb5
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Fri Jun 1 14:07:42 2018 -0400
[CXF-7751] Make sure completely empty args aren't output
(cherry picked from commit fcd459bbd43d05d0c48d64b9a71cc008bbfca614)
---
.../main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java | 6 +++++-
testutils/pom.xml | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
index 2ed5794..be3d3d9 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
@@ -24,6 +24,7 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.List;
+import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.common.util.URIParserUtil;
import org.apache.cxf.maven_plugin.WsdlArtifact;
import org.apache.cxf.tools.common.ToolConstants;
@@ -225,7 +226,10 @@ public class WsdlOption extends Option implements org.apache.cxf.maven_plugin.Ge
} else {
// Maven makes empty tags into null
// instead of empty strings. so replace null by ""
- destList.add(key + ((value == null) ? "" : value));
+ String v = key + ((value == null) ? "" : value);
+ if (!StringUtils.isEmpty(v)) {
+ destList.add(v);
+ }
}
}
}
diff --git a/testutils/pom.xml b/testutils/pom.xml
index 35b28f2..794dd9a 100644
--- a/testutils/pom.xml
+++ b/testutils/pom.xml
@@ -186,7 +186,7 @@
<xjcarg>-Xbug986</xjcarg>
</xjcargs>
<!--extraargs>
- <extraarg>-verbose</extraarg>
+ <extraarg>${cxf.test.keep}</extraarg>
</extraargs-->
<markGenerated>true</markGenerated>
<faultSerialVersionUID>1</faultSerialVersionUID>
--
To stop receiving notification emails like this one, please contact
dkulp@apache.org.