On Thu, 31 Jul 2025 22:08:50 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> src/java.base/share/classes/java/text/DecimalFormatSymbols.java line 1002: >> >>> 1000: >>> 1001: if (loadNumberData(locale) instanceof Object[] d && >>> 1002: d[0] instanceof String[] numberElements) { >> >> Should the size be validated here, before accessing `d[0]`? > > This should be fine, as there would be no situation where empty array would > be returned: > https://github.com/openjdk/jdk/blob/724e8c076e1aed05de893ef9366af0e62cc2ac2b/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java#L223 > I modified the `else` case, where the field was not initialized, btw. Thanks for checking ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26580#discussion_r2247668339