< 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,151 **** { jboolean result = JNI_TRUE; char *str = NULL; if (prefix != NULL) { ! if (!NSK_VERIFY( ! (str = (char *) NSK_CPP_STUB3( ! GetStringUTFChars ! , jni ! , prefix ! , 0 ! ) ! ) != NULL ! ) ! ) { result = JNI_FALSE; goto finally; } } ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB2( ! SetNativeMethodPrefix ! , jvmti ! , str ! ) ! ) ! ) { result = JNI_FALSE; goto finally; } if (str != NULL) { NSK_DISPLAY1("New PREFIX is set: %s\n" , str --- 121,135 ---- { jboolean result = JNI_TRUE; char *str = NULL; if (prefix != NULL) { ! if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL)) { result = JNI_FALSE; goto finally; } } ! 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,221 **** { jboolean result = JNI_TRUE; char *str = NULL; if (prefix != NULL) { ! if (!NSK_VERIFY( ! (str = (char *) NSK_CPP_STUB3( ! GetStringUTFChars ! , jni ! , prefix ! , 0 ! ) ! ) != NULL ! ) ! ) { result = JNI_FALSE; goto finally; } ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3( ! SetNativeMethodPrefixes ! , jvmti ! , 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 ! ) ! ) ! ) { result = JNI_FALSE; goto finally; } NSK_DISPLAY0("Old PREFIX is reset\n"); } --- 157,180 ---- { jboolean result = JNI_TRUE; char *str = NULL; if (prefix != NULL) { ! if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL)) { result = JNI_FALSE; goto finally; } ! 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(jvmti->SetNativeMethodPrefixes(0, (char **)&prefixes))) { result = JNI_FALSE; goto finally; } NSK_DISPLAY0("Old PREFIX is reset\n"); }
*** 248,284 **** , METHODS_COUNT ); return JNI_FALSE; } ! if (!NSK_VERIFY( ! (method.name = ! (char *) NSK_CPP_STUB3( ! GetStringUTFChars ! , jni ! , method_name_obj ! , 0 ! ) ! ) != NULL ! ) ! ) ! { goto finally; } ! if (!NSK_VERIFY( ! (method.signature = ! (char *) NSK_CPP_STUB3( ! GetStringUTFChars ! , jni ! , method_sig_obj ! , 0 ! ) ! ) != NULL ! ) ! ) ! { goto finally; } method.fnPtr = (void *) METHODS[native_method_number]; --- 207,221 ---- , METHODS_COUNT ); return JNI_FALSE; } ! if (!NSK_VERIFY((method.name = (char *) jni->GetStringUTFChars(method_name_obj, 0)) != NULL)) { goto finally; } ! if (!NSK_VERIFY((method.signature = (char *) jni->GetStringUTFChars(method_sig_obj, 0)) != NULL)) { goto finally; } method.fnPtr = (void *) METHODS[native_method_number];
*** 339,367 **** (jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL ) ) return JNI_ERR; ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB2( ! GetCapabilities ! , jvmti ! , &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) ! ) ! ) return JNI_ERR; return JNI_OK; } --- 276,292 ---- (jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL ) ) return JNI_ERR; ! 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(jvmti->AddCapabilities(&caps))) return JNI_ERR; return JNI_OK; }
< prev index next >