-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8248383: Clarify java.io.Reader.read(char[], ...) behavior for full array #1737
Conversation
/csr |
👋 Welcome back bpb! A progress list of the required criteria for merging this PR into |
Reviewed-by: kvn, iklam
@bplb has indicated that a compatibility and specification (CSR) request is needed for this pull request. |
Webrevs
|
…w/ jdk17 Reviewed-by: mikael, hseigel, darcy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Brian,
Are there existing tests that cover the behavior described in the proposed change?
Hi @LanceAndersen. I don't see any tests specific to this issue, but then there are ten Reader classes in |
Reviewed-by: lancea
…fails against jdk17 Reviewed-by: jwilhelm
Reviewed-by: kbarrett, tschatzl, gziemski
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, Brian.
…into JDK-8248383-Reader-read
|
For the sake of sanity I added a minimal test to verify that the behavior is in fact in accord with the added verbiage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat odd that the files changed includes merged file from a different changeset
but seems immaterial to the changes for the issue.
* @summary Ensure that zero is returned for read into zero length array | ||
*/ | ||
public class ReadIntoZeroLengthArray { | ||
private static char[] cbuf0 = new char[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the extra commits are because I put some commits on the master branch and then merged them into the feature branch. I believe the integration will merge them correctly.
I converted the test to TestNG. I've used it a number of times before to good effect (cf. java/nio/Buffer/BulkPutBuffer.java) but was too lazy to review the annotations again. Thanks for the suggestion.
@bplb This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 80 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
@bplb Since your change was applied there have been 83 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 143998e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this small verbiage change to specify clearly the behavior of
Reader::read(char[] cbuf)
when the length ofcbuf
is zero, and that ofReader::read(char[] cbuf, int off, int len)
whenlen
is zero.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1737/head:pull/1737
$ git checkout pull/1737