JDK 9 RFR of 8160221: jdk/test/java/nio/channels/FileChannel/Transfers.java leaving files behind
Brian Burkhalter
brian.burkhalter at oracle.com
Wed Jul 13 00:22:25 UTC 2016
On Jul 12, 2016, at 12:54 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 12/07/2016 16:01, Brian Burkhalter wrote:
>> A failure was still being observed on Windows during jtreg cleanup due to a file which could not be deleted as a FileChannel still held it open. This patch
>>
>> http://cr.openjdk.java.net/~bpb/8160221/webrev.01/<http://cr.openjdk.java.net/%7Ebpb/8160221/webrev.01/>
>>
>> fixes that problem at line 561 (verified).
>>
>>
> This looks okay, just wondering if you can use try-with-reosurces instead.
Updated to use try-with-resources to auto-close the FileChannel:
http://cr.openjdk.java.net/~bpb/8160221/webrev.02/
Regression test job succeeded.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160712/43ac33ea/attachment-0001.html>
More information about the nio-dev
mailing list