RFR: 8294437: java/nio/channels/FileChannel tests slow on Windows [v4]

Daniel Jeliński djelinski at openjdk.org
Fri Sep 30 20:25:30 UTC 2022


On Fri, 30 Sep 2022 11:07:39 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix file attributes
>
> test/jdk/java/nio/channels/FileChannel/TransferTo6GBFile.java line 63:
> 
>> 61:         out.println("  Writing large file...");
>> 62:         long t0 = System.nanoTime();
>> 63:         FileChannel fc = FileChannel.open(file, READ, WRITE);
> 
> You can probably change this to use try-with-resources too and maybe "READ" can be dropped as this loo just writes to the file.

changed to try-with-resources; READ can't be dropped - there's a `transferTo` on this channel.

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

PR: https://git.openjdk.org/jdk/pull/10464


More information about the nio-dev mailing list