8215160: Normalize spaces for remaining vmTestbase tests
authorjcbeyler
Tue, 11 Dec 2018 12:45:38 -0800
changeset 52952 837f1b8442be
parent 52951 722eaae2a785
child 52953 b75a44aad06c
8215160: Normalize spaces for remaining vmTestbase tests Summary: Add spaces where needed Reviewed-by: sspitsyn, amenkov
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI01/ji01t001/ji01t001.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t003/ji03t003.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t004/ji03t004.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLineNumberTable/linetab004/linetab004.cpp
test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendMonitorInfo/JvmtiTest/JvmtiTest.cpp
test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp
test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp
test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp
test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/hotswap/HotSwap.cpp
test/hotspot/jtreg/vmTestbase/nsk/share/native/native_thread.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress002.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp
test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress006.cpp
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -68,7 +68,7 @@
     jvmtiEnv * jvmti;
     nsk_printf("Agent:: VM.. Started..\n");
     rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
-    if (rc!= JNI_OK) {
+    if (rc != JNI_OK) {
         nsk_printf("Agent:: Could not load JVMTI interface \n");
         return JNI_ERR;
     } else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -67,7 +67,7 @@
     jvmtiEnv * jvmti;
     nsk_printf("Agent:: VM.. Started..\n");
     rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
-    if (rc!= JNI_OK) {
+    if (rc != JNI_OK) {
         nsk_printf("Agent:: Could not load JVMTI interface \n");
         return JNI_ERR;
     } else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -68,7 +68,7 @@
     jvmtiEnv * jvmti;
     nsk_printf("Agent:: VM.. Started..\n");
     rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
-    if (rc!= JNI_OK) {
+    if (rc != JNI_OK) {
         nsk_printf("Agent:: Could not load JVMTI interface \n");
         return JNI_ERR;
     } else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -46,7 +46,7 @@
         nsk_jvmti_disableNotification(jvmti_env, JVMTI_EVENT_CLASS_PREPARE, NULL);
         nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
                         sizeof(fileName)/sizeof(char));
-        if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName)  == NSK_TRUE) {
+        if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName) == NSK_TRUE) {
             nsk_printf("Redefine successful ..\n");
         } else {
             nsk_printf("# error :: Redefine failed..\n");
@@ -70,7 +70,7 @@
     jint rc ;
     nsk_printf("Agent:: VM.. Started..\n");
     rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
-    if (rc!= JNI_OK) {
+    if (rc != JNI_OK) {
         nsk_printf("Agent:: Could not load JVMTI interface \n");
         return JNI_ERR;
     } else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI01/ji01t001/ji01t001.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI01/ji01t001/ji01t001.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -205,8 +205,8 @@
     if ((exFndCalls > 0 && fnd_calls >= exFndCalls) || (fnd_calls == exFndCalls)) {
             NSK_DISPLAY5("CHECK PASSED: %s: the %s JNI function FindClass() has been %s during %s phase\n\t%d intercepted call(s) as expected\n"
                         , callBackFunc
-                        , (step==1) ? "tested" : "original"
-                        , (step==1) ? "redirected" : "restored"
+                        , (step == 1) ? "tested" : "original"
+                        , (step == 1) ? "redirected" : "restored"
                         , msg
                         , fnd_calls
                         );
@@ -222,8 +222,8 @@
 
         NSK_COMPLAIN6("TEST FAILED: %s: the %s JNI function FindClass() has not been %s during %s phase\n\t%d intercepted call(s) instead of %d as expected\n"
                      , callBackFunc
-                     , (step==1) ? "tested" : "original"
-                     , (step==1) ? "redirected" : "restored"
+                     , (step == 1) ? "tested" : "original"
+                     , (step == 1) ? "redirected" : "restored"
                      , msg
                      , fnd_calls
                      , exFndCalls
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -236,17 +236,17 @@
         if (meth_info[i].jni_calls == exJniCalls) {
             if (verbose)
                 printf("\nCHECK PASSED: the %s JNI function for calling method \"%s %s\" has been %s\n\t%d intercepted call(s) as expected\n",
-                    (step==1)?"tested":"original",
+                    (step == 1) ? "tested" : "original",
                     meth_info[i].m_name, meth_info[i].m_sign,
-                    (step==1)?"redirected":"restored",
+                    (step == 1) ? "redirected" : "restored",
                     meth_info[i].jni_calls);
         }
         else {
             result = STATUS_FAILED;
             printf("\nTEST FAILED: the %s JNI function for calling method \"%s %s\" has not been %s\n\t%d intercepted call(s) instead of %d as expected\n",
-                (step==1)?"tested":"original",
+                (step == 1) ? "tested" : "original",
                 meth_info[i].m_name, meth_info[i].m_sign,
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "redirected" : "restored",
                 meth_info[i].jni_calls, exJniCalls);
         }
         meth_info[i].jni_calls = 0; /* zeroing interception counter */
@@ -255,13 +255,13 @@
             if (verbose)
                 printf("CHECK PASSED: the java method \"%s %s\" has been really invoked by the %s JNI function\n",
                     meth_info[i].m_name, meth_info[i].m_sign,
-                    (step==1)?"redirected":"restored");
+                    (step == 1) ? "redirected" : "restored");
         }
         else {
             result = STATUS_FAILED;
             printf("TEST FAILED: the tested java method \"%s %s\" has not been really invoked by the %s JNI function\n",
                 meth_info[i].m_name, meth_info[i].m_sign,
-                (step==1)?"redirected":"restored");
+                (step == 1) ? "redirected" : "restored");
         }
     }
 }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t003/ji03t003.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t003/ji03t003.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -202,15 +202,15 @@
     if (throw_calls == exThrCalls) {
         if (verbose)
             printf("\nCHECK PASSED: the %s JNI function Throw() has been %s:\n\t%d intercepted call(s) as expected\n",
-                (step==1)?"tested":"original",
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "tested" : "original",
+                (step == 1) ? "redirected" : "restored",
                 throw_calls);
     }
     else {
         result = STATUS_FAILED;
         printf("\nTEST FAILED: the %s JNI function Throw() has not been %s:\n\t%d intercepted call(s) instead of %d as expected\n",
-            (step==1)?"tested":"original",
-            (step==1)?"redirected":"restored",
+            (step == 1) ? "tested" : "original",
+            (step == 1) ? "redirected" : "restored",
             throw_calls, exThrCalls);
     }
     throw_calls = 0; /* zeroing an interception counter */
