--- old/src/share/vm/prims/whitebox.hpp 2014-02-12 10:42:25.446020709 -0800 +++ new/src/share/vm/prims/whitebox.hpp 2014-02-12 10:42:25.329012609 -0800 @@ -36,6 +36,22 @@ #define WB_END JNI_END #define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL +#define CHECK_JNI_EXCEPTION_(env, value) \ + do { \ + if (env->ExceptionCheck()) { \ + env->ExceptionClear(); \ + return(value); \ + } \ + } while (0) + +#define CHECK_JNI_EXCEPTION(env) \ + do { \ + if (env->ExceptionCheck()) { \ + env->ExceptionClear(); \ + return; \ + } \ + } while (0) + class WhiteBox : public AllStatic { private: static bool _used;