You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/01 12:22:30 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #10446: MINOR: [ConfigEntry.class] add 'type' to 'toString' and 'hashCode'

ijuma commented on a change in pull request #10446:
URL: https://github.com/apache/kafka/pull/10446#discussion_r605610597



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/ConfigEntry.java
##########
@@ -188,6 +188,7 @@ public int hashCode() {
         result = prime * result + (isReadOnly ? 1 : 0);
         result = prime * result + source.hashCode();
         result = prime * result + synonyms.hashCode();
+        result = prime * result + type.hashCode();

Review comment:
       `hashCode` needs to be consistent with `equals`. If we add something here, we need to add it to `equals` too. Also makes sense to add to `toString` although it's not required for correctness. With regards to `documentation`, it probably makes sense even though it's a bit inefficient.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org