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:
<pre>
--- 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 <code>Instrumentation</code> 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
*/
</pre>