1
0

Fix compiler warning

This commit is contained in:
Gary Gregory
2023-11-19 11:19:48 -05:00
parent f02f8cbc5d
commit 0b5089a953

View File

@@ -233,15 +233,13 @@ public class SimpleLog implements Log, Serializable {
} }
private static InputStream getResourceAsStream(final String name) { private static InputStream getResourceAsStream(final String name) {
return (InputStream)AccessController.doPrivileged( return AccessController.doPrivileged((PrivilegedAction<InputStream>) () -> {
(PrivilegedAction) () -> { final ClassLoader threadCL = getContextClassLoader();
final ClassLoader threadCL = getContextClassLoader(); if (threadCL != null) {
return threadCL.getResourceAsStream(name);
if (threadCL != null) { }
return threadCL.getResourceAsStream(name); return ClassLoader.getSystemResourceAsStream(name);
} });
return ClassLoader.getSystemResourceAsStream(name);
});
} }