We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d94ebec commit 3b91f6dCopy full SHA for 3b91f6d
logback-core/src/main/java/ch/qos/logback/core/util/Loader.java
@@ -165,18 +165,14 @@ public ClassLoader run() {
165
166
/**
167
* Return the class loader which loaded the class passed as argument. Return the
168
- * system class loader if appropriate.
+ * system class loader if the class loader of 'clazz' argument is null.
169
*
170
* @param clazz
171
* @return
172
*/
173
public static ClassLoader getClassLoaderOfClass(final Class<?> clazz) {
174
ClassLoader cl = clazz.getClassLoader();
175
- if (cl == null) {
176
- return ClassLoader.getSystemClassLoader();
177
- } else {
178
- return cl;
179
- }
+ return systemClassloaderIfNull(cl);
180
}
181
182
0 commit comments