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


##########
java/fory-core/src/main/java/org/apache/fory/serializer/AbstractObjectSerializer.java:
##########
@@ -1000,9 +1000,7 @@ private InternalFieldInfo(Fory fory, Descriptor d, short 
classId) {
       nullable = d.isNullable();
       if (fory.trackingRef()) {
         trackingRef =
-            foryField != null
-                ? foryField.trackingRef()
-                : fory.getClassResolver().needToWriteRef(typeRef);
+            foryField != null ? foryField.ref() : 
fory.getClassResolver().needToWriteRef(typeRef);

Review Comment:
   Maybe we could use `d.isTrackingRef()` direclty if we build corect 
Descriptor from `ClassResolver/TypeResolver/XtypeResolver`



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