8212884: Remove the assignments in ifs for vmTestbase/[a-s]
Summary: Extract assignments from if statements in vmTestbase
Reviewed-by: cjplummer, sspitsyn
--- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -48,12 +48,14 @@
Options* options = NULL;
const char* agentName;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
NSK_DISPLAY1("%s: initialization was done\n", agentName);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -73,8 +73,8 @@
{(char*) "agentGotCapabilities", (char*) "()Z", (void*) Java_nsk_jvmti_AttachOnDemand_attach002_attach002Target_agentGotCapabilities}};
jint nativeMethodsNumber = 1;
- if (!NSK_JNI_VERIFY(jni, (appClass =
- jni->FindClass(ATTACH002_TARGET_APP_CLASS_NAME)) != NULL)) {
+ appClass = jni->FindClass(ATTACH002_TARGET_APP_CLASS_NAME);
+ if (!NSK_JNI_VERIFY(jni, appClass != NULL)) {
return NSK_FALSE;
}
@@ -187,15 +187,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_VERIFY(registerNativeMethods(jni))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -92,15 +92,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -110,15 +110,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -128,15 +128,18 @@
jvmtiEventCallbacks eventCallbacks;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -54,15 +54,18 @@
const char* agentName;
jvmtiCapabilities caps;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -91,15 +91,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -84,15 +84,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -84,15 +84,18 @@
jvmtiEnv* jvmti = NULL;
JNIEnv* jni = NULL;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -115,7 +115,8 @@
int startAuxiliaryThread(jvmtiEnv* jvmti, JNIEnv* jni) {
jthread thread;
- if (!NSK_VERIFY((thread = nsk_jvmti_aod_createThread(jni)) != NULL))
+ thread = nsk_jvmti_aod_createThread(jni);
+ if (!NSK_VERIFY(thread != NULL))
return NSK_FALSE;
if (!NSK_JVMTI_VERIFY(jvmti->RunAgentThread(thread, auxiliaryThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY))) {
@@ -145,15 +146,18 @@
jvmtiCapabilities caps;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("GCFinishMonitor", &gcFinishMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -94,8 +94,8 @@
{(char*) "shutdownAgent", (char*) "()V", (void*) Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_shutdownAgent}};
jint nativeMethodsNumber = 2;
- if (!NSK_JNI_VERIFY(jni, (appClass =
- jni->FindClass(ATTACH021_TARGET_APP_CLASS_NAME)) != NULL)) {
+ appClass = jni->FindClass(ATTACH021_TARGET_APP_CLASS_NAME);
+ if (!NSK_JNI_VERIFY(jni, appClass != NULL)) {
return NSK_FALSE;
}
@@ -124,15 +124,18 @@
jvmtiCapabilities caps;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_VERIFY(registerNativeMethods(jni))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -104,8 +104,8 @@
(void*) Java_nsk_jvmti_AttachOnDemand_attach022_attach022Target_shutdownAgent}};
jint nativeMethodsNumber = 1;
- if (!NSK_JNI_VERIFY(jni, (appClass =
- jni->FindClass(ATTACH022_TARGET_APP_CLASS_NAME)) != NULL)) {
+ appClass = jni->FindClass(ATTACH022_TARGET_APP_CLASS_NAME);
+ if (!NSK_JNI_VERIFY(jni, appClass != NULL)) {
return NSK_FALSE;
}
@@ -176,15 +176,18 @@
jvmtiCapabilities caps;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_VERIFY(registerNativeMethods(jni))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -109,15 +109,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -105,15 +105,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -65,7 +65,8 @@
int startNewThread(jvmtiEnv* jvmti, JNIEnv* jni) {
jthread thread;
- if (!NSK_VERIFY((thread = nsk_jvmti_aod_createThreadWithName(jni, STARTED_THREAD_NAME)) != NULL))
+ thread = nsk_jvmti_aod_createThreadWithName(jni, STARTED_THREAD_NAME);
+ if (!NSK_VERIFY(thread != NULL))
return NSK_FALSE;
if (!NSK_JVMTI_VERIFY(jvmti->RunAgentThread(thread, startedThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY))) {
@@ -140,15 +141,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -133,15 +133,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("threadsCounterMonitor", &threadsCounterMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -159,15 +159,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -123,15 +123,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&eventCallbacks,0, sizeof(eventCallbacks));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -97,15 +97,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent00-eventsCounterMonitor", &eventsCounterMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -108,15 +108,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent01-eventsCounterMonitor", &eventsCounterMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -128,15 +128,18 @@
jvmtiEnv* jvmti;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent02-eventsCounterMonitor", &eventsCounterMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -118,15 +118,18 @@
jvmtiCapabilities caps;
JNIEnv* jni;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent03-eventsCounterMonitor", &eventsCounterMonitor))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -51,7 +51,8 @@
const char* agentName;
Options* options;
- if (!NSK_VERIFY((options = nsk_jvmti_aod_getMultiagentsOptions(jvmti)) != NULL)) {
+ options = nsk_jvmti_aod_getMultiagentsOptions(jvmti);
+ if (!NSK_VERIFY(options != NULL)) {
NSK_COMPLAIN0("Failed to get agents's options\n");
nsk_jvmti_aod_disableEvent(jvmti, JVMTI_EVENT_CLASS_LOAD);
// can't call nsk_aod_agentFinished because of without options can't get agent's name
@@ -100,15 +101,18 @@
Options* options;
const char* agentName;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return NSK_FALSE;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050Agent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050Agent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -58,15 +58,18 @@
Options* options = NULL;
const char* agentName;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
NSK_DISPLAY1("%s: initialization was done\n", agentName);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/sharedAgents/simpleAgent00.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/sharedAgents/simpleAgent00.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -54,15 +54,18 @@
Options* options = NULL;
const char* agentName;
- if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+ options = (Options*) nsk_aod_createOptions(optionsString);
+ if (!NSK_VERIFY(options != NULL))
return JNI_ERR;
agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
- if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+ jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+ if (jni == NULL)
return JNI_ERR;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
NSK_DISPLAY1("%s: initialization was done\n", agentName);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -126,7 +126,8 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks event_callbacks;
- if(!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) {
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL)) {
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -585,7 +585,8 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks event_callbacks;
- if(!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) {
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL)) {
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -268,7 +268,8 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks event_callbacks;
- if(!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) {
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL)) {
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -529,7 +529,8 @@
jvmtiEventCallbacks event_callbacks;
const char *type;
- if(!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) {
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL)) {
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -208,7 +208,8 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks event_callbacks;
- if(!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) {
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL)) {
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ThreadEnd/threadend002/threadend002.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ThreadEnd/threadend002/threadend002.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -144,7 +144,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!setCallBacks()) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -339,17 +339,20 @@
jmethodID cid;
jthread result = NULL;
- if (!NSK_JNI_VERIFY(jni, (thrClass = jni->FindClass("java/lang/Thread")) != NULL)) {
+ thrClass = jni->FindClass("java/lang/Thread");
+ if (!NSK_JNI_VERIFY(jni, thrClass != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
- if (!NSK_JNI_VERIFY(jni, (cid = jni->GetMethodID(thrClass, "<init>", "()V")) != NULL)) {
+ cid = jni->GetMethodID(thrClass, "<init>", "()V");
+ if (!NSK_JNI_VERIFY(jni, cid != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
- if (!NSK_JNI_VERIFY(jni, (result = jni->NewObject(thrClass, cid)) != NULL)) {
+ result = jni->NewObject(thrClass, cid);
+ if (!NSK_JNI_VERIFY(jni, result != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
@@ -366,7 +369,8 @@
setCounter(&iterationCount, 0);
setCounter(&objectCount, 0);
- if (!NSK_VERIFY((threadObj = newThreadObj(jni)) != NULL)) {
+ threadObj = newThreadObj(jni);
+ if (!NSK_VERIFY(threadObj != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -511,8 +515,8 @@
int modified = 0;
int found = 0;
- if (!NSK_JNI_VERIFY(jni, (root =
- jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL)) {
+ root = jni->GetStaticObjectField(debugeeClass, rootFieldID);
+ if (!NSK_JNI_VERIFY(jni, root != NULL)) {
NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n");
nsk_jvmti_setFailStatus();
return;
@@ -556,12 +560,13 @@
return;
}
- if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
+ debugeeClass = (jclass) jni->NewGlobalRef(debugeeClass);
+ if (!NSK_JNI_VERIFY(jni, debugeeClass != NULL))
return;
NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE);
- if (!NSK_JNI_VERIFY(jni, (rootFieldID =
- jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL)) {
+ rootFieldID = jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE);
+ if (!NSK_JNI_VERIFY(jni, rootFieldID != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -602,8 +607,8 @@
return JNI_ERR;
/* create JVMTI environment */
- if (!NSK_VERIFY((jvmti =
- nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("counterMonitor", &counterMonitor_ptr))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -52,14 +52,15 @@
jbyte* elements;
jboolean isCopy;
- if (!NSK_JNI_VERIFY(jni_env, (newClassSize = jni_env->GetArrayLength(byteCode)) > 0)) {
+ newClassSize = jni_env->GetArrayLength(byteCode);
+ if (!NSK_JNI_VERIFY(jni_env, newClassSize > 0)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
NSK_DISPLAY1("\t... got array size: %d\n", newClassSize);
- if (!NSK_JNI_VERIFY(jni_env, (elements =
- jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
+ elements = jni_env->GetByteArrayElements(byteCode, &isCopy);
+ if (!NSK_JNI_VERIFY(jni_env, elements != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -94,8 +95,8 @@
Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t001_setClass(JNIEnv *jni_env,
jobject o, jclass cls) {
- if (!NSK_JNI_VERIFY(jni_env, (oldClassDef.klass = (jclass)
- jni_env->NewGlobalRef(cls)) != NULL)) {
+ oldClassDef.klass = (jclass) jni_env->NewGlobalRef(cls);
+ if (!NSK_JNI_VERIFY(jni_env, oldClassDef.klass != NULL)) {
nsk_jvmti_setFailStatus();
}
}
@@ -242,7 +243,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
{
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -54,14 +54,15 @@
jbyte* elements;
jboolean isCopy;
- if (!NSK_JNI_VERIFY(jni_env, (newClassSize[ind] = jni_env->GetArrayLength(byteCode)) > 0)) {
+ newClassSize[ind] = jni_env->GetArrayLength(byteCode);
+ if (!NSK_JNI_VERIFY(jni_env, newClassSize[ind] > 0)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
NSK_DISPLAY1("\t... got array size: %d\n", newClassSize[ind]);
- if (!NSK_JNI_VERIFY(jni_env, (elements =
- jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
+ elements = jni_env->GetByteArrayElements(byteCode, &isCopy);
+ if (!NSK_JNI_VERIFY(jni_env, elements != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -96,8 +97,8 @@
Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setClass(JNIEnv *jni_env,
jobject o, jint ind, jclass cls) {
- if (!NSK_JNI_VERIFY(jni_env, (oldClassDef[ind].klass = (jclass)
- jni_env->NewGlobalRef(cls)) != NULL)) {
+ oldClassDef[ind].klass = (jclass) jni_env->NewGlobalRef(cls);
+ if (!NSK_JNI_VERIFY(jni_env, oldClassDef[ind].klass != NULL)) {
nsk_jvmti_setFailStatus();
}
}
@@ -255,7 +256,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
{
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -97,13 +97,14 @@
return;
NSK_DISPLAY1("Find class: %s\n", TESTED_CLASS_NAME);
- if (!NSK_JNI_VERIFY(jni, (classDef.klass = jni->FindClass(TESTED_CLASS_NAME)) != NULL)) {
+ classDef.klass = jni->FindClass(TESTED_CLASS_NAME);
+ if (!NSK_JNI_VERIFY(jni, classDef.klass != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
- if (!NSK_JNI_VERIFY(jni, (classDef.klass = (jclass)
- jni->NewGlobalRef(classDef.klass)) != NULL)) {
+ classDef.klass = (jclass) jni->NewGlobalRef(classDef.klass);
+ if (!NSK_JNI_VERIFY(jni, classDef.klass != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -150,7 +151,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
{
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -141,7 +141,8 @@
jvmtiPhase phase;
- if (!NSK_JNI_VERIFY(jni_env, (classObject = jni_env->GetObjectClass(thread)) != NULL)) {
+ classObject = jni_env->GetObjectClass(thread);
+ if (!NSK_JNI_VERIFY(jni_env, classObject != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -428,7 +429,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
classLoaderCount = nsk_jvmti_findOptionIntValue(CLASS_LOADER_COUNT_PARAM, 10);
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -65,20 +65,21 @@
jmethodID methodID;
jclass loadedClass;
- if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(loader)) != NULL)) {
+ klass = jni_env->GetObjectClass(loader);
+ if (!NSK_JNI_VERIFY(jni_env, klass != NULL)) {
nsk_jvmti_setFailStatus();
return NULL;
}
- if (!NSK_JNI_VERIFY(jni_env,
- (methodID = jni_env->GetMethodID(
- klass, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;")) != NULL)) {
+ methodID = jni_env->GetMethodID(
+ klass, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
+ if (!NSK_JNI_VERIFY(jni_env, methodID != NULL)) {
nsk_jvmti_setFailStatus();
return NULL;
}
- if (!NSK_JNI_VERIFY(jni_env, (loadedClass = (jclass)
- jni_env->CallObjectMethod(loader, methodID, className)) != NULL)) {
+ loadedClass = (jclass) jni_env->CallObjectMethod(loader, methodID, className);
+ if (!NSK_JNI_VERIFY(jni_env, loadedClass != NULL)) {
nsk_jvmti_setFailStatus();
return NULL;
}
@@ -96,8 +97,8 @@
jobject o, jclass klass) {
jfieldID fieldID;
- if (!NSK_JNI_VERIFY(jni_env, (fieldID =
- jni_env->GetStaticFieldID(klass, "toProvokePreparation", "I")) != NULL)) {
+ fieldID = jni_env->GetStaticFieldID(klass, "toProvokePreparation", "I");
+ if (!NSK_JNI_VERIFY(jni_env, fieldID != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -116,13 +117,14 @@
jclass klass;
jmethodID methodID;
- if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(thread)) != NULL)) {
+ klass = jni_env->GetObjectClass(thread);
+ if (!NSK_JNI_VERIFY(jni_env, klass != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
- if (!NSK_JNI_VERIFY(jni_env, (methodID =
- jni_env->GetMethodID(klass, "start", "()V")) != NULL)) {
+ methodID = jni_env->GetMethodID(klass, "start", "()V");
+ if (!NSK_JNI_VERIFY(jni_env, methodID != NULL)) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -228,7 +230,8 @@
jvmtiPhase phase;
- if (!NSK_JNI_VERIFY(jni_env, (classObject = jni_env->GetObjectClass(thread)) != NULL)) {
+ classObject = jni_env->GetObjectClass(thread);
+ if (!NSK_JNI_VERIFY(jni_env, classObject != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -521,7 +524,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
classLoaderCount = nsk_jvmti_findOptionIntValue(CLASS_LOADER_COUNT_PARAM, 10);
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -105,11 +105,12 @@
jfieldID fieldID;
jclass klass = NULL;
- if (!NSK_JNI_VERIFY(jni, (klass = jni->FindClass(className)) != NULL))
+ klass = jni->FindClass(className);
+ if (!NSK_JNI_VERIFY(jni, klass != NULL))
return NULL;
- if (!NSK_JNI_VERIFY(jni, (fieldID =
- jni->GetStaticFieldID(klass, objFieldName, signature)) != NULL))
+ fieldID = jni->GetStaticFieldID(klass, objFieldName, signature);
+ if (!NSK_JNI_VERIFY(jni, fieldID != NULL))
return NULL;
return jni->GetStaticObjectField(klass, fieldID);
@@ -119,42 +120,46 @@
static int prepare() {
- if (!NSK_VERIFY((mainThread = findThread(MAIN_THREAD_NAME))!= NULL)) {
+ mainThread = findThread(MAIN_THREAD_NAME);
+ if (!NSK_VERIFY(mainThread != NULL)) {
NSK_COMPLAIN1("<%s> thread not found\n", MAIN_THREAD_NAME);
return NSK_FALSE;
}
/* make thread accessable for a long time */
- if (!NSK_JNI_VERIFY(jni, (mainThread = jni->NewGlobalRef(mainThread)) != NULL))
+ mainThread = jni->NewGlobalRef(mainThread);
+ if (!NSK_JNI_VERIFY(jni, mainThread != NULL))
return NSK_FALSE;
- if (!NSK_VERIFY((startObject =
- getStaticObjField(DEBUGEE_CLASS_NAME, START_FIELD_NAME,
- OBJECT_FIELD_SIG)) != NULL))
+ startObject = getStaticObjField(DEBUGEE_CLASS_NAME, START_FIELD_NAME, OBJECT_FIELD_SIG);
+ if (!NSK_VERIFY(startObject != NULL))
return NSK_FALSE;
/*make object accessable for a long time*/
- if (!NSK_JNI_VERIFY(jni, (startObject = jni->NewGlobalRef(startObject)) != NULL))
+ startObject = jni->NewGlobalRef(startObject);
+ if (!NSK_JNI_VERIFY(jni, startObject != NULL))
return NSK_FALSE;
- if (!NSK_VERIFY((endObject =
- getStaticObjField(DEBUGEE_CLASS_NAME, END_FIELD_NAME,
- OBJECT_FIELD_SIG)) != NULL))
+ endObject = getStaticObjField(DEBUGEE_CLASS_NAME, END_FIELD_NAME, OBJECT_FIELD_SIG);
+ if (!NSK_VERIFY(endObject != NULL))
return NSK_FALSE;
/*make object accessable for a long time*/
- if (!NSK_JNI_VERIFY(jni, (endObject = jni->NewGlobalRef(endObject)) != NULL))
+ endObject = jni->NewGlobalRef(endObject);
+ if (!NSK_JNI_VERIFY(jni, endObject != NULL))
return NSK_FALSE;
- if (!NSK_VERIFY((debuggeeThread =
- (jthread)getStaticObjField(DEBUGEE_CLASS_NAME, THREAD_FIELD_NAME,
- THREAD_FIELD_SIG)) != NULL))
+ debuggeeThread = (jthread) getStaticObjField(DEBUGEE_CLASS_NAME,
+ THREAD_FIELD_NAME,
+ THREAD_FIELD_SIG);
+ if (!NSK_VERIFY(debuggeeThread != NULL))
return NSK_FALSE;
/* make thread accessable for a long time */
- if (!NSK_JNI_VERIFY(jni, (debuggeeThread = jni->NewGlobalRef(debuggeeThread)) != NULL))
+ debuggeeThread = jni->NewGlobalRef(debuggeeThread);
+ if (!NSK_JNI_VERIFY(jni, debuggeeThread != NULL))
return NSK_FALSE;
return NSK_TRUE;
@@ -751,7 +756,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -509,7 +509,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -548,7 +548,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -554,7 +554,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -534,7 +534,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/em02t006.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/em02t006.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -485,7 +485,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t007/em02t007.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t007/em02t007.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -521,7 +521,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t008/em02t008.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t008/em02t008.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -533,7 +533,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t009/em02t009.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t009/em02t009.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -540,7 +540,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t010/em02t010.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t010/em02t010.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -459,15 +459,16 @@
if (!nsk_jvmti_waitForSync(timeout))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (cls = agentJNI->FindClass(CLASS_NAME)) != NULL))
+ cls = agentJNI->FindClass(CLASS_NAME);
+ if (!NSK_JNI_VERIFY(agentJNI, cls != NULL))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (field_accID =
- agentJNI->GetStaticFieldID(cls, FIELD_ACC_NAME, "I")) != NULL))
+ field_accID = agentJNI->GetStaticFieldID(cls, FIELD_ACC_NAME, "I");
+ if (!NSK_JNI_VERIFY(agentJNI, field_accID != NULL))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (field_modID =
- agentJNI->GetStaticFieldID(cls, FIELD_MOD_NAME, "I")) != NULL))
+ field_modID = agentJNI->GetStaticFieldID(cls, FIELD_MOD_NAME, "I");
+ if (!NSK_JNI_VERIFY(agentJNI, field_modID != NULL))
return;
if (!NSK_JVMTI_VERIFY(jvmti->SetFieldModificationWatch(cls, field_modID)))
@@ -521,7 +522,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t011/em02t011.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t011/em02t011.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -444,11 +444,12 @@
if (!nsk_jvmti_waitForSync(timeout))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (cls = agentJNI->FindClass(CLASS_NAME)) != NULL))
+ cls = agentJNI->FindClass(CLASS_NAME);
+ if (!NSK_JNI_VERIFY(agentJNI, cls != NULL))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (methodID =
- agentJNI->GetStaticMethodID(cls, METHOD_NAME, "()I")) != NULL))
+ methodID = agentJNI->GetStaticMethodID(cls, METHOD_NAME, "()I");
+ if (!NSK_JNI_VERIFY(agentJNI, methodID != NULL))
return;
if (!NSK_JVMTI_VERIFY(jvmti->SetBreakpoint(methodID, 0)))
@@ -499,7 +500,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t012/em02t012.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t012/em02t012.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -52,7 +52,8 @@
jobject o, jthread thrd) {
/* make thread accessable for a long time */
- NSK_JNI_VERIFY(jni_env, (testedThread = jni_env->NewGlobalRef(thrd)) != NULL);
+ testedThread = jni_env->NewGlobalRef(thrd);
+ NSK_JNI_VERIFY(jni_env, testedThread != NULL);
}
static void
@@ -502,7 +503,8 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM04/em04t001/em04t001.cpp Thu Oct 25 08:59:26 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM04/em04t001/em04t001.cpp Thu Oct 25 14:23:26 2018 -0700
@@ -199,10 +199,12 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
- if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
+ jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved);
+ if (!NSK_VERIFY(jvmti != NULL))
return JNI_ERR;
- if (!NSK_VERIFY((plist = (const void *)nsk_list_create()) != NULL))
+ plist = (const void *)nsk_list_create();
+ if (!NSK_VERIFY(plist != NULL))
return JNI_ERR;
NSK_DISPLAY1("plist = 0x%p\n", plist);