On Thu, 16 May 2024 11:46:30 GMT, Kevin Walls <kev...@openjdk.org> wrote:
>> Running JConsole from a previous JDK, and attaching to jdk-23 (after >> [JDK-8326666](https://bugs.openjdk.org/browse/JDK-8326666): Remove the Java >> Management Extension (JMX) Subject Delegation feature), the MBean tab is >> blank. >> >> In javax/management/remote/rmi/RMIConnectionImpl.java: >> addNotificationListener rejects a non-null delegationSubjects array, but >> older JDKs will send such an array. It could accept the array, and only >> reject/throw if it contains a non-null Subject (i.e. if an attempt to use >> subject delegation is really happening). >> >> Manually testing JConsole, the MBean tab is fully populated and usable. > > Kevin Walls has updated the pull request incrementally with one additional > commit since the last revision: > > IllegalArgumentException throws doc update src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnection.java line 959: > 957: * <code>NotificationFilters</code>. Elements of this array can > 958: * be null. > 959: * @param delegationSubjects should be {@code null}, but a non-null Would it be more clear to say: "should be {@code null}. However, an array where every entry is null is also accepted for compatibility reasons." src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnection.java line 960: > 958: * be null. > 959: * @param delegationSubjects should be {@code null}, but a non-null > 960: * array is accepted for compatibilty reasons, which must not contain Typo: s/compatibilty/compatibility/ src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnection.java line 969: > 967: * @throws IllegalArgumentException if <code>names</code> or > 968: * <code>filters</code> is null, or if <code>names</code> contains > 969: * a null element, or if these two arrays do not have the same size. Was this actually an oversight in the previous change to remove subject delegation? When `delegationSubjects` is null, then the 3 arrays are never going to be the same size. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19253#discussion_r1603957397 PR Review Comment: https://git.openjdk.org/jdk/pull/19253#discussion_r1603965135 PR Review Comment: https://git.openjdk.org/jdk/pull/19253#discussion_r1603963533