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

Clean up the JNI specification for MonitorEnter and MonitorExit

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • b16

      These are just editorial changes, no actual changes to the specification are involved.

      In MonitorEnter the opening description is written twice:

      Enters the monitor associated with the underlying Java object referred to by
      `obj`.

      Enters the monitor associated with the object referred to by obj. The `obj`
      reference must not be `NULL`.

      ---

      There is inconsistent use of code font for "obj".

      ---

      The parameter description:

      `obj`: a normal Java object or class object, must not be `NULL`.

      is somewhat odd as "class objects" are "normal Java objects", and it raises the question what an abnormal Java object may be. Eventually we will probably refer to "identity object" here but only after value objects are out of preview.

      --

      The spec says obj must not be null but doesn't actually state that NullPointerException is thrown. [EDIT: technically this would be a spec change so I won't address this]

      ---

      MonitorExit lacks an introductory sentence.

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

              Created:
              Updated:
              Resolved: