<i18n dev> RFR: 8349883: Locale.LanguageRange.parse("-") throws ArrayIndexOutOfBoundsException [v2]
Naoto Sato
naoto at openjdk.org
Wed Feb 12 22:55:25 UTC 2025
On Wed, 12 Feb 2025 22:06:34 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> 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
LGTM
-------------
Marked as reviewed by naoto (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23596#pullrequestreview-2613404677
More information about the i18n-dev
mailing list