On Thu, 19 Sep 2024 19:00:45 GMT, Chen Liang <li...@openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   suggestion from @liach
>
> src/java.base/share/classes/java/io/ObjectOutputStream.java line 2047:
> 
>> 2045:                     writeByte(TC_LONGSTRING);
>> 2046:                 }
>> 2047:                 writeLong(utflen);
> 
> The old plain `writeUTF` does not write a long utf if the length is too long, 
> but rather throws an `UTFDataFormatException`. There should be code paths 
> that no longer throw this exception, because a few tests, including:
> - `java/io/Serializable/longString/LongString.java`
> - `java/io/Serializable/sanityCheck/SanityCheck.java`
> - `java/text/Format/DateFormat/DateFormatRegression.java`
> are failing. I think this might be the root cause.

The reason for the error is that when the `drain` method is called, the local 
variable pos is not updated to the field `pos`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20886#discussion_r1767990262

Reply via email to