Author: veithen
Date: Wed Apr 28 18:00:58 2010
New Revision: 939033
URL: http://svn.apache.org/viewvc?rev=939033&view=rev
Log:
Moved EmptyOMLocation to org.apache.axiom.util.stax and renamed it to
DummyLocation. Also made it a singleton: no need to create a new instance on
every call of XMLStreamReader#getLocation().
Modified:
axis/axis2/java/transports/trunk/modules/base/src/main/java/org/apache/axis2/format/WrappedTextNodeStreamReader.java
Modified:
axis/axis2/java/transports/trunk/modules/base/src/main/java/org/apache/axis2/format/WrappedTextNodeStreamReader.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/base/src/main/java/org/apache/axis2/format/WrappedTextNodeStreamReader.java?rev=939033&r1=939032&r2=939033&view=diff
==============================================================================
---
axis/axis2/java/transports/trunk/modules/base/src/main/java/org/apache/axis2/format/WrappedTextNodeStreamReader.java
(original)
+++
axis/axis2/java/transports/trunk/modules/base/src/main/java/org/apache/axis2/format/WrappedTextNodeStreamReader.java
Wed Apr 28 18:00:58 2010
@@ -30,8 +30,8 @@ import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.apache.axiom.om.impl.EmptyOMLocation;
import org.apache.axiom.om.impl.llom.util.NamespaceContextImpl;
+import org.apache.axiom.util.stax.DummyLocation;
import org.apache.commons.io.IOUtils;
/**
@@ -70,12 +70,6 @@ import org.apache.commons.io.IOUtils;
// Once it has been moved to Axis2 or Axiom, remove the duplicate from
Synapse.
public class WrappedTextNodeStreamReader implements XMLStreamReader {
/**
- * Location object returned by {...@link #getLocation()}.
- * It always returns -1 for the location and null for the publicId and
systemId.
- */
- private final static Location EMPTY_LOCATION = new EmptyOMLocation();
-
- /**
* The qualified name of the wrapper element.
*/
private final QName wrapperElementName;
@@ -210,7 +204,7 @@ public class WrappedTextNodeStreamReader
public Location getLocation() {
// We do not support location information
- return EMPTY_LOCATION;
+ return DummyLocation.INSTANCE;
}
public void close() throws XMLStreamException {