dongnuo123 commented on code in PR #22264:
URL: https://github.com/apache/kafka/pull/22264#discussion_r3249100331


##########
generator/src/main/java/org/apache/kafka/message/MessageDataGenerator.java:
##########
@@ -656,7 +660,8 @@ private void generateVariableLengthReader(Versions 
fieldFlexibleVersions,
             FieldType.ArrayType arrayType = (FieldType.ArrayType) type;
             buffer.printf("if (%s > _readable.remaining()) {%n", lengthVar);
             buffer.incrementIndent();
-            buffer.printf("throw new RuntimeException(\"Tried to allocate a 
collection of size \" + %s + \", but " +
+            headerGenerator.addImport(MessageGenerator.SCHEMA_EXCEPTION_CLASS);

Review Comment:
   bufferunderflow



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