soondenana opened a new pull request, #19163: URL: https://github.com/apache/kafka/pull/19163
The generated `*RequestData` java file constructors take `Readable` as an input. However, the `parse` method in the `AbstractRequest` takes a `ByteBuffer` as input. So to create the corresponding `*RequestData` objects, each individual concrete Request classes wraps the `ByteBuffer` into a `ByteBufferAccessor`. This is a boilerplate code present in all the concrete Request classes. This change pulls it into `AbstractRequest` so that subclasses can simply pass the `Readable` they get from the superclass directly to `*RequestData` classes. The same change is made to the `serialize` method to maintain symmetry. A simple mechanical refactoring that touches many files, but reduced a lot of duplicated and boilerplate code. -- 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