diff -r 74dde8b66b7f -r 543a3fb81c4c test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldModificationWatch/clrfmodw001/clrfmodw001.cpp --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldModificationWatch/clrfmodw001/clrfmodw001.cpp Tue Sep 11 09:42:27 2018 -0400 +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldModificationWatch/clrfmodw001/clrfmodw001.cpp Tue Sep 11 10:12:50 2018 -0700 @@ -27,21 +27,8 @@ #include "agent_common.h" #include "JVMTITools.h" -#ifdef __cplusplus extern "C" { -#endif - -#ifndef JNI_ENV_ARG -#ifdef __cplusplus -#define JNI_ENV_ARG(x, y) y -#define JNI_ENV_PTR(x) x -#else -#define JNI_ENV_ARG(x,y) x, y -#define JNI_ENV_PTR(x) (*x) -#endif - -#endif #define PASSED 0 #define STATUS_FAILED 2 @@ -74,14 +61,12 @@ field fld = fields[ind]; const char *msg; - cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, fld.klass)); + cls = env->FindClass(fld.klass); if (fld.fid == NULL) { if (fld.stat) { - fields[ind].fid = JNI_ENV_PTR(env)-> - GetStaticFieldID(JNI_ENV_ARG(env, cls), fld.name, fld.sig); + fields[ind].fid = env->GetStaticFieldID(cls, fld.name, fld.sig); } else { - fields[ind].fid = JNI_ENV_PTR(env)-> - GetFieldID(JNI_ENV_ARG(env, cls), fld.name, fld.sig); + fields[ind].fid = env->GetFieldID(cls, fld.name, fld.sig); } } @@ -123,8 +108,7 @@ jint res; jvmtiError err; - res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti), - JVMTI_VERSION_1_1); + res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_1); if (res != JNI_OK || jvmti == NULL) { printf("Wrong result of a valid call to GetEnv !\n"); return JNI_ERR; @@ -185,7 +169,7 @@ } JNIEXPORT void JNICALL Java_nsk_jvmti_ClearFieldModificationWatch_clrfmodw001_touchfld0(JNIEnv *env, jobject obj) { - JNI_ENV_PTR(env)->SetIntField(JNI_ENV_ARG(env, obj), fields[0].fid, 2000); + env->SetIntField(obj, fields[0].fid, 2000); } JNIEXPORT void JNICALL @@ -208,6 +192,4 @@ return result; } -#ifdef __cplusplus } -#endif