Skip to content

Commit ba16cfc

Browse files
committed
Short path when one single buf
1 parent 676a28b commit ba16cfc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

netty-utils/src/main/java/org/asynchttpclient/netty/util/Utf8ByteBufCharsetDecoder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ public String decode(ByteBuf buf) throws CharacterCodingException {
177177
}
178178

179179
public String decode(ByteBuf... bufs) throws CharacterCodingException {
180+
if (bufs.length == 1) {
181+
return decode(bufs[0]);
182+
}
180183

181184
int totalSize = 0;
182185
int totalNioBuffers = 0;

0 commit comments

Comments
 (0)