Cookie and HeaderEntry violate Object contract
Status: Beta
Brought to you by:
sonalb
The contract for Object.hashCode() includes "If two objects are
equal according to the equals(Object) method, then calling the
hashCode method on each of the two objects must produce the
same integer result." Both Cookie and HeaderEntry override
equals(Object) without overriding hashCode(), and so violate this
contract. This can lead to unexpected behaviour if they're used in
conjunction with hashed data structures such as
java.util.Hash{Map,Set}.