On Fri, 28 Feb 2025 23:02:28 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Hi Naoto,
>> 
>> Yes, I did look through that code and bug 5046319. Unfortunately, it 
>> happened when JAXP was standalone, the history of the change was lost. 
>> The variable "buf" seems to be an instance variable that serves to cache the 
>> text read. That part had been changed as well. Furthermore, if buf starts 
>> with zero length, the call to getTextCharacters would still result in 
>> IndexOutOfBoundsException.
>> 
>> Maybe the commented code can be removed, I kept them as is in case they may 
>> be useful reference as a history.
>
> OK, then I'd suggest removing the above comment and commented section 
> altogether, as it only provides confusion.

Yeah, agree. The code is stable as is.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23847#discussion_r1976196910

Reply via email to