RFR: 8373243 : EnumSet.spliterator() should specify and document its characteristics [v2]

Patrick Strawderman duke at openjdk.org
Thu Dec 11 04:48:21 UTC 2025


On Thu, 11 Dec 2025 02:56:13 GMT, Jason Mehrens <duke at openjdk.org> wrote:

> > PS Is there anything analagous that should be added to any of the methods on EnumMap about the properties of the returned collections?
> 
> In addition to documentation, I would think the splitIterator() of EnumMap::keySet and or EnumMap::entrySet would need to be overridden too so characteristics of Collections.newSetFromMap match with this patch.

I actually already cut a [ticket](https://bugs.openjdk.org/browse/JDK-8373288) for this, and was planning to open a PR. I hadn't thought of Collections.newSetFromMap but I think the spliterator characteristics should be fixed regardless.

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

PR Comment: https://git.openjdk.org/jdk/pull/28696#issuecomment-3640093123


More information about the core-libs-dev mailing list