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

Clarify Instrumentation interface should not be implemented outside java.instrument module

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 13
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Compatibility risk is minimal as only a note with a clarification is added.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add a note to the java.lang.instrument.Instrumentation interface to make it clear that it is not intended to be implemented outside of the java.instrument module.

      Problem

      Customers attempt to implement the interface outside of the java.instrument module.

      Solution

      Add a note to the java.lang.instrument.Instrumentation interface to make it clear that it is not intended to be implemented outside of the java.instrument module.

      Specification

      Add the following note to the Instrumentation spec:

      "Note: The interface is not intended to be implemented outside of the java.instrument module."

      The suggested patch is:

      --- a/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java   Fri May 10 13:37:00 2019 -0700
      +++ b/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java   Fri May 10 17:48:45 2019 -0700
      @@ -65,6 +65,9 @@
        * <p>
        * Once an agent acquires an Instrumentation instance,
        * the agent may call methods on the instance at any time.
      + * <p>
      + * @apiNote This interface is not intended to be implemented outside of
      + * the java.instrument module.
        *
        * @since   1.5
        */
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sspitsyn Serguei Spitsyn
              Reporter:
              alanb Alan Bateman
              Reviewed By:
              Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: