RFR: 8299827: Add resolved IP address in connection exception for sockets [v2]
Ralf Schmelter
rschmelter at openjdk.org
Fri Jan 13 18:27:30 UTC 2023
On Fri, 13 Jan 2023 08:58:53 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Ralf Schmelter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Simplified code
>
> src/java.base/share/classes/sun/net/util/SocketExceptions.java line 83:
>
>> 81: sb.append('(');
>> 82: sb.append(resolvedAddr);
>> 83: sb.append(')');
>
> An alternative here might be to just use addr.toString() as it already handles both the resolved and unresolved cases and uses the most usual convention of hostname/ipaddress.
That's a good idea. It even removes code instead of adding more. I've update the PR accordingly.
-------------
PR: https://git.openjdk.org/jdk/pull/11961
More information about the net-dev
mailing list