On Thu, 14 Nov 2024 13:03:28 GMT, Kevin Walls <kev...@openjdk.org> wrote:

> Remove redundant SecurityManager, AccessController references
> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the 
> Security Manager).
> 
> test/jdk/java/lang/instrument/ still passing.

src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java line 
484:

> 482:     // reflected object (for example, a method)
> 483:     private static void setAccessible(final AccessibleObject ao, final 
> boolean accessible) {
> 484:         ao.setAccessible(accessible);

I think you can remove this method, and instead change the usage in 
loadClassAndStartAgent to just call setAccessible.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22106#discussion_r1842363414

Reply via email to