chia7712 commented on code in PR #19847:
URL: https://github.com/apache/kafka/pull/19847#discussion_r2205596374


##########
metadata/src/main/java/org/apache/kafka/image/ClientQuotaImage.java:
##########
@@ -39,21 +39,11 @@
  *
  * This class is thread-safe.
  */
-public final class ClientQuotaImage {
+public record ClientQuotaImage(Map<String, Double> quotas) {

Review Comment:
   `record` can generate the `equals` and `hashCode`, so could you please 
remove both of them? 



##########
metadata/src/main/java/org/apache/kafka/image/TopicImage.java:
##########
@@ -34,31 +35,9 @@
  *
  * This class is thread-safe.
  */
-public final class TopicImage {
-    private final String name;
-
-    private final Uuid id;
-
-    private final Map<Integer, PartitionRegistration> partitions;
-
-    public TopicImage(String name,
-                      Uuid id,
-                      Map<Integer, PartitionRegistration> partitions) {
-        this.name = name;
-        this.id = id;
-        this.partitions = partitions;
-    }
-
-    public String name() {
-        return name;
-    }
-
-    public Uuid id() {
-        return id;
-    }
-
-    public Map<Integer, PartitionRegistration> partitions() {
-        return partitions;
+public record TopicImage(String name, Uuid id, Map<Integer, 
PartitionRegistration> partitions) {

Review Comment:
   ditto



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