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
View all comments
Show parent comment
9
u/pron98 Jun 16 '26
The danger in serialization isn't some particular mechanism or another. It stems entirely from the very notion of deserializing fields while bypassing constructors. This is dangerous in any library and any language, and there's no way to make it safe. So we've left a door open for the legacy serialization approach that, while still dangerous, somewhat reduces the blast radius, and the advice to all serialization libraries going forward is to always deserialise using constructors (e.g. how the JDK deserialises records and collections).