The default buffer must be unpooled for backward compatibility

Mistakenly set to pooled while merging the changes from 4.1 and master.
This commit is contained in:
Trustin Lee 2014-02-21 14:42:40 -08:00
parent 7fe10fe635
commit 0fc66a411f

View File

@ -48,7 +48,7 @@ public final class ByteBufUtil {
HEXDUMP_TABLE[(i << 1) + 1] = DIGITS[i & 0x0F]; HEXDUMP_TABLE[(i << 1) + 1] = DIGITS[i & 0x0F];
} }
String allocType = SystemPropertyUtil.get("io.netty.allocator.type", "pooled").toLowerCase(Locale.US).trim(); String allocType = SystemPropertyUtil.get("io.netty.allocator.type", "unpooled").toLowerCase(Locale.US).trim();
ByteBufAllocator alloc; ByteBufAllocator alloc;
if ("unpooled".equals(allocType)) { if ("unpooled".equals(allocType)) {
alloc = UnpooledByteBufAllocator.DEFAULT; alloc = UnpooledByteBufAllocator.DEFAULT;
@ -347,7 +347,7 @@ public final class ByteBufUtil {
if (!cr.isUnderflow()) { if (!cr.isUnderflow()) {
cr.throwException(); cr.throwException();
} }
dst.writerIndex(dst.writerIndex() + (dstBuf.position() - pos)); dst.writerIndex(dst.writerIndex() + dstBuf.position() - pos);
release = false; release = false;
return dst; return dst;
} catch (CharacterCodingException x) { } catch (CharacterCodingException x) {