<i18n dev> RFR: 8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972

Justin Lu jlu at openjdk.org
Sat Aug 30 00:06:18 UTC 2025


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.

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

Commit messages:
 - Add reg test
 - init

Changes: https://git.openjdk.org/jdk/pull/27014/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27014&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8366400
  Stats: 17 lines in 2 files changed: 12 ins; 3 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/27014.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27014/head:pull/27014

PR: https://git.openjdk.org/jdk/pull/27014


More information about the i18n-dev mailing list