RFR: 8299827: Add resolved IP address in connection exception for sockets [v2]

Alan Bateman alanb at openjdk.org
Wed Jan 18 07:22:21 UTC 2023


On Wed, 18 Jan 2023 06:46:55 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Cool, that's really short. I've updated the PR.
>
> Hello @schmelter-sap, The javadoc of `String.join` states that it can throw a `NullPointerException` if any of the elements in `null`. As far as I can see, the `IOException` that may get thrown, probably isn't guaranteed to have a exception message, in which case this will run into a `NullPointerException`. Perhaps we should guard this code against that possibility?

Right now, if "enhanced socket exceptions" is enabled, then it only be used for socket/network exceptions. These will have some exception messages but you are right that catering for this possibility would be good, to avoid needing to change it again in the future.

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

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


More information about the net-dev mailing list