dongnuo123 commented on code in PR #22264:
URL: https://github.com/apache/kafka/pull/22264#discussion_r3249094554
##########
clients/src/main/java/org/apache/kafka/common/protocol/ByteBufferAccessor.java:
##########
@@ -30,34 +32,54 @@ public ByteBufferAccessor(ByteBuffer buf) {
@Override
public byte readByte() {
- return buf.get();
+ try {
+ return buf.get();
+ } catch (BufferUnderflowException e) {
+ throw new SchemaException("Buffer underflow while reading byte",
e);
Review Comment:
it doesn't make sense to throw schema exception here since there's no schema
in the layer
--
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]