commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r489749 - in /jakarta/commons/proper/lang/trunk/src: java/org/apache/commons/lang/LocaleUtils.java test/org/apache/commons/lang/LocaleUtilsTest.java
Date Fri, 22 Dec 2006 20:34:37 GMT
Author: bayard
Date: Fri Dec 22 12:34:37 2006
New Revision: 489749

URL: http://svn.apache.org/viewvc?view=rev&rev=489749
Log:
Applying test for LANG-304 and fix to LocaleUtils

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java?view=diff&rev=489749&r1=489748&r2=489749
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java Fri
Dec 22 12:34:37 2006
@@ -220,7 +220,7 @@
      * @return true if the locale is a known locale
      */
     public static boolean isAvailableLocale(Locale locale) {
-        return cAvailableLocaleSet.contains(locale);
+        return availableLocaleList().contains(locale);
     }
 
     //-----------------------------------------------------------------------

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java?view=diff&rev=489749&r1=489748&r2=489749
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java
Fri Dec 22 12:34:37 2006
@@ -75,6 +75,13 @@
         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.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message