Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit fd9be8f

Browse files
committed
Merge pull request #4 from ruboto/master
Fix JRubyCacheBackend::canUseUnsafeCHM on Android
2 parents 21ea387 + 3449e82 commit fd9be8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/org/jruby/ext/thread_safe/JRubyCacheBackendLibrary.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private static boolean canUseUnsafeCHM() {
6363
return true;
6464
} catch (Throwable t) { // ensuring we really do catch everything
6565
// Doug's Unsafe setup errors always have this "Could not ini.." message
66-
if (t.getMessage().contains("Could not initialize intrinsics") || isCausedBySecurityException(t)) {
66+
if (isCausedBySecurityException(t)) {
6767
return false;
6868
}
6969
throw (t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t));
@@ -72,7 +72,7 @@ private static boolean canUseUnsafeCHM() {
7272

7373
private static boolean isCausedBySecurityException(Throwable t) {
7474
while (t != null) {
75-
if (t instanceof SecurityException) {
75+
if ((t.getMessage() != null && t.getMessage().contains("Could not initialize intrinsics")) || t instanceof SecurityException) {
7676
return true;
7777
}
7878
t = t.getCause();

0 commit comments

Comments
 (0)