Lazily initializing fields in #Java is error-prone and undermines constant-folding. JDK 26 comes with JEP 526, which previews `LazyConstant` - the remedy to this malady.
More details in Inside Java Newscast #106 - join me for the premiere tomorrow morning, 0700 UTC:
https://www.youtube.com/watch?v=BZlXZyXA4jY