diff --git a/java/external/src/javax/xml/parsers/FactoryFinder.java b/java/external/src/javax/xml/parsers/FactoryFinder.java index 423c204..c35400d 100644 --- a/java/external/src/javax/xml/parsers/FactoryFinder.java +++ b/java/external/src/javax/xml/parsers/FactoryFinder.java @@ -78,16 +78,8 @@ import java.lang.reflect.InvocationTargetException; * when bundled as part of the JDK. */ class FactoryFinder { - /** Temp debug code - this will be removed after we test everything - */ - private static boolean debug = false; - static { - // Use try/catch block to support applets - try { - debug = System.getProperty("jaxp.debug") != null; - } catch (Exception x) { - } - } + /** Set to true for debugging */ + private static final boolean debug = false; private static void debugPrintln(String msg) { if (debug) { @@ -108,9 +100,7 @@ class FactoryFinder { m = Thread.class.getMethod("getContextClassLoader", null); } catch (NoSuchMethodException e) { // Assume that we are running JDK 1.1, use the current ClassLoader - if (debug) { - debugPrintln("assuming JDK 1.1"); - } + debugPrintln("assuming JDK 1.1"); return FactoryFinder.class.getClassLoader(); } @@ -169,6 +159,8 @@ class FactoryFinder { static Object find(String factoryId, String fallbackClassName) throws ConfigurationError { + debugPrintln("debug is on"); + ClassLoader classLoader = findClassLoader(); // Use the system property first diff --git a/java/external/src/javax/xml/transform/FactoryFinder.java b/java/external/src/javax/xml/transform/FactoryFinder.java index 0b579e1..8babbe6 100644 --- a/java/external/src/javax/xml/transform/FactoryFinder.java +++ b/java/external/src/javax/xml/transform/FactoryFinder.java @@ -78,16 +78,8 @@ import java.lang.reflect.InvocationTargetException; * when bundled as part of the JDK. */ class FactoryFinder { - /** Temp debug code - this will be removed after we test everything - */ - private static boolean debug = false; - static { - // Use try/catch block to support applets - try { - debug = System.getProperty("jaxp.debug") != null; - } catch (Exception x) { - } - } + /** Set to true for debugging */ + private static final boolean debug = false; private static void debugPrintln(String msg) { if (debug) { @@ -108,9 +100,7 @@ class FactoryFinder { m = Thread.class.getMethod("getContextClassLoader", null); } catch (NoSuchMethodException e) { // Assume that we are running JDK 1.1, use the current ClassLoader - if (debug) { - debugPrintln("assuming JDK 1.1"); - } + debugPrintln("assuming JDK 1.1"); return FactoryFinder.class.getClassLoader(); } @@ -169,6 +159,8 @@ class FactoryFinder { static Object find(String factoryId, String fallbackClassName) throws ConfigurationError { + debugPrintln("debug is on"); + ClassLoader classLoader = findClassLoader(); // Use the system property first