chaokunyang commented on code in PR #2338:
URL: https://github.com/apache/fory/pull/2338#discussion_r2146588046
##########
java/fory-core/src/main/java/org/apache/fory/builder/CodecBuilder.java:
##########
@@ -162,9 +162,6 @@ protected Expression tryCastIfPublic(
return expression;
}
- // left null check in sub class encode method to reduce data dependence.
- private final boolean fieldNullable = false;
Review Comment:
ObjectCodecBuilder check the nullabiity separately for efficiency. We can
make this as a method:
```java
protected boolean fieldNullable() {
return true;
}
```
and overwrite iit n BaseObjectBuilder :
```java
@Overwrite
protected boolean fieldNullable() {
return false;
}
```
--
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]