Clean up debug code
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d84a3ea853
commit
41208535c4
@ -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");
|
||||
}
|
||||
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
|
||||
|
||||
@ -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");
|
||||
}
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user