RFR: 8341778: Some javac tests ignore the result of JavacTask::call
Johannes Döbler
duke at openjdk.org
Thu Jun 5 08:45:53 UTC 2025
On Thu, 5 Jun 2025 06:17:11 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/patterns/SOEDeeplyNestedBlocksTest.java line 37:
>
>> 35: public class SOEDeeplyNestedBlocksTest {
>> 36:
>> 37: static final int NESTING_DEPTH = 500;
>
> Same question here.
With a NESTING_DEPTH of 1000 javac will run into a StackOverflowError, but it still completes and task.call() returns false. Using 500 javac can compile without error. Not sure what this test wants to prove. If it wants to show that javac can complete without throwing an SOE then it should keep depth 1000 and test that task.call() returns false.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25645#discussion_r2128289861
More information about the hotspot-gc-dev
mailing list