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 2016/01/23 11:06:25 UTC
svn commit: r1726368 - in /webservices/axiom/trunk:
aspects/core-aspects/src/main/java/org/apache/axiom/core/
aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/
aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/...
Author: veithen
Date: Sat Jan 23 10:06:24 2016
New Revision: 1726368
URL: http://svn.apache.org/viewvc?rev=1726368&view=rev
Log:
Extract interface from StAXOMBuilder.
Added:
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java (with props)
Modified:
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreChildNodeSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomContainerSupport.aj
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSerializableSupport.aj
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/Navigator.java
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/PullThroughWrapper.java
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/sr/TestClose.java
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreChildNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreChildNodeSupport.aj?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreChildNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreChildNodeSupport.aj Sat Jan 23 10:06:24 2016
@@ -20,7 +20,7 @@ package org.apache.axiom.core;
import org.apache.axiom.om.NodeUnavailableException;
import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
public aspect CoreChildNodeSupport {
private CoreParentNode CoreChildNode.owner;
@@ -108,7 +108,7 @@ public aspect CoreChildNodeSupport {
if (parent != null && parent.getBuilder() != null) {
switch (parent.getState()) {
case CoreParentNode.DISCARDED:
- ((StAXOMBuilder)parent.getBuilder()).debugDiscarded(parent);
+ ((Builder)parent.getBuilder()).debugDiscarded(parent);
throw new NodeUnavailableException();
case CoreParentNode.INCOMPLETE:
do {
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj Sat Jan 23 10:06:24 2016
@@ -23,7 +23,7 @@ import org.apache.axiom.om.OMContainer;
import org.apache.axiom.om.OMException;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
public aspect CoreParentNodeSupport {
private Object CoreParentNode.content;
@@ -89,7 +89,7 @@ public aspect CoreParentNodeSupport {
OMXMLParserWrapper builder = getBuilder();
if (builder == null) {
throw new IllegalStateException("The node has no builder");
- } else if (((StAXOMBuilder)builder).isClosed()) {
+ } else if (((Builder)builder).isClosed()) {
throw new OMException("The builder has already been closed");
} else if (!builder.isCompleted()) {
builder.next();
@@ -105,7 +105,7 @@ public aspect CoreParentNodeSupport {
if (firstChild == null) {
switch (getState()) {
case CoreParentNode.DISCARDED:
- ((StAXOMBuilder)getBuilder()).debugDiscarded(this);
+ ((Builder)getBuilder()).debugDiscarded(this);
throw new NodeUnavailableException();
case CoreParentNode.INCOMPLETE:
do {
@@ -198,7 +198,7 @@ public aspect CoreParentNodeSupport {
if (lastChild instanceof CoreParentNode) {
((CoreParentNode)lastChild).build();
}
- ((StAXOMBuilder)getBuilder()).discard((OMContainer)this);
+ ((Builder)getBuilder()).discard((OMContainer)this);
updateState = true;
} else {
updateState = false;
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomContainerSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomContainerSupport.aj?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomContainerSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomContainerSupport.aj Sat Jan 23 10:06:24 2016
@@ -43,8 +43,8 @@ import org.apache.axiom.om.OMXMLParserWr
import org.apache.axiom.om.OMXMLStreamReader;
import org.apache.axiom.om.OMXMLStreamReaderConfiguration;
import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.om.impl.builder.OMFactoryEx;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.apache.axiom.om.impl.common.serializer.pull.OMXMLStreamReaderExAdapter;
import org.apache.axiom.om.impl.common.serializer.pull.PullSerializer;
import org.apache.axiom.om.impl.common.serializer.push.OutputException;
@@ -163,7 +163,7 @@ public aspect AxiomContainerSupport {
} else {
if (getState() == AxiomContainer.DISCARDED) {
if (builder != null) {
- ((StAXOMBuilder)builder).debugDiscarded(this);
+ ((Builder)builder).debugDiscarded(this);
}
throw new NodeUnavailableException();
}
@@ -342,7 +342,7 @@ public aspect AxiomContainerSupport {
final void AxiomContainer.serializeChildren(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
if (getState() == AxiomContainer.DISCARDED) {
- StAXOMBuilder builder = (StAXOMBuilder)getBuilder();
+ Builder builder = (Builder)getBuilder();
if (builder != null) {
builder.debugDiscarded(this);
}
@@ -365,7 +365,7 @@ public aspect AxiomContainerSupport {
// and serialize the nodes that have not been built yet by copying the
// events from the underlying XMLStreamReader.
if (!isComplete() && getBuilder() != null) {
- StAXOMBuilder builder = (StAXOMBuilder)getBuilder();
+ Builder builder = (Builder)getBuilder();
XMLStreamReader reader = builder.disableCaching();
DataHandlerReader dataHandlerReader = XMLStreamReaderUtils.getDataHandlerReader(reader);
boolean first = true;
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj Sat Jan 23 10:06:24 2016
@@ -49,7 +49,7 @@ import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.om.OMSourcedElement;
import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.om.impl.common.serializer.push.OutputException;
import org.apache.axiom.om.impl.common.serializer.push.Serializer;
import org.apache.axiom.om.impl.intf.AxiomAttribute;
@@ -228,7 +228,7 @@ public aspect AxiomElementSupport {
public final void AxiomElement.discard() {
if (getState() == CoreParentNode.INCOMPLETE && getBuilder() != null) {
- ((StAXOMBuilder)getBuilder()).discard((OMContainer)this);
+ ((Builder)getBuilder()).discard((OMContainer)this);
}
detach();
}
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSerializableSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSerializableSupport.aj?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSerializableSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSerializableSupport.aj Sat Jan 23 10:06:24 2016
@@ -23,7 +23,7 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.om.impl.common.serializer.push.OutputException;
import org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer;
import org.apache.axiom.om.impl.intf.AxiomSerializable;
@@ -58,9 +58,8 @@ public aspect AxiomSerializableSupport {
setComplete(true);
// If this is a StAXBuilder, close it.
- if (builder instanceof StAXOMBuilder &&
- !((StAXOMBuilder) builder).isClosed()) {
- ((StAXOMBuilder) builder).close();
+ if (builder instanceof Builder) {
+ ((Builder) builder).close();
}
}
}
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/Navigator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/Navigator.java?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/Navigator.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/Navigator.java Sat Jan 23 10:06:24 2016
@@ -61,7 +61,7 @@ import org.apache.axiom.om.OMSerializabl
import org.apache.axiom.om.OMSourcedElement;
import org.apache.axiom.om.OMText;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.om.impl.common.util.OMDataSourceUtil;
import org.apache.axiom.util.namespace.MapBasedNamespaceContext;
import org.apache.axiom.util.stax.XMLEventUtils;
@@ -643,7 +643,7 @@ final class Navigator extends PullSerial
namespaceCount = -1;
} else {
CoreParentNode container = (CoreParentNode)node;
- StAXOMBuilder builder = (StAXOMBuilder)container.getBuilder();
+ Builder builder = (Builder)container.getBuilder();
int depth = 1;
// Find the root node for the builder (i.e. the topmost node having the same
// builder as the current node)
@@ -682,15 +682,15 @@ final class Navigator extends PullSerial
}
OMXMLParserWrapper builder = container.getBuilder();
// Delegate to the builder's parser.
- if (builder != null && builder instanceof StAXOMBuilder) {
- StAXOMBuilder staxBuilder = (StAXOMBuilder) builder;
+ if (builder != null && builder instanceof Builder) {
+ Builder staxBuilder = (Builder) builder;
if (!staxBuilder.isClosed()) {
// If the parser was closed by something other
// than the builder, an IllegalStateException is
// thrown. For now, return null as this is unexpected
// by the caller.
try {
- return ((StAXOMBuilder) builder).getReaderProperty(s);
+ return ((Builder) builder).getReaderProperty(s);
} catch (IllegalStateException ise) {
return null;
}
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/PullThroughWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/PullThroughWrapper.java?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/PullThroughWrapper.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/PullThroughWrapper.java Sat Jan 23 10:06:24 2016
@@ -23,13 +23,13 @@ import javax.xml.stream.XMLStreamReader;
import org.apache.axiom.om.OMContainer;
import org.apache.axiom.om.OMDocument;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
final class PullThroughWrapper extends AbstractWrapper {
- private final StAXOMBuilder builder;
+ private final Builder builder;
private final OMContainer container;
- PullThroughWrapper(PullSerializer serializer, StAXOMBuilder builder, OMContainer container, XMLStreamReader reader, int startDepth) {
+ PullThroughWrapper(PullSerializer serializer, Builder builder, OMContainer container, XMLStreamReader reader, int startDepth) {
super(serializer, reader, startDepth);
this.builder = builder;
this.container = container;
Added: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java?rev=1726368&view=auto
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java (added)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java Sat Jan 23 10:06:24 2016
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.om.impl.builder;
+
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axiom.om.OMContainer;
+import org.apache.axiom.om.OMXMLParserWrapper;
+
+/**
+ * For internal use only.
+ */
+public interface Builder extends OMXMLParserWrapper {
+ /**
+ * @return if parser is closed
+ */
+ boolean isClosed();
+
+ /**
+ * Get the value of a feature/property from the underlying XMLStreamReader implementation
+ * without accessing the XMLStreamReader. https://issues.apache.org/jira/browse/AXIOM-348
+ *
+ * @param name
+ * @return TODO
+ */
+ Object getReaderProperty(String name) throws IllegalArgumentException;
+
+ XMLStreamReader disableCaching();
+
+ void reenableCaching(OMContainer container);
+
+ void discard(OMContainer container);
+
+ void debugDiscarded(Object container);
+}
Propchange: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/Builder.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java Sat Jan 23 10:06:24 2016
@@ -31,7 +31,6 @@ import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.impl.OMAttributeEx;
import org.apache.axiom.om.impl.OMContainerEx;
import org.apache.axiom.om.impl.OMElementEx;
@@ -84,7 +83,7 @@ import java.util.Map;
* To avoid this, the builder remembers exceptions thrown by the parser and rethrows
* them during a call to next().
*/
-public class StAXOMBuilder implements OMXMLParserWrapper, CustomBuilderSupport {
+public class StAXOMBuilder implements Builder, CustomBuilderSupport {
private static final Log log = LogFactory.getLog(StAXOMBuilder.class);
/** Field parser */
@@ -299,7 +298,7 @@ public class StAXOMBuilder implements OM
element.discard();
}
- public final void discard(OMContainer container) throws OMException {
+ public final void discard(OMContainer container) {
int targetElementLevel = elementLevel;
OMContainerEx current = target;
while (current != container) {
@@ -597,13 +596,6 @@ public class StAXOMBuilder implements OM
}
}
- /**
- * Get the value of a feature/property from the underlying XMLStreamReader implementation
- * without accessing the XMLStreamReader. https://issues.apache.org/jira/browse/AXIOM-348
- *
- * @param name
- * @return TODO
- */
public final Object getReaderProperty(String name) throws IllegalArgumentException {
if (!isClosed()) {
return parser.getProperty(name);
@@ -622,9 +614,6 @@ public class StAXOMBuilder implements OM
return this.charEncoding;
}
- /**
- * @return if parser is closed
- */
public final boolean isClosed() {
return _isClosed;
}
Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java Sat Jan 23 10:06:24 2016
@@ -28,7 +28,7 @@ import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.om.impl.common.serializer.push.OutputException;
import org.apache.axiom.om.impl.common.serializer.push.Serializer;
import org.apache.axiom.soap.SOAP11Constants;
@@ -163,12 +163,12 @@ public abstract class SOAPEnvelopeImpl e
// non-caching code block serializing the top-level SOAPEnvelope element
// TODO: should use 'instance of OMXMLParserWrapper' instead? StAXBuilder is more generic
OMXMLParserWrapper builder = getBuilder();
- if ((builder != null) && (builder instanceof StAXOMBuilder)) {
+ if ((builder != null) && (builder instanceof Builder)) {
try {
if (log.isDebugEnabled()) {
log.debug("closing builder: " + builder);
}
- StAXOMBuilder staxBuilder = (StAXOMBuilder) builder;
+ Builder staxBuilder = (Builder) builder;
staxBuilder.close();
} catch (Exception e) {
if (log.isDebugEnabled()) {
@@ -181,8 +181,8 @@ public abstract class SOAPEnvelopeImpl e
if (builder == null) {
log.debug("builder is null");
}
- if ((builder != null) && !(builder instanceof StAXOMBuilder)) {
- log.debug("builder is not instance of " + StAXOMBuilder.class.getName());
+ if ((builder != null) && !(builder instanceof Builder)) {
+ log.debug("builder is not instance of " + Builder.class.getName());
}
}
}
Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/sr/TestClose.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/sr/TestClose.java?rev=1726368&r1=1726367&r2=1726368&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/sr/TestClose.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/sr/TestClose.java Sat Jan 23 10:06:24 2016
@@ -23,7 +23,7 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMXMLBuilderFactory;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.builder.Builder;
import org.apache.axiom.ts.AxiomTestCase;
import javax.xml.stream.XMLStreamReader;
@@ -60,14 +60,14 @@ public class TestClose extends AxiomTest
reader.close(); // This should be a noop since the parser is closed.
// Closing the parser should also close the parser on the builder (since they are the same)
- assertTrue(((StAXOMBuilder)b).isClosed());
+ assertTrue(((Builder)b).isClosed());
b.close(); // This should be a noop since the parser is closed
// Calling getProperty after a close should return null, not an exception
assertTrue(reader.getProperty("dummyProperty") == null);
// Calling builder.getReaderProperty should return null, not an exception
- assertTrue(((StAXOMBuilder)b).getReaderProperty("dummyProperty") == null);
+ assertTrue(((Builder)b).getReaderProperty("dummyProperty") == null);
}