Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0 [v2]
On Wed, 22 Sep 2021 17:41:18 GMT, Roger Riggs wrote: >> 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 t\ >> he hidden link: > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Check for missing version from SystemVersion plist. > Refactor avoid repetition of conversion of NSString to char *. Thanks for testing with Xcode 11.7. and MacOS 11.6. - PR: https://git.openjdk.java.net/jdk/pull/5633
Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0 [v2]
On Wed, 22 Sep 2021 17:41:18 GMT, Roger Riggs wrote: >> 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 t\ >> he hidden link: > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Check for missing version from SystemVersion plist. > Refactor avoid repetition of conversion of NSString to char *. Looks good to me. I tested with an Xcode 11.7 build on a MacOS 11.6 and there OsVersionTest fails without the fix and passes with it. - Marked as reviewed by clanger (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5633
Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0 [v2]
On Wed, 22 Sep 2021 17:41:18 GMT, Roger Riggs wrote: >> 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 t\ >> he hidden link: > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Check for missing version from SystemVersion plist. > Refactor avoid repetition of conversion of NSString to char *. Marked as reviewed by naoto (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5633
Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0 [v2]
> 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 t\ > he hidden link: Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Check for missing version from SystemVersion plist. Refactor avoid repetition of conversion of NSString to char *. - Changes: - all: https://git.openjdk.java.net/jdk/pull/5633/files - new: https://git.openjdk.java.net/jdk/pull/5633/files/d1e2bd20..f44119d9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5633&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5633&range=00-01 Stats: 16 lines in 1 file changed: 6 ins; 7 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5633.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5633/head:pull/5633 PR: https://git.openjdk.java.net/jdk/pull/5633
Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
On Wed, 22 Sep 2021 15:00:59 GMT, Roger Riggs wrote: > 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 t\ > he hidden link: src/java.base/macosx/native/libjava/java_props_macosx.c line 270: > 268: > @"/System/Library/CoreServices/.SystemVersionPlatform.plist"]; > 269: if (version != NULL) { > 270: NSString *nsVerStr = [version objectForKey : > @"ProductVersion"]; Should we check `nsVerStr != NULL` here? - PR: https://git.openjdk.java.net/jdk/pull/5633
Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
On Tue, 21 Sep 2021 19:33:05 GMT, Roger Riggs wrote: > 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. Marked as reviewed by bpb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5619