cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1081536 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Mon, 14 Mar 2011 19:35:20 GMT
Author: dkulp
Date: Mon Mar 14 19:35:19 2011
New Revision: 1081536

URL: http://svn.apache.org/viewvc?rev=1081536&view=rev
Log:
Fix from Ondrej Scecina applied relating to element.setPrefix with an
empty string being undefined behavior.

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1081536&r1=1081535&r2=1081536&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Mar
14 19:35:19 2011
@@ -956,7 +956,7 @@ public final class StaxUtils {
             case XMLStreamConstants.START_ELEMENT: {
                 elementCount++;
                 Element e = doc.createElementNS(reader.getNamespaceURI(), reader.getLocalName());
-                if (reader.getPrefix() != null) {
+                if (!StringUtils.isEmpty(reader.getPrefix())) {
                     e.setPrefix(reader.getPrefix());
                 }       
                 e = (Element)parent.appendChild(e);



Mime
View raw message