RFR: 8344942: Template-Based Testing Framework [v61]

Emanuel Peter epeter at openjdk.org
Sun Jun 1 06:02:06 UTC 2025


On Fri, 30 May 2025 08:22:00 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Merge branch 'JDK-8344942-TemplateFramework-v3' of https://github.com/eme64/jdk into JDK-8344942-TemplateFramework-v3
>>  - move verification
>
> 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?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2118774938


More information about the hotspot-compiler-dev mailing list