--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe009/popframe009.cpp Wed Sep 12 14:19:36 2018 -0300
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe009/popframe009.cpp Wed Sep 12 10:27:03 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
@@ -182,8 +169,7 @@
printdump = JNI_TRUE;
}
- 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;
@@ -251,8 +237,7 @@
return;
}
- midCheckPoint = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, cls),
- "checkPoint", "()V");
+ midCheckPoint = env->GetStaticMethodID(cls, "checkPoint", "()V");
if (midCheckPoint == NULL) {
printf("Cannot find Method ID for method checkPoint\n");
result = STATUS_FAILED;
@@ -426,21 +411,19 @@
result = STATUS_FAILED;
}
- midFibonacci = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, cls),
- "fibonacci", "(I)I");
+ midFibonacci = env->GetStaticMethodID(cls, "fibonacci", "(I)I");
if (midFibonacci == NULL) {
printf("Cannot get method ID for method \"fibonacci\"\n");
result = STATUS_FAILED;
}
- clazz = JNI_ENV_PTR(env)->GetObjectClass(JNI_ENV_ARG(env, thr));
+ clazz = env->GetObjectClass(thr);
if (clazz == NULL) {
printf("Cannot get class of thread object\n");
return STATUS_FAILED;
}
- midRun = JNI_ENV_PTR(env)->GetMethodID(JNI_ENV_ARG(env, clazz),
- "run", "()V");
+ midRun = env->GetMethodID(clazz, "run", "()V");
if (midRun == NULL) {
printf("Cannot get method ID for \"run\"\n");
return STATUS_FAILED;
@@ -608,6 +591,4 @@
return result;
}
-#ifdef __cplusplus
}
-#endif