RFR: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields
Mandy Chung
mchung at openjdk.org
Mon Feb 13 21:42:26 UTC 2023
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> I overlooked in the fix for JDK-8297757 that it should have passed the declaring class of the static fields rather than the reference class passed to `Lookup::findStaticVarHandle`.
`InternalError` is thrown if the field is not found as it's not declared in `refc`. Or if the field is declared in the superclass or superinterface and just happens to find a field at the same offset in `refc`, a wrong `VarHandleDesc` is produced.
-------------
PR: https://git.openjdk.org/jdk/pull/12543
More information about the core-libs-dev
mailing list