From 6eecc96ed016929b130ed9a0e456993458f4d7fd Mon Sep 17 00:00:00 2001 From: serb Date: Thu, 14 Aug 2014 14:19:58 +0100 Subject: [PATCH] 8046887: JNI exception pending in jdk/src/solaris/native/sun/awt: awt_DrawingSurface.c, awt_GraphicsEnv.c, awt_InputMethod.c, sun_awt_X11_GtkFileDialogPeer.c Reviewed-by: azvegint, prr --- src/solaris/native/sun/awt/awt_GraphicsEnv.c | 6 ++++-- .../native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/solaris/native/sun/awt/awt_GraphicsEnv.c b/src/solaris/native/sun/awt/awt_GraphicsEnv.c index 324d0cf10..f142c8664 100644 --- a/src/solaris/native/sun/awt/awt_GraphicsEnv.c +++ b/src/solaris/native/sun/awt/awt_GraphicsEnv.c @@ -1348,7 +1348,9 @@ JNIEnv *env, jobject this) } /* Make Color Model object for this GraphicsConfiguration */ - colorModel = awtJNI_GetColorModel (env, adata); + colorModel = (*env)->ExceptionCheck(env) + ? NULL : awtJNI_GetColorModel (env, adata); + AWT_UNLOCK (); return colorModel; @@ -2052,7 +2054,7 @@ Java_sun_awt_X11GraphicsDevice_configDisplayMode AWT_FLUSH_UNLOCK(); - if (!success) { + if (!success && !(*env)->ExceptionCheck(env)) { JNU_ThrowInternalError(env, "Could not set display mode"); } #endif /* !HEADLESS */ diff --git a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c index 5eb6fe52d..1c040e0a1 100644 --- a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c +++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c @@ -246,8 +246,14 @@ static jobjectArray toFilenamesArray(JNIEnv *env, GSList* list, jstring* jcurren } str = (*env)->NewStringUTF(env, entry); - if (str && !(*env)->ExceptionCheck(env)) { + if((*env)->ExceptionCheck(env)){ + break; + } + if (str) { (*env)->SetObjectArrayElement(env, array, i, str); + if((*env)->ExceptionCheck(env)){ + break; + } } } -- GitLab