The JVM still preloads types of null-restricted static fields. This behavior was necessary when such fields were initialized by the JVM using a default value. The current model requires all null-restricted fields to be strict fields, and their initialization is the responsibility of user code in <clinit>. Because null-restricted static fields are never flattened, and their initialization is performed by Java code, there's no reason for the JVM to continue to preload these classes.
- links to
-
Commit(lworld) openjdk/valhalla/443cdd5a
-
Review(lworld) openjdk/valhalla/1599