--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Thu Oct 25 12:09:41 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Thu Oct 25 08:18:42 2018 -0700
@@ -60,18 +60,18 @@
redefineNumber=0;
className=NULL;
generic=NULL;
- if ( ! NSK_JVMTI_VERIFY ( jvmti_env->GetClassSignature(klass, &className, &generic) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic))) {
nsk_printf("#error Agent :: while getting classname Signature.\n");
nsk_jvmti_agentFailed();
} else {
if (strcmp(className,CLASS_NAME) == 0) {
jfieldID field;
/* get the field id and set watch on that .*/
- if (! NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, FIELDNAME, TYPE)) != NULL) ) {
- nsk_printf(" Agent :: (*JNI)->GetFieldID(jni, ... ) returns `null`.\n");
+ if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, FIELDNAME, TYPE)) != NULL)) {
+ nsk_printf(" Agent :: (*JNI)->GetFieldID(jni, ...) returns `null`.\n");
nsk_jvmti_agentFailed();
- } else if ( ! NSK_JVMTI_VERIFY(jvmti_env->SetFieldAccessWatch(klass, field) ) ) {
- nsk_printf("#error Agent :: occured while jvmti->SetFieldAccessWatch(... ) .\n");
+ } else if (!NSK_JVMTI_VERIFY(jvmti_env->SetFieldAccessWatch(klass, field))) {
+ nsk_printf("#error Agent :: occured while jvmti->SetFieldAccessWatch(...) .\n");
nsk_jvmti_agentFailed();
}
}
@@ -93,20 +93,20 @@
return;
}
redefineNumber=0;
- if (! NSK_JNI_VERIFY(jni, (clas = jni->FindClass(SEARCH_NAME)) != NULL) ) {
+ if (!NSK_JNI_VERIFY(jni, (clas = jni->FindClass(SEARCH_NAME)) != NULL)) {
nsk_printf(" Agent :: (*JNI)->FindClass(jni, %s) returns `null`.\n",SEARCH_NAME);
nsk_jvmti_agentFailed();
} else {
nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
sizeof(fileName)/sizeof(char));
- if ( nsk_jvmti_redefineClass(jvmti_env, clas, fileName ) != NSK_TRUE) {
+ if (nsk_jvmti_redefineClass(jvmti_env, clas, fileName) != NSK_TRUE) {
nsk_printf(" Agent :: Failed to redefine.\n");
nsk_jvmti_agentFailed();
} else {
nsk_printf(" Agent :: Redefined.\n");
nsk_printf(" Agent :: Suspendeding thread.\n");
/* pop the current working frame. */
- if ( ! NSK_JVMTI_VERIFY(jvmti_env->SuspendThread(thread) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->SuspendThread(thread))) {
nsk_printf("#error Agent :: occured suspending Thread.\n");
nsk_jvmti_agentFailed();
} else {
@@ -128,13 +128,13 @@
}
#endif
jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
- if ( ! NSK_VERIFY ( JNI_OK == vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1) ) ) {
+ if (!NSK_VERIFY(JNI_OK == vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1))) {
nsk_printf(" Agent :: Could not load JVMTI interface.\n");
return JNI_ERR;
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE ) {
+ if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
nsk_printf("#error Agent :: Failed to parse options.\n");
return JNI_ERR;
}
@@ -144,7 +144,7 @@
caps.can_pop_frame=1;
caps.can_generate_all_class_hook_events=1;
caps.can_generate_field_access_events=1;
- if (! NSK_JVMTI_VERIFY ( jvmti->AddCapabilities(&caps) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
nsk_printf("#error Agent :: while adding capabilities.\n");
return JNI_ERR;
}
@@ -155,10 +155,10 @@
nsk_printf("#error Agent :: while setting event callbacks.\n");
return JNI_ERR;
}
- if ( ( nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL)
- == NSK_TRUE ) &&
- ( nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_FIELD_ACCESS, NULL)
- == NSK_TRUE ) ) {
+ if ((nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL)
+ == NSK_TRUE) &&
+ (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_FIELD_ACCESS, NULL)
+ == NSK_TRUE)) {
nsk_printf(" Agent :: Notifications are enabled.\n");
} else {
nsk_printf("#error Agent :: Eanableing Notifications.\n");
@@ -175,11 +175,11 @@
jboolean retvalue;
jint state;
retvalue = JNI_FALSE;
- if ( ! NSK_JVMTI_VERIFY( jvmti->GetThreadState(thread, &state) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(thread, &state))) {
nsk_printf(" Agent :: Error while getting thread state.\n");
nsk_jvmti_agentFailed();
} else {
- if ( state & JVMTI_THREAD_STATE_SUSPENDED) {
+ if (state & JVMTI_THREAD_STATE_SUSPENDED) {
retvalue = JNI_TRUE;
}
}
@@ -193,18 +193,18 @@
jboolean retvalue;
jint state;
retvalue = JNI_FALSE;
- if ( ! NSK_JVMTI_VERIFY( jvmti->GetThreadState(thread, &state) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(thread, &state))) {
nsk_printf(" Agent :: Error while getting thread state.\n");
nsk_jvmti_agentFailed();
} else {
- if ( state & JVMTI_THREAD_STATE_SUSPENDED) {
- if ( ! NSK_JVMTI_VERIFY ( jvmti->PopFrame(thread) ) ) {
+ if (state & JVMTI_THREAD_STATE_SUSPENDED) {
+ if (!NSK_JVMTI_VERIFY(jvmti->PopFrame(thread))) {
nsk_printf("#error Agent :: while poping thread's frame.\n");
nsk_jvmti_agentFailed();
} else {
nsk_printf(" Agent :: poped thread frame.\n");
- if ( ! NSK_JVMTI_VERIFY (
- jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_FIELD_ACCESS, NULL) ) ) {
+ if (!NSK_JVMTI_VERIFY(
+ jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_FIELD_ACCESS, NULL))) {
nsk_printf("#error Agent :: failed to disable notification JVMTI_EVENT_FIELD ACCESS.\n");
nsk_jvmti_agentFailed();
} else {
@@ -226,7 +226,7 @@
jthread thread) {
jboolean retvalue;
retvalue = JNI_FALSE;
- if ( !NSK_JVMTI_VERIFY( jvmti->ResumeThread(thread) ) ) {
+ if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread))) {
nsk_printf("#error Agent :: while resuming thread.\n");
nsk_jvmti_agentFailed();
} else {