test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadState/thrstat005/thrstat005.cpp
changeset 52642 9cfc8b0c45fd
parent 52221 27ba7cc31f9f
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadState/thrstat005/thrstat005.cpp	Wed Nov 21 18:44:11 2018 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadState/thrstat005/thrstat005.cpp	Wed Nov 21 10:46:45 2018 -0800
@@ -144,10 +144,19 @@
 
         printf("checkThreadState: wait %d ms\n", waitTime);
         fflush(stdout);
-        if ((res = g_ppJvmtiEnv->RawMonitorEnter(g_waitMon)) != JVMTI_ERROR_NONE
-                || (res = g_ppJvmtiEnv->RawMonitorWait(g_waitMon, waitTime)) != JVMTI_ERROR_NONE
-                || (res = g_ppJvmtiEnv->RawMonitorExit(g_waitMon)) != JVMTI_ERROR_NONE) {
-            reportError("GetThreadState: unexpected error", res);
+        res = g_ppJvmtiEnv->RawMonitorEnter(g_waitMon);
+        if (res != JVMTI_ERROR_NONE) {
+            reportError("GetThreadState: unexpected error from RawMontiorEnter", res);
+            return JNI_FALSE;
+        }
+        res = g_ppJvmtiEnv->RawMonitorWait(g_waitMon, waitTime);
+        if (res != JVMTI_ERROR_NONE) {
+            reportError("GetThreadState: unexpected error from RawMontiorWait", res);
+            return JNI_FALSE;
+        }
+        res = g_ppJvmtiEnv->RawMonitorExit(g_waitMon);
+        if (res != JVMTI_ERROR_NONE) {
+            reportError("GetThreadState: unexpected error from RawMonitorExit", res);
             return JNI_FALSE;
         }