On Sun, 20 Sep 2026 13:01:36 GMT, Jaikiran Pai <[email protected]> wrote:
>> Markus KARG has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Protected backwards-compatible behavior of existing subclasses as
>> proposed by Jaikiran Pai
>> - Removed (fast/slow path) comments
>
> src/java.base/share/classes/sun/nio/cs/StreamDecoder.java line 127:
>
>> 125: synchronized (lock) {
>> 126: readCalled = true;
>> 127:
>
> There's a pre-existing package-private `implRead(...)` method in this
> `StreamDecoder` class. I don't see it being used anywhere else other than
> this same class (and that's a good thing).
>
> While we are doing this change, can you make that method `private`? I
> wouldn't have asked for it, but now that we are tracking whether read was
> called on the `StreamDecoder` (through this `readCalled` variable), it would
> be good to prevent any future calls to `implRead(...)` from outside the
> current code path which do this `readCalled` tracking. Making it `private`
> would prevent such issues.
Made it private in df1e54ea02505047078bcb2bdb56bbbcaea0188f
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32264#discussion_r4116233594