Integrated: 8377334: Test framework used by langtools regression tests can produce false positives

Vicente Romero vromero at openjdk.org
Mon Feb 9 21:39:07 UTC 2026


On Sat, 7 Feb 2026 16:01:03 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> The compile task in JavacTemplateTestBase skipped some steps, resulting in missing errors.
>> 
>> Two test cases in RecordCompilationTests introduced unrelated compile errors that hide the original error. One test case in SealedCompilationTest does not declare a base nested class as static, so the subclass cannot use a static modifier and fails compilation. Simply made the base nested class static to allow that.
>
> test/langtools/lib/combo/tools/javac/combo/JavacTemplateTestBase.java line 249:
> 
>> 247:             }
>> 248:             else {
>> 249:                 ct.call();
> 
> I think that we have to be more aggressive here, for example, if an exception is thrown here I can see all these tests failing:
> tools/javac/expswitch/ExpSwitchNestingTest.java
> tools/javac/lambda/methodReference/BoundUnboundSearchTest.java
> tools/javac/patterns/scope/ScopeTest.java
> 
> apart from the ones modified in this PR

those were double checked by @liach, approving

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29620#discussion_r2777761291


More information about the compiler-dev mailing list