divijvaidya commented on code in PR #12890:
URL: https://github.com/apache/kafka/pull/12890#discussion_r1032518261


##########
clients/src/main/java/org/apache/kafka/common/requests/RequestHeader.java:
##########
@@ -122,11 +158,12 @@ public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         RequestHeader that = (RequestHeader) o;
-        return this.data.equals(that.data);
+        return headerVersion == that.headerVersion &&
+            Objects.equals(data, that.data);
     }
 
     @Override
     public int hashCode() {
-        return this.data.hashCode();
+        return Objects.hash(data, headerVersion);

Review Comment:
   Edit: Note for reviewers
   
   Piggybacking this minor change where we now include headerVersion in 
equality comparison for two RequestHeader objects.



##########
clients/src/main/java/org/apache/kafka/common/requests/RequestHeader.java:
##########
@@ -122,11 +158,12 @@ public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         RequestHeader that = (RequestHeader) o;
-        return this.data.equals(that.data);
+        return headerVersion == that.headerVersion &&
+            Objects.equals(data, that.data);
     }
 
     @Override
     public int hashCode() {
-        return this.data.hashCode();
+        return Objects.hash(data, headerVersion);

Review Comment:
   Note for reviewers
   
   Piggybacking this minor change where we now include headerVersion in 
equality comparison for two RequestHeader objects.



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to