RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v22]

Alan Bateman alanb at openjdk.org
Thu Nov 28 16:23:43 UTC 2024


On Thu, 28 Nov 2024 16:09:57 GMT, Volkan Yazıcı <duke at openjdk.org> wrote:

>> For the record, `Net::translateToSocketException` doesn't map `AlreadyConnectedException`.
>
>> I checked the socket adaptor and there is needed a bug here. SocketChannel throws AlreadyConnectedException and the socket adaptor should map that to SocketException("already connected"). It doesn't do that so we should fix it.
> 
> @AlanBateman, I presume you want me to fix that mapping in a separate JBS+PR, right?

If Daniel is okay with it, then it might be easier to fix it here as part of this PR because the changes to add the mapping are touching exactly the focus of this PR, and the new test is testing the condition that exposes this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22160#discussion_r1862456763


More information about the net-dev mailing list