RFR: 8306678: Replace use of os.version with an internal Version record [v2]
ExE Boss
duke at openjdk.org
Mon Apr 24 20:49:11 UTC 2023
On Mon, 24 Apr 2023 19:43:15 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> 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.
This assignment could probably be moved into a static field initializer, as it’s now a simple expression:
// SDK 10.15 and earlier always reports 10.16 instead of 11.x.x
private static final boolean hasDynamicLoaderCache
= OperatingSystem.version().compareTo(new Version(10, 16)) >= 0;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13584#discussion_r1175765486
More information about the nio-dev
mailing list