hachikuji commented on a change in pull request #9563:
URL: https://github.com/apache/kafka/pull/9563#discussion_r518885497



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/EnvelopeRequest.java
##########
@@ -91,4 +91,14 @@ public AbstractResponse getErrorResponse(int throttleTimeMs, 
Throwable e) {
     public static EnvelopeRequest parse(ByteBuffer buffer, short version) {
         return new EnvelopeRequest(ApiKeys.ENVELOPE.parseRequest(version, 
buffer), version);
     }
+
+    public EnvelopeRequestData data() {
+        return data;
+    }
+
+    @Override
+    public Send toSend(String destination, RequestHeader header) {
+        return SendBuilder.buildRequestSend(destination, header, this.data);

Review comment:
       The version is contained in `RequestHeader`. This pattern was probably 
started before `AbstractRequest` included the version as well.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to