RFR: 8373288: EnumMap spliterators should include more specific characteristics
Joe Darcy
darcy at openjdk.org
Tue Dec 16 05:09:51 UTC 2025
On Tue, 16 Dec 2025 04:42:53 GMT, Patrick Strawderman <duke at openjdk.org> wrote:
> The spliterators returned by keySet, entrySet, and values were not reporting additional characteristics, such as ORDERED, SORTED, and NONNULL; the EnumMap iterators all guarantee iteration is in the natural order of the enum key, and nulls are disallowed as keys.
>
> Null values are allowed, so the values collection can only additionally report ORDERED.
While changing the specification to add these requirements would require CSR review, I think that would be a better version of this change.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28840#issuecomment-3658865460
More information about the core-libs-dev
mailing list