test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.cpp
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.cpp Thu Oct 18 07:56:55 2018 +0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.cpp Wed Oct 17 21:28:11 2018 -0700
@@ -52,8 +52,7 @@
#endif
jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
nsk_printf(" Agent:: VM Started.\n");
- if ( ! NSK_VERIFY ( JNI_OK == NSK_CPP_STUB3(GetEnv, vm,
- (void **)&jvmti, JVMTI_VERSION_1_1) ) ) {
+ if ( ! NSK_VERIFY ( JNI_OK == vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1) ) ) {
nsk_printf(" Agent ::Agent failed to get jvmti env.\n");
return JNI_ERR;
} else {
@@ -64,7 +63,7 @@
}
memset(&caps, 0, sizeof(caps));
caps.can_redefine_classes = 1;
- if ( ! NSK_JVMTI_VERIFY ( NSK_CPP_STUB2(AddCapabilities, jvmti, &caps) ) ) {
+ if ( ! NSK_JVMTI_VERIFY ( jvmti->AddCapabilities(&caps) ) ) {
nsk_printf(" Agent:: Error occured while adding capabilities.\n");
return JNI_ERR;
}
@@ -85,7 +84,7 @@
redefineNumber=0;
ret = JNI_FALSE;
- if (!NSK_JNI_VERIFY(jni, (cls = NSK_CPP_STUB2(FindClass, jni, SEARCH_NAME)) != NULL)) {
+ if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(SEARCH_NAME)) != NULL)) {
nsk_printf("Agent:: (*JNI)->FindClass(jni, %s) returns `null`.\n", SEARCH_NAME);
return NSK_FALSE;
}