RFR: 8345176: Add tests to verify java.net.Socket constructors close the socket on failure [v4]
duke
duke at openjdk.org
Mon Dec 2 08:40:41 UTC 2024
On Fri, 29 Nov 2024 15:04:20 GMT, Volkan Yazıcı <duke at openjdk.org> wrote:
>> [8343791](https://bugs.openjdk.org/browse/JDK-8343791) (addressed by #22160) stresses that `Socket::connect()` failures should be handled such that the resultant state of the `Socket` and its underlying `SocketImpl` should match. In a similar fashion, `Socket::new` (which is using `bind()` and `connect()` under the hood) failures should not leave behind an open `SocketImpl` either. This change set, addressing [8345176](https://bugs.openjdk.org/browse/JDK-8345176), adds `CtorFailTest` verifying this behavior.
>
> Volkan Yazıcı has updated the pull request incrementally with one additional commit since the last revision:
>
> Use record in `toString()`
@vy
Your change (at version fb75cbd1bed59283a5ce91430a4bfed96e2d803e) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22439#issuecomment-2510893647
More information about the net-dev
mailing list