Skip to content

Conversation

justin-curtis-lu
Copy link
Member

@justin-curtis-lu justin-curtis-lu commented Aug 29, 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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8366400: JCK test api/java_text/DecimalFormat/Parse.html fails after JDK-8363972 (Bug - P2)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27014/head:pull/27014
$ git checkout pull/27014

Update a local copy of the PR:
$ git checkout pull/27014
$ git pull https://git.openjdk.org/jdk.git pull/27014/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27014

View PR using the GUI difftool:
$ git pr show -t 27014

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27014.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2025

👋 Welcome back jlu! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 30, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Aug 30, 2025

@justin-curtis-lu The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org rfr Pull request is ready for review labels Aug 30, 2025
@mlbridge
Copy link

mlbridge bot commented Aug 30, 2025

Webrevs

@AlanBateman
Copy link
Contributor

Would it be possible to review the DecimalFormat tests in the jdk repo? I'm wondering if the changes for lenient parsing in JDK-8363972 should have had more tests (it's good that tests elsewhere found the issue but it does suggest that we don't have enough tests in the jdk repo).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants