-
Sub-task
-
Resolution: Delivered
-
P4
-
17
-
Verified
The `java.lang.instrument` implementation has been changed in this release to require that agent `premain` and `agentmain` methods are public. The specification has always required this, but it was not enforced. Attempting to run with an agent where these methods are not public will fail with an exception such as:
`java.lang.IllegalAccessException: method <fully-qualified-class-name>.premain must be declared public`.
A related change in this release is that the `premain` and `agentmain` methods must be defined in the agent class. The implementation no longer searches for these methods in superclasses.
`java.lang.IllegalAccessException: method <fully-qualified-class-name>.premain must be declared public`.
A related change in this release is that the `premain` and `agentmain` methods must be defined in the agent class. The implementation no longer searches for these methods in superclasses.