RFR: 8299827: Add resolved IP address in connection exception for sockets [v3]
Alan Bateman
alanb at openjdk.org
Mon Jan 16 12:03:23 UTC 2023
On Mon, 16 Jan 2023 09:34:33 GMT, Ralf Schmelter <rschmelter at openjdk.org> wrote:
>> This change adds the resolved IP address to the exception text of a failed socket connection. This helps if the connection failed because of stale DNS entries.
>
> Ralf Schmelter has updated the pull request incrementally with one additional commit since the last revision:
>
> Further simplification
src/java.base/share/classes/sun/net/util/SocketExceptions.java line 30:
> 28: import java.io.IOException;
> 29: import java.lang.reflect.Constructor;
> 30: import java.net.InetAddress;
I assume this import doesn't need to be added now.
src/java.base/share/classes/sun/net/util/SocketExceptions.java line 80:
> 78:
> 79: private static IOException ofUnixDomain(IOException e, UnixDomainSocketAddress addr) {
> 80: return create(e, String.join(": ", e.getMessage(), addr.toString()));
This is ofUnixDomain, did you mean to change this one? InetSocketAddress::toString specifies the string representation, UnixDomainSocketAddress does not.
-------------
PR: https://git.openjdk.org/jdk/pull/11961
More information about the net-dev
mailing list