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:
edwingo
2001-10-24 00:55:15 +00:00
parent 23ce6ff1d8
commit d84a3ea853
2 changed files with 4 additions and 10 deletions

View File

@@ -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;
}
/**

View File

@@ -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;
}
/**