cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1393106 - /cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
Date Tue, 02 Oct 2012 19:09:14 GMT
Author: dkulp
Date: Tue Oct  2 19:09:14 2012
New Revision: 1393106

URL: http://svn.apache.org/viewvc?rev=1393106&view=rev
Log:
Merged revisions 1391510 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1391510 | dkulp | 2012-09-28 11:48:52 -0400 (Fri, 28 Sep 2012) | 2 lines

  Per javadoc, empty prefix needs to delgate to writeDefaultNamespace

........

Modified:
    cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java?rev=1393106&r1=1393105&r2=1393106&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
(original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
Tue Oct  2 19:09:14 2012
@@ -34,6 +34,7 @@ import javax.xml.stream.XMLStreamConstan
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.staxutils.DelegatingXMLStreamWriter;
 
@@ -86,6 +87,10 @@ public class OutTransformWriter extends 
 
     @Override
     public void writeNamespace(String prefix, String uri) throws XMLStreamException {
+        if (StringUtils.isEmpty(prefix) || "xmlns".equals(prefix)) {
+            writeDefaultNamespace(uri);
+            return;
+        }
         if (matchesDropped(true)) {
             return;
         }



Mime
View raw message