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



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/AbstractResponse.java
##########
@@ -88,16 +80,11 @@ protected void updateErrorCounts(Map<Errors, Integer> 
errorCounts, Errors error)
 
     protected abstract Struct toStruct(short version);
 
-    public ByteBuffer serializeBody(short version) {
-        Struct dataStruct = toStruct(version);
-        ByteBuffer buffer = ByteBuffer.allocate(dataStruct.sizeOf());
-        dataStruct.writeTo(buffer);
-        buffer.flip();
-
-        return buffer;
-    }
-
-    public static AbstractResponse deserializeBody(ByteBuffer byteBuffer, 
RequestHeader header) {
+    /**
+     * Parse a response from the provided buffer. The buffer is expected to 
hold both
+     * the {@link ResponseHeader} as well as the response payload.
+     */
+    public static AbstractResponse parseResponse(ByteBuffer byteBuffer, 
RequestHeader header) {

Review comment:
       sure. Open a jira as follow-up :)




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