Skip to content

Commit

Permalink
Refine LogAdapter#isPresent
Browse files Browse the repository at this point in the history
Align LogAdapter#isPresent with ClassUtils#isPresent in order
to catch NoClassDefFoundError and other errors.

Closes gh-29506
  • Loading branch information
sdeleuze committed Nov 22, 2022
1 parent 8350738 commit 0b8000e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -100,7 +100,8 @@ private static boolean isPresent(String className) {
Class.forName(className, false, LogAdapter.class.getClassLoader());
return true;
}
catch (ClassNotFoundException ex) {
catch (Throwable ex) {
// Typically ClassNotFoundException or NoClassDefFoundError...
return false;
}
}
Expand Down

0 comments on commit 0b8000e

Please sign in to comment.