RFR: 8273774: jdk.tools.jlink.internal.Platform::is64Bit() should not hard code for x64 and AARCH64 [v2]

Remilia Scarlet github.com+22913521+1996scarlet at openjdk.java.net
Thu Sep 16 03:25:32 UTC 2021


> Currently, the Platform.is64Bit() hard coded for judging whether the target arch is 64-bit.
> The `classes_nocoops.jsa not found` issue can be found while testing CDSPluginTest.java on 64-bit platform, excluding x64 and AARCH64, like mips64.
> 
> For solving this issue, we assume that the bits of target UNKNOWN arch is same as the runtime platform.
> This patch adds the following lines in the Platform.is64Bit() method.
> 
> ``` java
> if (arch() == Platform.Architecture.UNKNOWN) {
>      return (System.getProperty("os.arch").indexOf("64") != -1);
> }
> 
> 
> Please review this change. Thanks!

Remilia Scarlet has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'openjdk:master' into JDK-8273774
 - 8273774: jdk.tools.jlink.internal.Platform::is64Bit() should not hard code for x64 and AARCH64

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5519/files
  - new: https://git.openjdk.java.net/jdk/pull/5519/files/d51678ac..125c83e7

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5519&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5519&range=00-01

  Stats: 364 lines in 45 files changed: 198 ins; 52 del; 114 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5519.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5519/head:pull/5519

PR: https://git.openjdk.java.net/jdk/pull/5519


More information about the core-libs-dev mailing list