--- a/jdk/src/solaris/native/sun/awt/awt_util.c Mon Apr 07 18:01:52 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_util.c Mon Apr 07 17:41:16 2014 +0100
@@ -62,7 +62,7 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
-void
+jboolean
awtJNI_ThreadYield(JNIEnv *env) {
static jclass threadClass = NULL;
@@ -76,7 +76,7 @@
Boolean err = FALSE;
if (threadClass == NULL) {
jclass tc = (*env)->FindClass(env, "java/lang/Thread");
- CHECK_NULL(tc);
+ CHECK_NULL_RETURN(tc, JNI_FALSE);
threadClass = (*env)->NewGlobalRef(env, tc);
(*env)->DeleteLocalRef(env, tc);
if (threadClass != NULL) {
@@ -92,10 +92,11 @@
err = TRUE;
}
if (err) {
- return;
+ return JNI_FALSE;
}
} /* threadClass == NULL*/
(*env)->CallStaticVoidMethod(env, threadClass, yieldMethodID);
DASSERT(!((*env)->ExceptionOccurred(env)));
+ return JNI_TRUE;
} /* awtJNI_ThreadYield() */