ijuma commented on code in PR #12229:
URL: https://github.com/apache/kafka/pull/12229#discussion_r900166671


##########
clients/src/main/java/org/apache/kafka/common/record/DefaultRecordBatch.java:
##########
@@ -308,7 +308,7 @@ protected Record readNext(long baseOffset, long 
baseTimestamp, int baseSequence,
                 try {
                     return DefaultRecord.readFrom(buffer, baseOffset, 
baseTimestamp, baseSequence, logAppendTime);
                 } catch (BufferUnderflowException e) {
-                    throw new InvalidRecordException("Incorrect declared batch 
size, premature EOF reached");
+                    throw new InvalidRecordException("Incorrect declared batch 
size, premature EOF reached", e);

Review Comment:
   Does the underflow exception actually add any information? If I recall 
correctly, it does not.



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

Reply via email to