src/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java

Print this page
rev 6794 : imported patch 7091601

*** 301,313 **** dfs.setMinusSign(getMinusSign(langTag, dfs.getMinusSign())); dfs.setMonetaryDecimalSeparator(getMonetaryDecimalSeparator(langTag, dfs.getMonetaryDecimalSeparator())); dfs.setNaN(getNaN(langTag, dfs.getNaN())); dfs.setPercent(getPercent(langTag, dfs.getPercent())); dfs.setPerMill(getPerMill(langTag, dfs.getPerMill())); - if (isNativeDigit(langTag)) { dfs.setZeroDigit(getZeroDigit(langTag, dfs.getZeroDigit())); - } ref = new SoftReference<>(dfs); decimalFormatSymbolsCache.put(locale, ref); } return (DecimalFormatSymbols)dfs.clone(); } --- 301,311 ----
*** 418,430 **** Locale base = locale.stripExtensions(); if (!supportedLocaleSet.contains(base)) { return false; } String requestedCalType = locale.getUnicodeLocaleType("ca"); ! String nativeCalType = ! calIDToLDML[getCalendarID(locale.toLanguageTag())] .replaceFirst("_.*", ""); // remove locale part. if (requestedCalType == null) { return Calendar.getAvailableCalendarTypes().contains(nativeCalType); } else { --- 416,432 ---- Locale base = locale.stripExtensions(); if (!supportedLocaleSet.contains(base)) { return false; } + int calid = getCalendarID(locale.toLanguageTag()); + if (calid <= 0 || calid >= calIDToLDML.length) { + return false; + } + String requestedCalType = locale.getUnicodeLocaleType("ca"); ! String nativeCalType = calIDToLDML[calid] .replaceFirst("_.*", ""); // remove locale part. if (requestedCalType == null) { return Calendar.getAvailableCalendarTypes().contains(nativeCalType); } else {