> This PR corrects two parsing issues for `DecimalFormat` during strict parsing. > > 1. The special parsing path for NaN was shared by lenient and strict > parsing. As a result, subsequent text after the "NaN" was accepted in strict > mode, although the trailing characters should have caused parsing to fail. > Strict parsing needs to add additional logic for that special case. > > 2. In strict mode, a grouping size of zero causes all numeric input to be > rejected since it tries to check for the first group immediately. A grouping > size of zero is implies that grouping is not used. However, `isGroupingUsed` > is independent of `setGroupingSize`. The implementation needs to check for > both the int size and boolean status value when checking grouping during > strict parsing. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Explicitly clarify the relationship between lenient and legacy parsing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/31980/files - new: https://git.openjdk.org/jdk/pull/31980/files/22dfe06c..f6c7c31c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=31980&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31980&range=01-02 Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/31980.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31980/head:pull/31980 PR: https://git.openjdk.org/jdk/pull/31980
