changeset 22786 | 86644d9539c2 |
parent 20282 | 7f9cbdf89af2 |
child 22796 | bb0ea482a99e |
--- a/hotspot/src/share/vm/prims/unsafe.cpp Tue Feb 11 21:32:19 2014 -0800 +++ b/hotspot/src/share/vm/prims/unsafe.cpp Wed Feb 12 12:01:45 2014 -0800 @@ -858,6 +858,11 @@ strcpy(buf, "java/lang/"); strcat(buf, ename); jclass cls = env->FindClass(buf); + if (env->ExceptionCheck()) { + env->ExceptionClear(); + tty->print_cr("Unsafe: cannot throw %s because FindClass has failed", buf); + return; + } char* msg = NULL; env->ThrowNew(cls, msg); }