On Sat, 21 Mar 2026 00:20:56 GMT, Chen Liang <[email protected]> wrote:
> We should fix the return type of `DynamicCallSiteDesc.bootstrapMethod`;
> luckily we can do this without breaking binary compatibility.
src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java line
305:
> 303: }
> 304:
> 305: sealed interface BootstrapMethodHook {
**[Nice to have]** The `BootstrapMethodHook` sealed interface lacks an explicit
`permits DynamicCallSiteDesc` clause, relying on implicit same-compilation-unit
permits. All 7 other sealed types in `java.lang.constant` (`ConstantDesc`,
`MethodHandleDesc`, `DirectMethodHandleDesc`, `ClassDesc`, `MethodTypeDesc`,
`ModuleDesc`, `PackageDesc`) use explicit `permits` clauses.
Consider adding `permits DynamicCallSiteDesc` for consistency:
sealed interface BootstrapMethodHook permits DynamicCallSiteDesc {
MethodHandleDesc bootstrapMethod();
}
_— glm-5.1 via Qwen Code /review_
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30351#discussion_r3042503056