cmccabe commented on a change in pull request #11310:
URL: https://github.com/apache/kafka/pull/11310#discussion_r712517042



##########
File path: 
clients/src/main/java/org/apache/kafka/server/policy/CreateTopicPolicy.java
##########
@@ -104,6 +105,24 @@ public Short replicationFactor() {
             return configs;
         }
 
+        @Override
+        public int hashCode() {
+            return Objects.hash(topic, numPartitions, replicationFactor,
+                replicasAssignments, configs);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+            RequestMetadata other = (RequestMetadata) o;
+            return topic.equals(other.topic) &&
+                Objects.equals(numPartitions, other.numPartitions) &&
+                Objects.equals(replicationFactor, other.replicationFactor) &&
+                Objects.equals(replicasAssignments, other.replicasAssignments) 
&&
+                configs.equals(other.configs);

Review comment:
       `configs` can not be null. `numPartitions`, `replicationFactor` and 
`replicasAssignments` can be null.




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