Reports fields of type java.lang.LazyConstant that are not final.

Per JEP 526: Lazy Constants, lazy constants must be stored in a final field to enable constant-folding optimizations by the JVM.

Correct usage:


  private final LazyConstant<Logger> logger = LazyConstant.of(() -> Logger.create(OrderController.class));

Incorrect usage (will be reported):


  private LazyConstant<String> x = LazyConstant.of(() -> "expensive string");

New in 2026.1