Author: veithen
Date: Thu Jul 30 21:36:28 2009
New Revision: 799451

URL: http://svn.apache.org/viewvc?rev=799451&view=rev
Log:
Enable testing of the StAX implementation provided by the JRE on Java 1.6.

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-parser-tests/src/test/java/ParserTest.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-parser-tests/src/test/java/ParserTest.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-parser-tests/src/test/java/ParserTest.java?rev=799451&r1=799450&r2=799451&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-parser-tests/src/test/java/ParserTest.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-parser-tests/src/test/java/ParserTest.java
 Thu Jul 30 21:36:28 2009
@@ -79,9 +79,16 @@
             }
         }
         
+        TestSuite superSuite = new TestSuite();
+        
+        // On Java 1.6, also add the StAX implementation from the JRE
+        // The check is not very clean but it should be enough for a unit 
test...
+        if (System.getProperty("java.version").startsWith("1.6")) {
+            superSuite.addTest(new SetContextClassLoaderTestWrapper(suite, 
ClassLoader.getSystemClassLoader()));
+        }
+        
         // Build decorators that execute the test suite using different StAX 
implementations
         File[] parserJars = new File(targetDir, 
"parsers").listFiles(jarFilter);
-        TestSuite superSuite = new TestSuite();
         for (int i=0; i<parserJars.length; i++) {
             ClassLoader parserClassLoader = new URLClassLoader(new URL[] { 
parserJars[i].toURL() }, parentClassLoader);
             superSuite.addTest(new SetContextClassLoaderTestWrapper(suite, 
parserClassLoader));


Reply via email to