You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/04/23 12:39:40 UTC

svn commit: r1329168 - /webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java

Author: veithen
Date: Mon Apr 23 10:39:39 2012
New Revision: 1329168

URL: http://svn.apache.org/viewvc?rev=1329168&view=rev
Log:
Removed the namespace URI interning stuff (see also r1293593).

Modified:
    webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java?rev=1329168&r1=1329167&r2=1329168&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java Mon Apr 23 10:39:39 2012
@@ -23,26 +23,6 @@ import javax.xml.stream.util.StreamReade
 import org.apache.axiom.om.OMDataSource;
 
 public class StreamSwitch extends StreamReaderDelegate {
-    // namespaceURI interning
-    // default is false because most XMLStreamReader implementations don't do interning
-    // due to performance impacts
-    private boolean namespaceURIInterning = false;
-
-    /**
-     * Set namespace uri interning
-     * @param b
-     */
-    public void setNamespaceURIInterning(boolean b) {
-        this.namespaceURIInterning = b;
-    }
-    
-    /**
-     * @return if namespace uri interning 
-     */
-    public boolean isNamespaceURIInterning() {
-        return this.namespaceURIInterning;
-    }
-    
     public boolean isClosed() {
         return ((SwitchingWrapper)getParent()).isClosed();
     }
@@ -58,19 +38,4 @@ public class StreamSwitch extends Stream
     public void enableDataSourceEvents(boolean value) {
         ((SwitchingWrapper)getParent()).enableDataSourceEvents(value);
     }
-
-    // TODO: one would expect that the same is applied to other methods returning namespace URIs, but this was not the case in the original OMStAXWrapper code
-    public String getNamespaceURI() {
-        String namespaceURI = super.getNamespaceURI();
-        
-        // By default most parsers don't intern the namespace.
-        // Unfortunately the property to detect interning on the delegate parsers is hard to detect.
-        // Woodstox has a proprietary property on the XMLInputFactory.
-        // IBM has a proprietary property on the XMLStreamReader.
-        // For now only force the interning if requested.
-        if (this.isNamespaceURIInterning()) {
-            namespaceURI = (namespaceURI != null) ? namespaceURI.intern() : null;
-        }
-        return namespaceURI;
-    }
 }