On 22/11/2015 16:09, Mark Sheppard wrote:
Alan thanks for the feedback ...

the implementation is based on what is currently being used in the tests via the existing
set of NameService implementations.

yes, the processing of the hosts file returns the first mapping it encounters. The functionality is to provide similar to that which currently exists in the various
NameService implementations, such as SimpleNameService.
This would, afaik also, be in line with name service library functions
processing /etc/hosts file.

WRT returning a list of ip addresses, if that is needed then we can amend the implementation, but current implementation of tests' NameServices implementations didn't provide or use such
functionality

Again, none of the tests had a NameService implementation (SimpleNameService etc,) supporting IPv6, so this determined what went into the current implementation. It is something that could be added in future when required.

wrt comments, they could be accommodated, but note that the structure of a jdk.net.hosts.file is not the same as /etc/hosts, which maps an IP address to a list of host aliases. If you that we change the mapping order and the format
we can do that.
I think the hosts file should use the same format. If it's too much trouble to support multiple addresses for the first push then that is okay but we should allow for that possibility in the future, same thing for IPv6 addresses.

I think comments would be useful from the start and would benefit some of the existing tests too.



wrt illegal_state_exception token, I left this in, thinking that it was worthwhile as it tests a concurrency issue within InetAddress and the InetAddress cache.
We can remove this also.
I think it would be good to remove that as it's confusing and not needed.



i'll add a transient declaration to re-enforce their absence from serialized form.

So, do we wish to change the mapping structure, as per /etc/hosts ?
do we wish that a list of ip addresses are returned, even if tests don't currently need it ?
These aren't mutually exclusive options as adding support for multiple IP addresses later should be fine.

-Alan

Reply via email to