chaokunyang commented on code in PR #2917:
URL: https://github.com/apache/fory/pull/2917#discussion_r2534528601


##########
java/fory-core/src/main/java/org/apache/fory/resolver/ClassResolver.java:
##########
@@ -896,7 +899,11 @@ public Class<? extends Serializer> 
getSerializerClass(Class<?> cls, boolean code
         return Serializers.CharsetSerializer.class;
       } else if (ReflectionUtils.isJdkProxy(cls)) {
         if (JavaSerializer.getWriteReplaceMethod(cls) != null) {
-          return ReplaceResolveSerializer.class;
+          if (!fory.isCompatible() && !fory.isShareMeta() && 
Modifier.isFinal(cls.getModifiers())) {
+            return FinalFieldReplaceResolveSerializer.class;

Review Comment:
   I don't think we can return this here? If 
`FinalFieldReplaceResolveSerializer` don't write class info, and fory don't 
write class into, then for deserialization, how do we know which class to use 
to create object instance?



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