cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r737494 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Date Sun, 25 Jan 2009 10:11:52 GMT
Author: cschneider
Date: Sun Jan 25 10:11:52 2009
New Revision: 737494

URL: http://svn.apache.org/viewvc?rev=737494&view=rev
Log:
CXF-2003 avoid comparing a namespace of null with a namespace of ""

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=737494&r1=737493&r2=737494&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java Sun Jan 25
10:11:52 2009
@@ -311,7 +311,8 @@
         for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
             if (n instanceof Element) {
                 Element e = (Element) n;
-                if (ns.equals(e.getNamespaceURI()) && localName.equals(e.getLocalName()))
{
+                String eNs = (e.getNamespaceURI() == null) ? "" : e.getNamespaceURI();
+                if (ns.equals(eNs) && localName.equals(e.getLocalName())) {
                     r.add(e);
                 }
             }



Mime
View raw message