From 02f897203af98b180b2a1b68e5ae1a901c8ef707 Mon Sep 17 00:00:00 2001 From: zhouzh_zzz Date: Tue, 22 Aug 2023 17:11:29 +0800 Subject: [PATCH] Protobuf support: Replace "java.util.ArrayList" with ArrayList.class.getName() Signed-off-by: zhouzh_zzz --- .../src/main/java/org/redisson/codec/ProtobufCodec.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/redisson/src/main/java/org/redisson/codec/ProtobufCodec.java b/redisson/src/main/java/org/redisson/codec/ProtobufCodec.java index d6e440f3f..d918f2234 100644 --- a/redisson/src/main/java/org/redisson/codec/ProtobufCodec.java +++ b/redisson/src/main/java/org/redisson/codec/ProtobufCodec.java @@ -17,6 +17,8 @@ import org.redisson.client.protocol.Encoder; import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.Set; @@ -68,9 +70,9 @@ public class ProtobufCodec extends BaseCodec { protobufBlacklist = new HashSet<>(); protobufBlacklist.addAll(BasicSerializerFactoryConcreteGetter.getConcreteKeySet()); - protobufBlacklist.add("java.util.ArrayList"); - protobufBlacklist.add("java.util.HashSet"); - protobufBlacklist.add("java.util.HashMap"); + protobufBlacklist.add(ArrayList.class.getName()); + protobufBlacklist.add(HashSet.class.getName()); + protobufBlacklist.add(HashMap.class.getName()); } public void addBlacklist(Class clazz) {