--- old/test/java/util/PluggableLocale/TimeZoneNameProviderTest.java Mon Oct 15 23:38:41 2012 +++ new/test/java/util/PluggableLocale/TimeZoneNameProviderTest.java Mon Oct 15 23:38:39 2012 @@ -45,6 +45,7 @@ void test1() { Locale[] available = Locale.getAvailableLocales(); + List jreimplloc = Arrays.asList(LocaleProviderAdapter.forJRE().getTimeZoneNameProvider().getAvailableLocales()); List providerLocales = Arrays.asList(tznp.getAvailableLocales()); String[] ids = TimeZone.getAvailableIDs(); @@ -51,7 +52,7 @@ for (Locale target: available) { // pure JRE implementation OpenListResourceBundle rb = LocaleProviderAdapter.forJRE().getLocaleData().getTimeZoneNames(target); - boolean jreHasBundle = rb.getLocale().equals(target); + boolean jreSupportsTarget = jreimplloc.contains(target); for (String id: ids) { // the time zone @@ -59,7 +60,7 @@ // JRE string array for the id String[] jrearray = null; - if (jreHasBundle) { + if (jreSupportsTarget) { try { jrearray = rb.getStringArray(id); } catch (MissingResourceException mre) {} @@ -75,7 +76,7 @@ providersname = tznp.getDisplayName(id, i>=3, i%2, target); } - // JRE's name (if any) + // JRE's name String jresname = null; if (jrearray != null) { jresname = jrearray[i]; @@ -82,7 +83,7 @@ } checkValidity(target, jresname, providersname, name, - jreHasBundle && rb.handleGetKeys().contains(id)); + jreSupportsTarget && jresname != null); } } }