Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Nov 6, 2023
1 parent d94ebec commit 3b91f6d
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,14 @@ public ClassLoader run() {

/**
* Return the class loader which loaded the class passed as argument. Return the
* system class loader if appropriate.
* system class loader if the class loader of 'clazz' argument is null.
*
* @param clazz
* @return
*/
public static ClassLoader getClassLoaderOfClass(final Class<?> clazz) {
ClassLoader cl = clazz.getClassLoader();
if (cl == null) {
return ClassLoader.getSystemClassLoader();
} else {
return cl;
}
return systemClassloaderIfNull(cl);
}

/**
Expand Down

0 comments on commit 3b91f6d

Please sign in to comment.