
foojay · 12 min readSoftware architecture
Finally final: embracing JEP 500
The article explains how Java’s upcoming JEP 500 will enforce final field immutability and shows how the Tentackle framework adapts its serializer to comply by using canonical constructors, builders, or annotations to avoid mutating finals. It details practical steps and annotations for both owned and external classes.
- Use @CanonicalConstructor with @CanonicalName to map constructor params to fields.
- Enable final field mutation via -Dtentackle.trip.mutateFinalFields=true if unavoidable.
- TRIP refuses to deserialize finals without a constructor, forcing explicit handling.