Brian, You have to check error != 0 before call to WSAGetLastError() at ll. 134 Inet6AddressImpl.c
Besides that - the fix looks good for me. -Dmitry On 2013-10-14 23:43, Brian Burkhalter wrote: > > 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 -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * I would love to change the world, but they won't give me the sources.