changeset 9854:5d22ffb8b826

8035739: [parfait] JNI exception pending and primitive type mismatch in jdk/src/windows/native/sun/windows/awt_List.cpp Reviewed-by: serb, azvegint
author pchelko
date Thu, 10 Apr 2014 11:57:19 +0400
parents b1994e5c11ad
children 4ebe24f57e52
files src/windows/native/sun/windows/awt_List.cpp
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_List.cpp	Thu Apr 10 11:56:01 2014 +0400
+++ b/src/windows/native/sun/windows/awt_List.cpp	Thu Apr 10 11:57:19 2014 +0400
@@ -614,7 +614,8 @@
             {
                 LPTSTR itemPtr = NULL;
                 jstring item = (jstring)env->GetObjectArrayElement(items, i);
-                JNI_CHECK_NULL_GOTO(item, "null item", next_item);
+                if (env->ExceptionCheck()) goto ret;
+                if (item == NULL) goto next_item;
                 itemPtr = (LPTSTR)JNU_GetStringPlatformChars(env, item, 0);
                 if (itemPtr == NULL)
                 {
@@ -1017,8 +1018,8 @@
     ses->list = env->NewGlobalRef(self);
     ses->index = index;
 
-    return (jboolean)AwtToolkit::GetInstance().SyncCall(
-        (void *(*)(void *))AwtList::_IsSelected, ses);
+    return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
+                       (void *(*)(void *))AwtList::_IsSelected, ses));
     // global ref and ses are deleted in _IsSelected
 
     CATCH_BAD_ALLOC_RET(FALSE);