You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/12/14 04:05:49 UTC

svn commit: r356720 - /webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java

Author: dims
Date: Tue Dec 13 19:05:45 2005
New Revision: 356720

URL: http://svn.apache.org/viewcvs?rev=356720&view=rev
Log:
few more fixes from Guillaume for fixing problems when using StaxSource from stax-utils project (hence can't check-in a test case)

Modified:
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java?rev=356720&r1=356719&r2=356720&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMStAXWrapper.java Tue Dec 13 19:05:45 2005
@@ -329,16 +329,18 @@
     public int getTextCharacters(int i, char[] chars, int i1, int i2)
             throws XMLStreamException {
         int returnLength = 0;
-        if (hasText()) {
-            if (parser != null) {
-                try {
-                    returnLength = parser.getTextCharacters(i, chars, i1, i2);
-                } catch (XMLStreamException e) {
-                    throw new OMStreamingException(e);
-                }
+        if (parser != null) {
+            try {
+                returnLength = parser.getTextCharacters(i, chars, i1, i2);
+            } catch (XMLStreamException e) {
+                throw new OMStreamingException(e);
+            }
+        } else {
+            if (hasText()) {
+                OMText textNode = (OMText) lastNode;
+                String str = textNode.getText();
+                str.getChars(i, i + i2, chars, i1);
             }
-
-            // Note - this has no relevant method in the OM
         }
         return returnLength;
     }
@@ -973,7 +975,7 @@
      * @return
      */
     public Location getLocation() {
-        throw new UnsupportedOperationException();
+        return null;
     }
 
     /**