EPISODE · Mar 6, 2026 · 10 MIN
"LazyConstants in JDK 26" [IJN]
from Inside Java · host Nicolai Parlog
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.
NOW PLAYING
"LazyConstants in JDK 26" [IJN]
No transcript for this episode yet
Similar Episodes
Apr 29, 2026 ·48m
Apr 29, 2026 ·106m
Apr 29, 2026 ·55m
Apr 29, 2026 ·74m