Better local name
This commit is contained in:
@@ -367,9 +367,9 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Class c;
|
Class clazz;
|
||||||
try {
|
try {
|
||||||
c = Class.forName(logAdapterClassName, true, currentCL);
|
clazz = Class.forName(logAdapterClassName, true, currentCL);
|
||||||
} catch (final ClassNotFoundException originalClassNotFoundException) {
|
} catch (final ClassNotFoundException originalClassNotFoundException) {
|
||||||
// The current classloader was unable to find the log adapter
|
// The current classloader was unable to find the log adapter
|
||||||
// in this or any ancestor classloader. There's no point in
|
// in this or any ancestor classloader. There's no point in
|
||||||
@@ -385,7 +385,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
// classloading strategy is not consistent with the
|
// classloading strategy is not consistent with the
|
||||||
// Java 1.2 classloading guidelines but JCL can
|
// Java 1.2 classloading guidelines but JCL can
|
||||||
// and so should handle this case.
|
// and so should handle this case.
|
||||||
c = Class.forName(logAdapterClassName);
|
clazz = Class.forName(logAdapterClassName);
|
||||||
} catch (final ClassNotFoundException secondaryClassNotFoundException) {
|
} catch (final ClassNotFoundException secondaryClassNotFoundException) {
|
||||||
// no point continuing: this adapter isn't available
|
// no point continuing: this adapter isn't available
|
||||||
msg = secondaryClassNotFoundException.getMessage();
|
msg = secondaryClassNotFoundException.getMessage();
|
||||||
@@ -395,7 +395,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor = c.getConstructor(logConstructorSignature);
|
constructor = clazz.getConstructor(logConstructorSignature);
|
||||||
final Object o = constructor.newInstance(params);
|
final Object o = constructor.newInstance(params);
|
||||||
|
|
||||||
// Note that we do this test after trying to create an instance
|
// Note that we do this test after trying to create an instance
|
||||||
@@ -403,7 +403,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
// we don't complain about Log hierarchy problems when the
|
// we don't complain about Log hierarchy problems when the
|
||||||
// adapter couldn't be instantiated anyway.
|
// adapter couldn't be instantiated anyway.
|
||||||
if (o instanceof Log) {
|
if (o instanceof Log) {
|
||||||
logAdapterClass = c;
|
logAdapterClass = clazz;
|
||||||
logAdapter = (Log) o;
|
logAdapter = (Log) o;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -418,7 +418,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
// The handleFlawedHierarchy method will throw
|
// The handleFlawedHierarchy method will throw
|
||||||
// LogConfigurationException if it regards this problem as
|
// LogConfigurationException if it regards this problem as
|
||||||
// fatal, and just return if not.
|
// fatal, and just return if not.
|
||||||
handleFlawedHierarchy(currentCL, c);
|
handleFlawedHierarchy(currentCL, clazz);
|
||||||
} catch (final NoClassDefFoundError e) {
|
} catch (final NoClassDefFoundError e) {
|
||||||
// We were able to load the adapter but it had references to
|
// We were able to load the adapter but it had references to
|
||||||
// other classes that could not be found. This simply means that
|
// other classes that could not be found. This simply means that
|
||||||
|
|||||||
Reference in New Issue
Block a user