RFR: 8359830: Incorrect os.version reported on macOS Tahoe 26 (Beta) [v2]

Jaikiran Pai jpai at openjdk.org
Wed Jun 25 10:20:15 UTC 2025


> Can I please get a review of this change which proposes to address the issue noted in https://bugs.openjdk.org/browse/JDK-8359830?
> 
> macOS operating system's newer version 26 (currently in Beta) is reported as a 16 by older versions of XCode. JDK internally uses the `NSProcessInfo` and `NSOperatingSystemVersion` APIs to identify the macOS version and set the `os.version` system property to that value. The current recommended version to build the JDK on macOS is XCode 15.4. The `NSOperatingSystemVersion` API on that version of XCode reports macOS version as 16 instead of 26.
> 
> The commit in this PR updates the JDK code to handle this mismatch and set the `os.version` appropriately to 26. This fix is similar to what we did with macOS BigSur when the macOS version 10.16 was meant to mean 11 https://bugs.openjdk.org/browse/JDK-8253702. 
> 
> The existing `OsVersionTest` has been updated for some trivial clean up. Existing tests in tier1, tier2 and tier3 continue to pass with this change. If anyone has access to a macOS 26 Beta, I request them to build this change and run `tier1` tests to help verify that there aren't any failures.

Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - merge latest from master branch
 - reduce line length
 - update test
 - 8359830: Incorrect os.version reported on macOS Tahoe 26 (Beta)

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25865/files
  - new: https://git.openjdk.org/jdk/pull/25865/files/6d888de7..ae690ae8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25865&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25865&range=00-01

  Stats: 9244 lines in 358 files changed: 3921 ins; 3188 del; 2135 mod
  Patch: https://git.openjdk.org/jdk/pull/25865.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25865/head:pull/25865

PR: https://git.openjdk.org/jdk/pull/25865


More information about the core-libs-dev mailing list