harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r620735 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/util/Locale.java test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
Date Tue, 12 Feb 2008 09:52:07 GMT
Author: tonywu
Date: Tue Feb 12 01:52:04 2008
New Revision: 620735

URL: http://svn.apache.org/viewvc?rev=620735&view=rev
Log:
Work around HARMONY-5465 ([classlib][util] Locale(String, String, String) capitalize third
parameter (variant))

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?rev=620735&r1=620734&r2=620735&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Tue Feb
12 01:52:04 2008
@@ -239,9 +239,10 @@
         }
 
         // countryCode is defined in ASCII character set
-        countryCode = uLocale.getCountry();
+        countryCode = country.length()!=0?uLocale.getCountry():"";
 
-        variantCode = uLocale.getVariant();
+        // Work around for be compatible with RI
+        variantCode = variant;
     }
 
     /**

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java?rev=620735&r1=620734&r2=620735&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
Tue Feb 12 01:52:04 2008
@@ -358,9 +358,9 @@
 		
 		// Non-bug difference for HARMONY-5442
 		l = new Locale("", "CA", "var");
-		assertEquals("Wrong representation 2.5", "_CA_VAR", l.toString());
+		assertEquals("Wrong representation 2.5", "_CA_var", l.toString());
 		l = new Locale("en", "", "WIN");
-		assertEquals("Wrong representation 4", "en_WIN", l.toString());
+		assertEquals("Wrong representation 4", "en__WIN", l.toString());
 		l = new Locale("en", "CA");
 		assertEquals("Wrong representation 6", "en_CA", l.toString());
 		l = new Locale("en", "CA", "VAR");



Mime
View raw message