On Wed, 20 Nov 2024 13:33:07 GMT, Volkan Yazıcı <d...@openjdk.org> wrote:
>> Fixed in 424fc8ccd3a495a49f859f0cfc563cf463b3efeb. > > Imagine `bind()` succeeding, yet `connect()` failing due to an `IAE` thrown > by `SocketImpl#connect()`. This would leave the socket in `BOUND` state. > Hence, shouldn't we include the `connect()` in the try-catch block too? I don't mind if we have a broader try-finally but it would be a bug if connect were to throw IAE. All the validation should be done before delegating to the SocketImpl. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22160#discussion_r1850338643