[jdk8u-dev] Integrated: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
Olga Mikhaltsova
omikhaltcova at openjdk.org
Thu Oct 13 15:24:46 UTC 2022
On Fri, 30 Sep 2022 20:45:54 GMT, Olga Mikhaltsova <omikhaltcova at openjdk.org> wrote:
> I'd like to backport JDK-8269850 to jdk8u in order to fix the incorrect version detection for macOS.
>
> The patch 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 it's small and low risk. The changes are related only to one function void setOSNameAndVersion(..) within the single file. The patch is identical to the original one.
>
> Tested with a simple test printing the OS version on macOS Monterey:
>
> public class Main {
> public static void main(String[] args) {
> System.out.println(System.getProperty("os.version"));
> }
> }
This pull request has now been integrated.
Changeset: 43cfe27f
Author: Olga Mikhaltsova <omikhaltcova at openjdk.org>
Committer: Yuri Nesterenko <yan at openjdk.org>
URL: https://git.openjdk.org/jdk8u-dev/commit/43cfe27fa3a11dd6d4fffcb1c1336ac7fdd0233b
Stats: 25 lines in 1 file changed: 7 ins; 12 del; 6 mod
8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
Backport-of: 3b1b8fc646493eae5f4df828afe29abb75fa5e60
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/126
More information about the jdk8u-dev
mailing list