On Sat, 21 Mar 2026 12:40:41 GMT, Chen Liang <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java line
>> 307:
>>
>>> 305: sealed interface BootstrapMethodHook {
>>> 306: MethodHandleDesc bootstrapMethod();
>>> 307: }
>>
>> I wish there was a way to declare required bridge overloads without needing
>> interfaces such as these (which only works for public instance methods), or
>> needing some sort of post‑compilation bytecode rewriting (which works for
>> any method, but significantly complicates the build steps).
>
> Don't think it's in the interest of us to expand the language here. This
> trick actually should be perfectly legal to avoid NoSuchMethodError for all
> compliant Java SE implementations (see the CSR for details)
Would it make sense to add a comment here though to make the purpose of this
`BootstrapMethodHook` clearer?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30351#discussion_r2969558059