1
0

Simple rearrangement of code only; no functionality change (though the diffs don't show that clearly).

Turned a complicated anonymous class declaration into a simple anonymous class that calls a method
on LogFactory containing all the code previously within the anonymous class declaration.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@170355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2005-05-16 10:41:44 +00:00
parent 3200e8aa2e
commit 851f7c5f33

View File

@@ -632,6 +632,26 @@ public abstract class LogFactory {
Object result = AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return createFactory(factoryClass, classLoader);
}
});
if (result instanceof LogConfigurationException)
throw (LogConfigurationException)result;
return (LogFactory)result;
}
/**
* Implements the operations described in the javadoc for newFactory.
*
* @param factoryClass
* @param classLoader
*
* @returns either a LogFactory object or a LogConfigurationException object.
*/
protected static Object createFactory(String factoryClass, ClassLoader classLoader) {
// This will be used to diagnose bad configurations
// and allow a useful message to be sent to the user
Class logFactoryClass = null;
@@ -694,13 +714,6 @@ public abstract class LogFactory {
return new LogConfigurationException(e);
}
}
});
if (result instanceof LogConfigurationException)
throw (LogConfigurationException)result;
return (LogFactory)result;
}
private static InputStream getResourceAsStream(final ClassLoader loader,
final String name)