chaokunyang commented on code in PR #1701:
URL: https://github.com/apache/fury/pull/1701#discussion_r1670474125
##########
java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java:
##########
@@ -101,6 +102,33 @@ public ArraysAsListSerializer(Fury fury, Class<List<?>>
cls) {
super(fury, cls, false);
}
+ @Override
+ public List<?> copy(List<?> originCollection) {
+ Object[] elements = new Object[originCollection.size()];
+ if (!needToCopyRef) {
+ copyElements(originCollection, elements);
+ return Arrays.asList(elements);
+ }
+ List<?> newCollection;
+ newCollection = (List<?>) fury.getCopyObject(originCollection);
+ if (Objects.nonNull(newCollection)) {
+ return newCollection;
+ }
+ fury.incCopyDepth(1);
Review Comment:
We can udpate depth in Fury#copy
--
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]