RFR: 8374654: Inconsistent handling of lambda deserialization for Object method references on interfaces

Liam Miller-Cushon cushon at openjdk.org
Wed Jan 7 00:29:45 UTC 2026


See [JDK-8374654](https://bugs.openjdk.org/browse/JDK-8374654). This fixes an inconsistency between generated Lambda `$deserialization$` methods and the runtime behaviour of `SerializedLambda` instances, for Object method references on interfaces. At runtime the methods are resolved to declared methods, so Object method references on interfaces will always have the `getImplMethodKind`, `getImplClass`, and `getImplMethodSignature` of the method declared in `Object`, not of an override in the interface.

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

Commit messages:
 - Add a test
 - 8374654: Inconsistent handling of lambda deserialization for Object method references on interfaces

Changes: https://git.openjdk.org/jdk/pull/29075/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29075&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374654
  Stats: 149 lines in 3 files changed: 139 ins; 1 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/29075.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29075/head:pull/29075

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


More information about the compiler-dev mailing list