chaokunyang commented on code in PR #1701:
URL: https://github.com/apache/fury/pull/1701#discussion_r1670481626
##########
java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java:
##########
@@ -221,6 +249,22 @@ public T newCollection(MemoryBuffer buffer) {
fury.getRefResolver().reference(collection);
return collection;
}
+
+ @Override
+ public Collection newCollection(Collection originCollection) {
+ Collection collection;
+ Comparator comparator = ((SortedSet) originCollection).comparator();
+ if (Objects.equals(type, TreeSet.class)) {
Review Comment:
I noticed we used `Objects` in many places, could we remove such usage, we
need to reduce callstack and the size of method bytecode
--
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]