Skip to content

Commit 79c0b92

Browse files
no FUD
Signed-off-by: Adrian Cole <[email protected]>
1 parent 8c4962b commit 79c0b92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

util/src/main/java/io/kubernetes/client/ProtoClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ private static byte[] encode(Message msg, String apiVersion, String kind) throws
313313
.setRaw(msg.toByteString())
314314
.build();
315315

316-
// Encode directly to an array, to reduce buffering. CodedOutputStream will
317-
// still allocate arrays internally, but this is the best we can do without
318-
// something that quickly looks like square/wire.
316+
// Encode directly to a sized array, to eliminate buffering
319317
int serializedSize = u.getSerializedSize();
320318
byte[] result = new byte[MAGIC.length + u.getSerializedSize()];
321319
System.arraycopy(MAGIC, 0, result, 0, MAGIC.length);

0 commit comments

Comments
 (0)