cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1005560 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Thu, 07 Oct 2010 18:19:41 GMT
Author: dkulp
Date: Thu Oct  7 18:19:40 2010
New Revision: 1005560

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

........
  r1005556 | dkulp | 2010-10-07 14:15:20 -0400 (Thu, 07 Oct 2010) | 1 line
  
  Accound for the older woodstox sometimes return null instead of ""
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

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

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1005560&r1=1005559&r2=1005560&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Thu Oct  7 18:19:40 2010
@@ -835,7 +835,11 @@ public final class JAXBEncoderDecoder {
                 Enumeration enm = (Enumeration)c2.getClass().getMethod("getAllPrefixes").invoke(c2);
                 while (enm.hasMoreElements()) {
                     String s = (String)enm.nextElement();
-                    nsMap.put(s, c.getNamespaceURI(s));
+                    if (s == null) {
+                        nsMap.put("", c.getNamespaceURI(s));
+                    } else {
+                        nsMap.put(s, c.getNamespaceURI(s));
+                    }
                 }
             } catch (Throwable t2) {
                 //ignore
@@ -844,7 +848,11 @@ public final class JAXBEncoderDecoder {
         if (!nsMap.isEmpty()) {
             for (int x = 0; x < source.getNamespaceCount(); x++) {
                 String pfx = source.getNamespacePrefix(x);
-                nsMap.remove(pfx);
+                if (pfx == null) { 
+                    nsMap.remove("");
+                } else {
+                    nsMap.remove(pfx);
+                }
             }
             if (!nsMap.isEmpty()) {
                 @SuppressWarnings("unchecked")



Mime
View raw message