<i18n dev> RFR: 8349883: Locale.LanguageRange.parse("-") throws ArrayIndexOutOfBoundsException [v2]
Justin Lu
jlu at openjdk.org
Wed Feb 12 22:06:34 UTC 2025
> Please review this PR which prevents a (non-specified) `AIOOBE` from leaking out of the range accepting endpoints in `Locale.LanguageRange`.
>
> In the reported error case, the invalid range is a lone "-" which is `split` into an empty array. Checking if the range ends with "-" first, avoids indexing the empty array.
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
Naoto's review - Include test in LanguageRangeTest instead. Additionally, bundle existing LRToString test into LanguageRangeTest as well
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23596/files
- new: https://git.openjdk.org/jdk/pull/23596/files/f1a90f2a..797f69a7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23596&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23596&range=00-01
Stats: 204 lines in 3 files changed: 61 ins; 136 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/23596.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23596/head:pull/23596
PR: https://git.openjdk.org/jdk/pull/23596
More information about the i18n-dev
mailing list