harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r997622 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/files/ classlib/depends/libs/ classlib/depends/manifests/icu4j_4.2.1/META-INF/ classlib/depends/manifests/icu4j_4.4.1.1/ classlib/depends/manifests/icu4j_4.4....
Date Thu, 16 Sep 2010 07:11:15 GMT
Author: hindessm
Date: Thu Sep 16 07:11:14 2010
New Revision: 997622

URL: http://svn.apache.org/viewvc?rev=997622&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@997554:

  r997554 | regisxu | 2010-09-16 02:26:18 +0100 (Thu, 16 Sep 2010) | 1 line
  
  Apply patch for HARMONY-6617: [classlib]Upgrade ICU4J4.2.1 to ICU4J4.4.1.1


Added:
    harmony/enhanced/java/branches/java6/classlib/depends/manifests/icu4j_4.4.1.1/
      - copied from r997554, harmony/enhanced/java/trunk/classlib/depends/manifests/icu4j_4.4.1.1/
    harmony/enhanced/java/branches/java6/classlib/depends/manifests/icu4j_4.4.1.1/META-INF/
      - copied from r997554, harmony/enhanced/java/trunk/classlib/depends/manifests/icu4j_4.4.1.1/META-INF/
    harmony/enhanced/java/branches/java6/classlib/depends/manifests/icu4j_4.4.1.1/META-INF/MANIFEST.MF
      - copied unchanged from r997554, harmony/enhanced/java/trunk/classlib/depends/manifests/icu4j_4.4.1.1/META-INF/MANIFEST.MF
Removed:
    harmony/enhanced/java/branches/java6/classlib/depends/manifests/icu4j_4.2.1/META-INF/MANIFEST.MF
Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/build.xml
    harmony/enhanced/java/branches/java6/classlib/depends/files/bootclasspath.properties
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/make/depends.properties
    harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/Currency.java
    harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ScannerTest.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 16 07:11:14 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349
+/harmony/enhanced/java/trunk:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349,997554
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 16 07:11:14 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349
+/harmony/enhanced/java/trunk/classlib:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349,997554
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/build.xml?rev=997622&r1=997621&r2=997622&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/build.xml (original)
+++ harmony/enhanced/java/branches/java6/classlib/build.xml Thu Sep 16 07:11:14 2010
@@ -200,7 +200,7 @@ module:
         <!-- Copy across the boot dependency jars --><!-- TOFIX clean these? -->
         <copy todir="${hy.jdk}/jre/lib/boot">
             <fileset dir="${depends.jars}">
-                <patternset includes="icu4j_4.2.1/*.jar" />
+                <patternset includes="icu4j_4.4.1.1/*.jar" />
             </fileset>
             <fileset dir="${depends.manifests}"/>
         </copy>

Modified: harmony/enhanced/java/branches/java6/classlib/depends/files/bootclasspath.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/depends/files/bootclasspath.properties?rev=997622&r1=997621&r2=997622&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/depends/files/bootclasspath.properties (original)
+++ harmony/enhanced/java/branches/java6/classlib/depends/files/bootclasspath.properties Thu
Sep 16 07:11:14 2010
@@ -161,8 +161,8 @@ bootclasspath.source.packageroot.30=/
 
 # ICU functionality for text/characters are provided by the ICU4J 
 # and ICU4J-charsets JAR files.
-bootclasspath.31=icu4j_4.2.1/icu4j-4_2_1.jar
-bootclasspath.32=icu4j_4.2.1/icu4j-charsets-4_2_1.jar
+bootclasspath.31=icu4j_4.4.1.1/icu4j-4_4_1_1.jar
+bootclasspath.32=icu4j_4.4.1.1/icu4j-charsets-4_4_1_1.jar
 
 # The following JARs are from Xerces/Xalan
 bootclasspath.34=xalan-j_2.7.0/xalan.jar

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 16 07:11:14 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349,997554
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/make/depends.properties?rev=997622&r1=997621&r2=997622&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/make/depends.properties (original)
+++ harmony/enhanced/java/branches/java6/classlib/make/depends.properties Thu Sep 16 07:11:14
2010
@@ -99,14 +99,14 @@ bcprov.jar=${bcprov.dir}/bcprov.jar
 bcprov.url=${depends.url}/jars/bcprov/${bcprov.ver}.jar
 bcprov.md5=2062f8e3d15748443ea60a94b266371c
 
-icu4j.ver=icu4j_4.2.1
+icu4j.ver=icu4j_4.4.1.1
 icu4j.dir=${depends.jars}/${icu4j.ver}
-icu4j.jar=${icu4j.dir}/icu4j-4_2_1.jar
-icu4j.url=http://download.icu-project.org/files/icu4j/4.2.1/icu4j-4_2_1.jar
-icu4j.md5=2bef290de1db6970a6699bf78f0dca77
+icu4j.jar=${icu4j.dir}/icu4j-4_4_1_1.jar
+icu4j.url=http://download.icu-project.org/files/icu4j/4.4.1.1/icu4j-4_4_1_1.jar
+icu4j.md5=52e1253e6c1c4124c4085e239e51a585
 
-icu4j-charsets.ver=icu4j_4.2.1
+icu4j-charsets.ver=icu4j_4.4.1.1
 icu4j-charsets.dir=${depends.jars}/${icu4j.ver}
