Applying test for LANG-304 and fix to LocaleUtils

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@489749 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2006-12-22 20:34:37 +00:00
parent 848a8144bc
commit cf20d13c64
2 changed files with 8 additions and 1 deletions

View File

@ -220,7 +220,7 @@ public static Set availableLocaleSet() {
* @return true if the locale is a known locale
*/
public static boolean isAvailableLocale(Locale locale) {
return cAvailableLocaleSet.contains(locale);
return availableLocaleList().contains(locale);
}
//-----------------------------------------------------------------------

View File

@ -75,6 +75,13 @@ public static Test suite() {
return suite;
}
public void setUp() throws Exception {
super.setUp();
// Testing #LANG-304. Must be called before availableLocaleSet is called.
LocaleUtils.isAvailableLocale(Locale.getDefault());
}
//-----------------------------------------------------------------------
/**
* Test that constructors are public, and work, etc.