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

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

XMLWordPrintable

    • minimal
    • Compatibility risk is minimal as only a note with a clarification is added.
    • Java API
    • SE

      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
        */
      

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

              Created:
              Updated:
              Resolved: