We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3150d6b commit b903186Copy full SHA for b903186
netty-utils/src/main/java/org/asynchttpclient/netty/util/Utf8ByteBufCharsetDecoder.java
@@ -182,17 +182,17 @@ public String decode(ByteBuf... bufs) throws CharacterCodingException {
182
183
int totalSize = 0;
184
int totalNioBuffers = 0;
185
- boolean direct = false;
+ boolean withoutArray = false;
186
for (ByteBuf buf : bufs) {
187
- if (buf.isDirect()) {
188
- direct = true;
+ if (!buf.hasArray()) {
+ withoutArray = true;
189
break;
190
}
191
totalSize += buf.readableBytes();
192
totalNioBuffers += buf.nioBufferCount();
193
194
195
- if (direct) {
+ if (withoutArray) {
196
return ByteBufUtils.decodeNonOptimized(UTF_8, bufs);
197
198
} else {
0 commit comments