MrChang0 commented on code in PR #1622:
URL: https://github.com/apache/incubator-fury/pull/1622#discussion_r1596721086


##########
java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java:
##########
@@ -399,6 +400,26 @@ public static void registerDefaultSerializers(Fury fury) {
     fury.registerSerializer(cls, new ImmutableSortedSetSerializer<>(fury, 
cls));
     cls = loadClass(pkg + ".ImmutableSortedMap", ImmutableSortedMap.of(1, 
2).getClass());
     fury.registerSerializer(cls, new ImmutableSortedMapSerializer<>(fury, 
cls));
+
+    // Guava version before 19.0, of() return
+    // 
EmptyImmutableSet/EmptyImmutableBiMap/EmptyImmutableSortedMap/EmptyImmutableSortedSet
+    // we register if class exist
+    if (checkClassExist(pkg + ".EmptyImmutableSet")) {

Review Comment:
   > If classid are different, the deserialization will laod wrong class and 
deserializer. We met such errors before. it's very hard to locate it
   
   I see comments, and I take same classId to deserialize low version guava.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to