On Fri, 13 Mar 2026 17:55:45 GMT, Frederic Parain <[email protected]> wrote:
> This patch removes the mandatory preloading triggered by the @NullRestricted > annotated fields, and falls back to the speculative pre-loadings allowed by > the LoadableDescriptors attribute. > See the CR for more details about the rational and the new semantic of the > @NullRestricted annotation. > > Tested with Mach5 tier1-4. > > Thank you. The lworld branch is not for experiments anymore, it is now the stabilization branch to prepare the integration of JEP 401 code into mainline to become a preview feature. The `@NullRestricted` annotation is still in the lworld branch because it is required to continue testing the null-free and non-atomic features already implemented in the JVM. It is not part of the plan to further improve or change the semantic of `@NullRestricted` in this branch nor to extend the null-free or non-atomic support. This PR keeps the parts that are essential to preserve the code coverage of our tests, and removes unnecessary behaviors. The effects of the annotation are now limited to the behavior of some fields under conditions. The mandatory preloading of classes is not necessary for the usages we have of this annotation (strict fields and `LoadableDescriptors` attribute are sufficient as explained in the CR), and adds new behaviors to the already complex class loading process that are hard to justify without a JVM specification support. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/2228#issuecomment-4068924854
