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

Daniel Jeliński djelinski at openjdk.org
Fri Sep 30 06:07:32 UTC 2022


On Thu, 29 Sep 2022 23:59:04 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with seven additional commits since the last revision:
>> 
>>  - Remove intermittently failing deletes
>>  - reintroduce deleteOnExit
>>  - rewrite testToWritableByteChannel without using file output
>>  - Migrate Transfer4GBFile to nio
>>  - Implement createSparseTempFile
>>  - Use RandomFactory to generate random bytes
>>  - Update copyright year
>
> test/jdk/java/nio/channels/FileChannel/Transfer2GPlus.java line 140:
> 
>> 138: 
>> 139:             long n;
>> 140:             if ((n = srcCh.transferTo(0, LENGTH, wbc)) < LENGTH)
> 
> The contract of `FileChannel::transferTo` does not guarantee that all bytes are transferred:
> 
> ```An invocation of this method may or may not transfer all of the requested bytes [...]```.

preexisting, and unlikely to change because of Hyrum's law. I can file a ticket to update the docs if you think it makes sense.

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

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


More information about the nio-dev mailing list