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


##########
java/fory-core/src/main/java/org/apache/fory/builder/BaseObjectCodecBuilder.java:
##########
@@ -405,7 +405,17 @@ protected Expression serializeField(
     TypeRef<?> typeRef = descriptor.getTypeRef();
     boolean nullable = descriptor.isNullable();
 
+    // ref tracking logic:
+    // - if the ref tracking is enabled globally, then @ForyField will be 
checked
+    // - otherwise, fallback to global config
+    boolean useRefTracking;
     if (needWriteRef(typeRef)) {
+      useRefTracking = descriptor.getForyField() == null || 
descriptor.isTrackingRef();

Review Comment:
   with https://github.com/apache/fory/pull/3021/files#r2625961552, we can just 
use `descriptor.isTrackingRef()`



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