Skip to content

Commit 348be14

Browse files
committed
Catching Error is not recommended
Signed-off-by: Sven Strickroth <[email protected]>
1 parent f729a08 commit 348be14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java8-shim/src/main/java/org/owasp/shim/Java8Shim.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public abstract class Java8Shim {
1919
try {
2020
// This is compiled with -release 1.9 in a separate project.
2121
_instance = Class.forName("org.owasp.shim.ForJava9AndLater").newInstance();
22-
} catch (Error e) {
22+
} catch (Throwable e) {
2323
// This is co-located with this project and is a fall-back.
2424
_instance = Class.forName("org.owasp.shim.ForJava8").newInstance();
2525
}

0 commit comments

Comments
 (0)