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:05 UTC

[cxf] branch master updated: CXF-7787 - NullPointerException from wsdl2java

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 203ca92  CXF-7787 - NullPointerException from wsdl2java
203ca92 is described below

commit 203ca92cc4ba73afa4ee49f8086452bc3ca06916
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jul 12 12:38:33 2018 +0100

    CXF-7787 - NullPointerException from wsdl2java
---
 .../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;
             }
         }