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 2010/11/29 23:13:46 UTC

svn commit: r1040315 - in /cxf/branches/2.3.x-fixes: ./ api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Author: dkulp
Date: Mon Nov 29 22:13:45 2010
New Revision: 1040315

URL: http://svn.apache.org/viewvc?rev=1040315&view=rev
Log:
Merged revisions 1040314 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1040314 | dkulp | 2010-11-29 17:06:55 -0500 (Mon, 29 Nov 2010) | 1 line
  
  [CXF-3061] Add an NPE guard
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Propchange: cxf/branches/2.3.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=1040315&r1=1040314&r2=1040315&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Mon Nov 29 22:13:45 2010
@@ -195,17 +195,19 @@ public final class EndpointReferenceUtil
             // handle case where given systemId is null (so that
             // direct key lookup fails) by scanning through map
             // searching for a namespace match
-            for (Map.Entry<String, byte[]> ent : schemas.entrySet()) {
-                if (ent.getKey().endsWith(namespaceURI)) {
-                    schemas.remove(ent.getKey());
-                    impl = new LSInputImpl();
-                    impl.setSystemId(newId);
-                    impl.setBaseURI(newId);
-                    impl.setCharacterStream(
-                        new InputStreamReader(
-                            new ByteArrayInputStream(ent.getValue())));
-                    done.add(newId + ":" + namespaceURI);
-                    return impl;
+            if (namespaceURI != null) {
+                for (Map.Entry<String, byte[]> ent : schemas.entrySet()) {
+                    if (ent.getKey().endsWith(namespaceURI)) {
+                        schemas.remove(ent.getKey());
+                        impl = new LSInputImpl();
+                        impl.setSystemId(newId);
+                        impl.setBaseURI(newId);
+                        impl.setCharacterStream(
+                            new InputStreamReader(
+                                new ByteArrayInputStream(ent.getValue())));
+                        done.add(newId + ":" + namespaceURI);
+                        return impl;
+                    }
                 }
             }