harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r431538 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/org/apache/harmony/luni/internal/locale/ test/java/tests/api/java/util/
Date Tue, 15 Aug 2006 06:13:39 GMT
Author: pyang
Date: Mon Aug 14 23:13:38 2006
New Revision: 431538

URL: http://svn.apache.org/viewvc?rev=431538&view=rev
Log:
Patch applied for HARMONY-1146 ( [classlib][luni] java.util.Locale lacks of country and language
data)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/ISO3Countries.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Language.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country.java?rev=431538&r1=431537&r2=431538&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country.java
Mon Aug 14 23:13:38 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,6 +62,7 @@
 		{"CV", "Cape Verde"},
 		{"KY", "Cayman Islands"},
 		{"CF", "Central African Republic"},
+        {"CD","The Democratic Republic Of Congo"}, //$NON-NLS-1$ //$NON-NLS-2$
 		{"TD", "Chad"},
 		{"CL", "Chile"},
 		{"CN", "China"},

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/ISO3Countries.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/ISO3Countries.java?rev=431538&r1=431537&r2=431538&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/ISO3Countries.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/ISO3Countries.java
Mon Aug 14 23:13:38 2006
@@ -69,7 +69,7 @@
 		{"CN", "CHN"},
 		{"CO", "COL"},
 		{"CR", "CRI"},
-		{"CS", "CSG"},
+		{"CS", "SCG"},  //$NON-NLS-1$//$NON-NLS-2$
 		{"CU", "CUB"},
 		{"CV", "CPV"},
 		{"CX", "CXR"},

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Language.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Language.java?rev=431538&r1=431537&r2=431538&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Language.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Language.java
Mon Aug 14 23:13:38 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
 	Object [][] contents = {
 		{"aa", "Afar"},
 		{"ab", "Abkhazian"},
+        {"ae", "Avestan"},
 		{"af", "Afrikaans"},
 		{"am", "Amharic"},
 		{"ar", "Arabic"},

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java?rev=431538&r1=431537&r2=431538&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/LocaleTest.java
Mon Aug 14 23:13:38 2006
@@ -129,6 +129,11 @@
 		assertTrue("Returned incorrect country: "
 				+ testLocale.getDisplayCountry(), testLocale
 				.getDisplayCountry().equals("Canada"));
+        
+        // Regression for Harmony-1146
+        Locale l_countryCD = new Locale("", "CD"); //$NON-NLS-1$ //$NON-NLS-2$
+                assertEquals("The Democratic Republic Of Congo", //$NON-NLS-1$
+                        l_countryCD.getDisplayCountry()); 
 	}
 
 	/**
@@ -150,6 +155,10 @@
 		assertTrue("Returned incorrect language: "
 				+ testLocale.getDisplayLanguage(), testLocale
 				.getDisplayLanguage().equals("English"));
+        
+		// Regression for Harmony-1146
+        Locale l_languageAE = new Locale("ae", ""); //$NON-NLS-1$ //$NON-NLS-2$
+        assertEquals("Avestan", l_languageAE.getDisplayLanguage()); //$NON-NLS-1$
 	}
 
 	/**
@@ -227,6 +236,10 @@
         
         Locale l = new Locale("ae");
         assertEquals("ave", l.getISO3Language());
+        
+        // Regression for Harmony-1146
+        Locale l_CountryCS = new Locale("", "CS"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertEquals("SCG", l_CountryCS.getISO3Country()); //$NON-NLS-1$
         
         // Regression for Harmony-1129
         l = new Locale("ak", ""); //$NON-NLS-1$ //$NON-NLS-2$



Mime
View raw message