Skip to content

Conversation

RogerRiggs
Copy link
Contributor

@RogerRiggs RogerRiggs commented Oct 6, 2025

Convert java.nio.ByteOrder to an enum.
The class declaration is changed from public class to public enum.
Enums are Comparable so declare LITTLE_ENDIAN before BIG_ENDIAN so LITTLE_ENDIAN is less than BIG_ENDIAN.
The implementation is simplified, removing the constructor and explicit static fields.
Remove the override of toString; the javadoc provided by Enum is sufficient.

No changes to other classes or implementations are needed to pass Tier 1-3.


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 CSR request JDK-8369130 to be approved

Issues

  • JDK-8362637: Convert java.nio.ByteOrder to an enum (Enhancement - P4)
  • JDK-8369130: Convert java.nio.ByteOrder to an enum (CSR)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27657

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Declare LITTLE_ENDIAN before BIG_ENDIAN so comparing enums LITTLE_ENDIAN is less than BIG_ENDIAN.
The implementation is simplified, removing the constructor and explicit static fields.
Remove the override of `toString`; the javadoc provided by Enum is sufficient.
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 6, 2025

👋 Welcome back rriggs! 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 Oct 6, 2025

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

@openjdk openjdk bot added csr Pull request needs approved CSR before integration nio [email protected] labels Oct 6, 2025
@openjdk
Copy link

openjdk bot commented Oct 6, 2025

@RogerRiggs The following label will be automatically applied to this pull request:

  • nio

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 Oct 6, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 6, 2025

Webrevs

@liach
Copy link
Member

liach commented Oct 6, 2025

Why do we reorder the BIG_ENDIAN and LITTLE_ENDIAN fields?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csr Pull request needs approved CSR before integration nio [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants