LiangliangSui commented on code in PR #2139:
URL: https://github.com/apache/fury/pull/2139#discussion_r2030361594
##########
java/fury-core/src/main/java/org/apache/fury/serializer/ObjectSerializer.java:
##########
@@ -73,19 +74,23 @@ public final class ObjectSerializer<T> extends
AbstractObjectSerializer<T> {
private final GenericTypeField[] otherFields;
private final GenericTypeField[] containerFields;
private final int classVersionHash;
+ private final SerializationBinding binding;
+ private final TypeResolver typeResolver;
public ObjectSerializer(Fury fury, Class<T> cls) {
this(fury, cls, true);
}
public ObjectSerializer(Fury fury, Class<T> cls, boolean resolveParent) {
super(fury, cls);
+ binding = SerializationBinding.createBinding(fury);
Review Comment:
**NIT:**
We can create `SerializationBinding` directly in `Fury.java` instead of
repeatedly creating it in `ObjectSerializer`, `NonexistentClassSerializer`,
`MetaSharedSerializer` serializers, so that `SerializationBinding` can be
reused, because the parameters required by `SerializationBinding.createBinding`
are only `Fury`.
--
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]