JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown
Alan Bateman
Alan.Bateman at oracle.com
Tue Oct 8 09:43:30 UTC 2013
On 08/10/2013 00:00, Brian Burkhalter wrote:
> Resuming this discussion …
>
> Thanks for the previous comments. My feeling at this point is to do one of two things:
>
> A) defer to something after JDK 8, or
> B) on EAI_AGAIN do not retry but set the cause of the UAE to "new SomeException(gai_strerror(error))" where SomeException could be for example Exception, RuntimeException, or IOException.
>
> Comments?
>
Throwing UHE with a useful message or cause would be best, so option B.
However, I don't think it is critical for jdk8 as it's not a new issue
(at least I think UHE has always been thrown with just the hostname,
never the reason if it is known). So if there isn't time to be confident
with the patch then it should be okay to move this out to 9.
-Alan.
More information about the core-libs-dev
mailing list