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

> Refactor the Platform class in jdk.jpackage to use the internal 
> OperatingSystem, Architecture, and Version classes.
> The OperatingSystem.isXXX() and Architecture.isYYY() methods replace 
> comparisons in the Platform class.
> The checks of the os.version are replaced but may not be needed if OpenJDK no 
> longer supports them.
> 
> It is recommended to remove os version checks that apply only to Mac versions 
> before 10.15.
> Mac OS X 10.15 is the oldest version supported.

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java 
line 613:

> 611:     public static void addNewKeychain(Map<String, ? super Object> params)
> 612:                                     throws IOException, 
> InterruptedException {
> 613:         if (OperatingSystem.version().compareTo(new Version(10,12)) < 0) 
> {

Suggestion:

        if (OperatingSystem.version().compareTo(new Version(10, 12)) < 0) {

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java line 
325:

> 323:             xml.writeAttribute("require-scripts", "false");
> 324:             xml.writeAttribute("hostArchitectures",
> 325:                     (OperatingSystem.isMacOS() && 
> Architecture.isAARCH64()) ? "arm64" : "x86_64");

Seems `OperatingSystem.isMacOS()` check is redundant

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13586#discussion_r1185763621
PR Review Comment: https://git.openjdk.org/jdk/pull/13586#discussion_r1185764656

Reply via email to