Skip to content

Conversation

@viktorklang-ora
Copy link
Contributor

@viktorklang-ora viktorklang-ora commented Dec 8, 2025

Addresses https://bugs.openjdk.org/browse/JDK-8373243 by copying and adapting the specification from https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/LinkedHashSet.java#L186-L204

Since EnumSet is sealed and only permits two final classes, the verbiage around "Implementations should document the reporting of additional characteristic values." may be considered to get removed from this PR. Kept, for now, for symmetry reasons.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request matching fixVersion 27 to be approved (needs to be created)

Issue

  • JDK-8373243: EnumSet.spliterator() should specify and document its characteristics (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28696/head:pull/28696
$ git checkout pull/28696

Update a local copy of the PR:
$ git checkout pull/28696
$ git pull https://git.openjdk.org/jdk.git pull/28696/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28696

View PR using the GUI difftool:
$ git pr show -t 28696

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28696.diff

Using Webrev

Link to Webrev Comment

@viktorklang-ora
Copy link
Contributor Author

Tagging @jddarcy here since this issue was raised by him.

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 8, 2025

👋 Welcome back vklang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 8, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Dec 8, 2025
@openjdk
Copy link

openjdk bot commented Dec 8, 2025

@viktorklang-ora The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 8, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 8, 2025

Webrevs

…cteristics as well as making EnumSet::spliterator() final
@jddarcy
Copy link
Member

jddarcy commented Dec 9, 2025

/csr needed

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Dec 9, 2025
@openjdk
Copy link

openjdk bot commented Dec 9, 2025

@jddarcy has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@viktorklang-ora please create a CSR request for issue JDK-8373243 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@jddarcy
Copy link
Member

jddarcy commented Dec 9, 2025

PS Is there anything analagous that should be added to any of the methods on EnumMap about the properties of the returned collections?


/**
* Creates a <em><a href="Spliterator.html#binding">late-binding</a></em>
* and <em>fail-fast</em> {@code Spliterator} over the elements in this set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the EnumSet spliterator is fail-fast, since its iterator is weakly consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

4 participants