We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf59a63 commit 2946e3bCopy full SHA for 2946e3b
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