From 684dd24cc7be878d234f6fb75678122273035308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Andr=C3=A9=20Pearce?= Date: Wed, 9 Aug 2017 08:51:33 +0100 Subject: [PATCH] ARTEMIS-1335 Update Netty to 4.1.14 Update Netty to 4.1.14 --- artemis-features/src/main/resources/features.xml | 1 + .../netty/buffer/UnpooledUnsafeDirectByteBufWrapper.java | 7 ++++++- pom.xml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/artemis-features/src/main/resources/features.xml b/artemis-features/src/main/resources/features.xml index fc9bb78cd3..cf5a2a9a24 100644 --- a/artemis-features/src/main/resources/features.xml +++ b/artemis-features/src/main/resources/features.xml @@ -36,6 +36,7 @@ mvn:io.netty/netty-codec/${netty.version} mvn:io.netty/netty-handler/${netty.version} mvn:io.netty/netty-transport-native-epoll/${netty.version} + mvn:io.netty/netty-transport-native-unix-common/${netty.version} diff --git a/artemis-journal/src/main/java/io/netty/buffer/UnpooledUnsafeDirectByteBufWrapper.java b/artemis-journal/src/main/java/io/netty/buffer/UnpooledUnsafeDirectByteBufWrapper.java index a4346dc0c8..3ec816530a 100644 --- a/artemis-journal/src/main/java/io/netty/buffer/UnpooledUnsafeDirectByteBufWrapper.java +++ b/artemis-journal/src/main/java/io/netty/buffer/UnpooledUnsafeDirectByteBufWrapper.java @@ -36,6 +36,7 @@ import io.netty.util.internal.PlatformDependent; */ public final class UnpooledUnsafeDirectByteBufWrapper extends AbstractReferenceCountedByteBuf { + private static final byte ZERO = 0; private ByteBuffer buffer; private int arrayOffset; private byte[] array; @@ -563,7 +564,11 @@ public final class UnpooledUnsafeDirectByteBufWrapper extends AbstractReferenceC @Override public ByteBuf setZero(int index, int length) { if (hasMemoryAddress()) { - UnsafeByteBufUtil.setZero(this, addr(index), index, length); + if (length == 0) { + return this; + } + this.checkIndex(index, length); + PlatformDependent.setMemory(addr(index), length, ZERO); } else { //prefer Arrays::fill here? UnsafeByteBufUtil.setZero(array, idx(index), length); diff --git a/pom.xml b/pom.xml index 4374225fa0..15d701ee8a 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ 3.6.13.Final 2.4 2.8.47 - 4.1.9.Final + 4.1.14.Final 0.20.0 3.0.19.Final 1.7.21