RFR: 8305596: (fc) Two java/nio/channels tests fail after JDK-8303260

Alan Bateman alanb at openjdk.org
Wed Apr 5 08:30:15 UTC 2023


On Tue, 4 Apr 2023 22:04:04 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Update the tests to conform to the specification change in  [JDK-8303260](https://bugs.openjdk.org/browse/JDK-8303260) which allows writing to a position beyond the channel's size in `FileChannel::transferFrom`.

test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java line 474:

> 472:                 } else if ((test == TEST_INTR || test == TEST_PREINTR)
> 473:                         && (op == TRANSFER_FROM)) {
> 474:                     // Let these cases pass -- CBIE applies to other channel

Would it be possible to explain why this didn't happen before? The file channel position is 0 and I think transferFrom is called to transfer up to 1MB from a pipe source. The method is called with the interrupt status set so attempting from the pipe source will throw ClosedByInterruptException. I'm wondering what this didn't happen before your change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13342#discussion_r1158194178


More information about the nio-dev mailing list