Lazy Constants:Initialize Once Without the Double-Checked Lock
Try JEP 531 in JDK 27: LazyConstant.of, List/Map/Set.ofLazy, and one-time thread-safe init the JIT can constant-fold — without double-checked locking.
Read More11 post(s)
Try JEP 531 in JDK 27: LazyConstant.of, List/Map/Set.ofLazy, and one-time thread-safe init the JIT can constant-fold — without double-checked locking.
Read MoreWhat Leyden AOT caches are (JEP 483, 514, 515, 516): train a HotSpot cache, then start faster and warm up sooner — still a JVM, not a GraalVM native image.
Read MoreWhat the Java 25 KDF API is (JEP 510): derive AES and HMAC keys with javax.crypto.KDF and HKDF-SHA256 instead of HMAC-then-truncate or a copied StackOverflow HKDF.
Read MoreWhat Java 25 module import declarations are (JEP 511): import module M brings exported types into simple-name scope, how java.se and java.base fit, and how to resolve List clashes.
Read MoreWhat flexible constructor bodies are (JEP 513 / Java 25): validate args and initialize fields in a constructor prologue before super() or this(), without the static-helper hack.
Read MoreWhat compact source files are (JEP 512 / Java 25): implicit classes, instance main methods, java.lang.IO, and automatic java.base imports — without public static void main ceremony.
Read MoreWhat JEP 519 compact object headers are: shrink 64-bit HotSpot headers from 12–16 bytes to 8 without changing application source, how to enable the flag on 24/25, and why Java 27 turns it on by default.
Read MoreEnable spring.threads.virtual.enabled on Boot 3.2+, understand what Tomcat and the application task executor actually switch, and size Hikari, RestClient, and observability so the flag does not become a thundering herd.
Read MoreWhat Java scoped values are (JEP 506 / Java 25), how they differ from ThreadLocal, why they fit virtual threads, and how to bind request context with where/run and where/call.
Read MoreLearn the JDK 27 StructuredTaskScope factory API, Joiner policies, fan-in, sibling cancellation, and how structured concurrency fits virtual threads and scoped values.
Read MoreWhat Java virtual threads are (JEP 444 / Java 21), how they differ from platform threads, when they win for I/O-bound work, and the pinning and ThreadLocal gotchas—plus what Java 25 changed.
Read More