RFR: 8372002: VarHandle for receiver's superclass instance fields fails describeConstable

Chen Liang liach at openjdk.org
Mon Nov 17 16:23:54 UTC 2025


In project Babylon work when a VarHandle needs to be unreflected, @mcimadamore discovered that our current unreflection of instance field var handles cannot unreflect instance fields from superclasses, and throws an InternalError instead.

We can easily fix this by iterating the superclasses for fields.

-------------

Commit messages:
 - 8372002: VarHandle for receiver's superclass instance fields fails describeConstable

Changes: https://git.openjdk.org/jdk/pull/28355/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28355&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372002
  Stats: 53 lines in 4 files changed: 38 ins; 2 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/28355.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28355/head:pull/28355

PR: https://git.openjdk.org/jdk/pull/28355


More information about the core-libs-dev mailing list