RFR: 8306678: Replace use of os.version with an internal Version record
Roger Riggs
rriggs at openjdk.org
Mon Apr 24 19:46:32 UTC 2023
On Fri, 21 Apr 2023 17:02:23 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Create an internal Version record to hold and compare versions of the form (major, minor, micro).
>> Add `OperatingSystem.version()` to return the version of the running OS.
>> Replace uses of os.version in java.base.
>> Subsequent PRs will apply to uses in other modules including, jdk.jlink, jdk.jpackage, and java.desktop.
>
> src/java.base/macosx/classes/jdk/internal/loader/ClassLoaderHelper.java line 39:
>
>> 37: // SDK 10.15 and earlier always reports 10.16 instead of 11.x.x
>> 38: hasDynamicLoaderCache = OperatingSystem.version()
>> 39: .compareTo(new Version(10, 16)) >= 0;
>
> I wonder if this check can be removed too as 10.11 is the oldest macOS release that seems to be getting updates.
10.15 supported as of JDK 20; will keep the check until that changes.
> src/java.base/macosx/classes/sun/nio/fs/BsdFileStore.java line 103:
>
>> 101: // fgetxattr broken on APFS prior to 10.14
>> 102: return OperatingSystem.version()
>> 103: .compareTo(new Version(10, 14)) >= 0;
>
> I don't think 10.14 had had an update since 2021 so I suspect you can just remove this check.
Will be removed in PR https://github.com/openjdk/jdk/pull/13628
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13584#discussion_r1175712165
PR Review Comment: https://git.openjdk.org/jdk/pull/13584#discussion_r1175710973
More information about the nio-dev
mailing list