Xinyu Lin created ZOOKEEPER-4866:
------------------------------------
Summary: Override `equals()` and `hashCode()` for
`ClientCnxn.AuthData`
Key: ZOOKEEPER-4866
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4866
Project: ZooKeeper
Issue Type: Improvement
Reporter: Xinyu Lin
In {{{}ClientCnxn.java{}}}, when managing authentication information,
{{AuthData}} objects are added to {{{}authInfo{}}}, which is a set. However,
the {{AuthData}} class does not override the {{equals()}} and {{hashCode()}}
methods. This means that duplicate authentication data will not be
automatically removed when added to the set. Why were {{equals()}} and
{{hashCode()}} not overridden in the {{AuthData}} class? Is there a specific
reason for this design decision?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)