On Fri, 7 Apr 2023 21:13:03 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64, X86, IA64, ARM, AARCH64, RISCV64, S390X, >> PPC64LE` >> Note that `amd64` and `x86_64` in the build are represented by `X64`. >> The values of the system property `os.arch` is unchanged. >> >> The API is similar to the jdk.internal.util.OperatingSystem enum created by >> #[12931](https://git.openjdk.org/jdk/pull/12931). >> Uses in `java.base` and a few others are included but other modules will be >> done in separate PRs. > > Roger Riggs has updated the pull request incrementally with three additional > commits since the last revision: > > - Rename OperatingSystemProps to PlatformProps. > Refactor OperatingSystem initialization to use strings instead of integers. > - Revised mapping mechanism of build target architecture names to enum > values. > Unrecognized values from the build are mapped to enum value "OTHER". > Renamed PPC64LE to PPC64 to reflect only the architecture, not the > endianness. > Added an `isLittleEndian` method to return the endianness (not currently > used anywhere) > - Revert changes to jdk.accessibility AccessBridge src/java.base/share/classes/jdk/internal/util/Architecture.java line 47: > 45: // Cache a copy of the array for lightweight indexing > 46: private static final @Stable Architecture[] archValues = > Architecture.values(); > 47: This now appears to be unused: Suggestion: ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1161082612