From dc40f60e6bce0baedf2eb5e777f820b8a7ee7f92 Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Mon, 27 Feb 2017 12:48:39 +0000 Subject: [PATCH] ARTEMIS-1002 Use default PooledBufferAllocator in ActiveMQBuffers --- .../org/apache/activemq/artemis/api/core/ActiveMQBuffers.java | 2 +- .../core/remoting/impl/netty/PartialPooledByteBufAllocator.java | 2 +- .../amqp/client/transport/PartialPooledByteBufAllocator.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java index 849c9214bf..32f92796f8 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java @@ -28,7 +28,7 @@ import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper; public final class ActiveMQBuffers { - private static final PooledByteBufAllocator ALLOCATOR = new PooledByteBufAllocator(); + private static final PooledByteBufAllocator ALLOCATOR = PooledByteBufAllocator.DEFAULT; /** * Creates a self-expanding ActiveMQBuffer with the given initial size diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java index d6b9251c3e..5e67952ec7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java @@ -28,7 +28,7 @@ import io.netty.buffer.UnpooledByteBufAllocator; */ public class PartialPooledByteBufAllocator implements ByteBufAllocator { - private static final ByteBufAllocator POOLED = new PooledByteBufAllocator(false); + private static final ByteBufAllocator POOLED = PooledByteBufAllocator.DEFAULT; private static final ByteBufAllocator UNPOOLED = new UnpooledByteBufAllocator(false); public static final PartialPooledByteBufAllocator INSTANCE = new PartialPooledByteBufAllocator(); diff --git a/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java b/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java index 988e5019cc..12f5568f0e 100644 --- a/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java +++ b/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java @@ -28,7 +28,7 @@ import io.netty.buffer.UnpooledByteBufAllocator; */ public class PartialPooledByteBufAllocator implements ByteBufAllocator { - private static final ByteBufAllocator POOLED = new PooledByteBufAllocator(false); + private static final ByteBufAllocator POOLED = PooledByteBufAllocator.DEFAULT; private static final ByteBufAllocator UNPOOLED = new UnpooledByteBufAllocator(false); public static final PartialPooledByteBufAllocator INSTANCE = new PartialPooledByteBufAllocator();