On Thu, 6 Apr 2023 17:17:35 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 one additional 
> commit since the last revision:
> 
>   Revert changes to Foreign API to avoid class with another PR
>   Rename S390X to S390, representing just the s390 architecture
>   Removed ARM and IA64 enum values; they are unused; they can be added later 
> if needed

src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java line 51:

> 49:             !Architecture.isAARCH64()) {
> 50:             throw new RuntimeException(
> 51:                 "This provider is not supported on this processor 
> architecture: " + Architecture.current());

Could this constructor be changed to be a no-op? The check for Windows 9 and 
Windows Me dates back to JDK 6 and is no longer needed. The os.arch check also 
dates from JDK 6 when the  attach provider didn't work on IA64 The only Windows 
builds now are windows-x86, windows-x64, windows-aarch64 so I assume this check 
can go away.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1160140379

Reply via email to