@@ -218,15 +218,15 @@
     if (thrownew_calls == exThrNewCalls) {
         if (verbose)
             printf("\nCHECK PASSED: the %s JNI function ThrowNew() has been %s:\n\t%d intercepted call(s) as expected\n",
-                (step==1)?"tested":"original",
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "tested" : "original",
+                (step == 1) ? "redirected" : "restored",
                 thrownew_calls);
     }
     else {
         result = STATUS_FAILED;
         printf("\nTEST FAILED: the %s JNI function ThrowNew() has not been %s:\n\t%d intercepted call(s) instead of %d as expected\n",
-            (step==1)?"tested":"original",
-            (step==1)?"redirected":"restored",
+            (step == 1) ? "tested" : "original",
+            (step == 1) ? "redirected" : "restored",
             thrownew_calls, exThrNewCalls);
     }
     thrownew_calls = 0; /* zeroing an interception counter */
@@ -234,15 +234,15 @@
     if (excoccur_calls == exExcOccCalls) {
         if (verbose)
             printf("\nCHECK PASSED: the %s JNI function ExceptionOccurred() has been %s:\n\t%d intercepted call(s) as expected\n",
-                (step==1)?"tested":"original",
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "tested" : "original",
+                (step == 1) ? "redirected" : "restored",
                 excoccur_calls);
     }
     else {
         result = STATUS_FAILED;
         printf("\nTEST FAILED: the %s JNI function ExceptionOccurred() has not been %s:\n\t%d intercepted call(s) instead of %d as expected\n",
-            (step==1)?"tested":"original",
-            (step==1)?"redirected":"restored",
+            (step == 1) ? "tested" : "original",
+            (step == 1) ? "redirected" : "restored",
             excoccur_calls, exExcOccCalls);
     }
     excoccur_calls = 0; /* zeroing an interception counter */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t004/ji03t004.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t004/ji03t004.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -173,15 +173,15 @@
     if (allobj_calls == exAllObjCalls) {
         if (verbose)
             printf("\nCHECK PASSED: the %s JNI function AllocObject() has been %s:\n\t%d intercepted call(s) as expected\n",
-                (step==1)?"tested":"original",
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "tested" : "original",
+                (step == 1) ? "redirected" : "restored",
                 allobj_calls);
     }
     else {
         result = STATUS_FAILED;
         printf("\nTEST FAILED: the %s JNI function AllocObject() has not been %s:\t%d intercepted call(s) instead of %d as expected\n\n",
-            (step==1)?"tested":"original",
-            (step==1)?"redirected":"restored",
+            (step == 1) ? "tested" : "original",
+            (step == 1) ? "redirected" : "restored",
             allobj_calls, exAllObjCalls);
     }
     allobj_calls = 0; /* zeroing an interception counter */
