Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 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
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.