You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ru...@apache.org on 2008/01/23 17:09:33 UTC

svn commit: r614577 - /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java

Author: ruchithf
Date: Wed Jan 23 08:09:21 2008
New Revision: 614577

URL: http://svn.apache.org/viewvc?rev=614577&view=rev
Log:
Making sure we intern when importing a node

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

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=614577&r1=614576&r2=614577&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java Wed Jan 23 08:09:21 2008
@@ -276,8 +276,10 @@
                 if (importedNode.getLocalName() == null) {
                     newElement = this.createElement(importedNode.getNodeName());
                 } else {
-                    newElement = createElementNS(importedNode.getNamespaceURI(),
-                                                 importedNode.getNodeName());
+                    
+                    String ns = importedNode.getNamespaceURI();
+                    ns = (ns != null) ? ns.intern() : null;
+                    newElement = createElementNS(ns, importedNode.getNodeName());
                 }
 
                 // Copy element's attributes, if any.
@@ -311,7 +313,9 @@
                     if (OMConstants.XMLNS_NS_PREFIX.equals(importedNode.getNodeName())) {
                         newNode = createAttribute(importedNode.getNodeName());
                     } else {
-                        newNode = createAttributeNS(importedNode.getNamespaceURI(),
+                        String ns = importedNode.getNamespaceURI();
+                        ns = (ns != null) ? ns.intern() : null;
+                        newNode = createAttributeNS(ns ,
                                                     importedNode.getNodeName());
                     }
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org