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();