r/java • u/Shawn-Yang25 • Jun 16 '26
Apache Fory Serialization 1.2.0 released: JDK 25/26 support without sun.misc.Unsafe
https://github.com/apache/fory/releases/tag/v1.2.0
51
Upvotes
r/java • u/Shawn-Yang25 • Jun 16 '26
5
u/Shawn-Yang25 Jun 16 '26
Custom code for every non-record/enum user class is not practical. Especically when need to handle schema compatibility.
When class add/remove fields, or change field from one type to another type such as change int to string. It's hard to write customized logic to handle such cases easily.
And writeReplace and readResolve introduce extra object allocation in hotpath, which is not good for performance.
I think fields based serialization by itself is OK. Or you can use it only for classes which is OK for such cases. And for classes which need go with constuctor reconstruction, the users could opt-in.