On Mon, 4 Mar 2024 13:24:05 GMT, Kevin Walls <kev...@openjdk.org> wrote:

>> The deprecated Subject Delegation feature in JMX will be removed.
>> 
>> This was marked in JDK 21 as deprecated for removal (JDK-8298966).
>
> Kevin Walls has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   RMIConnection comments update

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 this interface will require all methods that take a delegation subject 
to specify UOE then the subject is not null. Yes, this will invalidate 
implementations that are outside of the JDK but such implementations need to be 
updated anyway.

src/java.management/share/classes/javax/management/remote/JMXConnector.java 
line 158:

> 156:      */
> 157:     @Deprecated(since="21", forRemoval=true)
> 158:     public default MBeanServerConnection 
> getMBeanServerConnection(Subject delegationSubject)

Specifying the UOE in the param description is problematic. I think you want to 
specify delegationSubject as not used, must be null, then declare UOE as one of 
the exceptions thrown by the method.

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

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

Reply via email to