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



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/ConfigEntry.java
##########
@@ -149,24 +149,28 @@ public boolean equals(Object o) {
 
         ConfigEntry that = (ConfigEntry) o;
 
-        return this.name.equals(that.name) &&
-                this.value != null ? this.value.equals(that.value) : 
that.value == null &&

Review comment:
       This was a bug as it evaluated following conditions:
   ```java
   that.value == null &&
                   this.isSensitive == that.isSensitive &&
                   this.isReadOnly == that.isReadOnly &&
                   this.source == that.source &&
                   Objects.equals(this.synonyms, that.synonyms);
   ```
   and the expected behavior is `that.value == null`.
   
   There are some tests depending on the "incorrect" equals.




-- 
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:
us...@infra.apache.org


Reply via email to