Fixed bug in reflection code so code will compile and run on JDK 1.1
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225928 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -102,7 +102,6 @@ class FactoryFinder {
|
||||
private static ClassLoader findClassLoader()
|
||||
throws ConfigurationError
|
||||
{
|
||||
ClassLoader classLoader;
|
||||
Method m = null;
|
||||
|
||||
try {
|
||||
@@ -112,11 +111,11 @@ class FactoryFinder {
|
||||
if (debug) {
|
||||
debugPrintln("assuming JDK 1.1");
|
||||
}
|
||||
classLoader = FactoryFinder.class.getClassLoader();
|
||||
return FactoryFinder.class.getClassLoader();
|
||||
}
|
||||
|
||||
try {
|
||||
classLoader = (ClassLoader) m.invoke(Thread.currentThread(), null);
|
||||
return (ClassLoader) m.invoke(Thread.currentThread(), null);
|
||||
} catch (IllegalAccessException e) {
|
||||
// assert(false)
|
||||
throw new ConfigurationError("Unexpected IllegalAccessException",
|
||||
@@ -126,8 +125,6 @@ class FactoryFinder {
|
||||
throw new ConfigurationError("Unexpected InvocationTargetException",
|
||||
e);
|
||||
}
|
||||
|
||||
return classLoader;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -102,7 +102,6 @@ class FactoryFinder {
|
||||
private static ClassLoader findClassLoader()
|
||||
throws ConfigurationError
|
||||
{
|
||||
ClassLoader classLoader;
|
||||
Method m = null;
|
||||
|
||||
try {
|
||||
@@ -112,11 +111,11 @@ class FactoryFinder {
|
||||
if (debug) {
|
||||
debugPrintln("assuming JDK 1.1");
|
||||
}
|
||||
classLoader = FactoryFinder.class.getClassLoader();
|
||||
return FactoryFinder.class.getClassLoader();
|
||||
}
|
||||
|
||||
try {
|
||||
classLoader = (ClassLoader) m.invoke(Thread.currentThread(), null);
|
||||
return (ClassLoader) m.invoke(Thread.currentThread(), null);
|
||||
} catch (IllegalAccessException e) {
|
||||
// assert(false)
|
||||
throw new ConfigurationError("Unexpected IllegalAccessException",
|
||||
@@ -126,8 +125,6 @@ class FactoryFinder {
|
||||
throw new ConfigurationError("Unexpected InvocationTargetException",
|
||||
e);
|
||||
}
|
||||
|
||||
return classLoader;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user