> [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: Add `MockSocketImpl#toString()` to aid test output visuals ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22439/files - new: https://git.openjdk.org/jdk/pull/22439/files/5e492b7b..cf86230d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22439&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22439&range=01-02 Stats: 15 lines in 1 file changed: 15 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/22439.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22439/head:pull/22439 PR: https://git.openjdk.org/jdk/pull/22439