MrChang0 commented on code in PR #1622:
URL: https://github.com/apache/incubator-fury/pull/1622#discussion_r1596612498
##########
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:
> Could we make classes before and after guava 19.0 mapped to same class id.
In this way, teh different guava version across processes won't introduce
deserialization error
I perfer it more, with different guava version, it can take `of()` to
deserialize.
--
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]