On Tue, 28 Apr 2026 01:20:55 GMT, Chen Liang <[email protected]> wrote:
>> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Weaken spec to allow impl based decision for null elements > > test/jdk/java/util/Locale/LocaleMatchingTest.java line 210: > >> 208: Arguments.of(List.of(), null), >> 209: // null priority list >> 210: Arguments.of(null, List.of()) > > I think we should still reinstate some cases that has null elements, like: > > Arguments.of(List.of(), Collections.singletonList(null)), > Arguments.of(Collections.singletonList(null), List.of()) The intent of this change was to fix the implementation for null collections themselves, while keeping null element behavior intentionally unspecified. The new specification wording gives us the ability to make the call, but if we support cases such as `Arguments.of(List.of(), Collections.singletonList(null))`, then what about cases such as, `Arguments.of(List.of(), Arrays.asList(null, null, ...)`, I'm not sure about baking in any spot check cases without a clear rule. As a reminder, null elements throws for most cases, but not for cases such as these cases where one collection is empty, early match for lookupTag, or filtering with extended filtering containing only zero-weighted ranges. Since these are quite specific, it was part of the reason why I wanted to leave it unspecified, and let the implementation throw when it would naturally do so. What do you think? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30632#discussion_r3156443353
