RFR: 8371718: (sc) Channels.new{Input, Output}Stream can allocate unbounded memory for a socket channel [v3]

Brian Burkhalter bpb at openjdk.org
Tue Dec 9 18:38:19 UTC 2025


On Tue, 9 Dec 2025 17:42:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> I think we can add a new test with test channel implementations that throw if invoked with remaining > 128k. That would at least test the changes to ChannelInputStream and ChannelOutputStream.

I am not sure this is feasible for ChannelOutputStream as it uses writeFully which loops until all bytes are written.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28705#discussion_r2603855242


More information about the nio-dev mailing list