in lang/src/main/java/org/apache/shiro/lang/util/ClassUtils.java [123:157]
public static InputStream getResourceAsStream(String name) {
InputStream is = THREAD_CL_ACCESSOR.getResourceStream(name);
if (is == null) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Resource [" + name + "] was not found via the thread context ClassLoader. Trying the "
+ "current ClassLoader...");
}
is = CLASS_LANG_CL_ACCESSOR.getResourceStream(name);
}
if (is == null) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Resource [" + name + "] was not found via the org.apache.shiro.lang ClassLoader. Trying the "
+ "additionally set ClassLoader...");
}
is = ADDITIONAL_CL_ACCESSOR.getResourceStream(name);
}
if (is == null) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Resource [" + name + "] was not found via the current class loader. Trying the "
+ "system/application ClassLoader...");
}
is = SYSTEM_CL_ACCESSOR.getResourceStream(name);
}
if (is == null && LOGGER.isTraceEnabled()) {
LOGGER.trace("Resource [" + name + "] was not found via the thread context, current, or "
+ "system/application ClassLoaders. All heuristics have been exhausted. Returning null.");
}
return is;
}