@@ -189,15 +189,15 @@
     if (newobj_calls == exNewObjCalls) {
         if (verbose)
             printf("\nCHECK PASSED: the %s JNI function NewObjectV() has been %s:\n\t%d intercepted call(s) as expected\n",
-                (step==1)?"tested":"original",
-                (step==1)?"redirected":"restored",
+                (step == 1) ? "tested" : "original",
+                (step == 1) ? "redirected" : "restored",
                 newobj_calls);
     }
     else {
         result = STATUS_FAILED;
         printf("\nTEST FAILED: the %s JNI function NewObjectV() has not been %s:\n\t%d intercepted call(s) instead of %d as expected\n",
-            (step==1)?"tested":"original",
-            (step==1)?"redirected":"restored",
+            (step == 1) ? "tested" : "original",
+            (step == 1) ? "redirected" : "restored",
             newobj_calls, exNewObjCalls);
     }
     newobj_calls = 0; /* zeroing an interception counter */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -98,19 +98,19 @@
     jvmtiError err;
 
     NSK_DISPLAY1("\n%s JVMTI env: doRedirect: obtaining the JNI function table ...\n",
-        (indx==0)?"first":"second");
+        (indx == 0) ? "first" : "second");
     err = jvmti->GetJNIFunctionTable(&orig_jni_functions[indx]);
     if (err != JVMTI_ERROR_NONE) {
         result = STATUS_FAILED;
         NSK_COMPLAIN2("TEST FAILED: %s JVMTI env: failed to get original JNI function table: %s\n",
-            (indx==0)?"first":"second", TranslateError(err));
+            (indx == 0) ? "first" : "second", TranslateError(err));
         env->FatalError("failed to get original JNI function table");
     }
     err = jvmti->GetJNIFunctionTable(&redir_jni_functions[indx]);
     if (err != JVMTI_ERROR_NONE) {
         result = STATUS_FAILED;
         NSK_COMPLAIN2("TEST FAILED: %s JVMTI env: failed to get redirected JNI function table: %s\n",
-            (indx==0)?"first":"second", TranslateError(err));
+            (indx == 0) ? "first" : "second", TranslateError(err));
         env->FatalError("failed to get redirected JNI function table");
     }
 
@@ -119,18 +119,18 @@
         "\toverwriting the function GetVersion() ...\n",
         (indx == 0) ? "first" : "second");
     redir_jni_functions[indx]->GetVersion =
