RFR: 8357681: Fixed the DigitList::toString method causing incorrect results during debugging

Volkan Yazici vyazici at openjdk.org
Tue May 27 19:33:55 UTC 2025


On Sun, 18 May 2025 11:11:32 GMT, Shaojin Wen <swen at openjdk.org> wrote:

> When debugging getLong/getDouble/getDecimal of DigitList, the debugger will call the DigitList::toString method. At this time, DigitList::toString will modify tempBuilder, which will cause incorrect results.

_Nit:_ Would it be an overkill to add a test (verifying `toString` doesn't spoil the content) to avoid falling on the same slippery slope (i.e., _"Let me optimize this by reusing the `SB`!"_) again?

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

PR Comment: https://git.openjdk.org/jdk/pull/25288#issuecomment-2913768494


More information about the core-libs-dev mailing list