RFR: JDK-8134577 - Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor

Alan Bateman Alan.Bateman at oracle.com
Sun Nov 22 09:56:37 UTC 2015


On 12/11/2015 16:46, Mark Sheppard wrote:
> Hi,
>     based on feedback from first review the updates have been amended
> please oblige and review the current set of changes as per
>
> http://cr.openjdk.java.net/~msheppar/8134577/webrev.02/
>
I'm looked through the changes in this webrev.

At a high-level then it's great to see this troublesome internal 
provider interface going away. Using the property jdk.net.hosts.file to 
specify a hosts file that tests can use seems reasonable.

In a hosts file then a host with several IP addresses can be listed on 
several lines. If I read lookupAllHostAddr correctly then it's ignoring 
this case and will only find the first line. For testing purposes then 
should we allow for hosts file where a host is defined to have multiple 
addresses?

Another question is whether IPv6 addresses should be supported, it looks 
like lookupAllHostAddr only expects IPv4 addresses.

The other thing is comments (#) ? I'm sure it could be useful to be able 
to copy a hosts file and use for testing.

The token illegal_state_exception still looks strange to me as it means 
InetAddress.getByName will throw an exception that it is not specified 
to throw. I see the test Hang is using it but that test is for the 
provider interface that is removed so I assume the test should be 
removed too.

A minor point but useLocalHostFileLookpu and hostFilename are static so 
I assume the transient modifier isn't needed.

-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20151122/eb96ecd5/attachment.html>


More information about the net-dev mailing list