-        (indx==0)?MyGetVersionA:MyGetVersionB;
+        (indx == 0) ? MyGetVersionA : MyGetVersionB;
 
     err = jvmti->SetJNIFunctionTable(redir_jni_functions[indx]);
     if (err != JVMTI_ERROR_NONE) {
         result = STATUS_FAILED;
         NSK_COMPLAIN2("TEST FAILED: %s JVMTI env: failed to set new JNI function table: %s\n",
-            (indx==0)?"first":"second", TranslateError(err));
+            (indx == 0) ? "first" : "second", TranslateError(err));
         env->FatalError("failed to set new JNI function table");
     }
 
     NSK_DISPLAY1("%s JVMTI env: doRedirect: the functions are overwritten successfully\n",
-        (indx==0)?"first":"second");
+        (indx == 0) ? "first" : "second");
 }
 
 static void provokeIntercept(JNIEnv *env, const char *name) {
@@ -146,22 +146,22 @@
         NSK_DISPLAY5(
             "\nCHECK PASSED: GetVersion() interception set in the %s JVMTI env %s properly:\n"
             "\t%d interception(s) with the%s%s JVMTI env as expected\n",
-            (indx==0)?"first":"second",
-            (exCalls==0)?"overwritten by another environment":"works",
+            (indx == 0) ? "first" : "second",
+            (exCalls == 0) ? "overwritten by another environment" : "works",
             redir_calls[indx],
-            (indx==env_num)?" same ":" ",
-            (env_num==0)?"first":"second");
+            (indx == env_num) ? " same " : " ",
+            (env_num == 0) ? "first" : "second");
     }
     else {
         result = STATUS_FAILED;
         NSK_COMPLAIN6(
             "\nTEST FAILED: GetVersion() interception set in the %s JVMTI env doesn't %s properly:\n"
             "\t%d interception(s) with the%s%s JVMTI env instead of %d as expected\n",
-            (indx==0)?"first":"second",
-            (exCalls==0)?"overwritten by another environment":"work",
+            (indx == 0) ? "first" : "second",
+            (exCalls == 0) ? "overwritten by another environment" : "work",
             redir_calls[indx],
-            (indx==env_num)?" same ":" ",
-            (env_num==0)?"first":"second",
+            (indx == env_num) ? " same " : " ",
+            (env_num == 0) ? "first" : "second",
             exCalls);
         return STATUS_FAILED;
     }
@@ -177,17 +177,17 @@
 
     thrstarted[indx] = redir[indx] = redir_calls[indx] = 0;
 
-    NSK_DISPLAY1("\nagent %s initializer: obtaining the JVMTI env ...\n", (indx==0)?"A":"B");
+    NSK_DISPLAY1("\nagent %s initializer: obtaining the JVMTI env ...\n", (indx == 0) ? "A" : "B");
     res = vm->GetEnv((void **) &jvmti[indx], JVMTI_VERSION_1_1);
     if (res != JNI_OK || jvmti[indx] == NULL) {
         NSK_COMPLAIN1("TEST FAILURE: failed to call GetEnv for the agent %s\n",
-            (indx==0)?"A":"B");
+            (indx == 0) ? "A" : "B");
         result = STATUS_FAILED;
         return STATUS_FAILED;
     }
 
     NSK_DISPLAY1("\nagent %s initializer: the JVMTI env obtained\n\tsetting event callbacks ...\n",
-        (indx==0)?"A":"B");
+        (indx == 0) ? "A" : "B");
     (void) memset(&callbacks, 0, sizeof(callbacks));
     switch (indx) {
     case 0:
@@ -206,16 +206,16 @@
     }
 
     NSK_DISPLAY1("\nagent %s initializer: setting event callbacks done\n\tenabling events ...\n",
-        (indx==0)?"A":"B");
+        (indx == 0) ? "A" : "B");
     err = jvmti[indx]->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL);
     if (err != JVMTI_ERROR_NONE) { /* enable event globally */
         NSK_COMPLAIN2("TEST FAILURE: failed to enable JVMTI_EVENT_VM_INIT event for the agent %s: %s\n",
-            (indx==0)?"A":"B", TranslateError(err));
+            (indx == 0) ? "A" : "B", TranslateError(err));
         result = STATUS_FAILED;
         return STATUS_FAILED;
     }
     NSK_DISPLAY2("\nagent %s initializer: enabling events done, returning exit code %d\n",
-        (indx==0)?"A":"B", exitCode);
+        (indx == 0) ? "A" : "B", exitCode);
 
     return exitCode;
 }
