8210726: Fix up a few minor nits forgotten by JDK-8210665
Summary: Minor changes to 4 tests to make one-liners
Reviewed-by: cjplummer, iignatyev, sspitsyn
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw005/setfldw005.cpp Mon Sep 17 08:37:47 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw005/setfldw005.cpp Mon Sep 17 09:07:40 2018 -0700
@@ -154,11 +154,9 @@
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",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw006/setfldw006.cpp Mon Sep 17 08:37:47 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw006/setfldw006.cpp Mon Sep 17 09:07:40 2018 -0700
@@ -176,11 +176,9 @@
}
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) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw006/setfmodw006.cpp Mon Sep 17 08:37:47 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw006/setfmodw006.cpp Mon Sep 17 09:07:40 2018 -0700
@@ -170,11 +170,9 @@
}
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) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetLocalVariable/setlocal002/setlocal002.cpp Mon Sep 17 08:37:47 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetLocalVariable/setlocal002/setlocal002.cpp Mon Sep 17 09:07:40 2018 -0700
@@ -108,8 +108,7 @@
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;