You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2010/09/30 12:11:00 UTC

svn commit: r1002987 - in /webservices/commons/trunk/modules/axiom/modules/axiom-api: pom.xml src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java

Author: veithen
Date: Thu Sep 30 10:10:59 2010
New Revision: 1002987

URL: http://svn.apache.org/viewvc?rev=1002987&view=rev
Log:
Adding Woodstox 4.0 to the dialect test suite.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml?rev=1002987&r1=1002986&r2=1002987&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml Thu Sep 30 10:10:59 2010
@@ -86,6 +86,19 @@
             <version>1.4</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <!-- We need this to be able to test Woodstox 4 -->
+            <groupId>org.codehaus.woodstox</groupId>
+            <artifactId>stax2-api</artifactId>
+            <version>3.0.2</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.xml.stream</groupId>
+                    <artifactId>stax-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
     </dependencies>
     <build>
         <testResources>
@@ -154,6 +167,11 @@
                                     <version>3.2.9</version>
                                 </artifactItem>
                                 <artifactItem>
+                                    <groupId>org.codehaus.woodstox</groupId>
+                                    <artifactId>woodstox-core-asl</artifactId>
+                                    <version>4.0.8</version>
+                                </artifactItem>
+                                <artifactItem>
                                     <groupId>com.sun.xml.stream</groupId>
                                     <artifactId>sjsxp</artifactId>
                                     <version>1.0.1</version>

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java?rev=1002987&r1=1002986&r2=1002987&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/util/stax/dialect/WoodstoxStreamReaderWrapper.java Thu Sep 30 10:10:59 2010
@@ -76,6 +76,12 @@ class WoodstoxStreamReaderWrapper extend
         return getEventType() == CHARACTERS;
     }
 
+    public String getPrefix() {
+        // Woodstox 4.0 may return "" instead of null
+        String prefix = super.getPrefix();
+        return prefix == null || prefix.length() == 0 ? null : prefix;
+    }
+
     public XMLStreamReader getParent() {
         return super.getParent();
     }