On Thu, 28 Nov 2024 14:30:02 GMT, Volkan Yazıcı <d...@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. test/jdk/java/net/Socket/CtorFailTest.java line 108: > 106: > 107: static List<Arguments> testCases() { > 108: String exceptionMessage = "intentional test failure"; It would be good to put a comment here to remind the reader what the first argument is and what the second argument is. Something like: // Arguments: Exception bindException, Exception connectException ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22439#discussion_r1862502838