Skip to content

Commit 3b91f6d

Browse files
committed
minor refactoring
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent d94ebec commit 3b91f6d

File tree

1 file changed

+2
-6
lines changed
  • logback-core/src/main/java/ch/qos/logback/core/util

1 file changed

+2
-6
lines changed

logback-core/src/main/java/ch/qos/logback/core/util/Loader.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,14 @@ public ClassLoader run() {
165165

166166
/**
167167
* Return the class loader which loaded the class passed as argument. Return the
168-
* system class loader if appropriate.
168+
* system class loader if the class loader of 'clazz' argument is null.
169169
*
170170
* @param clazz
171171
* @return
172172
*/
173173
public static ClassLoader getClassLoaderOfClass(final Class<?> clazz) {
174174
ClassLoader cl = clazz.getClassLoader();
175-
if (cl == null) {
176-
return ClassLoader.getSystemClassLoader();
177-
} else {
178-
return cl;
179-
}
175+
return systemClassloaderIfNull(cl);
180176
}
181177

182178
/**

0 commit comments

Comments
 (0)