Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289253

JNI AttachCurrentThread should declare the correct parameter types

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Withdrawn
    • P4
    • 20
    • 20
    • hotspot

    Description

      The current declaration is:

      jint AttachCurrentThread(JavaVM *vm, void **p_env, void *thr_args);

      but p_env must be a JNIEnv**, and thr_args must be a JavaVMAttachArgs* so we should declare them as such.

      There are also number of inconsistencies in parameter naming e.g. penv vs. p_env, and vm vs p_vm, that should be made consistent across the invocation API. Some grammatical improvements in parameter descriptions can also be made e.g.

      `vm`: the VM to which the current thread will be attached, must not be `NULL`.

      should read:

      `vm`: the VM to which the current thread will be attached. It must not be `NULL`.

      Attachments

        Issue Links

          Activity

            People

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: