Merge
authorlana
Wed, 17 Mar 2010 14:19:07 -0700
changeset 5134 aaee94191629
parent 5133 0a1777c5b601 (diff)
parent 5020 c94d9cc81f49 (current diff)
child 5135 99420aad4834
Merge
jdk/test/java/nio/file/WatchService/OverflowEventIsLoner.java
langtools/test/tools/javac/treepostests/TreePosTest.java
--- a/jdk/make/sun/javazic/tzdata/VERSION	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/make/sun/javazic/tzdata/VERSION	Wed Mar 17 14:19:07 2010 -0700
@@ -21,4 +21,4 @@
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
 #
-tzdata2010b
+tzdata2010e
--- a/jdk/make/sun/javazic/tzdata/asia	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/make/sun/javazic/tzdata/asia	Wed Mar 17 14:19:07 2010 -0700
@@ -247,11 +247,31 @@
 # until further notice." I take that last sentence as the
 # establishment of a rule.
 
+# From Nobutomo Nakano (2010-02-19):
+# We received a report from Bangladesh saying that the start/end of
+# Bangladesh DST is incorrect. Currently we have only the Bengali version
+# of the official mail from BTRC which describes the following:
+#
+# "From 2010 each year when local standard time is about to reach
+# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM)
+# and when local daylight time is about to October 31 at 11:59:00 PM
+# clocks are turned backward 1 hour (10:59:00 PM)."
+#
+# So, DST will start/end 1 minute earlier.
+
+# From Arthur David Olson (2010-03-03):
+# The file
+# <a href=http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf>
+# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf
+# </a>
+# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59"
+# which is consistent with the information provided by Nobutomo Nakano.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
-Rule	Dhaka	2010	only	-	Jan	1	0:00	0	-
-Rule	Dhaka	2010	max	-	Mar	31	23:00	1:00	S
-Rule	Dhaka	2010	max	-	Nov	1	0:00	0	-
+Rule	Dhaka	2009	only	-	Dec	31	23:59	0	-
+Rule	Dhaka	2010	max	-	Mar	31	22:59	1:00	S
+Rule	Dhaka	2010	max	-	Oct	31	23:59	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
--- a/jdk/make/sun/javazic/tzdata/australasia	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/make/sun/javazic/tzdata/australasia	Wed Mar 17 14:19:07 2010 -0700
@@ -289,11 +289,30 @@
 # <a href="http://www.fiji.gov.fj/publish/page_16198.shtml">
 # http://www.fiji.gov.fj/publish/page_16198.shtml
 # </a>
+
+# From Steffen Thorsen (2010-03-03):
+# The Cabinet in Fiji has decided to end DST about a month early, on
+# 2010-03-28 at 03:00.
+# The plan is to observe DST again, from 2010-10-24 to sometime in March
+# 2011 (last Sunday a good guess?).
+#
+# Official source:
+# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166">
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166
+# </a>
+#
+# A bit more background info here:
+# <a href="http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html">
+# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
+# </a>
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
-Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
+Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
+Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
+Rule	Fiji	2011	only	-	Mar	lastSun 3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -471,70 +490,30 @@
 
 # Samoa
 
-# From Alexander Krivenyshev (2008-12-06):
-# The Samoa government (Western Samoa) may implement DST on the first Sunday of 
-# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28, 
-# 2010). 
-# 
-# "Selected Committee reports to Cabinet on Daylight Saving Time",
-# Government of Samoa:
-# <a href="http://www.govt.ws/pr_article.cfm?pr_id=560">
-# http://www.govt.ws/pr_article.cfm?pr_id=560
-# </a>
-# or
-# <a href="http://www.worldtimezone.com/dst_news/dst_news_samoa01.html">
-# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
-# </a>
-
-# From Steffen Thorsen (2009-08-27):
-# Samoa's parliament passed the Daylight Saving Bill 2009, and will start 
-# daylight saving time on the first Sunday of October 2009 and end on the 
-# last Sunday of March 2010. We hope that the full text will be published 
-# soon, but we believe that the bill is only valid for 2009-2010. Samoa's 
-# Daylight Saving Act 2009 will be enforced as soon as the Head of State 
-# executes a proclamation publicizing this Act.
+# From Steffen Thorsen (2009-10-16):
+# We have been in contact with the government of Samoa again, and received
+# the following info:
 #
