ICU-6646 Synchronized eclipse35 bracnch with maint-4-0 r26366

X-SVN-Rev: 26367
diff --git a/.gitattributes b/.gitattributes
index 4f9e609..8c0105e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -263,6 +263,7 @@
 src/com/ibm/icu/dev/tool/docs/icu4j38.api.gz -text
 src/com/ibm/icu/dev/tool/docs/icu4j381.api.gz -text
 src/com/ibm/icu/dev/tool/docs/icu4j400.api.gz -text
+src/com/ibm/icu/dev/tool/docs/icu4j401.api.gz -text
 src/com/ibm/icu/dev/tool/tzu/icu.gif -text
 src/com/ibm/icu/dev/tool/tzu/runicutzu.bat -text
 src/com/ibm/icu/dev/tool/tzu/runicutzu.cmd -text
diff --git a/build.properties b/build.properties
index 266aeee..8e8b85e 100644
--- a/build.properties
+++ b/build.properties
@@ -11,7 +11,7 @@
 
 # impl version will be updated for maintenance releases.
 # It must be <icu4j.spec.version.string>[.<maint-version>]
-icu4j.impl.version.string=4.0.1
+icu4j.impl.version.string=4.0.1.1
 
 # data version number won't be changed in a feature stream
 icu4j.data.version.number=40
@@ -27,6 +27,4 @@
 default.target.rt.version=J2SE15
 
 icu4j.plugin.impl.version.string=4.0.1
-copyright.eclipse=Licensed Materials - Property of IBM \n (C) Copyright IBM Corp. 2000, 2009. All Rights Reserved. \n IBM is a registered trademark of IBM Corp.
-
-icu4j.eclipse.build.version.string=4.0.1.v20090415
+copyright.eclipse=Licensed Materials - Property of IBM \n (C) Copyright IBM Corp. 2000, 2009. All Rights Reserved. \n IBM is a registered trademark of IBM Corp.
\ No newline at end of file
diff --git a/build.xml b/build.xml
index c66c2b2..bbcb88c 100644
--- a/build.xml
+++ b/build.xml
@@ -851,7 +851,7 @@
   <target name="checktags" depends="_requires14,_checktags" description="check API tags before release" />
 
   <target name="gatherapi" depends="tools" unless="before.java14" description="run API database generator tool">
-    <javadoc classpath="${build.dir}" sourcepath="${src.dir}" packagenames="com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.text,com.ibm.icu.util" source="1.4">
+    <javadoc classpath="${build.dir}" sourcepath="${src.dir}" packagenames="com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.text,com.ibm.icu.util,com.ibm.icu.charset" source="1.4">
       <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIData" path="${build.dir}">
         <param name="-name" value="ICU4J ${icu4j.impl.version.string}" />
         <param name="-output" value="${api.dir}/icu4j${icu4j.version.number}.api" />
@@ -862,7 +862,7 @@
   </target>
 
   <target name="gatherapi.with.version" depends="tools" unless="before.java14" description="run API database generator tool">
-    <javadoc classpath="${build.dir}" sourcepath="${src.dir}" packagenames="com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.text,com.ibm.icu.util" source="1.4">
+    <javadoc classpath="${build.dir}" sourcepath="${src.dir}" packagenames="com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.text,com.ibm.icu.util,com.ibm.icu.charset" source="1.4">
       <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIData" path="${build.dir}">
         <param name="-name" value="ICU4J ${icu4j.impl.version.string}" />
         <param name="-output" value="${api.dir}/icu4j${icu4j.version.number}.stver.api" />
