The java.nio.ByteOrder class predates the addition of enum to the language.
Its structure and usage are so similar, it merits looking at whether it can be migrated to an enum.
The idea was raised on core-libs-dev as: https://mail.openjdk.org/pipermail/core-libs-dev/2025-July/148342.html
Subsequent prototyping has not exposed any significant incompatibilities.
A thorough investigation of current uses in OpenJDK and in third party packages is warranted.
Its structure and usage are so similar, it merits looking at whether it can be migrated to an enum.
The idea was raised on core-libs-dev as: https://mail.openjdk.org/pipermail/core-libs-dev/2025-July/148342.html
Subsequent prototyping has not exposed any significant incompatibilities.
A thorough investigation of current uses in OpenJDK and in third party packages is warranted.