
About this episode
Lazily initializing fields in Java is error-prone and undermines constant-folding. JDK 26 comes with JEP 526, which previews LazyConstant, a type that lazily initializes a value through a given Supplier. It executes that supplier at most once successfully and then assigns the value to a field annotated with @Stable, which allows constant folding. This API is also a poster child for how OpenJDK develops and evolves features.
Get every episode summarized
Each time Inside Java publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.
Email me new episodesFree for 3 shows. No card needed.
Hosts & guests
No transcript yet
This episode has not been transcribed. Request it and it moves to the front of the queue.
More episodes
More from Inside Java

"Make Java Safer with Flexible Constructor Bodies" [IJN]
Inside Java

"Ask the Architects at JavaOne'26" [AtA]
Inside Java

"You Must Avoid Final Field Mutation" [IJN]
Inside Java

"How JDK 26 Improves G1's Throughput" [AtA]
Inside Java