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

Alan Bateman alanb at openjdk.java.net
Thu Jun 17 17:03:00 UTC 2021


On Sat, 5 Jun 2021 15:11:55 GMT, Markus KARG <github.com+1701815+mkarg at openjdk.org> wrote:

> @AlanBateman I'm done with the changes you requested and kindly like to ask where to go from here.

Moving ChannelOutputStream to sun.nio.ch looks right. The implementation of transferTo will need a few rounds of cleanup, it's a look very messy right now. Most usages of var need to be replaced as it is impossible for the reader to know what the types are. Pattern matching for instanceof can be used to avoid the casts.

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

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


More information about the nio-dev mailing list