in src/main/java/org/apache/commons/logging/LogFactory.java [1260:1286]
private static Enumeration getResources(final ClassLoader loader, final String name) {
final PrivilegedAction action =
new PrivilegedAction() {
@Override
public Object run() {
try {
if (loader != null) {
return loader.getResources(name);
}
return ClassLoader.getSystemResources(name);
} catch (final IOException e) {
if (isDiagnosticsEnabled()) {
logDiagnostic("Exception while trying to find configuration file " +
name + ":" + e.getMessage());
}
return null;
} catch (final NoSuchMethodError e) {
// we must be running on a 1.1 JVM which doesn't support
// ClassLoader.getSystemResources; just return null in
// this case.
return null;
}
}
};
final Object result = AccessController.doPrivileged(action);
return (Enumeration) result;
}