On Tue, 8 Dec 2020 19:51:48 GMT, Alan Bateman <al...@openjdk.org> wrote:

>>> This change have been already reviewed by Mandy, Sundar, Alan and David.
>>> Now, the PR approval is needed.
>> 
>> Can you provide a link to the discussion? I'm mostly curious if there was 
>> some discussion as to why Instrument purposefully allowed non-public premain 
>> methods:
>> 
>>          // the premain method should not be required to be public,
>> 508         // make it accessible so we can call it
>> 509         // Note: The spec says the following:
>> 510         //     The agent class must implement a public static premain 
>> method...
>> 511         setAccessible(m, true);```
>
> All the discussion is in the bug and CSR:
> https://bugs.openjdk.java.net/browse/JDK-8165276
> https://bugs.openjdk.java.net/browse/JDK-8248189
> We messed up in JDK-5070281 (JDK 6) and it came to light in JDK 9 when 
> auditing the use of setAccessible in the JDK.

Chris, I've added link to the jdk 15 review thread to the PR description.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1694

Reply via email to