8031492: [Parfait] warnings from b122 for jdk/src/solaris/native/sun/awt: JNI exception pending
authorazvegint
Mon, 10 Feb 2014 15:02:24 +0000
changeset 23289 cd5ba3eeaae6
parent 23288 b7183846db97
child 23290 6d992283f608
8031492: [Parfait] warnings from b122 for jdk/src/solaris/native/sun/awt: JNI exception pending Reviewed-by: pchelko, serb
jdk/src/solaris/native/sun/awt/gtk2_interface.c
--- a/jdk/src/solaris/native/sun/awt/gtk2_interface.c	Sat Feb 08 18:03:38 2014 -0800
+++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.c	Mon Feb 10 15:02:24 2014 +0000
@@ -32,6 +32,7 @@
 #include "java_awt_Transparency.h"
 #include "jvm_md.h"
 #include "sizecalc.h"
+#include <jni_util.h>
 
 #define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0")
 #define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0")
@@ -456,13 +457,19 @@
     const gchar * const * schemes = NULL;
 
     jclass cls_action = (*env)->FindClass(env, "java/awt/Desktop$Action");
+    CHECK_NULL(cls_action);
     jclass cls_xDesktopPeer = (*env)->FindClass(env, "sun/awt/X11/XDesktopPeer");
+    CHECK_NULL(cls_xDesktopPeer);
     jfieldID fld_supportedActions = (*env)->GetStaticFieldID(env, cls_xDesktopPeer, "supportedActions", "Ljava/util/List;");
+    CHECK_NULL(fld_supportedActions);
     jobject supportedActions = (*env)->GetStaticObjectField(env, cls_xDesktopPeer, fld_supportedActions);
 
     jclass cls_arrayList = (*env)->FindClass(env, "java/util/ArrayList");
+    CHECK_NULL(cls_arrayList);
     jmethodID mid_arrayListAdd = (*env)->GetMethodID(env, cls_arrayList, "add", "(Ljava/lang/Object;)Z");
+    CHECK_NULL(mid_arrayListAdd);
     jmethodID mid_arrayListClear = (*env)->GetMethodID(env, cls_arrayList, "clear", "()V");
+    CHECK_NULL(mid_arrayListClear);
 
     (*env)->CallVoidMethod(env, supportedActions, mid_arrayListClear);