RFR: 4926314: Optimize Reader.read(CharBuffer)

Philippe Marschall github.com+471021+marschall at openjdk.java.net
Sat Mar 13 14:43:07 UTC 2021


On Tue, 16 Feb 2021 23:49:36 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> I think the implementation changes here look good. I don't know however whether there is enough coverage in the tests. These should verify that the `Reader`, `CharArrayReader`, and `InputStreamReader` implementations of `read(CharBuffer)` are accurate. If there is already sufficient coverage in the tests in `test/jdk/java/io` then that is good enough and nothing need be added.

`CharArrayReader` was lacking a test. I added a test which found a bug and fixed the bug. The PR also contains new tests for `Reader` and `InputStreamReader`. They cover on-heap and off-heap cases.

Is there a way to get test coverage with JTReg tests? I only found [1] which seems out of date and points to an Oracle internal wiki.

 [1] https://wiki.openjdk.java.net/display/CodeTools/JCov+FAQ#JCovFAQ-HowdoIuseJCovwithjtreg?

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

PR: https://git.openjdk.java.net/jdk/pull/1915


More information about the nio-dev mailing list