harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r548249 - in /harmony/enhanced/classlib/branches/java6/modules/luni/src: main/java/java/util/Locale.java test/java/tests/api/java/util/LocaleTest.java
Date Mon, 18 Jun 2007 07:47:43 GMT
Author: tonywu
Date: Mon Jun 18 00:47:42 2007
New Revision: 548249

URL: http://svn.apache.org/viewvc?view=rev&rev=548249
Log:
Apply patch HARMONY-4202([classlib][luni][java6] New constant in java.util.Locale for java6
)

Modified:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java?view=diff&rev=548249&r1=548248&r2=548249
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
Mon Jun 18 00:47:42 2007
@@ -157,6 +157,12 @@
 	 */
 	public static final Locale US = new Locale("en", "US");  //$NON-NLS-1$//$NON-NLS-2$
 
+    /**
+     * the locale whose language, country, and variant are empty ("") strings.
+     * @since 1.6
+     */
+    public static final Locale ROOT = new Locale("","","");//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+    
 	private static final PropertyPermission setLocalePermission = new PropertyPermission(
 			"user.language", "write");  //$NON-NLS-1$//$NON-NLS-2$
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java?view=diff&rev=548249&r1=548248&r2=548249
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
Mon Jun 18 00:47:42 2007
@@ -373,6 +373,17 @@
         List<String> countries = Arrays.asList(Locale.getISOCountries());
         assertTrue(countries.contains("CS"));
     }
+    
+    /**
+     * @tests {@value java.util.Locale#ROOT}
+     * @since 1.6
+     */
+    public void test_constantROOT() {
+        Locale root = Locale.ROOT;
+        assertEquals("", root.getLanguage());
+        assertEquals("", root.getCountry());
+        assertEquals("", root.getVariant());
+    }
 
 	/**
 	 * Sets up the fixture, for example, open a network connection. This method



Mime
View raw message