RFR: 8273774: jdk.tools.jlink.internal.Platform::is64Bit() should not hard code for x64 and AARCH64
Remilia Scarlet
github.com+22913521+1996scarlet at openjdk.java.net
Wed Sep 15 14:46:12 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!
-------------
Commit messages:
- 8273774: jdk.tools.jlink.internal.Platform::is64Bit() should not hard code for x64 and AARCH64
Changes: https://git.openjdk.java.net/jdk/pull/5519/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5519&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8273774
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 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