cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1298956 - /cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Fri, 09 Mar 2012 18:18:03 GMT
Author: dkulp
Date: Fri Mar  9 18:18:03 2012
New Revision: 1298956

URL: http://svn.apache.org/viewvc?rev=1298956&view=rev
Log:
Fix potential NPE

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1298956&r1=1298955&r2=1298956&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Fri Mar  9 18:18:03 2012
@@ -872,7 +872,11 @@ public final class JAXBEncoderDecoder {
                 f.setAccessible(true);
                 String ns[] = (String[])f.get(c);
                 for (int x = 0; x < ns.length; x += 2) {
-                    nsMap.put(ns[x], ns[x + 1]);
+                    if (ns[x] == null) {
+                        nsMap.put(null, ns[x + 1]);
+                    } else {
+                        nsMap.put(ns[x], ns[x + 1]);
+                    }
                 }
             }
         } catch (Throwable t) {



Mime
View raw message