< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.cpp
Print this page
rev 52215 : 8212770: Remove spaces before/after () for vmTestbase/jvmti/[s-u]
Summary:
Reviewed-by:
*** 44,56 ****
jvmti->GetClassSignature(klass, &className, &generic);
if (strcmp(className, CLASS_NAME) == 0) {
char fileName[512];
nsk_jvmti_getFileName(0, FILE_NAME, fileName,
sizeof(fileName)/sizeof(char));
! if ( nsk_jvmti_redefineClass(jvmti, klass, fileName ) == NSK_TRUE ) {
nsk_printf("Agent:: Successfully redefined..");
! if ( nsk_jvmti_disableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE ) {
nsk_printf(" Agent :: NOTIFICATIONS ARE DISABLED \n");
} else {
nsk_printf(" Agent :: Failed to disabled \n");
}
} else {
--- 44,56 ----
jvmti->GetClassSignature(klass, &className, &generic);
if (strcmp(className, CLASS_NAME) == 0) {
char fileName[512];
nsk_jvmti_getFileName(0, FILE_NAME, fileName,
sizeof(fileName)/sizeof(char));
! if (nsk_jvmti_redefineClass(jvmti, klass, fileName) == NSK_TRUE) {
nsk_printf("Agent:: Successfully redefined..");
! if (nsk_jvmti_disableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) {
nsk_printf(" Agent :: NOTIFICATIONS ARE DISABLED \n");
} else {
nsk_printf(" Agent :: Failed to disabled \n");
}
} else {
*** 73,89 ****
jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
jint rc ;
jvmtiEnv * jvmti;
nsk_printf("Agent:: VM.. Started..\n");
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
! if ( rc!= JNI_OK ) {
nsk_printf("Agent:: Could not load JVMTI interface \n");
return JNI_ERR;
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
! if (nsk_jvmti_parseOptions(options) == NSK_FALSE ) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
memset(&caps, 0, sizeof(caps));
caps.can_redefine_classes = 1;
--- 73,89 ----
jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
jint rc ;
jvmtiEnv * jvmti;
nsk_printf("Agent:: VM.. Started..\n");
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
! if (rc!= JNI_OK) {
nsk_printf("Agent:: Could not load JVMTI interface \n");
return JNI_ERR;
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
! if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
memset(&caps, 0, sizeof(caps));
caps.can_redefine_classes = 1;
*** 94,105 ****
rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks));
if (rc != JVMTI_ERROR_NONE) {
nsk_printf(" Agent:: Error occured while setting event call back \n");
return JNI_ERR;
}
! if ( nsk_jvmti_enableNotification(jvmti,
! JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE ) {
nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n");
} else {
nsk_printf(" Error in Eanableing Notifications..");
}
}
--- 94,105 ----
rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks));
if (rc != JVMTI_ERROR_NONE) {
nsk_printf(" Agent:: Error occured while setting event call back \n");
return JNI_ERR;
}
! if (nsk_jvmti_enableNotification(jvmti,
! JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) {
nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n");
} else {
nsk_printf(" Error in Eanableing Notifications..");
}
}
< prev index next >