changeset 6709:31416e6673db

Merge
author asaha
date Thu, 25 Jul 2013 17:17:15 -0700
parents aac9848719a9 4139a0986ba2
children 6c81a895ac96 4c6eb1390566
files .hgtags src/share/classes/javax/swing/JTable.java
diffstat 12 files changed, 143 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Jul 23 08:11:32 2013 -0700
+++ b/.hgtags	Thu Jul 25 17:17:15 2013 -0700
@@ -284,7 +284,9 @@
 f447c3bbf074439ece0ce9fea82c857f93817801 jdk7u21-b10
 f9323b9d020ce8d313af2d2e2682e2b6cabcc40d jdk7u21-b11
 08ed0bfc9668f04ce4e3803f16aad92f6e50f885 jdk7u21-b30
+f3cf02a53684b9fbefabb212c80dfbea0c27f113 jdk7u21-b50
 f3cf02a53684b9fbefabb212c80dfbea0c27f113 jdk7u21-b12
+e87b0b64e8b248b51bc65a8131ce29874f9d6a0b jdk7u21-b31
 a5e712ea6944b1c81bcd5343a50645964f12b107 jdk7u21-b02
 9d87f5f84afef6ba4c92523a76e3c81fd9acfa00 jdk7u21-b03
 139d3e3b62d49374112ce1add84cd3d1e5ed5335 jdk7u21-b04
@@ -303,6 +305,9 @@
 ba6c3d64b94d17d90b86e36b7a282480a1c6808a jdk7u25-b13
 a71103b8cbb155a4af136baaee4f4bdd30ee817c jdk7u25-b14
 e1768e2070c938ec97325ad48b0d281e3031a29c jdk7u25-b15
+40034a7b7dec4d984139e154008e82e35d0ed212 jdk7u25-b31
+4ed1ef559d7c0058991eaf7e069b851940be432c jdk7u25-b33
+82eb0ebe4ef33f85054faf38a17f9ab4e14c2d60 jdk7u25-b34
 0d68732acbd4b6669512b1d2be496a9e391795a9 jdk7u25-b30
 173b399abd8aa2e4fdc0066c977719670d180125 jdk7u25-b16
 55f01444cf58c8004df9a9634c1bd7ff87caa370 jdk7u25-b32
@@ -327,6 +332,7 @@
 b9f86896cd0aa9b83e472a90b20ae7c253fba633 jdk7u40-b32
 419939ecee8311c8a38ff624ae67e473f8c60e51 jdk7u40-b33
 7c1d6fc3b6da19c7b7c0aad0716a2d810dbb974b jdk7u40-b34
+0931b4a280b1e9b3b12936222d1bc6d427310f79 jdk7u40-b35
 55f01444cf58c8004df9a9634c1bd7ff87caa370 jdk7u25-b32
 b06abd965701459a868e88af9a3e564c0301971c jdk7u45-b01
 d23a877da2d5dad6520a268c83f183295a9e7299 jdk7u45-b02
--- a/make/sun/javazic/tzdata/VERSION	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/VERSION	Thu Jul 25 17:17:15 2013 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2013c
+tzdata2013d
--- a/make/sun/javazic/tzdata/africa	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/africa	Thu Jul 25 17:17:15 2013 -0700
@@ -875,12 +875,18 @@
 # announced that year's Ramadan daylight-saving transitions would be
 # 2012-07-20 and 2012-08-20; see
 # <http://www.mmsp.gov.ma/fr/actualites.aspx?id=288>.
-#
+
+# From Andrew Paprocki (2013-07-02):
+# Morocco announced that the year's Ramadan daylight-savings
+# transitions would be 2013-07-07 and 2013-08-10; see:
+# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
+
+# From Paul Eggert (2013-07-03):
 # To estimate what the Moroccan government will do in future years,
-# transition dates for 2013 through 2021 were determined by running
+# transition dates for 2014 through 2021 were determined by running
 # the following program under GNU Emacs 24.3:
 #
-# (let ((islamic-year 1434))
+# (let ((islamic-year 1435))
 #   (while (< islamic-year 1444)
 #     (let ((a
 #	     (calendar-gregorian-from-absolute
