chaokunyang commented on code in PR #2917:
URL: https://github.com/apache/fory/pull/2917#discussion_r2534546175
##########
java/fory-core/src/main/java/org/apache/fory/serializer/AbstractObjectSerializer.java:
##########
@@ -955,7 +955,15 @@ protected T newBean() {
// TODO(chaokunyang) Support Pojo<T> generics besides Map/Collection
subclass
// when it's supported in BaseObjectCodecBuilder.
for (Descriptor d : finals) {
- finalFields[cnt++] = new FinalTypeField(fory, d);
+ FinalTypeField typeField = new FinalTypeField(fory, d);
Review Comment:
you can change FinalTypeField contructor directly:
```java
classInfo = SerializationUtils.getClassInfo(fory, typeRef.getRawType());
if (!fory.isShareMeta()
&& !fory.isCompatible()
&& typeField.classInfo.getSerializer() instanceof
ReplaceResolveSerializer) {
}
`
##########
java/fory-core/src/main/java/org/apache/fory/serializer/AbstractObjectSerializer.java:
##########
@@ -955,7 +955,15 @@ protected T newBean() {
// TODO(chaokunyang) Support Pojo<T> generics besides Map/Collection
subclass
// when it's supported in BaseObjectCodecBuilder.
for (Descriptor d : finals) {
- finalFields[cnt++] = new FinalTypeField(fory, d);
+ FinalTypeField typeField = new FinalTypeField(fory, d);
Review Comment:
you can change FinalTypeField contructor directly:
```java
classInfo = SerializationUtils.getClassInfo(fory, typeRef.getRawType());
if (!fory.isShareMeta()
&& !fory.isCompatible()
&& typeField.classInfo.getSerializer() instanceof
ReplaceResolveSerializer) {
}
--
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]