--- a/jdk/src/java.desktop/unix/native/common/awt/awt.h Wed Jul 29 11:33:02 2015 +0400
+++ b/jdk/src/java.desktop/unix/native/common/awt/awt.h Wed Jul 29 20:32:35 2015 +0300
@@ -82,7 +82,12 @@
} while (0)
#define AWT_LOCK_IMPL() \
- (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID)
+ do { \
+ (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID); \
+ if ((*env)->ExceptionCheck(env)) { \
+ (*env)->ExceptionClear(env); \
+ } \
+ } while(0)
#define AWT_NOFLUSH_UNLOCK_IMPL() \
do { \
@@ -91,11 +96,10 @@
(*env)->ExceptionClear(env); \
} \
(*env)->CallStaticVoidMethod(env, tkClass, awtUnlockMID); \
+ if ((*env)->ExceptionCheck(env)) { \
+ (*env)->ExceptionClear(env); \
+ } \
if (pendingException) { \
- if ((*env)->ExceptionCheck(env)) { \
- (*env)->ExceptionDescribe(env); \
- (*env)->ExceptionClear(env); \
- } \
(*env)->Throw(env, pendingException); \
} \
} while (0)