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 2015/11/06 23:17:27 UTC
svn commit: r1713046 -
/webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java
Author: veithen
Date: Fri Nov 6 22:17:27 2015
New Revision: 1713046
URL: http://svn.apache.org/viewvc?rev=1713046&view=rev
Log:
Remove dead code (We require Java 7 for the build).
Modified:
webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java
Modified: webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java?rev=1713046&r1=1713045&r2=1713046&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java (original)
+++ webservices/axiom/trunk/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuite.java Fri Nov 6 22:17:27 2015
@@ -42,22 +42,20 @@ public class DialectTestSuite extends Te
File targetDir = new File("target");
- // On Java 1.6 and above, also add the StAX implementation from the JRE
- if (!System.getProperty("java.version").startsWith("1.5")) {
- Properties props = new Properties();
- if (System.getProperty("java.vendor").startsWith("IBM")) {
- // Necessary for IBM Java 1.6. Note that IBM Java 1.7 also supports
- // the com.sun.xml.internal.stream.* factories.
- props.setProperty("javax.xml.stream.XMLInputFactory", "com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl");
- props.setProperty("javax.xml.stream.XMLOutputFactory", "com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl");
- } else {
- props.setProperty("javax.xml.stream.XMLInputFactory", "com.sun.xml.internal.stream.XMLInputFactoryImpl");
- props.setProperty("javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl");
- }
- builder.addImplementation(new StAXImplementation("JRE", ClassLoader.getSystemClassLoader(), props));
- // Neither SJSXP nor XLXP report whitespace in prolog
- builder.exclude(TestGetTextInProlog.class, "(implementation=JRE)");
+ // Add the StAX implementation from the JRE
+ Properties props = new Properties();
+ if (System.getProperty("java.vendor").startsWith("IBM")) {
+ // Necessary for IBM Java 1.6. Note that IBM Java 1.7 also supports
+ // the com.sun.xml.internal.stream.* factories.
+ props.setProperty("javax.xml.stream.XMLInputFactory", "com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl");
+ props.setProperty("javax.xml.stream.XMLOutputFactory", "com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl");
+ } else {
+ props.setProperty("javax.xml.stream.XMLInputFactory", "com.sun.xml.internal.stream.XMLInputFactoryImpl");
+ props.setProperty("javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl");
}
+ builder.addImplementation(new StAXImplementation("JRE", ClassLoader.getSystemClassLoader(), props));
+ // Neither SJSXP nor XLXP report whitespace in prolog
+ builder.exclude(TestGetTextInProlog.class, "(implementation=JRE)");
addParsersFromFile(builder, new File(targetDir, "parsers.list"));
addParsersFromDirectory(builder, new File(targetDir, "parsers"));