@@ -224,29 +224,29 @@
     int tries = 0;
 
     NSK_DISPLAY1("\nstartAgent: starting agent %s thread ...\n",
-        (indx==0)?"A":"B");
-    void* context = (void*) ((indx==0)?"agent A":"agent B");
-    agentThr[indx] = THREAD_new((indx==0)?agentA:agentB, context);
+        (indx == 0) ? "A" : "B");
+    void* context = (void*) ((indx == 0) ? "agent A" : "agent B");
+    agentThr[indx] = THREAD_new((indx == 0) ? agentA : agentB, context);
     if (THREAD_start(agentThr[indx]) == NULL) {
         NSK_COMPLAIN1("TEST FAILURE: cannot start the agent %s thread\n",
-            (indx==0)?"A":"B");
+            (indx == 0) ? "A" : "B");
         exit(STATUS_FAILED);
     }
 
     NSK_DISPLAY1("\nstartAgent: waiting for the agent %s to be started ...\n",
-        (indx==0)?"A":"B");
+        (indx == 0) ? "A" : "B");
     do {
         THREAD_sleep(1);
         tries++;
         if (tries > TRIES) {
             NSK_COMPLAIN2("TEST FAILURE: the agent %s thread is still not started after %d attempts\n",
-                (indx==0)?"A":"B", TRIES);
+                (indx == 0) ? "A" : "B", TRIES);
             exit(STATUS_FAILED);
         }
     } while (thrstarted[indx] != 1);
 
     NSK_DISPLAY1("\nstartAgent: the agent %s thread started\n",
-        (indx==0)?"A":"B");
+        (indx == 0) ? "A" : "B");
 }
 
 /* agent thread procedures */
@@ -402,15 +402,15 @@
 
     for (i=0; i<AGENTS; i++) {
         NSK_DISPLAY1("\ngetResult: waiting for the agent %s thread...\n",
-            (i==0)?"A":"B");
+            (i == 0) ? "A" : "B");
         THREAD_waitFor(agentThr[i]);
         if (THREAD_status(agentThr[i]) != PASSED) {
             result = STATUS_FAILED;
             NSK_COMPLAIN2("TEST FAILED: the agent %s thread done with the error code %d\n",
-                (i==0)?"A":"B", THREAD_status(agentThr[i]));
+                (i == 0) ? "A" : "B", THREAD_status(agentThr[i]));
         }
         else NSK_DISPLAY2("getResult: the agent %s thread done with the code %d\n",
-                (i==0)?"A":"B", THREAD_status(agentThr[i]));
+                (i == 0) ? "A" : "B", THREAD_status(agentThr[i]));
         free(agentThr[i]);
     }
 
