private static InputStream getResourceAsStream(final String name) {
        return AccessController.doPrivileged((PrivilegedAction<InputStream>) () -> {
            ClassLoader threadCL = getContextClassLoader();

            if (threadCL != null) {
                return threadCL.getResourceAsStream(name);
            } else {
                return ClassLoader.getSystemResourceAsStream(name);
            }
        });
    }
InvocationTargetException is thrown by 'invoke' when the method
being invoked (getContextClassLoader) throws an exception.

getContextClassLoader() throws SecurityException when the context
class loader isn't an ancestor of the calling class's class loader,
or if security permissions are restricted.

In the first case (not related), we want to ignore and keep going.
We cannot help but also ignore the second with the logic below, but
other calls elsewhere (to obtain a class loader) will trigger this
exception where we can make a distinction.
jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SimpleLog.java