RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0

Roger Riggs rriggs at openjdk.java.net
Tue Sep 21 20:11:39 UTC 2021


The Mac OS specific code to determine the os.version property in java_props_macosx.c is updated
to replace the code extracting the version from the SystemVersion.plist by reading the version using the hidden link:
   `/System/Library/CoreServices/.SystemVersionPlatform.plist`

Its contents are not dependent on the SYSTEM_VERSION_COMPAT environment variable.
With this change, 11.5 reports the 11.5.1 minor version and os.version 11.6 is correctly reported.
The change can be backported to other versions as needed.

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

Commit messages:
 - 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0

Changes: https://git.openjdk.java.net/jdk/pull/5619/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5619&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269850
  Stats: 11 lines in 1 file changed: 1 ins; 6 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5619.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5619/head:pull/5619

PR: https://git.openjdk.java.net/jdk/pull/5619


More information about the core-libs-dev mailing list