RFR: 8329190: (ch) DatagramChannel.receive should throw ClosedChannelException when called on closed channel

Alan Bateman alanb at openjdk.org
Tue Apr 16 13:25:59 UTC 2024


On Tue, 16 Apr 2024 12:57:50 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Please ignore these review comments for now. I might have mistaken what this change is proposing to do, partly because I missed some of the discussion in the JBS issue (the comments were auto-hidden and I now see the "load additional comments" option).

Right, there has been quite a bit of back and forth on this. The channel state needs to checked before "beginning" the I/O operation. If asynchronously closed while in the block then the more specific AsynchronousCloseException will be thrown.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18796#discussion_r1567354457


More information about the nio-dev mailing list