test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp
changeset 52184 672bc2213cef
parent 51774 79dc492c00ab
child 52284 1f402d1f630f
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp	Thu Oct 18 07:56:55 2018 +0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp	Wed Oct 17 21:28:11 2018 -0700
@@ -37,8 +37,7 @@
     char * className;
     char * generic;
     int redefineNumber=0;
-    if (! NSK_JVMTI_VERIFY( NSK_CPP_STUB4(GetClassSignature,
-                    jvmti_env, klass, &className, &generic)) ) {
+    if (! NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic)) ) {
         nsk_printf(" Agent :: Error occured in getting class signature.\n");
         return;
     } else {
@@ -71,8 +70,7 @@
 jint  Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
     jvmtiEnv * jvmti;
     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:: Could not load JVMTI interface \n");
         return JNI_ERR;
     } else {
@@ -85,15 +83,13 @@
         memset(&caps, 0, sizeof(caps));
         caps.can_redefine_classes = 1;
         caps.can_generate_all_class_hook_events=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;
         }
         memset(&eventCallbacks, 0, sizeof(eventCallbacks));
         eventCallbacks.ClassPrepare = &callbackClassPrepare;
-        if ( ! NSK_JVMTI_VERIFY( NSK_CPP_STUB3(SetEventCallbacks,
-                        jvmti, &eventCallbacks, sizeof(eventCallbacks)) ) ) {
+        if ( ! NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)) ) ) {
             nsk_printf(" Agent:: Error occured while setting event call back \n");
             return JNI_ERR;
         }