RFR: 8378792: ObjectMethods.bootstrap missing getter validation
Roger Riggs
rriggs at openjdk.org
Thu Feb 26 19:33:22 UTC 2026
On Thu, 26 Feb 2026 19:15:14 GMT, Chen Liang <liach at openjdk.org> wrote:
> During review of Valhalla lworld vs mainline patch, I noticed Valhalla has a fix for a mainline issue where there is no getter validation for ObjectMethods.bootstrap. We should upstream this fix to mainline to make lworld cleaner and make mainline more robust.
>
> Before this fix, the invalid getters caused weird exceptions in method handle construction. Now they consistently throw IllegalArgumentException as specified.
Marked as reviewed by rriggs (Reviewer).
test/jdk/java/lang/runtime/ObjectMethodsTest.java line 162:
> 160: }
> 161:
> 162: record NamePlusType(String mn, MethodType mt) {}
Parameter/fields names of `name`, and `type` would make the uses below more readable.
-------------
PR Review: https://git.openjdk.org/jdk/pull/29941#pullrequestreview-3863131791
PR Review Comment: https://git.openjdk.org/jdk/pull/29941#discussion_r2860912640
More information about the core-libs-dev
mailing list