sjhajharia commented on code in PR #20180: URL: https://github.com/apache/kafka/pull/20180#discussion_r2224373221
########## server/src/main/java/org/apache/kafka/server/share/session/ShareSessionKey.java: ########## @@ -21,23 +21,12 @@ import java.util.Objects; -public class ShareSessionKey { - private final String groupId; - private final Uuid memberId; - +public record ShareSessionKey(String groupId, Uuid memberId) { public ShareSessionKey(String groupId, Uuid memberId) { this.groupId = Objects.requireNonNull(groupId); this.memberId = Objects.requireNonNull(memberId); } - public String groupId() { - return groupId; - } - - public Uuid memberId() { - return memberId; - } - @Override public int hashCode() { Review Comment: The `hashCode()` method is needed if we have an `equals()` method defined. And given that we have a slightly different equals() method than the default one, i think we need to preserve both. -- 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