RFR: 8279283 - BufferedInputStream should override transferTo [v11]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 22 22:18:24 UTC 2022
On Fri, 9 Sep 2022 12:19:54 GMT, Markus KARG <duke at openjdk.org> wrote:
>> Implementation of JDK-8279283
>
> Markus KARG has updated the pull request incrementally with two additional commits since the last revision:
>
> - corrected copyright
> - testing transferTo() after reset()
test/jdk/java/io/BufferedInputStream/TransferTo.java line 40:
> 38: import java.nio.file.Files;
> 39: import java.nio.file.Path;
> 40: import java.nio.file.StandardOpenOption;
This import of `StandardOpenOption` is not needed due to line 55.
test/jdk/java/io/BufferedInputStream/TransferTo.java line 89:
> 87:
> 88: // tests empty input stream
> 89: assertThrows(NullPointerException.class, () -> inputStreamProvider.input().transferTo(null));
A number of code lines in the test are too long and make it even harder to read.
test/jdk/java/io/BufferedInputStream/TransferTo.java line 162:
> 160: out.write(new byte[posOut]);
> 161:
> 162: // fill buffer by reading some bytes before transformTo
transformTo -> transferTo
-------------
PR: https://git.openjdk.org/jdk/pull/6935
More information about the core-libs-dev
mailing list