Re: Caching behaviour of InetAddress

2008-02-18 Thread Andreas Plesner Jacobsen
Alan Bateman wrote: Alan, I don't think it's a significant change, since that's how getByName() acts when the cache entries time out, so changing it would make it act a lot more consistently. Actually, I think it's worth debating whether or not InetAddress should cache lookups at all, I thi

Re: Caching behaviour of InetAddress

2008-02-18 Thread Andreas Plesner Jacobsen
Alan Bateman wrote: Alan, The specification could be improved but changing InetAddress.getByName to return a random address is a significant change that could break existing applications. It might be better to define a new method, perhaps "getAnyByName", that randomly chooses one of the cache

Caching behaviour of InetAddress

2008-02-18 Thread Andreas Plesner Jacobsen
I've recently been introduced to the caching behaviour of InetAddress, and I think it may be improved. The javadoc reads: The InetAddress class has a cache to store successful as well as unsuccessful host name resolutions. The positive caching is there to guard against DNS spoofing attacks; wh