RFR: 8208752: Calling a deserialized Lambda might fail with ClassCastException [v3]
Liam Miller-Cushon
cushon at openjdk.org
Mon Jan 19 22:10:44 UTC 2026
> See [JDK-8208752: Calling a deserialized Lambda might fail with ClassCastException](https://bugs.openjdk.org/browse/JDK-8208752).
>
> Lambda deserialization currently does not consider `SerializedLambda#getInstantiatedMethodType` when deserializing lambdas, which can lead to method references that differ only in `getInstantiatedMethodType` being merged into the same lambda instance, and can result in `ClassCastException`s like the one reported in the bug.
>
> This depends on the fix for [JDK-8374654: Inconsistent handling of lambda deserialization for Object method references on interfaces](https://bugs.openjdk.org/browse/JDK-8374654) in https://github.com/openjdk/jdk/pull/29075.
Liam Miller-Cushon has updated the pull request incrementally with two additional commits since the last revision:
- Merge branch 'JDK-8374654' into JDK-8208752
- Only resolve object methods on interfaces
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28943/files
- new: https://git.openjdk.org/jdk/pull/28943/files/10ee13db..1f803bcc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28943&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28943&range=01-02
Stats: 28 lines in 2 files changed: 22 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/28943.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28943/head:pull/28943
PR: https://git.openjdk.org/jdk/pull/28943
More information about the core-libs-dev
mailing list