@@ -933,8 +939,8 @@
 Rule	Morocco	2012	max	-	Sep	 lastSun 3:00	0	-
 Rule	Morocco	2012	only	-	Jul	 20	 3:00	0	-
 Rule	Morocco	2012	only	-	Aug	 20	 2:00	1:00	S
-Rule	Morocco	2013	only	-	Jul	  9	 3:00	0	-
-Rule	Morocco	2013	only	-	Aug	  8	 2:00	1:00	S
+Rule	Morocco	2013	only	-	Jul	  7	 3:00	0	-
+Rule	Morocco	2013	only	-	Aug	 10	 2:00	1:00	S
 Rule	Morocco	2014	only	-	Jun	 29	 3:00	0	-
 Rule	Morocco	2014	only	-	Jul	 29	 2:00	1:00	S
 Rule	Morocco	2015	only	-	Jun	 18	 3:00	0	-
--- a/make/sun/javazic/tzdata/asia	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/asia	Thu Jul 25 17:17:15 2013 -0700
@@ -1235,39 +1235,21 @@
 Rule	Zion	2012	only	-	Mar	Fri>=26	2:00	1:00	D
 Rule	Zion	2012	only	-	Sep	23	2:00	0	S
 
-# From Ephraim Silverberg (2012-10-18):
-# Yesterday, the Interior Ministry Committee, after more than a year
-# past, approved sending the proposed June 2011 changes to the Time
-# Decree Law back to the Knesset for second and third (final) votes
-# before the upcoming elections on Jan. 22, 2013.  Hence, although the
-# changes are not yet law, they are expected to be so before February 2013.
+# From Ephraim Silverberg (2013-06-27):
+# On June 23, 2013, the Israeli government approved changes to the
+# Time Decree Law.  The next day, the changes passed the First Reading
+# in the Knesset.  The law is expected to pass the Second and Third
+# (final) Readings by the beginning of September 2013.
 #
-# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
-# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
-# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
-# later (i.e. at 02:00 the first Monday after October 2).
-# [Rosh Hashana holidays are factored in until 2100.]
-
-# From Ephraim Silverberg (2012-11-05):
-# The Knesset passed today (in second and final readings) the amendment to the
-# Time Decree Law making the changes ... law.
+# As of 2013, DST starts at 02:00 on the Friday before the last Sunday
+# in March.  DST ends at 02:00 on the last Sunday of October.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Zion	2013	max	-	Mar	Fri>=23	2:00	1:00	D
-Rule	Zion	2013	2026	-	Oct	Sun>=2	2:00	0	S
-Rule	Zion	2027	only	-	Oct	Mon>=3	2:00	0	S
-Rule	Zion	2028	max	-	Oct	Sun>=2	2:00	0	S
-# The following rules are commented out for now, as they break older
-# versions of zic that support only signed 32-bit timestamps, i.e.,
-# through 2038-01-19 03:14:07 UTC.
-#Rule	Zion	2028	2053	-	Oct	Sun>=2	2:00	0	S
-#Rule	Zion	2054	only	-	Oct	Mon>=3	2:00	0	S
-#Rule	Zion	2055	2080	-	Oct	Sun>=2	2:00	0	S
-#Rule	Zion	2081	only	-	Oct	Mon>=3	2:00	0	S
-#Rule	Zion	2082	max	-	Oct	Sun>=2	2:00	0	S
+Rule	Zion	2013	max	-	Oct	lastSun	2:00	0	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Jerusalem	2:20:56 -	LMT	1880
+Zone	Asia/Jerusalem	2:20:54 -	LMT	1880
 			2:20:40	-	JMT	1918	# Jerusalem Mean Time?
 			2:00	Zion	I%sT
 
@@ -2570,8 +2552,8 @@
 Rule	Syria	2007	only	-	Mar	lastFri	0:00	1:00	S
 # From Jesper Norgard (2007-10-27):
 # The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
-# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
-# rather Midnight between Thursday and Friday. This does make more sence than
+# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or
+# rather Midnight between Thursday and Friday. This does make more sense than
 # having it between Wednesday and Thursday (two workdays in Syria) since the
 # weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
 # it is implemented at midnight of the last workday before weekend...
--- a/make/sun/javazic/tzdata/australasia	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/australasia	Thu Jul 25 17:17:15 2013 -0700
@@ -253,10 +253,16 @@
 # - Macquarie Island will stay on UTC+11 for winter and therefore not
 # switch back from daylight savings time when other parts of Australia do
 # on 4 April.
+#
+# From Arthur David Olson (2013-05-23):
+# The 1919 transition is overspecified below so pre-2013 zics
+# will produce a binary file with an EST-type as the first 32-bit type;
+# this is required for correct handling of times before 1916 by
+# pre-2013 versions of localtime.
 Zone Antarctica/Macquarie 0	-	zzz	1899 Nov
 			10:00	-	EST	1916 Oct 1 2:00
 			10:00	1:00	EST	1917 Feb
-			10:00	Aus	EST	1919 Apr
+			10:00	Aus	EST	1919 Apr 1 0:00s
 			0	-	zzz	1948 Mar 25
 			10:00	Aus	EST	1967
 			10:00	AT	EST	2010 Apr 4 3:00
@@ -1498,12 +1504,12 @@
 # From Paul Eggert (2000-01-08):
 # IATA SSIM (1999-09) says DST ends 0100 local time.  Go with McDow.
 
-# From the BBC World Service (1998-10-31 11:32 UTC):
+# From the BBC World Service in
+# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC):
 # The Fijiian government says the main reasons for the time change is to
-# improve productivity and reduce road accidents.  But correspondents say it
-# also hopes the move will boost Fiji's ability to compete with other pacific
-# islands in the effort to attract tourists to witness the dawning of the new
-# millenium.
+# improve productivity and reduce road accidents.... [T]he move is also
+# intended to boost Fiji's ability to attract tourists to witness the dawning
+# of the new millennium.
 
 # http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13)
 # reports that Fiji has discontinued DST.
@@ -1648,7 +1654,7 @@
 # Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell.
 
 # From Eric Ulevik (1999-05-03):
-# Tonga's director of tourism, who is also secretary of the National Millenium
+# Tonga's director of tourism, who is also secretary of the National Millennium
 # Committee, has a plan to get Tonga back in front.
 # He has proposed a one-off move to tropical daylight saving for Tonga from
 # October to March, which has won approval in principle from the Tongan
--- a/make/sun/javazic/tzdata/europe	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/europe	Thu Jul 25 17:17:15 2013 -0700
@@ -546,7 +546,7 @@
 # It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
 # 2:00 standard time, e.g. 3:00 local time.  However there are no
 # countries that use C-Eur rules in September 1945, so the only items
-# affected are apparently these ficticious zones that translates acronyms
+# affected are apparently these fictitious zones that translate acronyms
 # CET and MET:
 #
 # Zone CET  1:00 C-Eur CE%sT
@@ -2802,9 +2802,9 @@
 
 # Ukraine
 #
-# From Igor Karpov, who works for the Ukranian Ministry of Justice,
+# From Igor Karpov, who works for the Ukrainian Ministry of Justice,
 # via Garrett Wollman (2003-01-27):
-# BTW, I've found the official document on this matter. It's goverment
+# BTW, I've found the official document on this matter. It's government
 # regulations number 509, May 13, 1996. In my poor translation it says:
 # "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday
 # of March at 3am the time is changing to 4am and each last Sunday of
@@ -2838,7 +2838,7 @@
 # time this year after all.
 #
 # From Udo Schwedt (2011-10-18):
-# As far as I understand, the recent change to the Ukranian time zone
+# As far as I understand, the recent change to the Ukrainian time zone
 # (Europe/Kiev) to introduce permanent daylight saving time (similar
 # to Russia) was reverted today:
 #
--- a/make/sun/javazic/tzdata/iso3166.tab	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/iso3166.tab	Thu Jul 25 17:17:15 2013 -0700
@@ -26,14 +26,12 @@
 # 2009-05-17 by Arthur David Olson.
 # ISO 3166 alpha-2 country codes
 #
