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

Justin Lu jlu at openjdk.org
Tue Sep 2 22:15:29 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.

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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27014/files
  - new: https://git.openjdk.org/jdk/pull/27014/files/79b57021..96f71a0f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27014&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27014&range=00-01

  Stats: 75 lines in 2 files changed: 56 ins; 14 del; 5 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 core-libs-dev mailing list