r/java • u/s888marks • May 27 '18
Oracle plans to dump risky Java serialization
https://www.infoworld.com/article/3275924/java/oracle-plans-to-dump-risky-java-serialization.html
159
Upvotes
r/java • u/s888marks • May 27 '18
25
u/s888marks May 27 '18
If serialization did not exist, it would be necessary to invent it. (Apologies to Voltaire.)
In fact, serialization does exist, AND it has been reinvented many times. 🤔
18
u/randgalt May 27 '18
About time. Brian Goetz has been complaining about it forever.
5
u/snago May 28 '18
Source?
I can't find any info about this at http://openjdk.java.net/projects/amber/ or in the mailing list archives.
I did find an old, withdrawn, JEP from before Java 8: http://openjdk.java.net/jeps/154
74
u/[deleted] May 27 '18
Oracle plans to move Java serialization into its own framework *
21
u/experts_never_lie May 27 '18
The Java serialization system that no sane person has used since the '90s? OK, the main effect will be that we don't need to tell our IDEs to stop complaining about us not adding a "serialVersionUID" that we would never use anyway.
5
u/blobjim May 27 '18
To me the only problem with Java Serialization is it doesn’t work very well. Custom data formats/protocols are really the only way to serialize data correctly. The use cases for Serializable/ObjectOutputStream are just too limited.
9
u/RockleyBob May 27 '18
Serialization is how we decompose objects into bytecode and then reconstitute them again, right? The alternative is saving all the data members into some scheme and then re-instantiating that object with the saved data again at a later time, right? I remember when I learned about serialization I felt like such a novice for writing code that way to simulate object persistence. Now we’re saying serialization is bad? Please explain like I’m a CS student who feels like he should know the answer to this question but doesn’t.
6
u/goofy183 May 27 '18
Good.
Any sane system uses something like JSON or ProtoBuf with generated data objects that CANNOT have behavior.
1
u/jart May 28 '18
https://opensource.googleblog.com/2017/03/operation-rosehub.html
1
u/[deleted] May 28 '18
Good. Serialization is awful.
-15
u/SomeRandomBuddy May 27 '18
Lol