jmx-dev RFR: 8344181: Remove SecurityManager and related calls from jdk.management and jdk.management.agent [v2]
Chris Plummer
cjplummer at openjdk.org
Wed Nov 20 05:22:19 UTC 2024
On Tue, 19 Nov 2024 14:24:15 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> Remove redundant SecurityManager, AccessController references
>> (following on from JDK-8338411: Implement JEP 486: Permanently Disable the Security Manager).
>>
>> src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java
>> There is an existing theoretical path where GcInfoBuilder stays null, should never happen, "com.sun.management.GcInfo" exists...
>>
>> src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java
>> Similarly there is an existing assumption that Class.forName("com.sun.management.GcInfo") succeeds.
>
> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
>
> - space
> - Missed getBoolean
src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java line 39:
> 37: import java.net.UnknownHostException;
> 38: import java.nio.BufferUnderflowException;
> 39: import java.security.PrivilegedAction;
It doesn't look like java.security.PrivilegedAction is needed.
src/jdk.management/share/classes/com/sun/management/internal/DiagnosticCommandImpl.java line 152:
> 150:
> 151: public String execute(String[] args) {
> 152: if (permission != null) {
There is a lot of code that remains related to assigning a value to `permission`. It looks like it should also be removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1849523979
PR Review Comment: https://git.openjdk.org/jdk/pull/22155#discussion_r1849529065
More information about the jmx-dev
mailing list