Chris Hegarty wrote:
Are you referring to java.net.Proxy? Proxy.equals depends on the
resolution of its address. Address resolution could change over time,
depending on the caching policy. java.net.URL has a similar issue.
Strangely,I would have expected containsValue and containsKey to behave
in a similar fashion. I think the specification for these methods is
very clear, they should use equals(). I'm not sure if containsKey is
correct if it accepts key equality.
-Chris
I assume he is talking about java.lang.reflect.Proxy as it forwards the
hashCode and equals methods to the invocation handler.
-Alan