Author: veithen Date: Sat Feb 25 12:46:38 2012 New Revision: 1293593 URL: http://svn.apache.org/viewvc?rev=1293593&view=rev Log: Removed the change introduced by AXIOM-103.
Rationale: * The setNamespaceURIInterning API in OMStAXWrapper is not accessible to application code because getXMLStreamReader is not guaranteed to return a direct reference to OMStAXWrapper and the setNamespaceURIInterning is not defined by OMXMLStreamReader. * The implementation is incomplete/inconsistent because only the return value of a single method is interned, while the return values of other methods that return namespace URIs are not interned. * r1293589 introduces a well-defined public API that implements namespace URI interning consistently. Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java?rev=1293593&r1=1293592&r2=1293593&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java Sat Feb 25 12:46:38 2012 @@ -131,10 +131,6 @@ class OMStAXWrapper extends StreamReader switchingWrapper.releaseParserOnClose(value); } - public void setNamespaceURIInterning(boolean b) { - switchingWrapper.setNamespaceURIInterning(b); - } - public OMDataSource getDataSource() { return switchingWrapper.getDataSource(); } Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java?rev=1293593&r1=1293592&r2=1293593&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java Sat Feb 25 12:46:38 2012 @@ -126,11 +126,6 @@ class SwitchingWrapper extends AbstractX */ private final boolean preserveNamespaceContext; - // namespaceURI interning - // default is false because most XMLStreamReader implementations don't do interning - // due to performance impacts - boolean namespaceURIInterning = false; - /** Field elementStack */ private Stack nodeStack = null; @@ -165,21 +160,6 @@ class SwitchingWrapper extends AbstractX private OMNamespace[] namespaces = new OMNamespace[16]; /** - * 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; - } - - /** * Constructor. * * @param builder @@ -275,15 +255,6 @@ class SwitchingWrapper extends AbstractX throw new IllegalStateException(); } } - - // 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()) { - returnStr = (returnStr != null) ? returnStr.intern() : null; - } return returnStr; }