RFR: 8363972: Loose matching of dash/minusSign in number parsing
Naoto Sato
naoto at openjdk.org
Thu Jul 31 18:48:31 UTC 2025
Enabling lenient minus sign matching when parsing numbers. In some locales, e.g. Finnish, the default minus sign is the Unicode "Minus Sign" (U+2212), which is not the "Hyphen Minus" (U+002D) that users type in from keyboard. Thus the parsing of user input numbers may fail. This change utilizes CLDR's `parseLenient` element for minus signs and loosely matches them with the hyphen-minus so that user input numbers can parse. As this is a behavioral change, a corresponding CSR has been drafted.
-------------
Commit messages:
- Merge branch 'master' into JDK-8363972-Loose-matching-dash
- tidying up
- test location
- spec update
- readObject
- Merge branch 'master' into JDK-8363972-Loose-matching-dash
- lenientminus -> NumberElements
- lenientMinusSign -> serial, moved to NumberElements
- tentative
- initial commit
Changes: https://git.openjdk.org/jdk/pull/26580/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26580&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8363972
Stats: 386 lines in 8 files changed: 351 ins; 20 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/26580.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26580/head:pull/26580
PR: https://git.openjdk.org/jdk/pull/26580
More information about the core-libs-dev
mailing list