zhaommmmomo commented on PR #1701:
URL: https://github.com/apache/fury/pull/1701#issuecomment-2220797697

   I have summarized the above areas that need to be adjusted. Thank you for 
your code review and suggestions. @chaokunyang 
   
   Adjustment Points:
   1. Create a `FuryCopyableSerializer` to handle the custom `copy` method, and 
convert to this type in `createSerializer` to avoid using `instanceof` checks 
every time a copy is made.
   2. Adjust `Fury#copyReference(Object o1, Object o2)` to `Fury#reference(T 
o1, T o2)`, which is only used to track the references of o1 and o2.
   3. Create a base class `BaseObjectSerializer` for all `pojo / record / 
bean`, which implements the common `copy()` method. `ObjectSerializer`, 
`GeneratedSerializer`, `CompatibleSerializer`, and `MetaSharedSerializer` will 
inherit from this class.
   4. `record` is no longer the default immutable object.
   5. The `comparator` also needs to `Fury#copy()`.
   6. Code style:
      - Reduce calls like `Objects.isNull(obj)`, and directly check if `obj == 
null`.
      - Place `inc copy depth` inside `Fury#copy(T obj)`.


-- 
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