chaokunyang commented on code in PR #2191:
URL: https://github.com/apache/fury/pull/2191#discussion_r2084453548


##########
java/fury-core/src/main/java/org/apache/fury/builder/CompatibleCodecBuilder.java:
##########
@@ -341,9 +341,13 @@ private Expression writeEmbedTypeFieldValue(
       Expression bean, Expression buffer, FieldInfo fieldInfo) {
     Descriptor descriptor = createDescriptor(fieldInfo);
     walkPath.add(descriptor.getDeclaringClass() + descriptor.getName());
+    boolean nullable = false;
+    if (!descriptor.getTypeRef().isPrimitive()) {

Review Comment:
   I think we can have a nullable/trackingRef field and getter in Descriptor.
   
   We can also have a Descriptor which can build Descriptor with different 
field values easily.
   
   ```java
   Descriptor desc = ...;
   new DescriptorBuilder(desc).nullable(true).trackingRef(false).build();
   desc.builder().nullable(true).trackingRef(false).build();
   ```



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