提交 bf81aad5 编写于 作者: P pchelko

8035734: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Choice.cpp

Reviewed-by: anthony, serb
上级 2dfc6810
......@@ -157,6 +157,7 @@ AwtChoice* AwtChoice::Create(jobject peer, jobject parent) {
"preferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
if (env->ExceptionCheck()) goto done;
if (dimension != NULL && width == 0) {
width = env->GetIntField(dimension, AwtDimension::widthID);
......@@ -337,9 +338,8 @@ jobject AwtChoice::PreferredItemSize(JNIEnv *env)
"preferredSize",
"()Ljava/awt/Dimension;").l;
DASSERT(!safe_ExceptionOccurred(env));
if (dimension == NULL) {
return NULL;
}
CHECK_NULL_RETURN(dimension, NULL);
/* This size is window size of choice and it's too big for each
* drop down item height.
*/
......@@ -605,7 +605,8 @@ void AwtChoice::_AddItems(void *param)
for (i = 0; i < itemCount; i++)
{
jstring item = (jstring)env->GetObjectArrayElement(items, i);
JNI_CHECK_NULL_GOTO(item, "null item", next_elem);
if (env->ExceptionCheck()) goto done;
if (item == NULL) goto next_elem;
c->SendMessage(CB_INSERTSTRING, index + i, JavaStringBuffer(env, item));
env->DeleteLocalRef(item);
next_elem:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册