SEPURI-SAI-KRISHNA commented on code in PR #22755:
URL: https://github.com/apache/kafka/pull/22755#discussion_r3632226191


##########
clients/src/test/java/org/apache/kafka/common/serialization/ListDeserializerTest.java:
##########
@@ -354,6 +354,42 @@ public void shouldThrowOnTooLargeEntrySize() {
         );
     }
 
+    @Test
+    public void shouldThrowOnEntryTruncatedMidStream() {
+        // entrySize (10) is within data.length (14) so it passes the bounds 
check, but only 5 payload bytes
+        // actually follow. A single read(byte[]) would return a partial count 
(not -1) and silently leave the
+        // entry zero-padded; readFully must instead detect the truncation and 
fail.

Review Comment:
   Done reworded to describe the expected behavior instead of the 
read/readFully mechanics.



-- 
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]

Reply via email to