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

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


On Sat, 7 Feb 2026 00:41:15 GMT, Chen Liang <liach 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.

lgtm

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

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

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29620#pullrequestreview-3767397889
PR Review Comment: https://git.openjdk.org/jdk/pull/29620#discussion_r2777720545


More information about the compiler-dev mailing list