RFR: 8344942: Template-Based Testing Framework [v61]
Christian Hagedorn
chagedorn at openjdk.org
Mon Jun 2 12:08:10 UTC 2025
On Sun, 1 Jun 2025 05:58:13 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 306:
>>
>>> 304: var myHook = new Hook("MyHook");
>>> 305:
>>> 306: var template1 = Template.make("name", "value", (String name, Integer value) -> body(
>>
>> One could generally think about using `_` for unused lambda parameters which I think is the common convention. But then I guess we would need to update the documentation about saying "name" and "String name" should be the same and make an exception for unused ones. I don't know.
>
> I think it is better to keep the names duplicated. This gives the reader an easier visual aid to check which name has which type. What do you think?
That's totally fine and easy to follow.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2120948254
More information about the hotspot-compiler-dev
mailing list