diff --git a/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java b/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
index f2af18b..52497f5 100644
--- a/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
+++ b/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
@@ -121,6 +121,25 @@
                                                 && !((BasicTimeZone)outtz).hasEquivalentTransitions(tz, low, high);
                                 }
                                 if (bFailure) {
+                                    // There are tzids not supported by CLDR.  For example,
+                                    // new tzids introduced in the tz database after CLDR release.
+                                    // In 4.0, we used to use GMT as fallback, but we changed the
+                                    // fallback behavior in later releases.
+                                    // This workaround contains list of tzids known to fail.
+                                    // There is not good way to identify such zones (no corresponding
+                                    // CLDR data) except for accessing the resource data directly.
+                                    final String[] excludedTZIDs = {
+                                        "America/Argentina/Salta", "America/Santarem",
+                                        "Asia/Riyadh87", "Asia/Riyadh88", "Asia/Riyadh89",
+                                    };
+                                    for (int i = 0; i < excludedTZIDs.length; i++) {
+                                        if (canonicalID.equals(excludedTZIDs[i])) {
+                                            bFailure = false;
+                                            break;
+                                        }
+                                    }
+                                }
+                                if (bFailure) {
                                     errln("Canonical round trip failed; tz=" + tzids[tzidx]
                                             + ", locale=" + LOCALES[locidx] + ", pattern=" + PATTERNS[patidx]
                                             + ", time=" + DATES[datidx].getTime() + ", str=" + tzstr
diff --git a/src/com/ibm/icu/dev/tool/docs/icu4j36.api.gz b/src/com/ibm/icu/dev/tool/docs/icu4j36.api.gz
index e6e60dd..b8895dc 100644
--- a/src/com/ibm/icu/dev/tool/docs/icu4j36.api.gz
+++ b/src/com/ibm/icu/dev/tool/docs/icu4j36.api.gz
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:03d0d6ee2b586d113eb14af1a15dd2e09fd18a807258b3551a7daa9ebdbfade0
-size 26535
+oid sha256:a2a384467160d3d30872209c1b60eeaa233365d7a25d637218e580f740fbce45
+size 26926
diff --git a/src/com/ibm/icu/dev/tool/docs/icu4j38.api.gz b/src/com/ibm/icu/dev/tool/docs/icu4j38.api.gz
index a334643..ebb90d1 100644
--- a/src/com/ibm/icu/dev/tool/docs/icu4j38.api.gz
+++ b/src/com/ibm/icu/dev/tool/docs/icu4j38.api.gz
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4a57af4b4e36cb929fd0630fd1db5c08ffe9a367be05abb44bc0cfbe6f1bdcd2
-size 30164
+oid sha256:db98896cfc89946ae3a58c1c36c1bba9ca44bc0814cc6592d1b665cf9839344f
+size 30589
diff --git a/src/com/ibm/icu/dev/tool/docs/icu4j381.api.gz b/src/com/ibm/icu/dev/tool/docs/icu4j381.api.gz
index 2b4b302..b5d6718 100644
--- a/src/com/ibm/icu/dev/tool/docs/icu4j381.api.gz
+++ b/src/com/ibm/icu/dev/tool/docs/icu4j381.api.gz
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:546dfc5bf2f2872d7804fbba61be67ee893b8a1ff082eb122f81bfd361a948b1
-size 30281
+oid sha256:1c59f72974592ea9bd43564f9018904a362a1692aa431164548c7cb758d06c55
+size 30708
diff --git a/src/com/ibm/icu/dev/tool/docs/icu4j400.api.gz b/src/com/ibm/icu/dev/tool/docs/icu4j400.api.gz
index d655870..f4e7a40 100644
--- a/src/com/ibm/icu/dev/tool/docs/icu4j400.api.gz
+++ b/src/com/ibm/icu/dev/tool/docs/icu4j400.api.gz
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:75ece13e19c149456a6b86a13a0eab9bb851f2adb7119383c72e2ae3161c00c1
-size 31554
+oid sha256:0b04f969c3f732686089229e08fbb3187e363a456311ab011c4e9555d003c97d
+size 32245
diff --git a/src/com/ibm/icu/dev/tool/docs/icu4j401.api.gz b/src/com/ibm/icu/dev/tool/docs/icu4j401.api.gz
new file mode 100644
index 0000000..0939969
--- /dev/null
+++ b/src/com/ibm/icu/dev/tool/docs/icu4j401.api.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7cc77b7302c1258e5ca116a37061a10b0f3a7f1810213b48b5c7df25c193764e
+size 32248
diff --git a/src/com/ibm/icu/impl/data/icudata.jar b/src/com/ibm/icu/impl/data/icudata.jar
index efbbc4e..4eca8be 100755
--- a/src/com/ibm/icu/impl/data/icudata.jar
+++ b/src/com/ibm/icu/impl/data/icudata.jar
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:d05a33352ceedf8ccfdbeb0c96e13d29628345c4bed2c54de877f85d30d48344
-size 6592568
+oid sha256:db4aabb112055033df54d03aa57067666eee890b9edf8f5ee0ce18f9ad552320
+size 6592592
diff --git a/src/com/ibm/icu/text/RuleBasedCollator.java b/src/com/ibm/icu/text/RuleBasedCollator.java
index 80775a8..af283ea 100644
--- a/src/com/ibm/icu/text/RuleBasedCollator.java
+++ b/src/com/ibm/icu/text/RuleBasedCollator.java
@@ -1,7 +1,7 @@
 //##header J2SE15
 /**
 *******************************************************************************
-* Copyright (C) 1996-2008, International Business Machines Corporation and    *
+* Copyright (C) 1996-2009, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */
@@ -4261,6 +4261,20 @@
               } while(m_contractionIndex_[UCharOffset] != 0xFFFF);
             }
             break;
