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

Daniel Fuchs dfuchs at openjdk.org
Thu Nov 28 16:26:48 UTC 2024


On Thu, 28 Nov 2024 16:20:58 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>>> 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.

I'm OK with it - but would we need to reopen the CSR?  If we can fix this mapping issue that is good. My assumption was that you'd want to keep SocketAdaptor throwing AlreadyConnectedException.

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

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


More information about the net-dev mailing list