RFR: 8304911: Use OperatingSystem enum in some modules
Roger Riggs
rriggs at openjdk.org
Wed Apr 5 14:11:18 UTC 2023
On Wed, 5 Apr 2023 08:39:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> With the addition of `jdk.internal.util.OperatingSystem` references to the system property `os.name` can be replaced.
>> This PR exports jdk.internal.util to:
>> - java.prefs,
>> - java.security.jgss,
>> - java.smartcardio,
>> - jdk.charsets,
>> - jdk.net,
>> - jdk.zipfs
>
> src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java line 406:
>
>> 404: case MACOS -> newInstance("jdk.net.MacOSXSocketOptions");
>> 405: case WINDOWS -> newInstance("jdk.net.WindowsSocketOptions");
>> 406: default -> new PlatformSocketOptions();
>
> For another issue, but I assume this could be refactored to not need PlatformSocketOptions, in which case the mapping of OS name to implementation class would go away.
Created an issue to track the possible refactoring, will keep this change until then.
https://bugs.openjdk.org/browse/JDK-8305661
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13335#discussion_r1158574021
More information about the nio-dev
mailing list