RFR: 8266014: Regression brought by optimization done with JDK-4926314

Alan Bateman alanb at openjdk.java.net
Tue Apr 27 09:48:34 UTC 2021


On Tue, 27 Apr 2021 01:26:53 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Please consider this request to correct a minor problem with the optimization added for JDK-4926314. The change is to attempt to read the number of elements remaining in the target buffer unless that number is non-positive in which case read zero. The test addition fails without and passes with the implementation change.

Marked as reviewed by alanb (Reviewer).

test/jdk/java/io/Reader/ReadCharBuffer.java line 107:

> 105:     public void readZeroLength() {
> 106:         BufferedReader r =
> 107:             new BufferedReader(new CharArrayReader(new char[]{1, 2, 3}));

Spurious line break here but otherwise is good.

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

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


More information about the core-libs-dev mailing list