< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp
Print this page
rev 52285 : 8212884: Remove the assignments in ifs for vmTestbase/[a-s]
Summary: Extract assignments from if statements in vmTestbase
Reviewed-by: cjplummer, sspitsyn
@@ -108,19 +108,22 @@
jvmtiEventCallbacks eventCallbacks;
jvmtiCapabilities caps;
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));
caps.can_generate_monitor_events = 1;
if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
< prev index next >