[jdk17u-dev] RFR: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer
Paul Hohensee
phh at openjdk.org
Mon Aug 12 19:02:52 UTC 2024
On Thu, 18 Jul 2024 22:50:53 GMT, Todd V. Jonker <duke at openjdk.org> wrote:
> Backports a fix for a potential data-loss defect from JDK19 to JDK17.
>
> This change is not clean, but the conflict is minimal and localized to `StreamDecoder.java`.
>
> Viewing this diff alongside the original fix [here](https://github.com/openjdk/jdk/commit/6520843f86f638fe4d1e5b3358fab5799daca654?diff=unified&w=0#diff-e720d7662e29697b70409dd2aae7864f4e89d4bec33aa8d2ffce83cab365115eR184-R227) and expanding context upward a bit should be illuminating. The conflict is due to structural/indentation difference when the lock acquisition at L158 was hoisted into a separate method. That happened [here](https://github.com/openjdk/jdk/commit/9583e3657e43cc1c6f2101a64534564db2a9bd84?diff=unified&w=1#diff-e720d7662e29697b70409dd2aae7864f4e89d4bec33aa8d2ffce83cab365115eL154-L190) (wherein this file has an ugly diff obscuring relatively simple changes).
>
> Additional testing:
> - [x] New regression test fails without the fix, passes with it
> - [x] linux-x86_64-server-release: `JTREG_KEYWORDS="!headful & !external-dep & !printer" make test` (tier1-3)
Marked as reviewed by phh (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk17u-dev/pull/2726#pullrequestreview-2233808959
More information about the jdk-updates-dev
mailing list