Unused sun.nio.fs.Reflect
Alan Bateman
Alan.Bateman at oracle.com
Mon Apr 4 07:06:36 UTC 2022
On 02/04/2022 21:45, Claes Redestad wrote:
> :
>
> There's a sibling 'sun.nio.ch.Reflect' where a couple of methods are
> still dubiously in use in one place only in
> sun.nio.ch.InheritedChannel::createChannel to reflectively create a
> java.io.FileDescriptor. Perhaps that could be refactored to use
> jdk.internal.access.JavaIOFileDescriptorAccess, in which case we could
> get rid of both of these. Would be more efficient (if it matters) but
> also consolidate internal hacking to fewer places.
There are a number of left overs in ch.Reflect that can be removed.
However we have to careful about changing anything sockets based to use
JavaIOFileDescriptorAccess as handle != socket on Windows. This area is
lower level than java.io and requires direct control of the file
descriptors.
-Alan
More information about the nio-dev
mailing list