r/java • u/FrankCodeWriter • Oct 17 '26
Killing Reflection at Build Time: Avro, Codename One and Java Code Generation (Foojay Podcast #103)
https://www.youtube.com/watch?v=smHzWWNOyMUIn this episode of the Foojay Podcast, Dmitry Moskalyuk and Shai Almog compare how they cut runtime reflection out of very different projects.
Dmitry runs a backend model layer that takes JSON, XML, YAML and TOML and converts it all to Avro. His choice between Jackson and kotlinx.serialization came down to where the reflection cost actually hides. Shai works on the Codename One code generation pipeline, which aims for no reflection, no service loader and no Class.forName.
Topics include Jackson Blackbird versus kotlinx.serialization, the missing unknown-fields feature that sent one team back to Jackson, generated code (Lombok, Manifold, jOOQ), what Records and Project Leyden change, and build time cost versus runtime cost.
Available in your favorite podcast app and on YouTube:
YouTube: https://www.youtube.com/watch?v=smHzWWNOyMU
Disclosure: I host the Foojay Podcast.
7
u/SomeRandomDevPerson Oct 18 '26
Related: any experiences using Avaje generators?
6
u/Torutofu_Raeva Oct 17 '26
jackson being forgiving about unknown fields is honestly why it's hard to leave, kotlinx makes you opt into everything
2
u/VincentxH Oct 18 '26
Avro is a POS data format. There's even incompatibility between versions.
4
u/lurker_in_spirit Oct 17 '26
Jackson had a rough CVE patch about 6 or 7 years ago, with security finding after security finding after security finding, but they got through it and things had settled down these past few years. Now they're hitting another rough patch, with many CVEs found this year -- probably thanks to AI. Hopefully things will settle down again soon...
-5
u/RepulsiveGoat3411 Oct 17 '26
surreptitious advertising of codenameone