[jdk17u-dev] Integrated: 8292043: Incorrect decoding near EOF for stateful decoders like UTF-16

Roland Mesde duke at openjdk.org
Wed Nov 19 18:34:25 UTC 2025


On Wed, 12 Nov 2025 23:04:27 GMT, Roland Mesde <duke at openjdk.org> wrote:

> Backporting JDK-8292043: Incorrect decoding near EOF for stateful decoders like UTF-16. Fixes incorrect state handling with EOF in StreamDecoder. There's a reset() call to the decoder seeing the EOF before the last decode() operation to handle the state correctly. Removing the call should not affect other cases because reset() is issued down the execution.
> 
> Also adds a new test. Ran GHA Sanity Checks (passed) and new test (passed). Patch is clean.

This pull request has now been integrated.

Changeset: 4272f8c6
Author:    Roland Mesde <mesde at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/4272f8c6f56fae56543e1d071bce90a05bc5798e
Stats:     80 lines in 2 files changed: 79 ins; 1 del; 0 mod

8292043: Incorrect decoding near EOF for stateful decoders like UTF-16

Backport-of: aa9b8f04bf74d5fa00f2b27895e7369abea3a930

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

PR: https://git.openjdk.org/jdk17u-dev/pull/4177


More information about the jdk-updates-dev mailing list