soondenana opened a new pull request, #19353: URL: https://github.com/apache/kafka/pull/19353
This is the Response side of Request refactoring PR in commit: 56d1dc1b6e12a8a325c91749485aa03bce17c7f1 The generated ReequestData classes take Readable as input to parse the Response. However, the individual Response objects take ByteBuffer as input and thus convert them to Readable using `new ByteBufferAccessor` call. This call is in all the Respose classes that create boilderplate code in high tens of these classes. This PR changes the parse method of all the Respnose class to take Readable instead so that no such conversion is needed. The clients are the responsible for calling the parse method with appropriate object which is majority of the cases is already a Readable. There were couple of places in code where `position` method is used, which is not present in the Readable interface, so a new `ReadableBuf` interface is created to add these methods. This allows us to not retreive ByteBuffer from Readable to use the `position` method. Rest of the changes are all refactoring with no logical change. Delete this text and replace it with a detailed description of your change. The PR title and body will become the squashed commit message. If you would like to tag individuals, add some commentary, upload images, or include other supplemental information that should not be part of the eventual commit message, please use a separate comment. If applicable, please include a summary of the testing strategy (including rationale) for the proposed change. Unit and/or integration tests are expected for any behavior change and system tests should be considered for larger changes. -- 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