-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b24
-
os_x
The src/java.base/macosx/native/libjava/java_props_macosx.c in its setOSNameAndVersion function, in order to determine the current version of macosx, invokes the NSProcessInfo.operatingSystemVersion property. NSProcessInfo.operatingSystemVersion is an API provided by macosx through its Foundation framework https://developer.apple.com/documentation/foundation/nsprocessinfo. As noted in the documentation of NSProcessInfo.operatingSystemVersion, this property is available, for static reference, since macosx 10.10 https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion.
The current code in JDK's java_props_macosx.c calls the NSProcessInfo.operatingSystemVersion dynamically (reflection style) through the use of NSInvocation API because this property wasn't available for static access in macosx 10.9.
The current JDK mainline, at build time and runtime, expects macosx versions to be higher than 10.x, so replacing the NSInvocation call with a static reference to NSProcessInfo.operatingSystemVersion would clean up these few lines in java_props_macosx.c.
The current code in JDK's java_props_macosx.c calls the NSProcessInfo.operatingSystemVersion dynamically (reflection style) through the use of NSInvocation API because this property wasn't available for static access in macosx 10.9.
The current JDK mainline, at build time and runtime, expects macosx versions to be higher than 10.x, so replacing the NSInvocation call with a static reference to NSProcessInfo.operatingSystemVersion would clean up these few lines in java_props_macosx.c.
- links to
-
Commit(master) openjdk/jdk/9e31e78e
-
Review(master) openjdk/jdk/21595