RFR: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"

Leo Korinth lkorinth at openjdk.org
Tue Jan 9 19:00:25 UTC 2024


On Tue, 9 Jan 2024 18:46:46 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/8176717/TestInheritFD.java line 314:
>> 
>>> 312:                     System.out.println("(Third VM) Exception was thrown: " + e.toString());
>>> 313:                 }
>>> 314:                 throw e;
>> 
>> I do not know if this gives us any extra information from the single `println`. `e.toString()` ought to print the exception type, correct? If you really think it is worth having two different print statements, I think it would be better having one catch statement for each exception (both re-throwing), I guess the compiler would then complain if one exception source was removed. Either way, the casting to the TimeoutException is not necessary.
>
> I need to look at it a bit more, I think this is not correct.

The original code seems to try to catch one of two runtime exceptions:  CancellationException or CompletionException. The code you added can not be correct as a TimeoutException is a checked exception (and not thrown if I understand the code correctly).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17325#discussion_r1446484626


More information about the hotspot-runtime-dev mailing list