RFR: 8341778: Some javac tests ignore the result of JavacTask::call

Vicente Romero vromero at openjdk.org
Thu Jun 5 13:36:53 UTC 2025


On Thu, 5 Jun 2025 06:09:34 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Several tests are ignoring the result of invoking com.sun.source.util.JavacTask::call which returns a `Boolean`. This implies that tests could seem to pass when in reality they are silently failing. This PR is fixing this issue by checking, in all applicable cases the result of the invocation.
>> 
>> TIA
>
> test/langtools/tools/javac/T6361619.java line 53:
> 
>> 51:         final PrintWriter out = new PrintWriter(System.err, true);
>> 52: 
>> 53:         Iterable<String> flags = Arrays.asList("--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
> 
> Why `--add-exports`? Did this test actually failed without us noticing?

correct

> test/langtools/tools/javac/api/8007344/Test.java line 79:
> 
>> 77:     }
>> 78: 
>> 79:     static final List<String> OPTIONS = List.of(
> 
> Same question here...

same answer here

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25645#discussion_r2128873770
PR Review Comment: https://git.openjdk.org/jdk/pull/25645#discussion_r2128874248


More information about the hotspot-gc-dev mailing list