diff --git a/README.adoc b/README.adoc
index a35db16..75e2dcd 100644
--- a/README.adoc
+++ b/README.adoc
@@ -4,5 +4,5 @@
* License: Apache-2.0 License
* Required Java version: Java 11
* Maven coordinates:
-** `io.netty.contrib:netty-codec-redis:5.0.0.Final-SNAPSHOT`
+** `io.netty.contrib:netty-codec-redis:4.1.92.Final-SNAPSHOT`
diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml
index 6c5f7da..6262917 100644
--- a/benchmarks/pom.xml
+++ b/benchmarks/pom.xml
@@ -7,14 +7,14 @@
io.netty.contribnetty-codec-redis-parent
- 5.0.0.Final-SNAPSHOT
+ 4.1.92.Final-SNAPSHOTnetty-codec-redis-benchmarks${parent.version}
- 1.33
+ 1.36
@@ -44,4 +44,4 @@
${jmh.version}
-
\ No newline at end of file
+
diff --git a/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/RedisEncoderBenchmark.java b/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/RedisEncoderBenchmark.java
index b9330fc..176a971 100644
--- a/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/RedisEncoderBenchmark.java
+++ b/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/RedisEncoderBenchmark.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
@@ -15,17 +15,9 @@
*/
package io.netty.contrib.microbenchmarks.redis;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.PooledByteBufAllocator;
-import io.netty.buffer.Unpooled;
-import io.netty.buffer.UnpooledByteBufAllocator;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.contrib.handler.codec.redis.ArrayRedisMessage;
-import io.netty.contrib.handler.codec.redis.FullBulkStringRedisMessage;
-import io.netty.contrib.handler.codec.redis.RedisEncoder;
-import io.netty.contrib.handler.codec.redis.RedisMessage;
-import io.netty.microbench.channel.EmbeddedChannelWriteReleaseHandlerContext;
-import io.netty.util.concurrent.Future;
+import java.util.ArrayList;
+import java.util.List;
+
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
@@ -38,15 +30,25 @@
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
-import java.util.ArrayList;
-import java.util.List;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.PooledByteBufAllocator;
+import io.netty.buffer.Unpooled;
+import io.netty.buffer.UnpooledByteBufAllocator;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelPromise;
+import io.netty.contrib.handler.codec.redis.ArrayRedisMessage;
+import io.netty.contrib.handler.codec.redis.FullBulkStringRedisMessage;
+import io.netty.contrib.handler.codec.redis.RedisEncoder;
+import io.netty.contrib.handler.codec.redis.RedisMessage;
+import io.netty.microbench.channel.EmbeddedChannelWriteReleaseHandlerContext;
+import io.netty.microbench.util.AbstractMicrobenchmark;
@State(Scope.Benchmark)
@Fork(1)
@Threads(1)
@Warmup(iterations = 5)
@Measurement(iterations = 5)
-public class RedisEncoderBenchmark {
+public class RedisEncoderBenchmark extends AbstractMicrobenchmark {
private RedisEncoder encoder;
private ByteBuf content;
private ChannelHandlerContext context;
@@ -55,6 +57,9 @@ public class RedisEncoderBenchmark {
@Param({ "true", "false" })
public boolean pooledAllocator;
+ @Param({ "true", "false" })
+ public boolean voidPromise;
+
@Param({ "50", "200", "1000" })
public int arraySize;
@@ -65,7 +70,7 @@ public void setup() {
content.writeBytes(bytes);
ByteBuf testContent = Unpooled.unreleasableBuffer(content.asReadOnly());
- List rList = new ArrayList<>(arraySize);
+ List rList = new ArrayList(arraySize);
for (int i = 0; i < arraySize; ++i) {
rList.add(new FullBulkStringRedisMessage(testContent));
}
@@ -75,20 +80,23 @@ public void setup() {
UnpooledByteBufAllocator.DEFAULT, encoder) {
@Override
protected void handleException(Throwable t) {
- throw new AssertionError("Unexpected exception", t);
+ handleUnexpectedException(t);
}
};
}
@TearDown(Level.Trial)
- public void tearDown() {
- redisArray.release();
+ public void teardown() {
content.release();
content = null;
}
@Benchmark
- public Future writeArray() {
- return encoder.write(context, redisArray.retain());
+ public void writeArray() throws Exception {
+ encoder.write(context, redisArray.retain(), newPromise());
+ }
+
+ private ChannelPromise newPromise() {
+ return voidPromise ? context.voidPromise() : context.newPromise();
}
}
diff --git a/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/package-info.java b/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/package-info.java
index 5bafa73..e92a380 100644
--- a/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/package-info.java
+++ b/benchmarks/src/main/java/io/netty/contrib/microbenchmarks/redis/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
@@ -14,6 +14,6 @@
* under the License.
*/
/**
- * Benchmarks for {@link io.netty.contrib.handler.codec.redis}.
+ * Benchmarks for {@link io.netty.handler.codec.redis}.
*/
package io.netty.contrib.microbenchmarks.redis;
diff --git a/codec-redis/pom.xml b/codec-redis/pom.xml
index b8f257c..9ccc064 100644
--- a/codec-redis/pom.xml
+++ b/codec-redis/pom.xml
@@ -7,10 +7,10 @@
io.netty.contribnetty-codec-redis-parent
- 5.0.0.Final-SNAPSHOT
+ 4.1.92.Final-SNAPSHOT
- codec-redis
+ netty-codec-redis${parent.version}Netty/Codec/Redisjar
@@ -52,4 +52,4 @@
test
-
\ No newline at end of file
+
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/AbstractStringRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/AbstractStringRedisMessage.java
index dd814d6..f4d73ee 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/AbstractStringRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/AbstractStringRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,10 +12,10 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
-package io.netty.contrib.handler.codec.redis;
-import static java.util.Objects.requireNonNull;
+package io.netty.contrib.handler.codec.redis;
+import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.UnstableApi;
@@ -28,7 +28,7 @@ public abstract class AbstractStringRedisMessage implements RedisMessage {
private final String content;
AbstractStringRedisMessage(String content) {
- this.content = requireNonNull(content, "content");
+ this.content = ObjectUtil.checkNotNull(content, "content");
}
/**
@@ -48,4 +48,5 @@ public String toString() {
.append(content)
.append(']').toString();
}
+
}
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayHeaderRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayHeaderRedisMessage.java
index 1bd5a7f..86c3a5e 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayHeaderRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayHeaderRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.util.internal.StringUtil;
@@ -30,7 +31,7 @@ public class ArrayHeaderRedisMessage implements RedisMessage {
*/
public ArrayHeaderRedisMessage(long length) {
if (length < RedisConstants.NULL_VALUE) {
- throw new RedisCodecException("length: " + length + " (expected: >= " + RedisConstants.NULL_VALUE + ')');
+ throw new RedisCodecException("length: " + length + " (expected: >= " + RedisConstants.NULL_VALUE + ")");
}
this.length = length;
}
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayRedisMessage.java
index df48f39..81480c3 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ArrayRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,18 +12,18 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
-import static java.util.Objects.requireNonNull;
+import java.util.Collections;
+import java.util.List;
import io.netty.util.AbstractReferenceCounted;
import io.netty.util.ReferenceCountUtil;
+import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.UnstableApi;
-import java.util.Collections;
-import java.util.List;
-
/**
* Arrays of RESP.
*/
@@ -43,7 +43,7 @@ private ArrayRedisMessage() {
*/
public ArrayRedisMessage(List children) {
// do not retain here. children are already retained when created.
- this.children = requireNonNull(children, "children");
+ this.children = ObjectUtil.checkNotNull(children, "children");
}
/**
@@ -173,4 +173,5 @@ public String toString() {
return "EmptyArrayRedisMessage";
}
};
+
}
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringHeaderRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringHeaderRedisMessage.java
index c579b6f..183c0c4 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringHeaderRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringHeaderRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.util.internal.UnstableApi;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringRedisContent.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringRedisContent.java
index 4248efe..9e5ff4c 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringRedisContent.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/BulkStringRedisContent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.buffer.ByteBuf;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultBulkStringRedisContent.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultBulkStringRedisContent.java
index d396c4c..01952ad 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultBulkStringRedisContent.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultBulkStringRedisContent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.buffer.ByteBuf;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultLastBulkStringRedisContent.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultLastBulkStringRedisContent.java
index a50e5d8..80d4993 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultLastBulkStringRedisContent.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/DefaultLastBulkStringRedisContent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.buffer.ByteBuf;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ErrorRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ErrorRedisMessage.java
index c3688f5..671a710 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ErrorRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/ErrorRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.util.internal.UnstableApi;
@@ -30,4 +31,5 @@ public final class ErrorRedisMessage extends AbstractStringRedisMessage {
public ErrorRedisMessage(String content) {
super(content);
}
+
}
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FixedRedisMessagePool.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FixedRedisMessagePool.java
index 66f4770..6b6d7d4 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FixedRedisMessagePool.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FixedRedisMessagePool.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,8 +12,12 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
+import java.util.HashMap;
+import java.util.Map;
+
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.util.CharsetUtil;
@@ -21,10 +25,6 @@
import io.netty.util.collection.LongObjectMap;
import io.netty.util.internal.UnstableApi;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* A default fixed redis message pool.
*/
@@ -94,9 +94,9 @@ public String toString() {
* Creates a {@link FixedRedisMessagePool} instance.
*/
private FixedRedisMessagePool() {
- keyToSimpleStrings = new EnumMap(RedisReplyKey.class);
- stringToSimpleStrings = new HashMap<>(RedisReplyKey.values().length, 1.0f);
- byteBufToSimpleStrings = new HashMap<>(RedisReplyKey.values().length, 1.0f);
+ keyToSimpleStrings = new HashMap(RedisReplyKey.values().length, 1.0f);
+ stringToSimpleStrings = new HashMap(RedisReplyKey.values().length, 1.0f);
+ byteBufToSimpleStrings = new HashMap(RedisReplyKey.values().length, 1.0f);
for (RedisReplyKey value : RedisReplyKey.values()) {
ByteBuf key = Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(
value.name().getBytes(CharsetUtil.UTF_8))).asReadOnly();
@@ -107,9 +107,9 @@ private FixedRedisMessagePool() {
byteBufToSimpleStrings.put(key, message);
}
- keyToErrors = new EnumMap(RedisErrorKey.class);
- stringToErrors = new HashMap<>(RedisErrorKey.values().length, 1.0f);
- byteBufToErrors = new HashMap<>(RedisErrorKey.values().length, 1.0f);
+ keyToErrors = new HashMap(RedisErrorKey.values().length, 1.0f);
+ stringToErrors = new HashMap(RedisErrorKey.values().length, 1.0f);
+ byteBufToErrors = new HashMap(RedisErrorKey.values().length, 1.0f);
for (RedisErrorKey value : RedisErrorKey.values()) {
ByteBuf key = Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(
value.toString().getBytes(CharsetUtil.UTF_8))).asReadOnly();
@@ -120,9 +120,9 @@ private FixedRedisMessagePool() {
byteBufToErrors.put(key, message);
}
- byteBufToIntegers = new HashMap<>(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
- longToIntegers = new LongObjectHashMap<>(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
- longToByteBufs = new LongObjectHashMap<>(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
+ byteBufToIntegers = new HashMap(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
+ longToIntegers = new LongObjectHashMap(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
+ longToByteBufs = new LongObjectHashMap(SIZE_CACHED_INTEGER_NUMBER, 1.0f);
for (long value = MIN_CACHED_INTEGER_NUMBER; value < MAX_CACHED_INTEGER_NUMBER; value++) {
byte[] keyBytes = RedisCodecUtil.longToAsciiBytes(value);
ByteBuf keyByteBuf = Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(keyBytes)).asReadOnly();
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FullBulkStringRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FullBulkStringRedisMessage.java
index af616b9..e943153 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FullBulkStringRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/FullBulkStringRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.buffer.ByteBuf;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/InlineCommandRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/InlineCommandRedisMessage.java
index ab5e4cf..1049f3e 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/InlineCommandRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/InlineCommandRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2018 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.util.internal.UnstableApi;
@@ -30,4 +31,5 @@ public final class InlineCommandRedisMessage extends AbstractStringRedisMessage
public InlineCommandRedisMessage(String content) {
super(content);
}
+
}
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/IntegerRedisMessage.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/IntegerRedisMessage.java
index 1b91f4c..b0eec2a 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/IntegerRedisMessage.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/IntegerRedisMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.util.internal.StringUtil;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/LastBulkStringRedisContent.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/LastBulkStringRedisContent.java
index e290211..fedaec0 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/LastBulkStringRedisContent.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/LastBulkStringRedisContent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,6 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
import io.netty.buffer.ByteBuf;
diff --git a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/RedisArrayAggregator.java b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/RedisArrayAggregator.java
index 4843488..7ca1df0 100644
--- a/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/RedisArrayAggregator.java
+++ b/codec-redis/src/main/java/io/netty/contrib/handler/codec/redis/RedisArrayAggregator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Netty Project
+ * Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
@@ -12,19 +12,20 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package io.netty.contrib.handler.codec.redis;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.List;
+
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.CodecException;
import io.netty.handler.codec.MessageToMessageDecoder;
import io.netty.util.ReferenceCountUtil;
import io.netty.util.internal.UnstableApi;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Deque;
-import java.util.List;
-
/**
* Aggregates {@link RedisMessage} parts into {@link ArrayRedisMessage}. This decoder
* should be used together with {@link RedisDecoder}.
@@ -32,10 +33,10 @@
@UnstableApi
public final class RedisArrayAggregator extends MessageToMessageDecoder {
- private final Deque depths = new ArrayDeque<>(4);
+ private final Deque depths = new ArrayDeque(4);
@Override
- protected void decode(ChannelHandlerContext ctx, RedisMessage msg) throws Exception {
+ protected void decode(ChannelHandlerContext ctx, RedisMessage msg, List