On Thu, 16 May 2024 10:26:25 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> That the JConsole tab was blank shows that the older RMIConnector's >> addListenerWithSubject creates a new single-entry array from the given >> delegationSubject (which is null) and passes it onwards. The app is not >> creating the array itself., that's us. >> >> (also, maybe that JConsole relies on listeners in order to show a screen >> that doesn't really need to depend on them, but this change is obviously >> about being compatible with that) >> >> We all know that that is the only use case out there, the current wisdom is >> that this feature is not used, nobody is creating the Subject array and >> calling addListenersWithSubjects (plural) with it... >> >> IF we find such an app app, we are going to ignore the array unless it >> contains a non-null entry. This seems safe and efficient. We are >> documenting that it should be null, and it is weird to document a length >> requirement for something that should be null... 8-) > > This shows that when SubjectDelegation was not used, a null-filled array of > the same length as the two other arrays was expected before (in previous > versions of the JDK where SubjectDelegation was supported, but in the case > where it wasn't used). > I am not suggesting to document the length requirement. The length > requirement was enforced before and undocumented. I'm just suggesting that we > allow null and null-filled but don't allow something (null filled array of > wrong length) that would have been rejeceted in previous JDK versions. I > would also suggest to check the length before the content - in case an array > is supplied. Yes, completely understand. I just don't think it has any benefit. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19253#discussion_r1603106058