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

Johan Sjölen jsjolen at openjdk.org
Wed Jan 10 10:16:24 UTC 2024


On Wed, 10 Jan 2024 06:09:55 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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).
>
> I agree with Leo. IIUC if we timeout then a `CompletionException` will be thrown from `join()` with `TimeoutException` as the cause.

You're correct, I didn't understand the original code (I thought `TimeoutException` was thrown). I think the added information in the printing message is worth it, I just had to figure out why a `TimeoutException` was thrown and the extra context helps.

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

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


More information about the hotspot-runtime-dev mailing list