mjsax commented on code in PR #22514:
URL: https://github.com/apache/kafka/pull/22514#discussion_r3382831347
##########
clients/src/test/java/org/apache/kafka/common/serialization/ListDeserializerTest.java:
##########
@@ -380,14 +380,14 @@ public void shouldThrowOnTooLargeNullEntryLength() {
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xFF // encodes
number of null entries == 255
};
- final ListDeserializer<String> testDeserializer = new
ListDeserializer<>(ArrayList.class, new StringDeserializer());
+ final ListDeserializer<Integer> testDeserializer = new
ListDeserializer<>(ArrayList.class, new IntegerDeserializer());
Review Comment:
No, this was a bad test setup (was not a problem originally, but did got
revealed using `primitiveSize` above). So even if using `primitiveSize` is not
correct (good catch), we should still use Integer here, because we use
`CONSTANT_SIZE` but `String` is not constant size.
--
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]