RFR: 8248383: Clarify java.io.Reader.read(char[], ...) behavior for full array [v3]

Roger Riggs rriggs at openjdk.java.net
Wed Dec 16 14:57:57 UTC 2020


On Thu, 10 Dec 2020 23:36:13 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Please review this small verbiage change to specify clearly the behavior of `Reader::read(char[] cbuf)` when the length of `cbuf` is zero, and that of `Reader::read(char[] cbuf, int off, int len)` when `len` is zero.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8248383: Re-indent subclasses in @see tages

Somewhat odd that the files changed includes merged file from a different changeset
but seems immaterial to the changes for the issue.

test/jdk/java/io/Reader/ReadIntoZeroLengthArray.java line 39:

> 37:  */
> 38: public class ReadIntoZeroLengthArray {
> 39:     private static char[] cbuf0 = new char[0];

I would encourage the use of TestNG for new tests and they provide a good DataProvider framework for multiple test cases. (And frequently they run more quickly because they can be run in the jtreg process without spawing a separate process).

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

Marked as reviewed by rriggs (Reviewer).

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


More information about the core-libs-dev mailing list