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

Brian Burkhalter bpb at openjdk.org
Wed Mar 15 21:49:34 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)`.

> [M]aybe we just replace it (the test) with a simpler JUnit style test?

Addressed by 0639c2390e228f572c71a1642801033e7fc45222.

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

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


More information about the nio-dev mailing list