jmx-dev RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v7]

Daniel Fuchs dfuchs at openjdk.org
Mon Mar 11 18:53:15 UTC 2024


On Mon, 11 Mar 2024 18:39:38 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnection.java line 126:
>> 
>>> 124:      * @param className The class name of the MBean to be instantiated.
>>> 125:      * @param name The object name of the MBean. May be null.
>>> 126:      * @param delegationSubject No longer supported and should be null.
>> 
>> I think it can be simplified to:
>> 
>> Suggestion:
>> 
>>      * @param delegationSubject must be {@code null}.
>> 
>> 
>> I see no need to mention this feature no longer supported as no one is using and will use this feature.
>> 
>> Same comment applies to all methods that take `delegationSubject`.
>
> I was wondering if we should add a note at the class-level API documentation to say that subject delegation has been removed (or is no longer supported), and that methods will throw UOE if a non-null delegation subject is passed. It is otherwise strange to see a parameter that must be null. It could be worthwhile to mention it just once, at the class-level API.

Maybe mention there too that the delegationSubject parameter is kept for interoperability with older remote clients.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18025#discussion_r1520271921


More information about the jmx-dev mailing list