Skip to content

Commit

Permalink
Handle NCDFE for odd envs like GAE that throw it for Unsafe.
Browse files Browse the repository at this point in the history
Fixes #2304.
  • Loading branch information
headius committed Dec 12, 2014
1 parent 81879f1 commit 0576fd5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/util/unsafe/UnsafeHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 0576fd5

Please sign in to comment.