test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/agent03.cpp
changeset 52642 9cfc8b0c45fd
parent 51774 79dc492c00ab
equal deleted inserted replaced
52641:09a3f379b927 52642:9cfc8b0c45fd
    36  */
    36  */
    37 
    37 
    38 JNIEXPORT jint JNICALL Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) {
    38 JNIEXPORT jint JNICALL Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) {
    39     JNIEnv* jni;
    39     JNIEnv* jni;
    40 
    40 
    41     if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
    41     jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
       
    42     if (jni == NULL)
    42         return JNI_ERR;
    43         return JNI_ERR;
    43 
    44 
    44     // can't use NSK_DISPLAY since needed for nsk_ functions initialization isn't done here
    45     // can't use NSK_DISPLAY since needed for nsk_ functions initialization isn't done here
    45 
    46 
    46     printf("%s: initialization was done\n", AGENT_NAME);
    47     printf("%s: initialization was done\n", AGENT_NAME);