--- a/src/hotspot/share/prims/whitebox.cpp Tue May 29 16:02:23 2018 -0400
+++ b/src/hotspot/share/prims/whitebox.cpp Tue May 29 17:21:31 2018 -0400
@@ -98,6 +98,7 @@
#define CHECK_JNI_EXCEPTION_(env, value) \
do { \
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
+ THREAD->clear_pending_jni_exception_check(); \
if (HAS_PENDING_EXCEPTION) { \
return(value); \
} \
@@ -106,6 +107,7 @@
#define CHECK_JNI_EXCEPTION(env) \
do { \
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
+ THREAD->clear_pending_jni_exception_check(); \
if (HAS_PENDING_EXCEPTION) { \
return; \
} \