chaokunyang commented on code in PR #2999:
URL: https://github.com/apache/fory/pull/2999#discussion_r2596923882
##########
java/fory-core/src/main/java/org/apache/fory/serializer/collection/CollectionSerializer.java:
##########
@@ -61,7 +61,11 @@ public T copy(T originCollection) {
if (needToCopyRef) {
fory.reference(originCollection, newCollection);
}
- copyElements(originCollection, newCollection);
+ onCollectionCopy(originCollection, newCollection);
return (T) newCollection;
}
+
+ protected void onCollectionCopy(Collection originCollection, Collection
newCollection) {
Review Comment:
Abstraction is not always good, overwrite is more simple here, and your
implement can't setup correct reference graph, which will an issue too if copy
ref is enabled
--
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]