On Mon, 26 Jan 2026 09:54:41 GMT, Jaikiran Pai <[email protected]> wrote:

> Can I please get a review of this change which proposes to remove the 
> confusing "getsockopt" text from the exception reported on Windows when 
> `SocketChannel.finishConnect()` raises an exception due to a failed 
> `connect()`? 
> 
> This addresses https://bugs.openjdk.org/browse/JDK-8376290 and as noted in 
> that issue, this looks like an oversight when changes were done for 
> https://bugs.openjdk.org/browse/JDK-8317603. Prior to that, on older versions 
> the exception reported on Windows was:
> 
> 
> java.net.ConnectException: Connection refused: no further information
> 
> 
> With the current proposed changes in this PR, the exception will now be 
> `java.net.ConnectException: Connection refused` which matches what we report 
> on *nix platforms.
> 
> A new jtreg test has been added to reproduce the original text and verify the 
> change. tier1, tier2 and tier3 continue to pass with this change.

This pull request has now been integrated.

Changeset: 19c6fdf1
Author:    Jaikiran Pai <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/19c6fdf11b01308e9f99ce5666bfffcfbc453de3
Stats:     163 lines in 4 files changed: 141 ins; 10 del; 12 mod

8376290: SocketChannel.finishConnect() contains confusing "getsockopt" in 
exception message for a failed connect() on Windows

Reviewed-by: alanb

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

PR: https://git.openjdk.org/jdk/pull/29409

Reply via email to