@@ -439,7 +439,7 @@
 
     for (i=0; i<AGENTS; i++) {
         NSK_DISPLAY1("initializing agent %s ...\n",
-                (i==0)?"A":"B");
+                (i == 0) ? "A" : "B");
         if (initAgent(i) != PASSED)
             return JNI_ERR;
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLineNumberTable/linetab004/linetab004.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLineNumberTable/linetab004/linetab004.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -104,7 +104,7 @@
     err = jvmti->GetLineNumberTable(mid, &entryCount, &table);
     if (printdump == JNI_TRUE) {
         printf("\n Method: %s%s\n", methName,
-            (abstract==0) ? "" : " (abstract)");
+            (abstract == 0) ? "" : " (abstract)");
     }
     if (err != exp) {
         result = STATUS_FAILED;
@@ -112,8 +112,8 @@
         printf(" actual: %s (%d)\n", TranslateError(err), err);
         if (err == JVMTI_ERROR_NONE) {
             printf("  %s%s line number table (%d entries):%s\n",
-                   methName, (abstract==0) ? "" : " (abstract)",
-                   entryCount, (entryCount==0 ? " empty" : ""));
+                   methName, (abstract == 0) ? "" : " (abstract)",
+                   entryCount, (entryCount == 0 ? " empty" : ""));
             for (i = 0; i < entryCount; i++) {
                 printf("    start_location = 0x%x%08x,",
                        (jint)(table[i].start_location >> 32),
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendMonitorInfo/JvmtiTest/JvmtiTest.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendMonitorInfo/JvmtiTest/JvmtiTest.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -170,7 +170,7 @@
         iGlobalStatus = 2;
     }
 
-    if (expected_count !=0) {
+    if (expected_count != 0) {
 
         ret = jvmti->GetCurrentContendedMonitor(thr, owned_monitor);
         if (ret != JVMTI_ERROR_NONE) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -441,7 +441,7 @@
         // while (!threadsGroupLocks.runnableCanExit.get()) {
         //        Thread.yield();
         //    }
-        while (flag==JNI_FALSE)
+        while (flag == JNI_FALSE)
         {
             GET_BOOL_FIELD(flag, threadsGroupLocks, ThreadsGroupLocks, "runnableCanExit");
             CALL_STATIC_VOID_NOPARAM(Thread, "yield");
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -150,7 +150,7 @@
     char *cls_sig;
     jint clsByteCount;
 
-    display((hotswap != HOTSWAP_OFF)?0:1,
+    display((hotswap != HOTSWAP_OFF) ? 0 : 1,
         "#### JVMTIagent: ClassLoad occurred ####\n");
 
     getVerdict(jni_env, "ClassLoad");
@@ -236,7 +236,7 @@
     jclass decl_clazz;
 
     display((hotswap == HOTSWAP_EVERY_EXCEPTION ||
-            hotswap == HOTSWAP_EVERY_EXCEPTION_FOR_EVERY_CLASS)?0:1,
+            hotswap == HOTSWAP_EVERY_EXCEPTION_FOR_EVERY_CLASS) ? 0 : 1,
         "#### JVMTIagent: Exception occurred ####\n");
 
     getVerdict(jni_env, "Exception");
@@ -408,7 +408,7 @@
         jmethodID method, jlocation location) {
     jclass decl_clazz;
 
-    display((hotswap == HOTSWAP_EVERY_SINGLE_STEP)?0:1,
+    display((hotswap == HOTSWAP_EVERY_SINGLE_STEP) ? 0 : 1,
         "#### JVMTIagent: SingleStep occurred ####\n");
 
     getVerdict(jni_env, "SingleStep");
@@ -428,7 +428,7 @@
     jclass decl_clazz;
 
     display((hotswap == HOTSWAP_EVERY_METHOD_ENTRY ||
-            hotswap == HOTSWAP_EVERY_METHOD_ENTRY_FOR_EVERY_CLASS)?0:1,
+            hotswap == HOTSWAP_EVERY_METHOD_ENTRY_FOR_EVERY_CLASS) ? 0 : 1,
         "#### JVMTIagent: MethodEntry occurred ####\n");
 
     getVerdict(jni_env, "MethodEntry");
@@ -459,7 +459,7 @@
     jclass decl_clazz;
 
     display((hotswap == HOTSWAP_EVERY_EXCEPTION ||
-            hotswap == HOTSWAP_EVERY_EXCEPTION_FOR_EVERY_CLASS)?0:1,
+            hotswap == HOTSWAP_EVERY_EXCEPTION_FOR_EVERY_CLASS) ? 0 : 1,
         "#### JVMTIagent: ExceptionCatch occurred ####\n");
 
     getVerdict(jni_env, "ExceptionCatch");
@@ -1153,7 +1153,7 @@
         sprintf(error_msg, "JVMTIagent: getVerdict: %s event occured after VMDeath",
             evnt);
 
-        if (jni_env==NULL) { /* some event callbacks have no pointer to jni */
+        if (jni_env == NULL) { /* some event callbacks have no pointer to jni */
             printf("ERROR: %s\n", error_msg);
             exit(97);
         }
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -432,7 +432,7 @@
                 put_u1(SAME_FRAME_EXTENDED);
                 put_u2(calculateOffsetDelta(i, (u2) frame_type));
 
-            } else if ((frame_type >= SAME_LOCALS_1_STACK_ITEM_BEGIN) && (frame_type<=SAME_LOCALS_1_STACK_ITEM_END)) {
+            } else if ((frame_type >= SAME_LOCALS_1_STACK_ITEM_BEGIN) && (frame_type <= SAME_LOCALS_1_STACK_ITEM_END)) {
                 // same_locals_1_stack_item_frame {
                 //         u1 frame_type = SAME_LOCALS_1_STACK_ITEM;/* 64-127 */
                 //         verification_type_info stack[1];
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/hotswap/HotSwap.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/hotswap/HotSwap.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -318,7 +318,7 @@
             NSK_DISPLAY1("SingleStepEventsCount: %d\n", SingleStepEventsCount);
             if (vm_mode == VM_MODE_MIXED) {
                 if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
-                        (((i % 2)==0) ? JVMTI_DISABLE : JVMTI_ENABLE),
+                        (((i % 2) == 0) ? JVMTI_DISABLE : JVMTI_ENABLE),
                         JVMTI_EVENT_SINGLE_STEP, NULL)))
                     nsk_jvmti_setFailStatus();
             }
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/native/native_thread.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/native/native_thread.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -142,7 +142,7 @@
 
 /**
  * Return 1 if the thread has been started, or 0 if not,
- * or -1 if thread==NULL.
+ * or -1 if thread == NULL.
  */
 int THREAD_isStarted(void* t) {
     THREAD* thread = (THREAD*)t;
@@ -154,7 +154,7 @@
 /**
  * Return 1 if the thread has been started and already has finished,
  * or 0 if the thread hasn't finish (or even hasn't been started),
- * or -1 if thread==NULL.
+ * or -1 if thread == NULL.
  */
 int THREAD_hasFinished(void* t) {
     THREAD* thread = (THREAD*)t;
@@ -166,7 +166,7 @@
 /**
  * Return thread->status if thread has finished,
  * or return 0 if thread hasn't finished,
- * or retuen -1 if thread==NULL.
+ * or retuen -1 if thread == NULL.
  */
 int THREAD_status(void* t) {
     THREAD* thread = (THREAD*)t;
@@ -179,7 +179,7 @@
 
 /**
  * Cycle with 1 second sleeps until the thread has finished;
- * or return immediately, if thread==NULL.
+ * or return immediately, if thread == NULL.
  */
 void THREAD_waitFor(void* t) {
     THREAD* thread = (THREAD*)t;
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -86,13 +86,13 @@
     }
     memcpy(element->checkstr[allocs],digest,DIGESTLENGTH);
     allocs++;
-    if (allocs%printperiod==0) {
+    if (allocs % printperiod == 0) {
         printf("Check string for thread %s is ", element->str[allocs-1]);
         for (j=0;j<DIGESTLENGTH;j++)
             printf("%02x", digest[j]);
         printf("\n");
     }
-    if (allocs==nstr) {
+    if (allocs == nstr) {
         printf("JNI UTF8 strings memory=%zd\n", strsize);
         tmpstr=env->NewStringUTF(element->str[allocs-1]); CE
         for (j=0; j<nstr; j++) {
@@ -103,7 +103,7 @@
             for (k=0; k < strlen(element->str[j]); k++) {
                 digest[k % DIGESTLENGTH] += element->str[j][k];
             }
-            if (memcmp(digest,element->checkstr[j],DIGESTLENGTH)==0) {
+            if (memcmp(digest,element->checkstr[j],DIGESTLENGTH) == 0) {
                 env->ReleaseStringUTFChars(jstr,element->str[j]); CE
                 element->str[j] = NULL;
                 element->checkstr[j] = NULL;
@@ -185,14 +185,14 @@
         digest[j % DIGESTLENGTH]+=elem[j];
     }
     memcpy(javachars->checkstr[index++],digest,DIGESTLENGTH);
-    if (index%printperiod==0) {
+    if (index % printperiod == 0) {
         printf("Check string sum for thread %.*s is ", elem_len, elem);
         for (j=0;j<DIGESTLENGTH;j++)
             printf("%02x", digest[j]);
         printf("\n");
     }
     free(elem);
-    if (index==nstr) {
+    if (index == nstr) {
         printf("JNI Unicode strings memory=%ld\n",len);
         tmpstr=env->NewString(javachars->str[index-1],elem_len); CE
         for (j=0; j<nstr; j++) {
@@ -208,7 +208,7 @@
                 digest[i % DIGESTLENGTH]+=elem[i];
             }
             free(elem);
-            if (memcmp(digest,javachars->checkstr[j],javachars->size[j])==0) {
+            if (memcmp(digest,javachars->checkstr[j],javachars->size[j]) == 0) {
                 env->ReleaseStringChars(jstr,javachars->str[j]); CE
                 javachars->str[j] = NULL;
                 javachars->checkstr[j] = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress002.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress002.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -69,13 +69,13 @@
   clazz=env->FindClass(classname); CE
   obj=env->NewObjectArray((jsize)3,clazz,
                  env->AllocObject(clazz)); CE
-  if (obj==NULL) {
+  if (obj == NULL) {
     fprintf(stderr,"Can not construct the object Array for  %s\n", classname);
     return(NULL);
   }
 
   methodID=env->GetMethodID(clazz,name,sig); CE
-  if (methodID==NULL) {
+  if (methodID == NULL) {
     fprintf(stderr,"Can not get the ID of <init> for %s\n", classname);
     return(NULL);
   }
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -80,7 +80,7 @@
     doubleBuf=(jdouble *)malloc(SIZE*sizeof(jdouble));
 
     for (i=0;i<SIZE;i++) {
-    if (i%2==0) boolBuf[i]=JNI_TRUE;
+    if (i%2 == 0) boolBuf[i]=JNI_TRUE;
     else boolBuf[i]=JNI_FALSE;
     /*
       byteBuf[i]=(jbyte)random();
@@ -140,7 +140,7 @@
     jdouble *doubleOrig, *doubleClone;
     int i;
 
-    if ((orig==NULL) || (clone==NULL)) {
+    if ((orig == NULL) || (clone == NULL)) {
     fprintf(stderr,"JNI received a NULL array from Java\n");
     return JNI_FALSE;
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -50,7 +50,7 @@
 /*     const char *threadName=env->GetStringUTFChars(jstr, 0); */
 
     env->MonitorEnter(jobj); CE
-    if (upper==0) tmp=(jchar *)malloc(DIGESTLENGTH*sizeof(char));
+    if (upper == 0) tmp = (jchar *) malloc(DIGESTLENGTH*sizeof(char));
     if (env->ExceptionOccurred()) {
         env->ExceptionDescribe();
         env->ExceptionClear();
@@ -140,7 +140,7 @@
 
     printf("Comparing: ");
     for (i=0;i<len;i++)
-    if (ch[i]!=tmp[i]) {
+    if (ch[i] != tmp[i]) {
         printf("Error in %d\n",i);
         printf("ch[%d]=%02x tmp[%d]=%02x\n",i,ch[i],i,tmp[i]);
         ret=JNI_FALSE;
@@ -153,7 +153,7 @@
     ++upper;
     if (!(upper % 500))
     fprintf(stderr,"There are %d elements now.\n", upper);
-    if (upper==limit) {
+    if (upper == limit) {
     jclass clazz;
     jmethodID methodID;
     char *name = (char*) "halt";
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -56,7 +56,7 @@
     CHECK_EXCEPTION
     if (!env->Throw(tobj)) {
     if (env->ExceptionOccurred())
-        if (Exceptcalls%1000==0)
+        if (Exceptcalls % 1000 == 0)
         fprintf(stderr, "NATIVE: Throw has been catched in native\n");
     env->ExceptionClear();
     ++Exceptcalls;
@@ -65,7 +65,7 @@
     env->MonitorExit(jobj);
     CHECK_EXCEPTION
 
-    switch (Exceptcalls%23) {
+    switch (Exceptcalls % 23) {
       case 0: name="java/lang/ArithmeticException"; break;
       case 1: name="java/lang/ArrayIndexOutOfBoundsException"; break;
       case 2: name="java/lang/ArrayStoreException"; break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress006.cpp	Tue Dec 11 14:09:54 2018 -0600
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress006.cpp	Tue Dec 11 12:45:38 2018 -0800
@@ -48,8 +48,9 @@
 
     if (upper >= LIMIT) return JNI_TRUE;
 
-    if (upper==0)
-    globRefsArray=(jobject*)(malloc(LIMIT*sizeof(jobject)));
+    if (upper == 0) {
+        globRefsArray=(jobject*)(malloc(LIMIT*sizeof(jobject)));
+    }
 
     globRefsArray[upper]=env->NewGlobalRef(tobj); CE
     if (env->IsSameObject(tobj, globRefsArray[upper])) {