mchernyakov commented on code in PR #2904:
URL: https://github.com/apache/fory/pull/2904#discussion_r2507074515
##########
java/fory-core/src/main/java/org/apache/fory/builder/BaseObjectCodecBuilder.java:
##########
@@ -594,17 +610,26 @@ protected Expression writeClassInfo(
return writeClassAction;
}
+ protected Expression getOrCreateSerializer(Class<?> cls) {
+ return getOrCreateSerializer(cls, false);
+ }
+
/**
* Returns a serializer expression which will be used to call write/read
method to avoid virtual
* methods calls in most situations.
*/
- protected Expression getOrCreateSerializer(Class<?> cls) {
+ protected Expression getOrCreateSerializer(Class<?> cls, boolean finalField)
{
Review Comment:
do you mean you would like: in `ObjectCodecBuilder#serializeGroup(...)`
directly call `getOrCreateSerializer(..., true)`? without any other
`serializeForNullable(...)` etc.
I can do it, would it be ok, because in some of those methods there are
additional checks for `if (needWriteRef(typeRef)) {...}` ?
--
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]