[jdk8u-dev] RFR: 8253702: BigSur version number reported as 10.16, should be 11.nn

Olga Mikhaltsova omikhaltcova at openjdk.org
Thu Sep 29 18:13:08 UTC 2022


I'd like to backport JDK-8253702 and JDK-8269850 to jdk8u in order to fix the incorrect version detection for macOS.

Both patches applied manually due to the location difference:
`src/java.base/macosx/native/libjava/java_props_macosx.c` (source)
`jdk/src/solaris/native/java/lang/java_props_macosx.c` (destination)
But they are small and low risk. The changes are related only to one function `void setOSNameAndVersion(..)` within the single file. Both patches are identical to the original ones.

Tested with a simple test printing the OS version on macOS Big Sur and macOS Monterey:

public class Main {
    public static void main(String[] args) {
        System.out.println(System.getProperty("os.version"));
    }
}

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

Commit messages:
 - Backport 3b1b8fc646493eae5f4df828afe29abb75fa5e60
 - Backport 66757750a2adf0739d0f5bf98a3f50a123b7adcf

Changes: https://git.openjdk.org/jdk8u-dev/pull/125/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=125&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8253702
  Stats: 34 lines in 1 file changed: 20 ins; 5 del; 9 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/125.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/125/head:pull/125

PR: https://git.openjdk.org/jdk8u-dev/pull/125


More information about the jdk8u-dev mailing list