`BytecodeHelpers.handleConstantDescToHandleInfo` is incorrectly using `DirectMethodHandleDesc.invocationType`, which accidentally works for static bootstrap methods so it's discovered only now with more extensive testing from bytebuddy. Cleaned up by reusing the correct `handleDescToHandleInfo` instead. Thanks to @raphw for the report.
For now, a workaround can be instead of using `DynamicConstantDesc`, translate to `ConstantDynamicEntry` in user applications. ------------- Commit messages: - Copyright year - 8338406: BytecodeHelpers using wrong invocation descriptor for condy Changes: https://git.openjdk.org/jdk/pull/20586/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20586&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8338406 Stats: 194 lines in 3 files changed: 105 ins; 87 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/20586.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20586/head:pull/20586 PR: https://git.openjdk.org/jdk/pull/20586