mjsax commented on code in PR #23961:
URL: https://github.com/apache/kafka/pull/23961#discussion_r4418843982
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/PositionSerde.java:
##########
@@ -60,6 +62,18 @@ public static Position deserialize(final ByteBuffer buffer) {
}
}
+ private static void validateCount(final int count,
+ final int minBytesPerEntry,
+ final ByteBuffer buffer,
+ final String entryType) {
+ if (count < 0 || (long) count * minBytesPerEntry > buffer.remaining())
{
+ throw new IllegalArgumentException(
Review Comment:
```suggestion
throw new SerializationException(
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]