8210726: Fix up a few minor nits forgotten by JDK-8210665
Minor changes to 4 tests to make one-liners Reviewed-by: cjplummer, iignatyev, sspitsyn
This commit is contained in:
parent
f4e1502e03
commit
fddc4b8ccb
@ -154,11 +154,9 @@ Java_nsk_jvmti_SetFieldAccessWatch_setfldw005_getReady(JNIEnv *env, jclass cls)
|
||||
|
||||
for (i = 0; i < sizeof(fields) / sizeof(field); i++) {
|
||||
if (fields[i].stat == JNI_TRUE) {
|
||||
fields[i].fid = env-> GetStaticFieldID(
|
||||
cls, fields[i].name, fields[i].sig);
|
||||
fields[i].fid = env->GetStaticFieldID(cls, fields[i].name, fields[i].sig);
|
||||
} else {
|
||||
fields[i].fid = env->GetFieldID(
|
||||
cls, fields[i].name, fields[i].sig);
|
||||
fields[i].fid = env->GetFieldID(cls, fields[i].name, fields[i].sig);
|
||||
}
|
||||
if (fields[i].fid == NULL) {
|
||||
printf("Unable to set access watch on %s fld%" PRIuPTR ", fieldID=0",
|
||||
|
@ -176,11 +176,9 @@ Java_nsk_jvmti_SetFieldAccessWatch_setfldw006_getReady(JNIEnv *env,
|
||||
}
|
||||
for (i = 0; i < sizeof(watches)/sizeof(watch_info); i++) {
|
||||
if (watches[i].is_static == JNI_TRUE) {
|
||||
watches[i].fid = env->GetStaticFieldID(
|
||||
cls, watches[i].f_name, watches[i].f_sig);
|
||||
watches[i].fid = env->GetStaticFieldID(cls, watches[i].f_name, watches[i].f_sig);
|
||||
} else {
|
||||
watches[i].fid = env->GetFieldID(
|
||||
cls, watches[i].f_name, watches[i].f_sig);
|
||||
watches[i].fid = env->GetFieldID(cls, watches[i].f_name, watches[i].f_sig);
|
||||
}
|
||||
err = jvmti->SetFieldAccessWatch(cls, watches[i].fid);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
|
@ -170,11 +170,9 @@ Java_nsk_jvmti_SetFieldModificationWatch_setfmodw006_getReady(JNIEnv *env,
|
||||
}
|
||||
for (i = 0; i < sizeof(watches)/sizeof(watch_info); i++) {
|
||||
if (watches[i].is_static == JNI_TRUE) {
|
||||
watches[i].fid = env->GetStaticFieldID(
|
||||
cls, watches[i].f_name, watches[i].f_sig);
|
||||
watches[i].fid = env->GetStaticFieldID(cls, watches[i].f_name, watches[i].f_sig);
|
||||
} else {
|
||||
watches[i].fid = env->GetFieldID(
|
||||
cls, watches[i].f_name, watches[i].f_sig);
|
||||
watches[i].fid = env->GetFieldID(cls, watches[i].f_name, watches[i].f_sig);
|
||||
}
|
||||
err = jvmti->SetFieldModificationWatch(cls, watches[i].fid);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
|
@ -108,8 +108,7 @@ Java_nsk_jvmti_SetLocalVariable_setlocal002_check(JNIEnv *env, jclass cls, jthre
|
||||
return result;
|
||||
}
|
||||
|
||||
mid = env->GetStaticMethodID(
|
||||
cls, "run", "([Ljava/lang/String;Ljava/io/PrintStream;)I");
|
||||
mid = env->GetStaticMethodID(cls, "run", "([Ljava/lang/String;Ljava/io/PrintStream;)I");
|
||||
if (mid == NULL) {
|
||||
printf("Cannot find method \"run\"\n");
|
||||
return STATUS_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user