8028771: regression test java/util/Locale/LocaleProviders.sh failed
Reviewed-by: alanb
--- a/jdk/test/java/util/Locale/LocaleProviders.java Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.java Wed Nov 27 10:01:08 2013 -0800
@@ -80,6 +80,12 @@
static void adapterTest(String expected, String lang, String ctry) {
Locale testLocale = new Locale(lang, ctry);
+ LocaleProviderAdapter ldaExpected =
+ LocaleProviderAdapter.forType(LocaleProviderAdapter.Type.valueOf(expected));
+ if (!ldaExpected.getDateFormatProvider().isSupportedLocale(testLocale)) {
+ System.out.println("test locale: "+testLocale+" is not supported by the expected provider: "+ldaExpected+". Ignoring the test.");
+ return;
+ }
String preference = System.getProperty("java.locale.providers", "");
LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale);
LocaleProviderAdapter.Type type = lda.getAdapterType();
--- a/jdk/test/java/util/Locale/LocaleProviders.sh Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.sh Wed Nov 27 10:01:08 2013 -0800
@@ -24,7 +24,7 @@
#
# @test
# @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
-# 8013086 8013233 8013903 8015960
+# 8013086 8013233 8013903 8015960 8028771
# @summary tests for "java.locale.providers" system property
# @compile -XDignore.symbol.file LocaleProviders.java
# @run shell/timeout=600 LocaleProviders.sh