-icu4j-charsets.jar=${icu4j.dir}/icu4j-charsets-4_2_1.jar
-icu4j-charsets.url=http://download.icu-project.org/files/icu4j/4.2.1/icu4j-charsets-4_2_1.jar
-icu4j-charsets.md5=bccab3c39d735171fb54ce5e4f49207b
+icu4j-charsets.jar=${icu4j.dir}/icu4j-charsets-4_4_1_1.jar
+icu4j-charsets.url=http://download.icu-project.org/files/icu4j/4.4.1.1/icu4j-charsets-4_4_1_1.jar
+icu4j-charsets.md5=d76e2861a01d427129f795223a610b2f

Modified: harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/Currency.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/Currency.java?rev=997622&r1=997621&r2=997622&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/Currency.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/Currency.java
Thu Sep 16 07:11:14 2010
@@ -73,13 +73,11 @@ public final class Currency implements S
      */
     public static Currency getInstance(Locale locale) {
         com.ibm.icu.util.Currency currency = null;
-        try {
-            currency = com.ibm.icu.util.Currency.getInstance(locale);
-        } catch (IllegalArgumentException e) {
-            return null;
-        }
+        currency = com.ibm.icu.util.Currency.getInstance(locale);
+
         if (currency == null) {
-            throw new IllegalArgumentException(locale.getCountry());
+            checkCountry(locale.getCountry());
+            return null;
         }
         String currencyCode = currency.getCurrencyCode();
 
@@ -90,6 +88,15 @@ public final class Currency implements S
         return getInstance(currencyCode);
     }
 
+    private static void checkCountry(String country) {
+        String[] countries = Locale.getISOCountries();
+        List<String> countryArray = Arrays.asList(countries);
+
+        if (!countryArray.contains(country)) {
+            throw new IllegalArgumentException(country);
+        }
+    }
+
     /**
      * Returns this {@code Currency}'s ISO 4217 currency code.
      * 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ScannerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ScannerTest.java?rev=997622&r1=997621&r2=997622&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ScannerTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ScannerTest.java
Thu Sep 16 07:11:14 2010
@@ -1117,7 +1117,7 @@ public class ScannerTest extends TestCas
             // expected
         }
 
-        s = new Scanner("-123 123- (123)");
+        s = new Scanner("-123 123-");
         s.useLocale(new Locale("mk", "MK"));
         assertEquals(-123, s.nextInt(10));
         try {
@@ -1128,8 +1128,6 @@ public class ScannerTest extends TestCas
         }
         // Skip the un-recognizable token 123-.
         assertEquals("123-", s.next());
-        // The following test case fails on RI
-        assertEquals(-123, s.nextInt(10));
 
         // If the parameter radix is illegal, the following test cases fail on
         // RI
@@ -1317,7 +1315,7 @@ public class ScannerTest extends TestCas
             // expected
         }
 
-        s = new Scanner("-123 123- (123)");
+        s = new Scanner("-123 123-");
         s.useLocale(new Locale("mk", "MK"));
         assertEquals(-123, s.nextInt());
         try {
@@ -1328,8 +1326,6 @@ public class ScannerTest extends TestCas
         }
         // Skip the un-recognizable token 123-.
         assertEquals("123-", s.next());
-        // The following test case fails on RI
-        assertEquals(-123, s.nextInt());
     }
     
     /**
@@ -1574,9 +1570,8 @@ public class ScannerTest extends TestCas
             // Expected
         }
 
-        s = new Scanner("(123) 123- -123");
+        s = new Scanner("123- -123");
         s.useLocale(new Locale("mk", "MK"));
-        assertEquals((float)-123.0, s.nextFloat());
         try {
             s.nextFloat();
             fail("Should throw InputMismatchException");
@@ -3451,7 +3446,7 @@ public class ScannerTest extends TestCas
             // expected
         }
 
-        s = new Scanner("-123 123- (123)");
+        s = new Scanner("-123 123-");
         s.useLocale(new Locale("mk", "MK"));
         assertTrue(s.hasNextInt(10));
         assertEquals(-123, s.nextInt(10));
@@ -3464,9 +3459,6 @@ public class ScannerTest extends TestCas
         }
         // Skip the un-recognizable token 123-.
         assertEquals("123-", s.next());
-        // The following test case fails on RI
-        assertTrue(s.hasNextInt(10));
-        assertEquals(-123, s.nextInt(10));
     }
 
     /**
@@ -3653,7 +3645,7 @@ public class ScannerTest extends TestCas
             // expected
         }
 
-        s = new Scanner("-123 123- (123)");
+        s = new Scanner("-123 123-");
         s.useLocale(new Locale("mk", "MK"));
         assertTrue(s.hasNextInt());
         assertEquals(-123, s.nextInt());
@@ -3665,9 +3657,6 @@ public class ScannerTest extends TestCas
         }
         // Skip the un-recognizable token 123-.
         assertEquals("123-", s.next());
-        // The following test case fails on RI
-        assertTrue(s.hasNextInt());
-        assertEquals(-123, s.nextInt());
     }
     
     /**
@@ -3775,10 +3764,8 @@ public class ScannerTest extends TestCas
 //            // Expected
 //        }
 
-        s = new Scanner("(123) 123- -123");
+        s = new Scanner("123- -123");
         s.useLocale(new Locale("mk", "MK"));
-        assertTrue(s.hasNextFloat());
-        assertEquals((float)-123.0, s.nextFloat());
         assertFalse(s.hasNextFloat());
         try {
             s.nextFloat();

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 16 07:11:14 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349
+/harmony/enhanced/java/trunk/drlvm:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349,997554
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 16 07:11:14 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349
+/harmony/enhanced/java/trunk/jdktools:929253-996210,996457,996567,996687,996798,996801,996806,996812,996814,996824,996904,996996,997081,997093,997116,997212,997267,997336,997338,997349,997554
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message