divijvaidya commented on code in PR #12228: URL: https://github.com/apache/kafka/pull/12228#discussion_r1159591975
########## clients/src/main/java/org/apache/kafka/common/record/LegacyRecord.java: ########## @@ -385,8 +385,7 @@ private static void write(ByteBuffer buffer, ByteBuffer value, CompressionType compressionType, TimestampType timestampType) { - try { - DataOutputStream out = new DataOutputStream(new ByteBufferOutputStream(buffer)); + try (DataOutputStream out = new DataOutputStream(new ByteBufferOutputStream(buffer))) { Review Comment: Note to reviewer(s): This is a NoOp since `close()` method of `ByteBufferOutputStream` doesn't do anything. This change is for code hygiene. -- 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