RFR: 8304833: (fc) Remove dead code in sun.nio.ch.FileChannelImpl::implCloseChannel

Alan Bateman alanb at openjdk.org
Thu Mar 23 20:11:47 UTC 2023


On Thu, 23 Mar 2023 19:58:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Remove `fdAccess.close(fd)` branch in `implCloseChannel` as it is unreachable because exactly one of `parent` and `closer` can be non-`null`.

This looks good, can you also check if parent can be changed from Object to Closeable, that would allow the cast to be removed.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13168#issuecomment-1481827132


More information about the nio-dev mailing list