Author: chinthaka
Date: Tue Nov  7 22:36:45 2006
New Revision: 472406

URL: http://svn.apache.org/viewvc?view=rev&rev=472406
Log:
Applying the patch in WSCOMMONS-114. Tested Axiom and Axis2 projects with this 
change and no problem found. Thanks Ruchith. 


Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?view=diff&rev=472406&r1=472405&r2=472406
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
 Tue Nov  7 22:36:45 2006
@@ -650,7 +650,8 @@
      */
     public OMAttribute addAttribute(OMAttribute attr) {
         OMNamespace namespace = attr.getNamespace();
-        if (namespace != null
+        if (namespace != null && namespace.getNamespaceURI() != null 
+                && !"".equals(namespace.getNamespaceURI())
                 && this.findNamespace(namespace.getNamespaceURI(), namespace
                 .getPrefix()) == null) {
             this.declareNamespace(namespace.getNamespaceURI(), 
namespace.getPrefix());

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?view=diff&rev=472406&r1=472405&r2=472406
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
 Tue Nov  7 22:36:45 2006
@@ -493,7 +493,9 @@
             this.attributes = new LinkedHashMap(5);
         }
         OMNamespace namespace = attr.getNamespace();
-        if (namespace != null && 
this.findNamespace(namespace.getNamespaceURI(), namespace.getPrefix()) == null) 
{
+        if (namespace != null && namespace.getNamespaceURI() != null && 
+                !"".equals(namespace.getNamespaceURI()) && 
+                this.findNamespace(namespace.getNamespaceURI(), 
namespace.getPrefix()) == null) {
             this.declareNamespace(namespace.getNamespaceURI(), 
namespace.getPrefix());
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to