+          case CollationElementIterator.CE_SPEC_PROC_TAG_:
+            {
+              // 0xB7 is a precontext character defined in UCA5.1, a special
+              // handle is implemeted in order to save LatinOne table for
+              // most locales.
+              if (ch == 0xb7) {
+                  addLatinOneEntry(ch, CE, s);
+              }
+              else {
+                  latinOneFailed_ = true;
+                  return false;
+              }
+            }
+            break;
           default:
             latinOneFailed_ = true;
             return false;
diff --git a/src/com/ibm/icu/util/SimpleTimeZone.java b/src/com/ibm/icu/util/SimpleTimeZone.java
index 8fed6e5..cff7c0d 100644
--- a/src/com/ibm/icu/util/SimpleTimeZone.java
+++ b/src/com/ibm/icu/util/SimpleTimeZone.java
@@ -1,5 +1,5 @@
  /*
-*   Copyright (C) 1996-2008, International Business Machines
+*   Copyright (C) 1996-2009, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 */
 
@@ -993,7 +993,7 @@
             if (startMonth < Calendar.JANUARY || startMonth > Calendar.DECEMBER) {
                 throw new IllegalArgumentException();
             }
-            if (startTime < 0 || startTime >= Grego.MILLIS_PER_DAY ||
+            if (startTime < 0 || startTime > Grego.MILLIS_PER_DAY ||
                 startTimeMode < WALL_TIME || startTimeMode > UTC_TIME) {
                 throw new IllegalArgumentException();
             }
diff --git a/src/com/ibm/icu/util/VersionInfo.java b/src/com/ibm/icu/util/VersionInfo.java
index 9959b52..adc6781 100644
--- a/src/com/ibm/icu/util/VersionInfo.java
+++ b/src/com/ibm/icu/util/VersionInfo.java
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 1996-2008, International Business Machines Corporation and    *
+ * Copyright (C) 1996-2009, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -445,7 +445,7 @@
         UNICODE_4_0_1 = getInstance(4, 0, 1, 0);
         UNICODE_4_1   = getInstance(4, 1, 0, 0);
         UNICODE_5_0   = getInstance(4, 1, 0, 0);
-        ICU_VERSION   = getInstance(4, 0, 1, 0);
+        ICU_VERSION   = getInstance(4, 0, 1, 1);
         UCOL_RUNTIME_VERSION = getInstance(6);
         UCOL_BUILDER_VERSION = getInstance(7);
         UCOL_TAILORINGS_VERSION = getInstance(1);