From 4d1d995a115939da51a8ad93f9df91e05ec0c808 Mon Sep 17 00:00:00 2001 From: Karan Kumar Date: Fri, 21 Jun 2019 22:25:31 +0530 Subject: [PATCH] KAFKA-8563: Remove redundant `NetworkSend.sizeDelimit()` method (#6967) Reviewers: Ismael Juma --- .../java/org/apache/kafka/common/network/NetworkSend.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/common/network/NetworkSend.java b/clients/src/main/java/org/apache/kafka/common/network/NetworkSend.java index 8820059aa79..94abc64bfcb 100644 --- a/clients/src/main/java/org/apache/kafka/common/network/NetworkSend.java +++ b/clients/src/main/java/org/apache/kafka/common/network/NetworkSend.java @@ -24,11 +24,7 @@ import java.nio.ByteBuffer; public class NetworkSend extends ByteBufferSend { public NetworkSend(String destination, ByteBuffer buffer) { - super(destination, sizeDelimit(buffer)); - } - - private static ByteBuffer[] sizeDelimit(ByteBuffer buffer) { - return new ByteBuffer[] {sizeBuffer(buffer.remaining()), buffer}; + super(destination, sizeBuffer(buffer.remaining()), buffer); } private static ByteBuffer sizeBuffer(int size) {