You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protobuf generates code for equals() and hashcode() which compares all fields. This is not needed, or even incorrect: for example, name in Address is not needed and can even be empty.
Implement equals() and hashcode() for Address. They can then be used as Comparator for hashmaps/sets etc.
The text was updated successfully, but these errors were encountered:
Protobuf generates code for
equals()
andhashcode()
which compares all fields. This is not needed, or even incorrect: for example,name
inAddress
is not needed and can even be empty.Implement
equals()
andhashcode()
forAddress
. They can then be used asComparator
for hashmaps/sets etc.The text was updated successfully, but these errors were encountered: