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

(jni spec) Description of 3rd parameter to AttachCurrentThread is confusing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 8, 20
    • hotspot
    • b05

      In Java 7, the spec was:

      “In JDK 1.1, the second argument to AttachCurrentThread is always a pointer to JNIEnv. The third argument to AttachCurrentThread was reserved, and should be set to NULL.

      In JDK 1.2, you pass NULL as the third argument for 1.1 behavior, or pass a pointer to the following structure to specify additional information:"


      In Java 8 it changed to:

      "The second argument to AttachCurrentThread is always a pointer to JNIEnv. The third argument to AttachCurrentThread was reserved, and should be set to NULL."


      The sentence "The third argument to ..." is not correct as it can be NULL or a pointer to a JavaVMAttachArgs structure when there is additional information to specify. This sentence should be replaced with something like

      "When not NULL, the third argument is a pointer to the following structure to specify additional information:"

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

              Created:
              Updated:
              Resolved: