JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown
Brian Burkhalter
brian.burkhalter at oracle.com
Mon Oct 14 19:43:49 UTC 2013
On Oct 14, 2013, at 1:58 AM, Alan Bateman wrote:
>> 2) In Inet4AddressImpl.c and Inet6AddressImpl.c replace NET_ThrowUnknownHostExceptionWithGaiError with NET_ThrowByNameWithLastError (see net_md_util.c).
>>
>> […]
>>
>> If the "con" of option 2 is acceptable then I think that would be the best way to go, otherwise option 1.
>>
> Option #2 seems reasonable, the exception messages for similar network conditions are rarely the same on Windows and Unix anyway.
Here's the patch updated for this option:
http://cr.openjdk.java.net/~bpb/8010371/webrev.4/
> However I think it's important to have verified it with one or two errors to be confident that the errors translate as expected.
I can do this if we are actually going with this change for JDK 8.
> One other thing to add is that winsock_errors dates from early versions of Windows whether there wasn't a means to translate Windows Sockets errors. We should look at eliminating it (not for JDK 8 of course, it's too late) so that all errors are handle translated consistently.
See https://bugs.openjdk.java.net/browse/JDK-4842142.
Brian
More information about the core-libs-dev
mailing list