Is the idea after the first resolution it\'ll rely on OS caching? Still this seems inefficient and in cases of multiple domains resolving to the same IP, incorrect. What am
hashCode()
is closely related to equals()
. The explanation for this behavior is described in the docs for equals()
as follows:
Two hosts are considered equivalent if both host names can be resolved into the same IP addresses; else if either host name can't be resolved, the host names must be equal without regard to case; or both host names equal to null.
Source: java.net.URL.equals() docs.