chaokunyang commented on code in PR #2036:
URL: https://github.com/apache/fury/pull/2036#discussion_r2051404880
##########
java/fury-core/src/main/java/org/apache/fury/serializer/AbstractObjectSerializer.java:
##########
@@ -398,27 +402,55 @@ private static FinalTypeField buildFinalTypeField(Fury
fury, Descriptor d) {
d.getDeclaringClass() + "." + d.getName(),
// `d.getField()` will be null when peer class doesn't have this field.
d.getField() != null ? FieldAccessor.createAccessor(d.getField()) :
null,
- fury);
+ fury,
+ d.getField() != null ? d.getField().getAnnotation(FuryField.class) :
null);
}
private static GenericTypeField buildContainerField(Fury fury, Descriptor d)
{
return new GenericTypeField(
d.getTypeRef(),
d.getDeclaringClass() + "." + d.getName(),
d.getField() != null ? FieldAccessor.createAccessor(d.getField()) :
null,
- fury);
+ fury,
+ d.getField() != null ? d.getField().getAnnotation(FuryField.class) :
null);
Review Comment:
We could pass Descriptor into GenericTypeField instead of pass
`FieldAccessor`. Then creating `FieldAccessor` in `GenericTypeField`
--
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]