On Fri, 8 Apr 2022 17:20:36 GMT, Daniel Fuchs <[email protected]> wrote:
>> Please find enclosed a patch for
>> `8283719: java/util/logging/CheckZombieLockTest.java failing intermittently`
>>
>> My analysis is that the test fails intermittently because the `FileChannel`
>> created by the test is garbage collected too early, which releases the
>> associated lock before the `FileHandler` is created.
>> I have replaced the `try { } finally { }` with a `try-with-resource( ) { }
>> finally { }` which will prevent the `FileChannel` from being released before
>> the end of the block. Additional bonus: this should also help with the code
>> that tries to cleanup the files at the end.
>>
>> Though I haven't been able to reproduce the exact failure yet, I haven't
>> observed the new version of the test failing either.
>
> Daniel Fuchs has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Incorporated review comments
Marked as reviewed by alanb (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/8168