-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 22
-
Component/s: core-libs
In the previous releases, `MethodHandles.Lookup::findStaticVarHandle` eagerly initializes the declaring class of the static field when the `VarHandle` is created. As specified in the specification, the declaring class should be initialized when the `VarHandle` is operated on if it has not already been initialized. This issue is fixed in this release. The declaring class is no longer eagerly initialized when `MethodHandles.Lookup::findStaticVarHandle` is called. Existing code that relies on the previous behavior may observe a change of the order of the classes being initialized.