JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

Michael McMahon michael.x.mcmahon at oracle.com
Wed Oct 2 14:58:45 UTC 2013


On 02/10/13 15:40, Chris Hegarty wrote:
> On 02/10/2013 04:44, Alan Bateman wrote:
>> On 01/10/2013 12:46, Brian Burkhalter wrote:
>>> :
>>>
>>> I updated the webrev
>>>
>>> http://cr.openjdk.java.net/~bpb/8010371/
>>>
>>> with changes in the test of the return value of getaddrinfo for Unix
>>> Inet 4 and 6 and Windows Inet 6. The usual testing is in progress.
>>>
>>> Brian
>> This looks better, although I think I would reverse re-write the
>> expressions to "if (error = ...)".
>>
>> One thing to consider is whether this condition is really worth
>> introducing HostLookupException, particularly when it doesn't include
>
> I am also not convinced of the merits of adding a new public checked 
> Exception type for this situation. Do we expect all callers of API's 
> that can throw UKE to now have to catch this Exception and provide 
> their own try logic? Otherwise, what do we expect them to do with it.
>

It's proposed as a subclass of UnknownHostException. So, nobody would 
have to catch it.

I suppose another approach, which is a variant of the first one 
suggested, would be
retry logic built in, which is switched off by default and configurable 
somehow.

Michael




More information about the core-libs-dev mailing list