Skip to content

Commit 0b8000e

Browse files
committed
Refine LogAdapter#isPresent
Align LogAdapter#isPresent with ClassUtils#isPresent in order to catch NoClassDefFoundError and other errors. Closes gh-29506
1 parent 8350738 commit 0b8000e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-jcl/src/main/java/org/apache/commons/logging/LogAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ private static boolean isPresent(String className) {
100100
Class.forName(className, false, LogAdapter.class.getClassLoader());
101101
return true;
102102
}
103-
catch (ClassNotFoundException ex) {
103+
catch (Throwable ex) {
104+
// Typically ClassNotFoundException or NoClassDefFoundError...
104105
return false;
105106
}
106107
}

0 commit comments

Comments
 (0)