Skip to content
Permalink
Browse files
Handle NCDFE for odd envs like GAE that throw it for Unsafe.
Fixes #2304.
  • Loading branch information
headius committed Dec 12, 2014
1 parent 81879f1 commit 0576fd5c22a75cc8dc759413bd0e6ee9620c8a5d
Showing with 3 additions and 0 deletions.
  1. +3 −0 core/src/main/java/org/jruby/util/unsafe/UnsafeHolder.java
@@ -50,6 +50,9 @@ private static sun.misc.Unsafe loadUnsafe() {
return (sun.misc.Unsafe) f.get(null);
} catch (Exception e) {
return null;
} catch (NoClassDefFoundError ncdfe) {
// Google AppEngine raises NCDFE for Unsafe rather than CNFE
return null;
}
}

0 comments on commit 0576fd5

Please sign in to comment.