RFR: 8029370: (fc) FileChannel javadoc not clear for cases where position == size

Alan Bateman alanb at openjdk.org
Fri Feb 24 11:29:03 UTC 2023


On Thu, 23 Feb 2023 21:24:40 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Modify the specifications of the `java.nio.channels.FileChannel` methods `transferTo`, `read(ByteBuffer,long)`, and `write(ByteBuffer,long)` to state "greater than or equal to the file's current size" with respect to the given position instead of "greater than the file's current size."

Yes, it should be "greater than or equal to the file's current size". I assume transferFrom needs the same change. The javadoc update technically introduces a new testable assertion so I think a CSR should be created.

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

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


More information about the nio-dev mailing list