On Wed, 12 Feb 2025 19:34:19 GMT, Justin Lu <j...@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. Looks good test/jdk/java/util/Locale/IllformedRangeTest.java line 40: > 38: import static org.junit.jupiter.api.Assertions.assertThrows; > 39: > 40: public class IllformedRangeTest { Instead of creating a new test file, you might want to add this test into `LanguageRangeTest.java` ------------- PR Review: https://git.openjdk.org/jdk/pull/23596#pullrequestreview-2613272653 PR Review Comment: https://git.openjdk.org/jdk/pull/23596#discussion_r1953439911