From 29e940d35e6e596fd70172c7c23a4c4c9d2d6059 Mon Sep 17 00:00:00 2001 From: Poison Date: Mon, 13 Nov 2023 14:57:37 +0800 Subject: [PATCH] Replace '==' with 'equals()' --- .../fastjson/parser/deserializer/FieldDeserializer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/alibaba/fastjson/parser/deserializer/FieldDeserializer.java b/src/main/java/com/alibaba/fastjson/parser/deserializer/FieldDeserializer.java index 17c78a15b5..acf317d33d 100644 --- a/src/main/java/com/alibaba/fastjson/parser/deserializer/FieldDeserializer.java +++ b/src/main/java/com/alibaba/fastjson/parser/deserializer/FieldDeserializer.java @@ -139,8 +139,8 @@ public void setValue(Object object, Object value) { if (collection == Collections.emptySet() || collection == Collections.emptyList() - || collectionClassName == "java.util.ImmutableCollections$ListN" - || collectionClassName == "java.util.ImmutableCollections$List12" + || collectionClassName.equals("java.util.ImmutableCollections$ListN") + || collectionClassName.equals("java.util.ImmutableCollections$List12") || collectionClassName.startsWith("java.util.Collections$Unmodifiable")) { // skip return;