On Fri, 21 Apr 2023 17:06:44 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Refactor the Platform class of jlink to use jdk.internal.util OperatingSystem 
> and Architecture instead of os.name and os.arch. 
> They are direct replacements for the Platform enums except for UNKNOWN; its 
> use is refactored to report errors via exceptions.
> 
> Neither os.name nor os.arch should be assumed to be changeable; 
> one test case is removed because it assumes os.name can be changed on the 
> command line.

src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java 
line 575:

> 573:         if (Files.exists(binDir.resolve("java")) ||
> 574:             Files.exists(binDir.resolve("java.exe"))) {
> 575:             return new DefaultExecutableImage(root, 
> retrieveModules(root), Platform.runtime());

Hello Roger, I couldn't find any usages of this (existing) `public static 
ExecutableImage getExecutableImage(Path root)` in the code. Maybe we could 
remove it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13585#discussion_r1184944478

Reply via email to