RFR: 8342647: [macosx] Clean up the NSInvocation based call to NSProcessInfo.operatingSystemVersion

Jaikiran Pai jpai at openjdk.org
Sun Oct 20 06:45:44 UTC 2024


Can I please get a review of this change which does a tiny cleanup in the macosx specific code in `java_props_macosx.c`?

As noted in https://bugs.openjdk.org/browse/JDK-8342647 the `setOSNameAndVersion` function used to dynamically call `NSProcessInfo.operatingSystemVersion` because that property wasn't (statically) available until macosx 10.10 version. Since that version this property has been available even in the latest macosx versions https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion, so it's now possible to statically reference it in the code.

The change in this PR replaces the use of `NSInvocation` with the static reference to this property. No new tests have been added. Existing tier1, tier2 and tier3 tests with this change have all passed.

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

Commit messages:
 - 8342647: [macosx] Clean up the NSInvocation based call to NSProcessInfo.operatingSystemVersion

Changes: https://git.openjdk.org/jdk/pull/21595/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21595&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8342647
  Stats: 42 lines in 1 file changed: 3 ins; 22 del; 17 mod
  Patch: https://git.openjdk.org/jdk/pull/21595.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21595/head:pull/21595

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


More information about the core-libs-dev mailing list