Fix compiler warning
This commit is contained in:
@@ -1031,13 +1031,12 @@ public abstract class LogFactory {
|
|||||||
* run the operation using an AccessController.
|
* run the operation using an AccessController.
|
||||||
*/
|
*/
|
||||||
private static InputStream getResourceAsStream(final ClassLoader loader, final String name) {
|
private static InputStream getResourceAsStream(final ClassLoader loader, final String name) {
|
||||||
return (InputStream)AccessController.doPrivileged(
|
return AccessController.doPrivileged((PrivilegedAction<InputStream>) () -> {
|
||||||
(PrivilegedAction) () -> {
|
if (loader != null) {
|
||||||
if (loader != null) {
|
return loader.getResourceAsStream(name);
|
||||||
return loader.getResourceAsStream(name);
|
}
|
||||||
}
|
return ClassLoader.getSystemResourceAsStream(name);
|
||||||
return ClassLoader.getSystemResourceAsStream(name);
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user