mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8291065: Creating a VarHandle for a static field triggers class initialization
Reviewed-by: mchung, psandoz
This commit is contained in:
parent
a53345ad03
commit
201e3bcf52
10 changed files with 744 additions and 160 deletions
|
@ -4201,7 +4201,7 @@ return mh1;
|
|||
}
|
||||
refc = lookupClass();
|
||||
}
|
||||
return VarHandles.makeFieldHandle(getField, refc, getField.getFieldType(),
|
||||
return VarHandles.makeFieldHandle(getField, refc,
|
||||
this.allowedModes == TRUSTED && !getField.isTrustedFinalField());
|
||||
}
|
||||
/** Check access and get the requested constructor. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue