提交 59cb2023 编写于 作者: N naoto

8028771: regression test java/util/Locale/LocaleProviders.sh failed

Reviewed-by: alanb
上级 ab4c9fae
...@@ -80,6 +80,12 @@ public class LocaleProviders { ...@@ -80,6 +80,12 @@ public class LocaleProviders {
static void adapterTest(String expected, String lang, String ctry) { static void adapterTest(String expected, String lang, String ctry) {
Locale testLocale = new Locale(lang, 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", ""); String preference = System.getProperty("java.locale.providers", "");
LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale); LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale);
LocaleProviderAdapter.Type type = lda.getAdapterType(); LocaleProviderAdapter.Type type = lda.getAdapterType();
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
# #
# @test # @test
# @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666 # @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 # @summary tests for "java.locale.providers" system property
# @compile -XDignore.symbol.file LocaleProviders.java # @compile -XDignore.symbol.file LocaleProviders.java
# @run shell/timeout=600 LocaleProviders.sh # @run shell/timeout=600 LocaleProviders.sh
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册