From ef572d859da76da63f7c59aaefa65b233281ebc8 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 13 Aug 2014 12:07:06 +0200 Subject: [PATCH] Change back default allocator to pooled. Motivation: While porting some changes from 4.0 to 4.1 and master branch I changed the default allocator from pooled to unpooled by mistake. This should be reverted. The guilty commit is 4a3ef90381f343a457243d6e2eabac01e551315b. Thanks to @blucas for spotting this. Modifications: Revert changes related to allocator. Result: Use the correct default allocator again. --- buffer/src/main/java/io/netty/buffer/ByteBufUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java b/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java index e0448ea459..8bacc9758c 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java @@ -53,7 +53,9 @@ public final class ByteBufUtil { HEXDUMP_TABLE[(i << 1) + 1] = DIGITS[i & 0x0F]; } - String allocType = SystemPropertyUtil.get("io.netty.allocator.type", "unpooled").toLowerCase(Locale.US).trim(); + String allocType = SystemPropertyUtil.get( + "io.netty.allocator.type", PlatformDependent.isAndroid() ? "unpooled" : "pooled"); + allocType = allocType.toLowerCase(Locale.US).trim(); ByteBufAllocator alloc; if ("unpooled".equals(allocType)) {