8232673: (dc) DatagramChannel socket adaptor issues
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 30 13:27:08 UTC 2019
On 29/10/2019 19:11, Chris Hegarty wrote:
> :
>
> The window is small but, lockedConfigureBlocking should not call ensureOpen ( that may throw ), when invoked from the finally block, since there could be received data ( that might otherwise be thrown away ). The call to ensureOpen should be conditional.
Okay, make sense to just have the I/O operation complete successfully if
the datagram has been received. The same thing applies to the other
adaptor support in the SC/SSC implementations so I've changed those too
so that the restoring of the blocking mode does nothing rather than
throw an exception when the channel has been closed.
>
> Any reason why auxiliary classes are used, rather than static nested classes?
Thanks, that was not intentional.
>
> I share similar concerns about the use of assertions in combination with finally blocks, that Daniel has.
>
I removed the potentially troublesome asserts as they are a distraction
here.
The updated webrev is here:
http://cr.openjdk.java.net/~alanb/8232673/webrev.02/index.html
-Alan
More information about the nio-dev
mailing list