chia7712 commented on code in PR #19452: URL: https://github.com/apache/kafka/pull/19452#discussion_r2041682990
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/SubmittedRecords.java: ########## @@ -261,6 +259,7 @@ static class CommittableOffsets { /** * @return the offsets that can be committed at the time of the snapshot */ + @Override public Map<Map<String, Object>, Map<String, Object>> offsets() { return Collections.unmodifiableMap(offsets); Review Comment: > I think it's actually a place where we can't use Map.copyOf() as some values could be null. I hate to put `null` to the value ... > Since the offset field is immutable, we can wrap it in Collections.unmodifiableMap() in the constructor. +1 -- 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