RFR: 8303260: (fc) FileChannel::transferFrom should support position > size()

Alan Bateman alanb at openjdk.org
Fri Mar 10 10:43:14 UTC 2023


On Wed, 1 Mar 2023 01:34:33 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Enhance `FileChannel::transferFrom` to extend the channel's file if `position > size()`. This is consistent with `FileChannel::write(ByteBuffer, long)`.

The spec + impl changes looks fine. 

Is this test copied/edited from an older test? Configuration name FAST_TRANSFER_xxx looks a bit odd and maybe we just replace it with a simpler JUnit style test?

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

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


More information about the nio-dev mailing list