RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 [v2]

Alan Bateman alanb at openjdk.org
Wed Sep 3 11:37:43 UTC 2025


On Tue, 2 Sep 2025 22:15:29 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> This PR addresses a JCK test failure of an unexpected SIOOBE during DecimalFormat parsing. During the char by char comparison in `matchAffix`, the minimum of the length of the parsed String and the PP index + affix length are iterated on. The parse position index needs to be checked to not be negative to ensure that we do not index the String below 0. Taking the minimum of those two previously mentioned values already guarantees that we do not index the String above the length.
>
> Justin Lu has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Missing the bug ID in the new test
>  - Adding additional tests and moving tests to PositionTest

Thanks for expanding the coverage of the existing tests. That will help catch any regressions when changing the parsing code in the future.

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

PR Comment: https://git.openjdk.org/jdk/pull/27014#issuecomment-3248863177


More information about the core-libs-dev mailing list