Skip to main content

Lazy Constants in JDK 27 (JEP 531): Replacing Double-Checked Locking

Java's LazyConstant (JEP 531, third preview in JDK 27) against the holder idiom and double-checked locking: the API run on JDK 25, 26 and 27, the failure rule that changed between 26 and 27, List, Map and Set.ofLazy, a JMH benchmark, and why it is not yet for shipped code.

Compact Source Files and Instance Main Methods in Java 25 (JEP 512)

Java 25 finalizes JEP 512: void main() in a file with no class, the java.lang.IO helper, implicit java.base imports, the measured launcher order, and a private-constructor difference between JDK 25 and 27 — every claim compiled and run, with transcripts.