-# From Paul Eggert (2006-09-27):
+# From Paul Eggert (2013-05-27):
 #
 # This file contains a table with the following columns:
 # 1.  ISO 3166-1 alpha-2 country code, current as of
-#     ISO 3166-1 Newsletter VI-1 (2007-09-21).  See:
-#     <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
-#     ISO 3166 Maintenance agency (ISO 3166/MA)
-#     </a>.
+#     ISO 3166-1 Newsletter VI-15 (2013-05-10).  See: Updates on ISO 3166
+#   http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
 # 2.  The usual English name for the country,
 #     chosen so that alphabetic sorting of subsets produces helpful lists.
 #     This is not the same as the English name in the ISO 3166 tables.
@@ -43,8 +41,9 @@
 #
 # Lines beginning with `#' are comments.
 #
-# From Arthur David Olson (2011-08-17):
-# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs.  It is not intended
+# to take or endorse any position on legal or territorial claims.
 #
 #country-
 #code	country name
@@ -77,7 +76,7 @@
 BM	Bermuda
 BN	Brunei
 BO	Bolivia
-BQ	Bonaire Sint Eustatius & Saba
+BQ	Bonaire, St Eustatius & Saba
 BR	Brazil
 BS	Bahamas
 BT	Bhutan
@@ -258,7 +257,7 @@
 SS	South Sudan
 ST	Sao Tome & Principe
 SV	El Salvador
-SX	Sint Maarten
+SX	St Maarten (Dutch part)
 SY	Syria
 SZ	Swaziland
 TC	Turks & Caicos Is
--- a/make/sun/javazic/tzdata/southamerica	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/southamerica	Thu Jul 25 17:17:15 2013 -0700
@@ -994,7 +994,7 @@
 # adopted by the same states as before.
 Rule	Brazil	2007	only	-	Oct	Sun>=8	 0:00	1:00	S
 # From Frederico A. C. Neves (2008-09-10):
-# Acording to this decree
+# According to this decree
 # <a href="http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm">
 # http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm
 # </a>
@@ -1226,7 +1226,7 @@
 # http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
 # </a>
 #
-# This is not yet reflected in the offical "cambio de hora" site, but
+# This is not yet reflected in the official "cambio de hora" site, but
 # probably will be soon:
 # <a href="http://www.horaoficial.cl/cambio.htm">
 # http://www.horaoficial.cl/cambio.htm
--- a/make/sun/javazic/tzdata/zone.tab	Tue Jul 23 08:11:32 2013 -0700
+++ b/make/sun/javazic/tzdata/zone.tab	Thu Jul 25 17:17:15 2013 -0700
@@ -27,15 +27,19 @@
 #
 # TZ zone descriptions
 #
-# From Paul Eggert (1996-08-05):
+# From Paul Eggert (2013-05-27):
 #
 # This file contains a table with the following columns:
 # 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
+#     This identifies a country that overlaps the zone.  The country may
+#     overlap other zones and the zone may overlap other countries.
 # 2.  Latitude and longitude of the zone's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
 #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
+#     This location need not lie within the column-1 country.
 # 3.  Zone name used in value of TZ environment variable.
+#     Please see the 'Theory' file for how zone names are chosen.
 # 4.  Comments; present if and only if the country has multiple rows.
 #
 # Columns are separated by a single tab.
@@ -45,6 +49,10 @@
 #
 # Lines beginning with `#' are comments.
 #
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs.  It is not intended
+# to take or endorse any position on legal or territorial claims.
+#
 #country-
 #code	coordinates	TZ			comments
 AD	+4230+00131	Europe/Andorra
@@ -239,7 +247,7 @@
 ID	-0507+11924	Asia/Makassar	east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
 ID	-0232+14042	Asia/Jayapura	west New Guinea (Irian Jaya) & Malukus (Moluccas)
 IE	+5320-00615	Europe/Dublin
-IL	+3146+03514	Asia/Jerusalem
+IL	+314650+0351326	Asia/Jerusalem
 IM	+5409-00428	Europe/Isle_of_Man
 IN	+2232+08822	Asia/Kolkata
 IO	-0720+07225	Indian/Chagos
