divijvaidya commented on code in PR #13582: URL: https://github.com/apache/kafka/pull/13582#discussion_r1170245494
########## clients/src/main/java/org/apache/kafka/common/record/DefaultRecordBatch.java: ########## @@ -434,7 +434,7 @@ private static byte computeAttributes(CompressionType type, TimestampType timest if (isControl) attributes |= CONTROL_FLAG_MASK; if (type.id > 0) - attributes |= COMPRESSION_CODEC_MASK & type.id; + attributes |= (byte) (COMPRESSION_CODEC_MASK & type.id); Review Comment: I expected type promotion to a common ancestor for cases where overflow is expected such as multiplication but didn't expect it for `&` bit operation. Nevertheless TIL! -- 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