-# Some background information here, which will be updated once we have 
-# more details:
+# "Cabinet has now approved Daylight Saving to be effected next year
+# commencing from the last Sunday of September 2010 and conclude first
+# Sunday of April 2011."
+#
+# Background info:
 # <a href="http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html">
 # http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
 # </a>
-
-# From Alexander Krivenyshev (2009-10-03):
-# First, my deepest condolences to people of Samoa islands and all families and
-# loved ones around the world who lost their lives in the earthquake and tsunami.
 #
-# Considering the recent devastation on Samoa by earthquake and tsunami and that
-# many government offices/ ministers are closed- not sure if "Daylight Saving
-# Bill 2009" will be implemented in next few days- on October 4, 2009.
-#
-# Here is reply from Consulate-General of Samoa in New Zealand
-# ---------------------------
-# Consul General
-# consulgeneral@samoaconsulate.org.nz
-#
-# Talofa Alexander,
-#
-# Thank you for your sympathy for our country but at this time we have not
-# been informed about the Daylight Savings Time Change.  Most Ministries in
-# Apia are closed or relocating due to weather concerns.
-#
-# When we do find out if they are still proceeding with the time change we
-# will advise you soonest.
-#
-# Kind Regards,
-# Lana
-# for: Consul General
-
-# From Steffen Thorsen (2009-10-05):
-# We have called a hotel in Samoa and asked about local time there - they 
-# are still on standard time.
+# Samoa's Daylight Saving Time Act 2009 is available here, but does not
+# contain any dates:
+# <a href="http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf">
+# http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
+# </a>
 
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
-			-11:00	-	WST	2009 Oct 4
-			-11:00	1:00	WSDT	2010 Mar 28
+			-11:00	-	WST	2010 Oct 24
+			-11:00	1:00	WSDT	2011 Apr 3
 			-11:00	-	WST
 
 # Solomon Is
--- a/jdk/make/sun/javazic/tzdata/southamerica	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/make/sun/javazic/tzdata/southamerica	Wed Mar 17 14:19:07 2010 -0700
@@ -1143,6 +1143,18 @@
 # http://www.shoa.cl/noticias/2008/04hora/hora.htm
 # </a>.
 
+# From Angel Chiang (2010-03-04):
+# Subject: DST in Chile exceptionally extended to 3 April due to earthquake
+# <a href="http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098">
+# http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098
+# </a>
+# (in Spanish, last paragraph).
+#
+# This is breaking news. There should be more information available later.
+
+# From Arthur Daivd Olson (2010-03-06):
+# Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1177,7 +1189,9 @@
 # N.B.: the end of March 29 in Chile is March 30 in Universal time,
 # which is used below in specifying the transition.
 Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
-Rule	Chile	2009	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2010	only	-	Apr	 4	3:00u	0	-
+Rule	Chile	2011	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1386,8 +1400,24 @@
 # Decree 1,867 (2004-03-05)
 # From Carlos Raul Perasso via Jesper Norgaard Welen (2006-10-13)
 # <http://www.presidencia.gov.py/decretos/D1867.pdf>
-Rule	Para	2004	max	-	Oct	Sun>=15	0:00	1:00	S
-Rule	Para	2005	max	-	Mar	Sun>=8	0:00	0	-
+Rule	Para	2004	2009	-	Oct	Sun>=15	0:00	1:00	S
+Rule	Para	2005	2009	-	Mar	Sun>=8	0:00	0	-
+# From Carlos Raul Perasso (2010-02-18):
+# By decree number 3958 issued yesterday (
+# <a href="http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf">
+# http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf
+# </a>
+# )
+# Paraguay changes its DST schedule, postponing the March rule to April and
+# modifying the October date. The decree reads:
+# ...
+# Art. 1. It is hereby established that from the second Sunday of the month of
+# April of this year (2010), the official time is to be set back 60 minutes,
+# and that on the first Sunday of the month of October, it is to be set
+# forward 60 minutes, in all the territory of the Paraguayan Republic.
+# ...
+Rule	Para	2010	max	-	Oct	Sun>=1	0:00	1:00	S
+Rule	Para	2010	max	-	Apr	Sun>=8	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Asuncion	-3:50:40 -	LMT	1890
--- a/jdk/make/tools/src/build/tools/javazic/RuleDay.java	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/make/tools/src/build/tools/javazic/RuleDay.java	Wed Mar 17 14:19:07 2010 -0700
@@ -139,7 +139,7 @@
         if (isLast()) {
             return -1;
         }
