< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix001/SetNativeMethodPrefix001.cpp
Print this page
rev 52100 : 8212082: Remove the NSK_CPP_STUB macros for remaining vmTestbase/jvmti/[sS]*
Summary:
Reviewed-by:
@@ -121,31 +121,15 @@
{
jboolean result = JNI_TRUE;
char *str = NULL;
if (prefix != NULL) {
- if (!NSK_VERIFY(
- (str = (char *) NSK_CPP_STUB3(
- GetStringUTFChars
- , jni
- , prefix
- , 0
- )
- ) != NULL
- )
- )
+ if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL))
{ result = JNI_FALSE; goto finally; }
}
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(
- SetNativeMethodPrefix
- , jvmti
- , str
- )
- )
- )
+ if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefix(str)))
{ result = JNI_FALSE; goto finally; }
if (str != NULL) {
NSK_DISPLAY1("New PREFIX is set: %s\n"
, str
@@ -173,49 +157,24 @@
{
jboolean result = JNI_TRUE;
char *str = NULL;
if (prefix != NULL) {
- if (!NSK_VERIFY(
- (str = (char *) NSK_CPP_STUB3(
- GetStringUTFChars
- , jni
- , prefix
- , 0
- )
- ) != NULL
- )
- )
+ if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL))
{ result = JNI_FALSE; goto finally; }
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(
- SetNativeMethodPrefixes
- , jvmti
- , 1
- , (char **) &str
- )
- )
- )
+ if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefixes(1, (char **) &str)))
{ result = JNI_FALSE; goto finally; }
NSK_DISPLAY1("MultiplePrefixes: New PREFIX is set: %s\n"
, str
);
} else {
char* prefixes[1];
prefixes[0] = NULL;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(
- SetNativeMethodPrefixes
- , jvmti
- , 0
- , (char **)&prefixes
- )
- )
- )
+ if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefixes(0, (char **)&prefixes)))
{ result = JNI_FALSE; goto finally; }
NSK_DISPLAY0("Old PREFIX is reset\n");
}
@@ -248,37 +207,15 @@
, METHODS_COUNT
);
return JNI_FALSE;
}
- if (!NSK_VERIFY(
- (method.name =
- (char *) NSK_CPP_STUB3(
- GetStringUTFChars
- , jni
- , method_name_obj
- , 0
- )
- ) != NULL
- )
- )
- {
+ if (!NSK_VERIFY((method.name = (char *) jni->GetStringUTFChars(method_name_obj, 0)) != NULL)) {
goto finally;
}
- if (!NSK_VERIFY(
- (method.signature =
- (char *) NSK_CPP_STUB3(
- GetStringUTFChars
- , jni
- , method_sig_obj
- , 0
- )
- ) != NULL
- )
- )
- {
+ if (!NSK_VERIFY((method.signature = (char *) jni->GetStringUTFChars(method_sig_obj, 0)) != NULL)) {
goto finally;
}
method.fnPtr = (void *) METHODS[native_method_number];
@@ -339,29 +276,17 @@
(jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL
)
)
return JNI_ERR;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(
- GetCapabilities
- , jvmti
- , &caps)
- )
- )
+ if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
return JNI_ERR;
// Register all necessary JVM capabilities
caps.can_set_native_method_prefix = 1;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(
- AddCapabilities
- , jvmti
- , &caps)
- )
- )
+ if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
return JNI_ERR;
return JNI_OK;
}
< prev index next >