--- a/src/share/classes/java/util/HashMap.java	Tue Jul 23 08:11:32 2013 -0700
+++ b/src/share/classes/java/util/HashMap.java	Thu Jul 25 17:17:15 2013 -0700
@@ -431,7 +431,7 @@
      * others.
      */
     private V getForNullKey() {
-        if (isEmpty()) {
+        if (size == 0) {
             return null;
         }
         for (Entry<K,V> e = table[0]; e != null; e = e.next) {
@@ -459,7 +459,7 @@
      * for the key.
      */
     final Entry<K,V> getEntry(Object key) {
-        if (isEmpty()) {
+        if (size == 0) {
             return null;
         }
 
@@ -667,7 +667,7 @@
      * for this key.
      */
     final Entry<K,V> removeEntryForKey(Object key) {
-        if (isEmpty()) {
+        if (size == 0) {
             return null;
         }
         int hash = (key == null) ? 0 : hash(key);
@@ -701,7 +701,7 @@
      * for matching.
      */
     final Entry<K,V> removeMapping(Object o) {
-        if (isEmpty() || !(o instanceof Map.Entry))
+        if (size == 0 || !(o instanceof Map.Entry))
             return null;
 
         Map.Entry<K,V> entry = (Map.Entry<K,V>) o;
--- a/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java	Tue Jul 23 08:11:32 2013 -0700
+++ b/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java	Thu Jul 25 17:17:15 2013 -0700
@@ -27,6 +27,7 @@
  * @summary Basic Test for HotSpotDiagnosticMXBean.setVMOption()
  *          and getDiagnosticOptions().
  * @author  Mandy Chung
+ * @author  Jaroslav Bachorik
  *
  * @run main/othervm -XX:+PrintGCDetails SetVMOption
  */
@@ -36,7 +37,6 @@
 import com.sun.management.HotSpotDiagnosticMXBean;
 import com.sun.management.VMOption;
 import com.sun.management.VMOption.Origin;
-import sun.misc.Version;
 
 public class SetVMOption {
     private static String PRINT_GC_DETAILS = "PrintGCDetails";
@@ -47,17 +47,8 @@
     private static HotSpotDiagnosticMXBean mbean;
 
     public static void main(String[] args) throws Exception {
-        List<HotSpotDiagnosticMXBean> list =
-            ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
-
-        // The following test is transitional only and should be removed
-        // once build 52 is promoted.
-        int build = Version.jvmBuildNumber();
-        if (build > 0 && build < 52) {
-             // JVM support is integrated in build 52
-             // this test is skipped if running with VM earlier than 52
-             return;
-        }
+        mbean =
+            ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
 
         VMOption option = findPrintGCDetailsOption();
         if (!option.getValue().equalsIgnoreCase(EXPECTED_VALUE)) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/HashMap/OverrideIsEmpty.java	Thu Jul 25 17:17:15 2013 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Portions Copyright (c) 2013 IBM Corporation
+ */
+
+/**
+ * @test
+ * @bug 8019381
+ * @summary Verify that we do not get exception when we override isEmpty()
+ *          in a subclass of HashMap
+ * @author zhangshj@linux.vnet.ibm.com
+ */
+
+import java.util.HashMap;
+
+public class OverrideIsEmpty {
+    public static class NotEmptyHashMap<K,V> extends HashMap<K,V> {
+        private K alwaysExistingKey;
+        private V alwaysExistingValue;
+
+        @Override
+        public V get(Object key) {
+            if (key == alwaysExistingKey) {
+                return alwaysExistingValue;
+            }
+            return super.get(key);
+        }
+
+        @Override
+        public int size() {
+            return super.size() + 1;
+        }
+
+        @Override
+        public boolean isEmpty() {
+            return size() == 0;
+        }
+    }
+
+    public static void main(String[] args) {
+        NotEmptyHashMap<Object, Object> map = new NotEmptyHashMap<>();
+        Object key = new Object();
+        Object value = new Object();
+        map.get(key);
+        map.remove(key);
+    }
+}
+