RFR: 8357185: Redundant local variables with unconditionally matching primitive patterns [v2]

Aggelos Biboudis abimpoudis at openjdk.org
Fri Jul 4 07:39:40 UTC 2025


On Fri, 4 Jul 2025 00:58:19 GMT, Chen Liang <liach at openjdk.org> wrote:

>> test/langtools/tools/javac/patterns/PrimitiveUnconditionallyExactTest.java line 37:
>> 
>>> 35: 
>>> 36: /*
>>> 37:  * @test
>> 
>> The name of this test should be `T8357185` I think.
>
> I think we aim to name tests by the content instead of uninformative bug ids - ids are tracked with the bug jtreg directive.

Both styles are adopted as we can observe in `jdk/test/langtools/tools/javac`. 

In any case the current name is definitely not descriptive as it has nothing to do with unconditionally exact testing inherently. This is done in `test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java` or other tests. Unconditionally exact conversion is the context but not the observed effect. 

The test name can be either `T8357185` or something descriptive like `RedundantVariablesInPrimitivePatterns`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26107#discussion_r2184634119


More information about the compiler-dev mailing list