On Thu, 12 Aug 2021 01:10:15 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Draft: Eliminated duplicate code using lambda expressions >> - Draft: Use blocking mode also for target channel > > test/jdk/sun/nio/ch/ChannelInputStream/TransferTo.java line 93: > >> 91: checkTransferredContents(inputStreamProvider, >> outputStreamProvider, createRandomBytes(1024, 4096)); >> 92: // to span through several batches >> 93: checkTransferredContents(inputStreamProvider, >> outputStreamProvider, createRandomBytes(16384, 16384)); > > Should some random-sized buffers be tested? (Use `jdk.test.lib.RandomFactory` > factory for this, not `j.u.Random`. The existing use of `Random` is fine.) > > Should some testing be done of streams with non-zero initial position? Done in https://github.com/openjdk/jdk/pull/5209, will rebase on that PR once merged. > test/jdk/sun/nio/ch/ChannelInputStream/TransferTo.java line 101: > >> 99: try (InputStream in = inputStreamProvider.input(inBytes); >> 100: OutputStream out = >> outputStreamProvider.output(recorder::set)) { >> 101: in.transferTo(out); > > The return value of `transferTo()` is not checked. Done in https://github.com/openjdk/jdk/pull/5209, will rebase on that PR once merged. ------------- PR: https://git.openjdk.java.net/jdk/pull/4263