mjsax commented on code in PR #12204: URL: https://github.com/apache/kafka/pull/12204#discussion_r907880688
########## streams/src/main/java/org/apache/kafka/streams/state/internals/SessionKeySchema.java: ########## @@ -35,7 +35,7 @@ public class SessionKeySchema implements SegmentedBytesStore.KeySchema { private static final byte[] MIN_SUFFIX = new byte[SUFFIX_SIZE]; public static int keyByteLength(final Bytes key) { - return key.get().length + 2 * TIMESTAMP_SIZE; + return (key == null ? 0 : key.get().length) + 2 * TIMESTAMP_SIZE; Review Comment: Can `key` ever be `null` here? -- 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