-        return getDay();
+        return isEarlier() ? -getDay() : getDay();
     }
 
     /**
@@ -147,13 +147,10 @@
      * @return the SimpleTimeZone day-of-week rule value
      */
     int getDayOfWeekForSimpleTimeZoneInt() {
-        if (!isLater() && !isEarlier() && !isLast()) {
-            return 0;
-        }
-        if (isLater()) {
+        if (isEarlier() || isLater()) {
             return -getDayOfWeekNum();
         }
-        return getDayOfWeekNum();
+        return isLast() ? getDayOfWeekNum() : 0;
     }
 
     /**
--- a/jdk/src/share/classes/java/beans/Expression.java	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/src/share/classes/java/beans/Expression.java	Wed Mar 17 14:19:07 2010 -0700
@@ -99,6 +99,29 @@
     }
 
     /**
+     * {@inheritDoc}
+     * <p>
+     * If the invoked method completes normally,
+     * the value it returns is copied in the {@code value} property.
+     * Note that the {@code value} property is set to {@code null},
+     * if the return type of the underlying method is {@code void}.
+     *
+     * @throws NullPointerException if the value of the {@code target} or
+     *                              {@code methodName} property is {@code null}
+     * @throws NoSuchMethodException if a matching method is not found
+     * @throws SecurityException if a security manager exists and
+     *                           it denies the method invocation
+     * @throws Exception that is thrown by the invoked method
+     *
+     * @see java.lang.reflect.Method
+     * @since 1.7
+     */
+    @Override
+    public void execute() throws Exception {
+        setValue(invoke());
+    }
+
+    /**
      * If the value property of this instance is not already set,
      * this method dynamically finds the method with the specified
      * methodName on this target with these arguments and calls it.
--- a/jdk/src/share/classes/java/beans/Statement.java	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/src/share/classes/java/beans/Statement.java	Wed Mar 17 14:19:07 2010 -0700
@@ -127,8 +127,8 @@
     }
 
     /**
-     * The execute method finds a method whose name is the same
-     * as the methodName property, and invokes the method on
+     * The {@code execute} method finds a method whose name is the same
+     * as the {@code methodName} property, and invokes the method on
      * the target.
      *
      * When the target's class defines many methods with the given name
@@ -136,7 +136,7 @@
      * the algorithm specified in the Java Language Specification
      * (15.11). The dynamic class of the target and arguments are used
      * in place of the compile-time type information and, like the
-     * <code>java.lang.reflect.Method</code> class itself, conversion between
+     * {@link java.lang.reflect.Method} class itself, conversion between
      * primitive values and their associated wrapper classes is handled
      * internally.
      * <p>
@@ -147,13 +147,22 @@
      * <li>
      * The reserved method name "new" may be used to call a class's constructor
      * as if all classes defined static "new" methods. Constructor invocations
-     * are typically considered <code>Expression</code>s rather than <code>Statement</code>s
+     * are typically considered {@code Expression}s rather than {@code Statement}s
      * as they return a value.
      * <li>
-     * The method names "get" and "set" defined in the <code>java.util.List</code>
+     * The method names "get" and "set" defined in the {@link java.util.List}
      * interface may also be applied to array instances, mapping to
-     * the static methods of the same name in the <code>Array</code> class.
+     * the static methods of the same name in the {@code Array} class.
      * </ul>
+     *
+     * @throws NullPointerException if the value of the {@code target} or
+     *                              {@code methodName} property is {@code null}
+     * @throws NoSuchMethodException if a matching method is not found
+     * @throws SecurityException if a security manager exists and
+     *                           it denies the method invocation
+     * @throws Exception that is thrown by the invoked method
+     *
+     * @see java.lang.reflect.Method
      */
     public void execute() throws Exception {
         invoke();
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Wed Mar 17 14:19:07 2010 -0700
@@ -648,6 +648,14 @@
         table.put("ColorChooser.swatchesDefaultRecentColor", Color.RED);
         table.put("ColorChooser.swatchesSwatchSize", new Dimension(10, 10));
 
+        // These need to be defined for ImageView.
+        table.put("html.pendingImage", SwingUtilities2.makeIcon(getClass(),
+                                BasicLookAndFeel.class,
+                                "icons/image-delayed.png"));
+        table.put("html.missingImage", SwingUtilities2.makeIcon(getClass(),
+                                BasicLookAndFeel.class,
+                                "icons/image-failed.png"));
+
         // These are needed for PopupMenu.
         table.put("PopupMenu.selectedWindowInputMapBindings", new Object[] {
                   "ESCAPE", "cancel",
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Wed Jul 05 17:08:23 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Wed Mar 17 14:19:07 2010 -0700
@@ -489,23 +489,6 @@
     }
 
 
-    /**
-     * @inheritDoc
-     */
-    @Override
-    protected void paintTabArea(Graphics g, int tabPlacement,
-                                int selectedIndex) {
-        // This can be invoked from ScrollabeTabPanel
-        Insets insets = tabPane.getInsets();
-        int x = insets.left;
-        int y = insets.top;
-        int width = tabPane.getWidth() - insets.left - insets.right;
-        int height = tabPane.getHeight() - insets.top - insets.bottom;
-
-        paintTabArea(tabAreaContext, g, tabPlacement, selectedIndex,
-                     new Rectangle(x, y, width, height));
-    }
-
     private void paintTabArea(SynthContext ss, Graphics g,
                                 int tabPlacement, int selectedIndex,
                                 Rectangle tabAreaBounds) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Statement/Test6707226.java	Wed Mar 17 14:19:07 2010 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6707226
+ * @summary Tests the value updating in Expression
+ * @author Sergey Malenkov
+ */
+
+import java.beans.Expression;
+
+public class Test6707226 {
+    public static void main(String[] args) throws Exception {
+        Object value = new Object();
+
+        Expression expression = new Expression(value, Object.class, "new", null);
+        if (!value.equals(expression.getValue()))
+            throw new Error("the value is updated unexpectedly");
+
+        expression.execute();
+        if (value.equals(expression.getValue()))
+            throw new Error("the value is not updated as expected");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/Test6933784.java	Wed Mar 17 14:19:07 2010 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 6933784
+   @summary NIMBUS: ImageView getNoImageIcon and getLoadingImageIcon returns nulls instead of an icon
+   @author Pavel Porvatov
+   @run main Test6933784
+*/
+
+import javax.swing.*;
+import javax.swing.plaf.nimbus.NimbusLookAndFeel;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import javax.swing.text.Element;
+import javax.swing.text.html.HTMLDocument;
+import javax.swing.text.html.HTMLEditorKit;
+import javax.swing.text.html.ImageView;
+import java.io.StringReader;
+
+public class Test6933784 {
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(new SynthLookAndFeel());
+
+        checkImages();
+
+        UIManager.setLookAndFeel(new NimbusLookAndFeel());
+
+        checkImages();
+    }
+
+    private static void checkImages() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                HTMLEditorKit c = new HTMLEditorKit();
+                HTMLDocument doc = new HTMLDocument();
+
+                try {
+                    c.read(new StringReader("<HTML><TITLE>Test</TITLE><BODY><IMG id=test></BODY></HTML>"), doc, 0);
+                } catch (Exception e) {
+                    throw new RuntimeException("The test failed", e);
+                }
+
+                Element elem = doc.getElement("test");
+                ImageView iv = new ImageView(elem);
+
+                if (iv.getLoadingImageIcon() == null) {
+                    throw new RuntimeException("getLoadingImageIcon returns null");
+                }
+
+                if (iv.getNoImageIcon() == null) {
+                    throw new RuntimeException("getNoImageIcon returns null");
+                }
+            }
+        });
+    }
+}