RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]

Markus KARG github.com+1701815+mkarg at openjdk.java.net
Sat Jul 31 21:23:32 UTC 2021


On Sat, 31 Jul 2021 17:33:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> I need to look at it closely but I suspect this introduces a potential overflow. Also if output stream is backed by a SocketChannel configured non-blocking then FC::transferTo may return 0 so I assume there is a potential infinite loop there too. I suspect the eventually patch will need have to make use of the blockingLock to prevent the underlying channels from being changed to non-blocking during the transfer.

I need to confess that my NIO knowledge is not deep enough to follow you closely, so I trust on your advice how to go on from here.

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

PR: https://git.openjdk.java.net/jdk/pull/4263


More information about the core-libs-dev mailing list