You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/07/12 13:02:17 UTC
[cxf] branch 3.2.x-fixes updated: CXF-7787 - NullPointerException
from wsdl2java
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.2.x-fixes by this push:
new ffad68e CXF-7787 - NullPointerException from wsdl2java
ffad68e is described below
commit ffad68e5c2b7eed392b538f585665c6a0c959446
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jul 12 12:38:33 2018 +0100
CXF-7787 - NullPointerException from wsdl2java
(cherry picked from commit 203ca92cc4ba73afa4ee49f8086452bc3ca06916)
---
.../main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java b/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
index e5a71e0..6467889 100644
--- a/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
+++ b/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
@@ -161,7 +161,8 @@ public class SchemaCollection {
*/
public XmlSchema getSchemaByTargetNamespace(String namespaceURI) {
for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
- if (namespaceURI.equals(schema.getTargetNamespace())) {
+ if (namespaceURI != null && namespaceURI.equals(schema.getTargetNamespace())
+ || namespaceURI == null && schema.getTargetNamespace() == null) {
return schema;
}
}