diff --git a/make/data/tzdata/VERSION b/make/data/tzdata/VERSION
index 034114ae6ca872d6913821623b9fbdcd5bc48dac..ebd4db73b0e718a1eba65f5ff9079b6fa7adf61b 100644
--- a/make/data/tzdata/VERSION
+++ b/make/data/tzdata/VERSION
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2015a
+tzdata2015b
diff --git a/make/data/tzdata/asia b/make/data/tzdata/asia
index bff837c48d8ffcb4e0ab94097655d2e6736df9cc..fa4f2461cbbd75cee813c5c2f99f90be02f9a81f 100644
--- a/make/data/tzdata/asia
+++ b/make/data/tzdata/asia
@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# was at the start of 2008-03-31 (the day of Steffen Thorsen's report);
# this is almost surely wrong.
+# From Ganbold Tsagaankhuu (2015-03-10):
+# It seems like yesterday Mongolian Government meeting has concluded to use
+# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of
+# March 2015, daylight saving time starts. And 00:00AM of last Saturday of
+# September daylight saving time ends. Source:
+# http://zasag.mn/news/view/8969
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 -
@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 -
Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S
Rule Mongol 2001 2006 - Sep lastSat 2:00 0 -
Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S
+Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S
+Rule Mongol 2015 max - Sep lastSat 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# official source...:
# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
-# From Paul Eggert (2013-09-24):
-# For future dates, guess the last Thursday in March at 24:00 through
-# the first Friday on or after September 21 at 00:00. This is consistent with
-# the predictions in today's editions of the following URLs,
-# which are for Gaza and Hebron respectively:
-# http://www.timeanddate.com/worldclock/timezone.html?n=702
-# http://www.timeanddate.com/worldclock/timezone.html?n=2364
+# From Steffen Thorsen (2015-03-03):
+# Sources such as http://www.alquds.com/news/article/view/id/548257
+# and http://www.raya.ps/ar/news/890705.html say Palestine areas will
+# start DST on 2015-03-28 00:00 which is one day later than expected.
+#
+# From Paul Eggert (2015-03-03):
+# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
+# says that the fall 2014 transition was Oct 23 at 24:00.
+# For future dates, guess the last Friday in March at 24:00 through
+# the first Friday on or after October 21 at 00:00. This is consistent with
+# the predictions in today's editions of the following URLs:
+# http://www.timeanddate.com/time/change/gaza-strip/gaza
+# http://www.timeanddate.com/time/change/west-bank/hebron
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S
Rule Palestine 2011 only - Aug 1 0:00 0 -
Rule Palestine 2011 only - Aug 30 0:00 1:00 S
Rule Palestine 2011 only - Sep 30 0:00 0 -
-Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S
+Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S
Rule Palestine 2012 only - Sep 21 1:00 0 -
-Rule Palestine 2013 max - Sep Fri>=21 0:00 0 -
+Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
+Rule Palestine 2014 max - Oct Fri>=21 0:00 0 -
+Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
diff --git a/make/data/tzdata/australasia b/make/data/tzdata/australasia
index f2a89e8ee37f222eb534816231afef3e0c498953..ec9f392f88f5fcd4eec08144bf0743e634828a1e 100644
--- a/make/data/tzdata/australasia
+++ b/make/data/tzdata/australasia
@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
9:39:00 - LMT 1901 # Agana
10:00 - GST 2000 Dec 23 # Guam
10:00 - ChST # Chamorro Standard Time
+Link Pacific/Guam Pacific/Saipan # N Mariana Is
# Kiribati
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901
14:00 - LINT
# N Mariana Is
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31
- 9:43:00 - LMT 1901
- 9:00 - MPT 1969 Oct # N Mariana Is Time
- 10:00 - MPT 2000 Dec 23
- 10:00 - ChST # Chamorro Standard Time
+# See Pacific/Guam.
# Marshall Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
+Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Samoa (formerly and also known as Western Samoa)
@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# uninhabited
# Midway
-#
-# From Mark Brader (2005-01-23):
-# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
-# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
-# reproduced a Pan American Airways timetable from 1936, for their weekly
-# "Orient Express" flights between San Francisco and Manila, and connecting
-# flights to Chicago and the US East Coast. As it uses some time zone
-# designations that I've never seen before:....
-# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
-# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
-#
-Zone Pacific/Midway -11:49:28 - LMT 1901
- -11:00 - NST 1956 Jun 3
- -11:00 1:00 NDT 1956 Sep 2
- -11:00 - NST 1967 Apr # N=Nome
- -11:00 - BST 1983 Nov 30 # B=Bering
- -11:00 - SST # S=Samoa
+# See Pacific/Pago_Pago.
# Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritimati
diff --git a/make/data/tzdata/europe b/make/data/tzdata/europe
index 89790f06c1766c788f8b6ca4ac8b4c2b4fc8622f..008268ac7633d32d781b84690e00682c2c36ac7b 100644
--- a/make/data/tzdata/europe
+++ b/make/data/tzdata/europe
@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T
3:00 Russia VOL%sT 1991 Mar 31 2:00s
4:00 - VOLT 1992 Mar 29 2:00s
- 3:00 Russia MSK 2011 Mar 27 2:00s
+ 3:00 Russia MSK/MSD 2011 Mar 27 2:00s
4:00 - MSK 2014 Oct 26 2:00s
3:00 - MSK
diff --git a/make/data/tzdata/northamerica b/make/data/tzdata/northamerica
index 5943cfeec4b55f9797135aab235a65793b165787..442a50eef0f5eeba936666af4862cef0a47f073e 100644
--- a/make/data/tzdata/northamerica
+++ b/make/data/tzdata/northamerica
@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# "...the new time zone will come into effect at two o'clock on the first Sunday
# of February, when we will have to advance the clock one hour from its current
# time..."
-#
# Also, the new zone will not use DST.
+#
+# From Carlos Raúl Perasso (2015-02-02):
+# The decree that modifies the Mexican Hour System Law has finally
+# been published at the Diario Oficial de la Federación
+# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015
+# It establishes 5 zones for Mexico:
+# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W,
+# includes most of Mexico, excluding what's mentioned below.
+# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the
+# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía
+# de Banderas which lies in Central Zone); Sinaloa and Sonora.
+# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the
+# state of Baja California.
+# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state
+# of Quintana Roo.
+# 5- The islands, reefs and keys shall take their timezone from the
+# longitude they are located at.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
###############################################################################
# Anguilla
-# See America/Port_of_Spain.
-
# Antigua and Barbuda
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
- -5:00 - EST 1951
- -4:00 - AST
+# See America/Port_of_Spain.
# Bahamas
#
@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
-4:00 US A%sT
# Cayman Is
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
- -5:07:11 - KMT 1912 Feb # Kingston Mean Time
- -5:00 - EST
+# See America/Panama.
# Costa Rica
@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890
Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST
+Link America/Panama America/Cayman
# Puerto Rico
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
diff --git a/make/data/tzdata/southamerica b/make/data/tzdata/southamerica
index 02cf12113a00d347dcbe40199171f132e7b9883a..238ae3dc5692b2fbd0bfb2be205b0ead2bff20ad 100644
--- a/make/data/tzdata/southamerica
+++ b/make/data/tzdata/southamerica
@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
-# From Juan Correa (2015-01-28):
-# ... today the Ministry of Energy announced that Chile will drop DST, will keep
-# "summer time" (UTC -3 / UTC -5) all year round....
-# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html
+# From Eduardo Romero Urra (2015-03-03):
+# Today has been published officially that Chile will use the DST time
+# permanently until March 25 of 2017
+# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg
+#
+# From Paul Eggert (2015-03-03):
+# For now, assume that the extension will persist indefinitely.
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file.
@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890
-3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time
- -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time
+ -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time
-6:00 Chile EAS%sT 2015 Apr 26 3:00u
-5:00 - EAST
#
@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
# These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla
+Link America/Port_of_Spain America/Antigua
Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe
diff --git a/src/macosx/classes/apple/security/KeychainStore.java b/src/macosx/classes/apple/security/KeychainStore.java
index 2016c4811ab6caf97b0e39bded799ffb1e655894..c6c771a244c690d6701a174628562190929b616b 100644
--- a/src/macosx/classes/apple/security/KeychainStore.java
+++ b/src/macosx/classes/apple/security/KeychainStore.java
@@ -140,7 +140,8 @@ public final class KeychainStore extends KeyStoreSpi {
* password to recover it.
*
* @param alias the alias name
- * @param password the password for recovering the key
+ * @param password the password for recovering the key. This password is
+ * used internally as the key is exported in a PKCS12 format.
*
* @return the requested key, or null if the given alias does not exist
* or does not identify a key entry.
@@ -155,6 +156,20 @@ public final class KeychainStore extends KeyStoreSpi {
{
permissionCheck();
+ // An empty password is rejected by MacOS API, no private key data
+ // is exported. If no password is passed (as is the case when
+ // this implementation is used as browser keystore in various
+ // deployment scenarios like Webstart, JFX and applets), create
+ // a dummy password so MacOS API is happy.
+ if (password == null || password.length == 0) {
+ // Must not be a char array with only a 0, as this is an empty
+ // string.
+ if (random == null) {
+ random = new SecureRandom();
+ }
+ password = Long.toString(random.nextLong()).toCharArray();
+ }
+
Object entry = entries.get(alias.toLowerCase());
if (entry == null || !(entry instanceof KeyEntry)) {
diff --git a/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java b/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
index a450fec266e3ffa395fc772f46d77a7aba5b8468..5d7cb083bc5068a97b27c712872751b204d7b2c9 100644
--- a/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
+++ b/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
@@ -504,7 +504,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} else if (comp instanceof Container && comp != aContainer) {
Container cont = (Container)comp;
if (cont.isFocusTraversalPolicyProvider()) {
- return cont.getFocusTraversalPolicy().getLastComponent(cont);
+ Component retComp = cont.getFocusTraversalPolicy().getLastComponent(cont);
+ if (retComp != null) {
+ return retComp;
+ }
}
}
}
diff --git a/src/share/classes/java/util/zip/ZipEntry.java b/src/share/classes/java/util/zip/ZipEntry.java
index b61e334c131dfd195eb35a5009ed5020f3cd688e..aa93bcb368da378fe72bee89190bb76c319de4f0 100644
--- a/src/share/classes/java/util/zip/ZipEntry.java
+++ b/src/share/classes/java/util/zip/ZipEntry.java
@@ -481,6 +481,8 @@ class ZipEntry implements ZipConstants, Cloneable {
}
break;
case EXTID_NTFS:
+ if (sz < 32) // reserved 4 bytes + tag 2 bytes + size 2 bytes
+ break; // m[a|c]time 24 bytes
int pos = off + 4; // reserved 4 bytes
if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24)
break;
diff --git a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
index c1383f64863cdb22a54b890386d1b8bf80b9ed9a..d1de4169f7f807c010df1e5dd317ea71fef2cc59 100644
--- a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
+++ b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
@@ -566,7 +566,10 @@ public class SortingFocusTraversalPolicy
} else if (comp instanceof Container && comp != aContainer) {
Container cont = (Container)comp;
if (cont.isFocusTraversalPolicyProvider()) {
- return cont.getFocusTraversalPolicy().getLastComponent(cont);
+ Component retComp = cont.getFocusTraversalPolicy().getLastComponent(cont);
+ if (retComp != null) {
+ return retComp;
+ }
}
}
}
diff --git a/src/share/classes/sun/security/pkcs11/SessionManager.java b/src/share/classes/sun/security/pkcs11/SessionManager.java
index 798624c369d2d8dfe21a0cad0c0253354c1d9d5d..571f001cfacd011ff8ea610ad01f048ce14e0911 100644
--- a/src/share/classes/sun/security/pkcs11/SessionManager.java
+++ b/src/share/classes/sun/security/pkcs11/SessionManager.java
@@ -90,6 +90,7 @@ final class SessionManager {
// maximum number of active sessions during this invocation, for debugging
private int maxActiveSessions;
+ private Object maxActiveSessionsLock;
// flags to use in the C_OpenSession() call
private final long openSessionFlags;
@@ -113,6 +114,9 @@ final class SessionManager {
this.token = token;
this.objSessions = new Pool(this);
this.opSessions = new Pool(this);
+ if (debug != null) {
+ maxActiveSessionsLock = new Object();
+ }
}
// returns whether only a fairly low number of sessions are
@@ -212,7 +216,7 @@ final class SessionManager {
Session session = new Session(token, id);
activeSessions.incrementAndGet();
if (debug != null) {
- synchronized(this) {
+ synchronized(maxActiveSessionsLock) {
if (activeSessions.get() > maxActiveSessions) {
maxActiveSessions = activeSessions.get();
if (maxActiveSessions % 10 == 0) {
diff --git a/src/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/share/classes/sun/util/calendar/ZoneInfoFile.java
index 78d9f3ed6cba96f729a95278d34d24558e7bf435..61efb543d51d9b81905110a5d9a20771489757ed 100644
--- a/src/share/classes/sun/util/calendar/ZoneInfoFile.java
+++ b/src/share/classes/sun/util/calendar/ZoneInfoFile.java
@@ -625,6 +625,15 @@ public final class ZoneInfoFile {
params[2] = 5;
params[3] = 86400000;
}
+ // Additional check for startDayOfWeek=6 and starTime=86400000
+ // is needed for Asia/Amman; Asia/Gasa and Asia/Hebron
+ if (params[2] == 7 && params[3] == 0 &&
+ (zoneId.equals("Asia/Amman") ||
+ zoneId.equals("Asia/Gaza") ||
+ zoneId.equals("Asia/Hebron"))) {
+ params[2] = 6; // Friday
+ params[3] = 86400000; // 24h
+ }
//endDayOfWeek and endTime workaround
if (params[7] == 6 && params[8] == 0 &&
(zoneId.equals("Africa/Cairo"))) {
diff --git a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
index 9101f56532e40bc33e4f3737b70b05e1569f5475..929361c1de9536ef85dee94615eca7c479185af7 100644
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
@@ -2252,6 +2252,8 @@ public class ZipFileSystem extends FileSystem {
}
break;
case EXTID_NTFS:
+ if (sz < 32)
+ break;
pos += 4; // reserved 4 bytes
if (SH(extra, pos) != 0x0001)
break;
diff --git a/src/share/lib/security/java.security-aix b/src/share/lib/security/java.security-aix
index 81ce1d72f87519e5a63e89f56a4ff9bb34b50004..f0d295ce79332b67d17d8d759e7b22c46a33130b 100644
--- a/src/share/lib/security/java.security-aix
+++ b/src/share/lib/security/java.security-aix
@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3
+jdk.tls.disabledAlgorithms=SSLv3, RC4
diff --git a/src/share/lib/security/java.security-linux b/src/share/lib/security/java.security-linux
index 81ce1d72f87519e5a63e89f56a4ff9bb34b50004..f0d295ce79332b67d17d8d759e7b22c46a33130b 100644
--- a/src/share/lib/security/java.security-linux
+++ b/src/share/lib/security/java.security-linux
@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3
+jdk.tls.disabledAlgorithms=SSLv3, RC4
diff --git a/src/share/lib/security/java.security-macosx b/src/share/lib/security/java.security-macosx
index d72511b81e40dd7515bf44eee5d7b9d83d06be71..d07ad76bf3138f8a2357f0d9d4358181ae28d153 100644
--- a/src/share/lib/security/java.security-macosx
+++ b/src/share/lib/security/java.security-macosx
@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3
+jdk.tls.disabledAlgorithms=SSLv3, RC4
diff --git a/src/share/lib/security/java.security-solaris b/src/share/lib/security/java.security-solaris
index 92d0358bfd51c0384d3823ee02f6ec2d51aff385..ae866ff80cfb63fc1a382dfdff98987ed60a8114 100644
--- a/src/share/lib/security/java.security-solaris
+++ b/src/share/lib/security/java.security-solaris
@@ -502,4 +502,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3
+jdk.tls.disabledAlgorithms=SSLv3, RC4
diff --git a/src/share/lib/security/java.security-windows b/src/share/lib/security/java.security-windows
index 41907ee673bfed97b5bae70f35be6a999d3a5599..fc61a5e806b6bfd1b9fb03c75afe9ad55a7b60a3 100644
--- a/src/share/lib/security/java.security-windows
+++ b/src/share/lib/security/java.security-windows
@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3
+jdk.tls.disabledAlgorithms=SSLv3, RC4
diff --git a/src/solaris/classes/sun/awt/X11/XToolkit.java b/src/solaris/classes/sun/awt/X11/XToolkit.java
index 8a264d20052accd514e22549ab7bc426da055d3b..f8673f81c6e32336df61c9e8d9267bb752d0abcf 100644
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java
@@ -814,10 +814,32 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
// managers don't set this hint correctly, so we just get intersection with windowBounds
if (windowBounds != null && windowBounds.intersects(screenBounds))
{
- insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left);
- insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
- insets.top = Math.max((int)Native.getLong(native_ptr, 2), insets.top);
- insets.bottom = Math.max((int)Native.getLong(native_ptr, 3), insets.bottom);
+ int left = (int)Native.getLong(native_ptr, 0);
+ int right = (int)Native.getLong(native_ptr, 1);
+ int top = (int)Native.getLong(native_ptr, 2);
+ int bottom = (int)Native.getLong(native_ptr, 3);
+
+ /*
+ * struts could be relative to root window bounds, so
+ * make them relative to the screen bounds in this case
+ */
+ left = rootBounds.x + left > screenBounds.x ?
+ rootBounds.x + left - screenBounds.x : 0;
+ right = rootBounds.x + rootBounds.width - right <
+ screenBounds.x + screenBounds.width ?
+ screenBounds.x + screenBounds.width -
+ (rootBounds.x + rootBounds.width - right) : 0;
+ top = rootBounds.y + top > screenBounds.y ?
+ rootBounds.y + top - screenBounds.y : 0;
+ bottom = rootBounds.y + rootBounds.height - bottom <
+ screenBounds.y + screenBounds.height ?
+ screenBounds.y + screenBounds.height -
+ (rootBounds.y + rootBounds.height - bottom) : 0;
+
+ insets.left = Math.max(left, insets.left);
+ insets.right = Math.max(right, insets.right);
+ insets.top = Math.max(top, insets.top);
+ insets.bottom = Math.max(bottom, insets.bottom);
}
}
}
diff --git a/test/com/sun/management/OperatingSystemMXBean/GetTotalSwapSpaceSize.java b/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java
similarity index 52%
rename from test/com/sun/management/OperatingSystemMXBean/GetTotalSwapSpaceSize.java
rename to test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java
index 26d49cc67ee1eebdbf18dcf3525fe678240f2f9d..b21eb29b804c3367cb03628a46373a1b10b79be5 100644
--- a/test/com/sun/management/OperatingSystemMXBean/GetTotalSwapSpaceSize.java
+++ b/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -22,11 +22,16 @@
*/
/*
- *
- *
+ * @test
* @bug 4858522
* @summary Basic unit test of OperatingSystemMXBean.getTotalSwapSpaceSize()
+ *
+ * @library /lib/testlibrary
+ * @build TestTotalSwap jdk.testlibrary.*
+ * @run main TestTotalSwap
+ *
* @author Steve Bohne
+ * @author Jaroslav Bachorik
*/
/*
@@ -50,9 +55,13 @@
import com.sun.management.OperatingSystemMXBean;
import java.lang.management.*;
-public class GetTotalSwapSpaceSize {
+import jdk.testlibrary.OSInfo;
+import jdk.testlibrary.ProcessTools;
+import jdk.testlibrary.OutputAnalyzer;
+
+public class TestTotalSwap {
- private static OperatingSystemMXBean mbean =
+ private static final OperatingSystemMXBean mbean =
(com.sun.management.OperatingSystemMXBean)
ManagementFactory.getOperatingSystemMXBean();
@@ -62,19 +71,9 @@ public class GetTotalSwapSpaceSize {
private static long min_size_for_pass = 0;
private static final long MAX_SIZE_FOR_PASS = Long.MAX_VALUE;
- private static boolean trace = false;
-
- public static void main(String args[]) throws Exception {
- if (args.length > 1 && args[1].equals("trace")) {
- trace = true;
- }
-
- long expected_swap_size = 0;
-
- if (args.length < 1 || args.length > 2) {
- throw new IllegalArgumentException("Unexpected number of args " + args.length);
- }
+ public static void main(String args[]) throws Throwable {
+ long expected_swap_size = getSwapSizeFromOs();
long min_size = mbean.getFreeSwapSpaceSize();
if (min_size > 0) {
@@ -83,12 +82,9 @@ public class GetTotalSwapSpaceSize {
long size = mbean.getTotalSwapSpaceSize();
- if (trace) {
- System.out.println("Total swap space size in bytes: " + size);
- }
+ System.out.println("Total swap space size in bytes: " + size);
- if (!args[0].matches("sanity-only")) {
- expected_swap_size = Long.parseLong(args[0]);
+ if (expected_swap_size > -1) {
if (size != expected_swap_size) {
throw new RuntimeException("Expected total swap size : " +
expected_swap_size +
@@ -97,6 +93,7 @@ public class GetTotalSwapSpaceSize {
}
}
+ // sanity check
if (size < min_size_for_pass || size > MAX_SIZE_FOR_PASS) {
throw new RuntimeException("Total swap space size " +
"illegal value: " + size + " bytes " +
@@ -106,4 +103,60 @@ public class GetTotalSwapSpaceSize {
System.out.println("Test passed.");
}
+
+ private static long getSwapSizeFromOs() throws Throwable {
+ OSInfo.OSType os = OSInfo.getOSType();
+
+ switch (os) {
+ // total used free shared buffers cached
+ // Mem: 16533540864 13638467584 2895073280 534040576 1630248960 6236909568
+ // -/+ buffers/cache: 5771309056 10762231808
+ // Swap: 15999168512 0 15999168512
+
+ case LINUX: {
+ String swapSizeStr = ProcessTools.executeCommand("free", "-b")
+ .firstMatch("Swap:\\s+([0-9]+)\\s+.*", 1);
+ return Long.parseLong(swapSizeStr);
+ }
+ case SOLARIS: {
+ // swapfile dev swaplo blocks free
+ // /dev/dsk/c0t0d0s1 136,1 16 1638608 1600528
+ OutputAnalyzer out= ProcessTools.executeCommand(
+ "/usr/sbin/swap",
+ "-l"
+ );
+
+ long swapSize = 0;
+
+ for (String line : out.asLines()) {
+ if (line.contains("swapfile")) continue;
+
+ String[] vals = line.split("\\s+");
+ if (vals.length == 5) {
+ swapSize += Long.parseLong(vals[3]) * 512; // size is reported in 512b blocks
+ }
+ }
+
+ return swapSize;
+ }
+ case MACOSX: {
+ // total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
+ String swapSizeStr = ProcessTools.executeCommand(
+ "/usr/sbin/sysctl",
+ "-n",
+ "vm.swapusage"
+ ).firstMatch("total\\s+=\\s+([0-9]+(\\.[0-9]+)?[Mm]?).*", 1);
+ if (swapSizeStr.toLowerCase().endsWith("m")) {
+ swapSizeStr = swapSizeStr.substring(0, swapSizeStr.length() - 1);
+ return (long)(Double.parseDouble(swapSizeStr) * 1024 * 1024); // size in MB
+ }
+ return (long)(Double.parseDouble(swapSizeStr) * 1024 * 1024);
+ }
+ default: {
+ System.err.println("Unsupported operating system: " + os);
+ }
+ }
+
+ return -1;
+ }
}
diff --git a/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh b/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh
deleted file mode 100644
index a4f3726a643220cf199d6dd0b5525220bd98ad1a..0000000000000000000000000000000000000000
--- a/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# Copyright (c) 2005, 2012, 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.
-#
-
-#
-# @test
-# @summary Tests MM getTotalSwapSpaceSize() api.
-# @author Swamy V
-# @bug 6252770
-#
-# @run build GetTotalSwapSpaceSize
-# @run shell TestTotalSwap.sh
-#
-
-#
-# This test tests the actual swap size on linux and solaris.
-# On windows this is just a sanity check and correct size should
-# be checked manually:
-#
-# Windows NT/XP/2000:
-# 1. Run Start->Accessories->System Tools->System Information.
-# 2. The value (reported in Kbytes) is in the "Page File Space" entry
-# Windows 98/ME:
-# Unknown.
-#
-
-
-#set -x
-
-#Set appropriate jdk
-#
-
-if [ ! -z "${TESTJAVA}" ] ; then
- jdk="$TESTJAVA"
-else
- echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
- exit 1
-fi
-
-runOne()
-{
- echo "runOne $@"
- $TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES $@ || exit 3
-}
-
-solaris_swap_size()
-{
- total_swap=0
- for i in `/usr/sbin/swap -l | awk '{print $4}' | grep -v blocks`
- do
- # swap -l returns size in blocks of 512 bytes.
- total_swap=`expr $i \* 512 + $total_swap`
- done
-}
-
-# Test GetTotalSwapSpaceSize if we are running on Unix
-total_swap=0
-case `uname -s` in
- SunOS )
- solaris_swap_size
- runOne GetTotalSwapSpaceSize $total_swap
- ;;
- Linux )
- total_swap=`free -b | grep -i swap | awk '{print $2}'`
- runOne GetTotalSwapSpaceSize $total_swap
- ;;
- Darwin )
- # $ sysctl -n vm.swapusage
- # total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
- swap=`/usr/sbin/sysctl -n vm.swapusage | awk '{ print $3 }' | awk -F . '{ print $1 }'` || exit 2
- total_swap=`expr $swap \* 1024 \* 1024` || exit 2
- runOne GetTotalSwapSpaceSize $total_swap
- ;;
- * )
- runOne GetTotalSwapSpaceSize "sanity-only"
- ;;
-esac
-
-exit 0
-
diff --git a/test/java/awt/Focus/8073453/AWTFocusTransitionTest.java b/test/java/awt/Focus/8073453/AWTFocusTransitionTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..e4230b1fd26918a9254729eba7e850b63689f896
--- /dev/null
+++ b/test/java/awt/Focus/8073453/AWTFocusTransitionTest.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+/* @test
+ * @bug 8073453
+ * @summary Focus doesn't move when pressing Shift + Tab keys
+ * @author Dmitry Markov
+ * @compile AWTFocusTransitionTest.java
+ * @run main/othervm AWTFocusTransitionTest
+ */
+import sun.awt.SunToolkit;
+
+import java.awt.*;
+import java.awt.event.KeyEvent;
+
+public class AWTFocusTransitionTest {
+ private static SunToolkit toolkit;
+ private static Robot robot;
+
+ private static Frame frame;
+ private static TextField textField;
+ private static Button button;
+
+ public static void main(String[] args) throws Exception {
+ toolkit = (SunToolkit)Toolkit.getDefaultToolkit();
+ robot = new Robot();
+ robot.setAutoDelay(50);
+
+ try {
+ createAndShowGUI();
+
+ toolkit.realSync();
+
+ checkFocusOwner(textField);
+
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ toolkit.realSync();
+
+ checkFocusOwner(button);
+
+ robot.keyPress(KeyEvent.VK_SHIFT);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_SHIFT);
+ toolkit.realSync();
+
+ checkFocusOwner(textField);
+
+ robot.keyPress(KeyEvent.VK_SHIFT);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_SHIFT);
+ toolkit.realSync();
+
+ checkFocusOwner(button);
+ } finally {
+ if (frame != null) {
+ frame.dispose();
+ }
+ }
+ System.out.println("Test Passed!");
+ }
+
+ private static void createAndShowGUI() {
+ frame = new Frame("AWTFocusTransitionTest");
+ frame.setSize(300, 300);
+ frame.setFocusTraversalPolicyProvider(true);
+ frame.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
+
+ textField = new TextField();
+ button = new Button();
+
+ Panel panel = new Panel();
+ panel.setFocusTraversalPolicyProvider(true);
+ panel.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
+
+ Panel p = new Panel();
+ p.setLayout(new GridLayout(3, 1));
+ p.add(textField);
+ p.add(button);
+ p.add(panel);
+
+ frame.add(p);
+ frame.setVisible(true);
+ }
+
+ private static void checkFocusOwner(Component component) {
+ if (component != frame.getFocusOwner()) {
+ throw new RuntimeException("Test Failed! Incorrect focus owner: " + frame.getFocusOwner() +
+ ", but expected: " + component);
+ }
+ }
+}
+
diff --git a/test/java/awt/Focus/8073453/SwingFocusTransitionTest.java b/test/java/awt/Focus/8073453/SwingFocusTransitionTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..ec15cd392a7104bdcf672e6992914bd0fc6c1b3c
--- /dev/null
+++ b/test/java/awt/Focus/8073453/SwingFocusTransitionTest.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+/* @test
+ * @bug 8073453
+ * @summary Focus doesn't move when pressing Shift + Tab keys
+ * @author Dmitry Markov
+ * @compile SwingFocusTransitionTest.java
+ * @run main/othervm SwingFocusTransitionTest
+ */
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+
+public class SwingFocusTransitionTest {
+ private static SunToolkit toolkit;
+ private static Robot robot;
+
+ private static JFrame frame;
+ private static JTextField textField;
+ private static JButton button;
+
+ public static void main(String[] args) throws Exception {
+ toolkit = (SunToolkit)Toolkit.getDefaultToolkit();
+ robot = new Robot();
+ robot.setAutoDelay(50);
+
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ createAndShowGUI();
+ }
+ });
+
+ toolkit.realSync();
+
+ checkFocusOwner(textField);
+
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ toolkit.realSync();
+
+ checkFocusOwner(button);
+
+ robot.keyPress(KeyEvent.VK_SHIFT);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_SHIFT);
+ toolkit.realSync();
+
+ checkFocusOwner(textField);
+
+ robot.keyPress(KeyEvent.VK_SHIFT);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_SHIFT);
+ toolkit.realSync();
+
+ checkFocusOwner(button);
+ } finally {
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ if (frame != null) {
+ frame.dispose();
+ }
+ }
+ });
+ }
+ System.out.println("Test Passed!");
+ }
+
+ private static void createAndShowGUI() {
+ frame = new JFrame("SwingFocusTransitionTest");
+ frame.setSize(300, 300);
+ frame.setFocusTraversalPolicyProvider(true);
+ frame.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+
+ textField = new JTextField();
+ button = new JButton();
+
+ JPanel panel = new JPanel();
+ panel.setFocusTraversalPolicyProvider(true);
+ panel.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
+
+ JPanel p = new JPanel();
+ p.setLayout(new GridLayout(3, 1));
+ p.add(textField);
+ p.add(button);
+ p.add(panel);
+
+ frame.add(p);
+ frame.setVisible(true);
+ }
+
+ private static void checkFocusOwner(final Component component) throws Exception {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ if (component != frame.getFocusOwner()) {
+ throw new RuntimeException("Test Failed! Incorrect focus owner: " + frame.getFocusOwner() +
+ ", but expected: " + component);
+ }
+ }
+ });
+ }
+}
+
diff --git a/test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java b/test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..8005c03de78c08dd9d9c7925e18a7acfb243ce0c
--- /dev/null
+++ b/test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+/*
+ @test
+ @bug 8020443
+ @summary Frame is not created on the specified GraphicsDevice with two
+monitors
+ @author Oleg Pekhovskiy
+ @run main MultiScreenInsetsTest
+ */
+
+import java.awt.Frame;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import sun.awt.OSInfo;
+
+public class MultiScreenInsetsTest {
+ private static final int SIZE = 100;
+
+ public static void main(String[] args) throws InterruptedException {
+ OSInfo.OSType type = OSInfo.getOSType();
+ if (type != OSInfo.OSType.LINUX && type != OSInfo.OSType.SOLARIS) {
+ System.out.println("This test is for Solaris and Linux only..." +
+ "skipping!");
+ return;
+ }
+
+ GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ GraphicsDevice[] gds = ge.getScreenDevices();
+ if (gds.length < 2) {
+ System.out.println("It's a multi-screen test... skipping!");
+ return;
+ }
+
+ for (int screen = 0; screen < gds.length; ++screen) {
+ GraphicsDevice gd = gds[screen];
+ GraphicsConfiguration gc = gd.getDefaultConfiguration();
+ Rectangle bounds = gc.getBounds();
+ Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+
+ Frame frame = new Frame(gc);
+ frame.setLocation(bounds.x + (bounds.width - SIZE) / 2,
+ bounds.y + (bounds.height - SIZE) / 2);
+ frame.setSize(SIZE, SIZE);
+ frame.setUndecorated(true);
+ frame.setVisible(true);
+
+ // Maximize Frame to reach the struts
+ frame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
+ Thread.sleep(2000);
+
+ Rectangle frameBounds = frame.getBounds();
+ frame.dispose();
+ if (bounds.x + insets.left != frameBounds.x
+ || bounds.y + insets.top != frameBounds.y
+ || bounds.width - insets.right - insets.left != frameBounds.width
+ || bounds.height - insets.bottom - insets.top != frameBounds.height) {
+ throw new RuntimeException("Test FAILED! Wrong screen #" +
+ screen + " insets: " + insets);
+ }
+ }
+ System.out.println("Test PASSED!");
+ }
+}
diff --git a/test/java/lang/management/MemoryMXBean/LowMemoryTest.java b/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
index ee837635f2c95817e363a5f1bdc30bcc596a7bfb..4d081f67544349a52e60040032df9234f33fc409 100644
--- a/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
+++ b/test/java/lang/management/MemoryMXBean/LowMemoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -33,15 +33,16 @@
* @library /lib/testlibrary/
* @build LowMemoryTest MemoryUtil RunUtil
* @run main/timeout=600 LowMemoryTest
+ * @requires vm.opt.ExplicitGCInvokesConcurrent != "true"
+ * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true"
+ * @requires vm.opt.DisableExplicitGC != "true"
*/
-import com.sun.management.DiagnosticCommandMBean;
import java.lang.management.*;
import java.util.*;
import java.util.concurrent.Phaser;
import javax.management.*;
import javax.management.openmbean.CompositeData;
-import sun.management.ManagementFactoryHelper;
public class LowMemoryTest {
private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean();
diff --git a/test/java/lang/management/ThreadMXBean/AllThreadIds.java b/test/java/lang/management/ThreadMXBean/AllThreadIds.java
index 05547b780011108661ebf9c44cd573155ac759bf..aa80c746cf27e190a2dbdaf8d97ae94492f0c456 100644
--- a/test/java/lang/management/ThreadMXBean/AllThreadIds.java
+++ b/test/java/lang/management/ThreadMXBean/AllThreadIds.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -27,21 +27,19 @@
* @summary Basic unit test of ThreadMXBean.getAllThreadIds()
* @author Alexei Guibadoulline and Mandy Chung
*
- * @run build Barrier
* @run main/othervm AllThreadIds
*/
import java.lang.management.*;
-import java.util.*;
+import java.util.concurrent.Phaser;
public class AllThreadIds {
final static int DAEMON_THREADS = 20;
final static int USER_THREADS = 5;
final static int ALL_THREADS = DAEMON_THREADS + USER_THREADS;
- private static volatile boolean live[] = new boolean[ALL_THREADS];
- private static Thread allThreads[] = new Thread[ALL_THREADS];
- private static ThreadMXBean mbean
- = ManagementFactory.getThreadMXBean();
+ private static final boolean live[] = new boolean[ALL_THREADS];
+ private static final Thread allThreads[] = new Thread[ALL_THREADS];
+ private static final ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
private static boolean testFailed = false;
private static boolean trace = false;
@@ -52,8 +50,7 @@ public class AllThreadIds {
private static int curLiveThreadCount = 0;
private static int curPeakThreadCount = 0;
- // barrier for threads communication
- private static Barrier barrier = new Barrier(ALL_THREADS);
+ private static final Phaser startupCheck = new Phaser(ALL_THREADS + 1);
private static void printThreadList() {
if (!trace) return;
@@ -124,18 +121,15 @@ public class AllThreadIds {
curPeakThreadCount = mbean.getPeakThreadCount();
checkThreadCount(0, 0);
-
// Start all threads and wait to be sure they all are alive
- barrier.set(ALL_THREADS);
for (int i = 0; i < ALL_THREADS; i++) {
- live[i] = true;
+ setLive(i, true);
allThreads[i] = new MyThread(i);
- allThreads[i].setDaemon( (i < DAEMON_THREADS) ? true : false);
+ allThreads[i].setDaemon(i < DAEMON_THREADS);
allThreads[i].start();
}
// wait until all threads are started.
- barrier.await();
-
+ startupCheck.arriveAndAwaitAdvance();
checkThreadCount(ALL_THREADS, 0);
printThreadList();
@@ -173,15 +167,14 @@ public class AllThreadIds {
// Stop daemon threads, wait to be sure they all are dead, and check
// that they disappeared from getAllThreadIds() list
- barrier.set(DAEMON_THREADS);
for (int i = 0; i < DAEMON_THREADS; i++) {
- live[i] = false;
+ setLive(i, false);
}
- // wait until daemon threads are terminated.
- barrier.await();
- // give chance to threads to terminate
- pause();
+ // make sure the daemon threads are completely dead
+ joinDaemonThreads();
+
+ // and check the reported thread count
checkThreadCount(0, DAEMON_THREADS);
// Check mbean now
@@ -190,11 +183,11 @@ public class AllThreadIds {
for (int i = 0; i < ALL_THREADS; i++) {
long expectedId = allThreads[i].getId();
boolean found = false;
- boolean live = (i >= DAEMON_THREADS);
+ boolean alive = (i >= DAEMON_THREADS);
if (trace) {
System.out.print("Looking for thread with id " + expectedId +
- (live ? " expected alive." : " expected terminated."));
+ (alive ? " expected alive." : " expected terminated."));
}
for (int j = 0; j < list.length; j++) {
if (expectedId == list[j]) {
@@ -203,11 +196,11 @@ public class AllThreadIds {
}
}
- if (live != found) {
+ if (alive != found) {
testFailed = true;
}
if (trace) {
- if (live != found) {
+ if (alive != found) {
System.out.println(" TEST FAILED.");
} else {
System.out.println();
@@ -216,15 +209,14 @@ public class AllThreadIds {
}
// Stop all threads and wait to be sure they all are dead
- barrier.set(ALL_THREADS - DAEMON_THREADS);
for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) {
- live[i] = false;
+ setLive(i, false);
}
- // wait until daemon threads are terminated .
- barrier.await();
- // give chance to threads to terminate
- pause();
+ // make sure the non-daemon threads are completely dead
+ joinNonDaemonThreads();
+
+ // and check the thread count
checkThreadCount(0, ALL_THREADS - DAEMON_THREADS);
if (testFailed)
@@ -233,6 +225,30 @@ public class AllThreadIds {
System.out.println("Test passed.");
}
+ private static void joinDaemonThreads() throws InterruptedException {
+ for (int i = 0; i < DAEMON_THREADS; i++) {
+ allThreads[i].join();
+ }
+ }
+
+ private static void joinNonDaemonThreads() throws InterruptedException {
+ for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) {
+ allThreads[i].join();
+ }
+ }
+
+ private static void setLive(int i, boolean val) {
+ synchronized(live) {
+ live[i] = val;
+ }
+ }
+
+ private static boolean isLive(int i) {
+ synchronized(live) {
+ return live[i];
+ }
+ }
+
// The MyThread thread lives as long as correspondent live[i] value is true
private static class MyThread extends Thread {
int id;
@@ -243,8 +259,8 @@ public class AllThreadIds {
public void run() {
// signal started
- barrier.signal();
- while (live[id]) {
+ startupCheck.arrive();
+ while (isLive(id)) {
try {
sleep(100);
} catch (InterruptedException e) {
@@ -253,23 +269,6 @@ public class AllThreadIds {
testFailed = true;
}
}
- // signal about to exit
- barrier.signal();
}
}
-
- private static Object pauseObj = new Object();
- private static void pause() {
- // Enter lock a without blocking
- synchronized (pauseObj) {
- try {
- // may need to tune this timeout for different platforms
- pauseObj.wait(50);
- } catch (Exception e) {
- System.err.println("Unexpected exception.");
- e.printStackTrace(System.err);
- }
- }
- }
-
}
diff --git a/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java b/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java
index f998b7e23754942513cc1e927a6990401e163e74..6cb4bfb07202866a0a0f2bd08ba089ba06691b78 100644
--- a/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java
+++ b/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -75,7 +75,7 @@ public class SynchronizationStatistics {
}
private static void waitForThreadState(Thread t, Thread.State state) throws InterruptedException {
- while (!t.isInterrupted() && t.getState() != state) {
+ while (t.getState() != state) {
Thread.sleep(3);
}
}
@@ -109,7 +109,9 @@ public class SynchronizationStatistics {
synchronized(lock1) {
p.arriveAndAwaitAdvance(); // phase[1]
waitForThreadState(lt, Thread.State.BLOCKED);
- lockName = mbean.getThreadInfo(tid).getLockName();
+ do {
+ lockName = mbean.getThreadInfo(tid).getLockName();
+ } while (lockName == null);
}
p.arriveAndAwaitAdvance(); // phase[2]
@@ -159,7 +161,9 @@ public class SynchronizationStatistics {
synchronized(lock1) {
p.arriveAndAwaitAdvance(); // phase[1]
waitForThreadState(lt, Thread.State.BLOCKED);
- lockName = mbean.getThreadInfo(tid).getLockName();
+ do {
+ lockName = mbean.getThreadInfo(tid).getLockName();
+ } while (lockName == null);
}
p.arriveAndAwaitAdvance(); // phase[2]
@@ -168,7 +172,9 @@ public class SynchronizationStatistics {
synchronized(lock2) {
p.arriveAndAwaitAdvance(); // phase [3]
waitForThreadState(lt, Thread.State.BLOCKED);
- lockName = mbean.getThreadInfo(tid).getLockName();
+ do {
+ lockName = mbean.getThreadInfo(tid).getLockName();
+ } while (lockName == null);
}
p.arriveAndAwaitAdvance(); // phase [4]
testBlocked(ti, () -> mbean.getThreadInfo(tid), lockName, lock2);
diff --git a/test/java/util/zip/TestExtraTime.java b/test/java/util/zip/TestExtraTime.java
index c6723b8ea9839c9f670bd4da8dbc2052250fef0c..3f965b3cce5dcda1fdcd4789ead7d462b6efd2ec 100644
--- a/test/java/util/zip/TestExtraTime.java
+++ b/test/java/util/zip/TestExtraTime.java
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 4759491 6303183 7012868 8015666 8023713 8068790 8074694
+ * @bug 4759491 6303183 7012868 8015666 8023713 8068790 8074694 8076641
* @summary Test ZOS and ZIS timestamp in extra field correctly
*/
@@ -40,7 +40,6 @@ import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
-
public class TestExtraTime {
public static void main(String[] args) throws Throwable{
@@ -71,6 +70,7 @@ public class TestExtraTime {
}
testNullHandling();
+ testTagOnlyHandling();
testTimeConversions();
}
@@ -208,4 +208,42 @@ public class TestExtraTime {
}
}
}
+
+ static void check(ZipEntry ze, byte[] extra) {
+ if (extra != null) {
+ byte[] extra1 = ze.getExtra();
+ if (extra1 == null || extra1.length < extra.length ||
+ !Arrays.equals(Arrays.copyOfRange(extra1,
+ extra1.length - extra.length,
+ extra1.length),
+ extra)) {
+ throw new RuntimeException("Timestamp: storing extra field failed!");
+ }
+ }
+ }
+
+ static void testTagOnlyHandling() throws Throwable {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] extra = new byte[] { 0x0a, 0, 4, 0, 0, 0, 0, 0 };
+ try (ZipOutputStream zos = new ZipOutputStream(baos)) {
+ ZipEntry ze = new ZipEntry("TestExtraTime.java");
+ ze.setExtra(extra);
+ zos.putNextEntry(ze);
+ zos.write(new byte[] { 1,2 ,3, 4});
+ }
+ try (ZipInputStream zis = new ZipInputStream(
+ new ByteArrayInputStream(baos.toByteArray()))) {
+ ZipEntry ze = zis.getNextEntry();
+ check(ze, extra);
+ }
+ Path zpath = Paths.get(System.getProperty("test.dir", "."),
+ "TestExtraTime.zip");
+ Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath);
+ try (ZipFile zf = new ZipFile(zpath.toFile())) {
+ ZipEntry ze = zf.getEntry("TestExtraTime.java");
+ check(ze, extra);
+ } finally {
+ Files.delete(zpath);
+ }
+ }
}
diff --git a/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java b/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java
index 24bf863dc88a035870146d1cb0abc48959b45875..538658f7b065a26ccdbbd283fa160717dc824133 100644
--- a/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java
+++ b/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, 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
@@ -34,37 +34,31 @@
// java imports
//
import java.net.MalformedURLException;
-import java.util.Map;
-
-// JMX imports
-//
-import javax.management.* ;
-
-import javax.management.remote.*;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerFactory;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL;
public class NotSerializableNotifTest {
private static final MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
private static ObjectName emitter;
- private static int port = 2468;
private static String[] protocols;
private static final int sentNotifs = 10;
- private static double timeoutFactor = 1.0;
- private static final double defaultTimeout = 10;
-
public static void main(String[] args) throws Exception {
System.out.println(">>> Test to send a not serializable notification");
- String timeoutVal = System.getProperty("test.timeout.factor");
- if (timeoutVal != null) {
- timeoutFactor = Double.parseDouble(
- System.getProperty("test.timeout.factor")
- );
- }
-
// IIOP fails on JDK1.4, see 5034318
final String v = System.getProperty("java.version");
float f = Float.parseFloat(v.substring(0, 3));
@@ -77,35 +71,18 @@ public class NotSerializableNotifTest {
emitter = new ObjectName("Default:name=NotificationEmitter");
mbeanServer.registerMBean(new NotificationEmitter(), emitter);
- boolean ok = true;
for (int i = 0; i < protocols.length; i++) {
- try {
- if (!test(protocols[i])) {
- System.out.println(">>> Test failed for " + protocols[i]);
- ok = false;
- } else {
- System.out.println(">>> Test successed for " + protocols[i]);
- }
- } catch (Exception e) {
- System.out.println(">>> Test failed for " + protocols[i]);
- e.printStackTrace(System.out);
- ok = false;
- }
+ test(protocols[i]);
}
- if (ok) {
- System.out.println(">>> Test passed");
- } else {
- System.out.println(">>> TEST FAILED");
- System.exit(1);
- }
+ System.out.println(">>> Test passed");
}
- private static boolean test(String proto) throws Exception {
+ private static void test(String proto) throws Exception {
System.out.println("\n>>> Test for protocol " + proto);
- JMXServiceURL url = new JMXServiceURL(proto, null, port++);
+ JMXServiceURL url = new JMXServiceURL(proto, null, 0);
System.out.println(">>> Create a server: "+url);
@@ -115,7 +92,7 @@ public class NotSerializableNotifTest {
} catch (MalformedURLException e) {
System.out.println("System does not recognize URL: " + url +
"; ignoring");
- return true;
+ return;
}
server.start();
@@ -146,25 +123,10 @@ public class NotSerializableNotifTest {
// waiting ...
synchronized (listener) {
- int top = (int)Math.ceil(timeoutFactor * defaultTimeout);
- for (int i=0; i";
+ String exceptionText = "NO EXCEPTION OBSERVED";
+ String hexString = "0x" + Integer.toHexString(character);
+
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ dbf.setValidating(false);
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ InputSource isrc = new InputSource(new StringReader(inxml));
+
+ try {
+ db.parse(isrc);
+ } catch (SAXException e) {
+ exceptionText = e.toString();
+ }
+ System.out.println("Got Exception:" + exceptionText);
+ assertTrue(exceptionText.contains("attribute \"attTest\""));
+ assertTrue(exceptionText.contains("element is \"topElement\""));
+ assertTrue(exceptionText.contains("Unicode: " + hexString));
+ }
+}
diff --git a/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java b/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java
index fcc36aefc0ca081d3acba705bc283594f364807e..cb3594bf9dd6e5169d2d561b9f2ef6f6efb1fe15 100644
--- a/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java
+++ b/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java
@@ -23,10 +23,11 @@
/**
* @test
- * @bug 8062923 8062924
+ * @bug 8062923 8062924 8074297 8076290
* @run testng XslSubstringTest
* @summary Test xsl substring function with negative, Inf and
- * NaN length and few other use cases
+ * NaN length and few other use cases. Also test proper
+ * processing of supplementary characters by substring function.
*/
import java.io.StringReader;
@@ -39,6 +40,7 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import static org.testng.Assert.assertEquals;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class XslSubstringTest {
@@ -50,6 +52,36 @@ public class XslSubstringTest {
+ "";
final String xslPost = "";
+ @DataProvider(name = "GeneralTestsData")
+ private Object[][] xmls() {
+ return new Object[][] {
+ { "||", "|s|"},
+ { "||", "|sdf|"},
+ { "||", "||" },
+ { "||", "|sdf|" },
+ // 8076290 bug test case
+ { "||", "|12|"},
+ };
+ }
+
+ @DataProvider(name = "SupplementaryCharactersTestData")
+ private Object[][] dataSupplementaryCharacters() {
+ return new Object[][] {
+ // 8074297 bug test cases
+ { "||", "|BC|"},
+ { "||", "|B|" },
+ { "||", "|AB|"},
+ { "||", "|BC|"},
+ { "||", "|BC|"},
+ { "||", "|𠀋|"},
+ { "||", "|A|"},
+ { "||", "|𠀋ABC|"},
+ { "||", "|𠀋ABC|"},
+ // 8076290 bug test case
+ { "||", "|𠀋|"},
+ };
+ }
+
private String testTransform(String xsl) throws Exception {
//Prepare sources for transormation
Source src = new StreamSource(new StringReader(xml));
@@ -78,27 +110,14 @@ public class XslSubstringTest {
"||");
}
- @Test
- public void testGeneral1() throws Exception {
- assertEquals(testTransform("||"),
- "|s|");
+ @Test(dataProvider = "GeneralTestsData")
+ public void testGeneralAll(String xsl, String result) throws Exception {
+ assertEquals(testTransform(xsl), result);
}
- @Test
- public void testGeneral2() throws Exception {
- assertEquals(testTransform("||"),
- "|sdf|");
+ @Test(dataProvider = "SupplementaryCharactersTestData")
+ public void testSupplementCharacters(String xsl, String result) throws Exception {
+ assertEquals(testTransform(xsl), result);
}
- @Test
- public void testGeneral3() throws Exception {
- assertEquals(testTransform("||"),
- "||");
- }
-
- @Test
- public void testGeneral4() throws Exception {
- assertEquals(testTransform("||"),
- "||");
- }
}
diff --git a/test/sun/security/krb5/auto/SSL.java b/test/sun/security/krb5/auto/SSL.java
index aab262244ac08e10c832fbb2c12321d85b0fdce5..c72fc163c1adb1aad06aac8a97b9b3f687808467 100644
--- a/test/sun/security/krb5/auto/SSL.java
+++ b/test/sun/security/krb5/auto/SSL.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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
@@ -39,11 +39,10 @@
* @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
*/
import java.io.*;
-import java.net.InetAddress;
-import java.security.AccessControlException;
import java.security.Permission;
import javax.net.ssl.*;
import java.security.Principal;
+import java.security.Security;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
@@ -82,6 +81,9 @@ public class SSL extends SecurityManager {
}
public static void main(String[] args) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
krb5Cipher = args[0];
diff --git a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
index 75e7436291fac974bd8da7349f6b9bbc525be019..75697dc81566f4ee0446a20c54968d0f162270b7 100644
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
+++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -34,7 +34,7 @@
*/
import java.io.*;
-import java.net.*;
+import java.security.Security;
import javax.net.ssl.*;
public class CipherSuiteOrder {
@@ -196,6 +196,10 @@ public class CipherSuiteOrder {
volatile Exception clientException = null;
public static void main(String[] args) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+
String keyFilename =
System.getProperty("test.src", "./") + "/" + pathToStores +
"/" + keyStoreFile;
diff --git a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
index 5c784b4e9ec5a23d6231436faf5631144bdbf53d..b94381ae629d5116a0093073edd085cb19d94f5a 100644
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
+++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -102,10 +102,10 @@ import java.io.*;
import java.nio.*;
import java.security.KeyStore;
import java.security.KeyFactory;
+import java.security.Security;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.spec.PKCS8EncodedKeySpec;
-import java.security.spec.*;
import java.security.interfaces.*;
import java.util.Base64;
@@ -377,6 +377,10 @@ public class DHEKeySizing {
}
public static void main(String args[]) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+
if (args.length != 4) {
System.out.println(
"Usage: java DHEKeySizing cipher-suite " +
diff --git a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
index dfdefa9f1f76307b741ad6b1296570596a200a96..7b8c5e9dba15fd04aab0798da62df60628cfb1cb 100644
--- a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
+++ b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -622,6 +622,9 @@ public class CheckStatus {
}
public static void main(String args[]) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
CheckStatus cs;
diff --git a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
index 546a7865668018040236da857146bc4692bbe364..a2d8d4fd75fe164876f6c714b056cc3211ce6e63 100644
--- a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
+++ b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -33,6 +33,8 @@
* The code could certainly be tightened up a lot.
*
* @author Brad Wetmore
+ *
+ * @run main/othervm ConnectionTest
*/
import javax.net.ssl.*;
@@ -669,6 +671,10 @@ public class ConnectionTest {
}
public static void main(String args[]) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+
ConnectionTest ct = new ConnectionTest();
ct.test();
}
diff --git a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
index 5960ea639926fe8b8665792576940979c66ed668..5336355d8eb7447976781455261747dd68e117c9 100644
--- a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
+++ b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, 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
@@ -179,6 +179,9 @@ public class LargeBufs {
}
public static void main(String args[]) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
LargeBufs test;
diff --git a/test/sun/security/ssl/javax/net/ssl/SSLParameters/UseCipherSuitesOrder.java b/test/sun/security/ssl/javax/net/ssl/SSLParameters/UseCipherSuitesOrder.java
index c25d74c7d2cd2a9cc911af8c79b5b520a311f5e5..31970257745faf85a480fe467269701a0cf610fb 100644
--- a/test/sun/security/ssl/javax/net/ssl/SSLParameters/UseCipherSuitesOrder.java
+++ b/test/sun/security/ssl/javax/net/ssl/SSLParameters/UseCipherSuitesOrder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -35,7 +35,7 @@
*/
import java.io.*;
-import java.net.*;
+import java.security.Security;
import javax.net.ssl.*;
import java.util.Arrays;
@@ -195,6 +195,10 @@ public class UseCipherSuitesOrder {
volatile Exception clientException = null;
public static void main(String[] args) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+
// parse the arguments
parseArguments(args);
diff --git a/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java b/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
index c96d8ec9cc88d64b3f43346cceed03e152a44188..e71a272084aaed4fc293e659937e6321292f2a6e 100644
--- a/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
+++ b/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -36,7 +36,7 @@
*/
import java.io.*;
-import java.net.*;
+import java.security.Security;
import javax.net.ssl.*;
public class GenericStreamCipher {
@@ -160,6 +160,10 @@ public class GenericStreamCipher {
volatile Exception clientException = null;
public static void main(String[] args) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+
String keyFilename =
System.getProperty("test.src", ".") + "/" + pathToStores +
"/" + keyStoreFile;
diff --git a/test/sun/security/tools/keytool/ExportPrivateKeyNoPwd.java b/test/sun/security/tools/keytool/ExportPrivateKeyNoPwd.java
new file mode 100644
index 0000000000000000000000000000000000000000..799bf455b23d0a842cd9b92a442942b7ec6c04c2
--- /dev/null
+++ b/test/sun/security/tools/keytool/ExportPrivateKeyNoPwd.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+import java.security.*;
+
+/*
+ * Export a private key from the named keychain entry without supplying a
+ * password. See JDK-8062264.
+ *
+ * NOTE: Keychain access controls must already have been lowered to permit
+ * the target entry to be accessed.
+ */
+public class ExportPrivateKeyNoPwd {
+
+ public static final void main(String[] args) throws Exception {
+
+ if (args.length != 1) {
+ throw new Exception(
+ "ExportPrivateKeyNoPwd: must supply name of a keystore entry");
+ }
+ String alias = args[0];
+
+ KeyStore ks = KeyStore.getInstance("KeychainStore");
+ System.out.println("ExportPrivateKeyNoPwd: loading keychains...");
+ ks.load(null, null);
+
+ System.out.println("ExportPrivateKeyNoPwd: exporting key...");
+ Key key = ks.getKey(alias, null);
+ if (key instanceof PrivateKey) {
+ System.out.println("ExportPrivateKeyNoPwd: exported " +
+ key.getAlgorithm() + " private key from '" + alias + "'");
+ } else {
+ throw new Exception("Error exporting private key from keychain");
+ }
+ }
+}
+
diff --git a/test/sun/security/tools/keytool/ListKeychainStore.sh b/test/sun/security/tools/keytool/ListKeychainStore.sh
index b6e486c212e30d6487cf76e64ade498e2db068f9..17e1b5a92e29328db41e583db26ccbeee8646070 100644
--- a/test/sun/security/tools/keytool/ListKeychainStore.sh
+++ b/test/sun/security/tools/keytool/ListKeychainStore.sh
@@ -22,7 +22,7 @@
#
# @test
-# @bug 7133495 8041740
+# @bug 7133495 8041740 8062264
# @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry
if [ "${TESTJAVA}" = "" ] ; then
@@ -30,6 +30,9 @@ if [ "${TESTJAVA}" = "" ] ; then
TESTJAVA=`dirname $JAVAC_CMD`/..
fi
+if [ "${TESTSRC}" = "" ] ; then
+ TESTSRC="."
+fi
if [ "${TESTCLASSES}" = "" ] ; then
TESTCLASSES=`pwd`
fi
@@ -59,10 +62,6 @@ CLEANUP_LIST="rm -f $TEMPORARY_LIST"
COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
echo "Found $COUNT private key entries in the Keychain keystores"
-if [ $COUNT -gt 1 ]; then
- exit 0
-fi
-
# Create a temporary PKCS12 keystore containing 3 public/private keypairs
RESULT=`$CLEANUP_P12`
@@ -107,8 +106,9 @@ fi
echo "Unlocked the temporary keychain"
# Import the keypairs from the PKCS12 keystore into the keychain
+# (The '-A' option is used to lower the temporary keychain's access controls)
-security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD
+security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD -A
if [ $? -ne 0 ]; then
echo "Error: cannot import keypairs from PKCS12 keystore into the keychain"
RESULT=`$CLEANUP_P12`
@@ -128,26 +128,39 @@ security list-keychains
# Recount the number of private key entries in the Keychain keystores
-COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
-echo "Found $COUNT private key entries in the Keychain keystore"
-if [ $COUNT -lt 3 ]; then
- echo "Error: expected >2 private key entries in the Keychain keystores"
+RECOUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
+echo "Found $RECOUNT private key entries in the Keychain keystore"
+if [ $RECOUNT -lt `expr $COUNT + 3` ]; then
+ echo "Error: expected >$COUNT private key entries in the Keychain keystores"
RESULT=`$CLEANUP_P12`
RESULT=`$CLEANUP_KC`
exit 5
fi
+# Export a private key from the keychain (without supplying a password)
+# Access controls have already been lowered (see 'security import ... -A' above)
+
+${TESTJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/ExportPrivateKeyNoPwd.java || exit 6
+echo | ${TESTJAVA}/bin/java ${TESTVMOPTS} ExportPrivateKeyNoPwd x
+if [ $? -ne 0 ]; then
+ echo "Error exporting private key from the temporary keychain"
+ RESULT=`$CLEANUP_P12`
+ RESULT=`$CLEANUP_KC`
+ exit 6
+fi
+echo "Exported a private key from the temporary keychain"
+
RESULT=`$CLEANUP_P12`
if [ $? -ne 0 ]; then
echo "Error: cannot remove the temporary PKCS12 keystore"
- exit 6
+ exit 7
fi
echo "Removed the temporary PKCS12 keystore"
RESULT=`$CLEANUP_KC`
if [ $? -ne 0 ]; then
echo "Error: cannot remove the temporary keychain"
- exit 7
+ exit 8
fi
echo "Removed the temporary keychain"
diff --git a/test/sun/util/calendar/zi/tzdata/VERSION b/test/sun/util/calendar/zi/tzdata/VERSION
index 034114ae6ca872d6913821623b9fbdcd5bc48dac..ebd4db73b0e718a1eba65f5ff9079b6fa7adf61b 100644
--- a/test/sun/util/calendar/zi/tzdata/VERSION
+++ b/test/sun/util/calendar/zi/tzdata/VERSION
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2015a
+tzdata2015b
diff --git a/test/sun/util/calendar/zi/tzdata/asia b/test/sun/util/calendar/zi/tzdata/asia
index bff837c48d8ffcb4e0ab94097655d2e6736df9cc..fa4f2461cbbd75cee813c5c2f99f90be02f9a81f 100644
--- a/test/sun/util/calendar/zi/tzdata/asia
+++ b/test/sun/util/calendar/zi/tzdata/asia
@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# was at the start of 2008-03-31 (the day of Steffen Thorsen's report);
# this is almost surely wrong.
+# From Ganbold Tsagaankhuu (2015-03-10):
+# It seems like yesterday Mongolian Government meeting has concluded to use
+# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of
+# March 2015, daylight saving time starts. And 00:00AM of last Saturday of
+# September daylight saving time ends. Source:
+# http://zasag.mn/news/view/8969
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 -
@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 -
Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S
Rule Mongol 2001 2006 - Sep lastSat 2:00 0 -
Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S
+Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S
+Rule Mongol 2015 max - Sep lastSat 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# official source...:
# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
-# From Paul Eggert (2013-09-24):
-# For future dates, guess the last Thursday in March at 24:00 through
-# the first Friday on or after September 21 at 00:00. This is consistent with
-# the predictions in today's editions of the following URLs,
-# which are for Gaza and Hebron respectively:
-# http://www.timeanddate.com/worldclock/timezone.html?n=702
-# http://www.timeanddate.com/worldclock/timezone.html?n=2364
+# From Steffen Thorsen (2015-03-03):
+# Sources such as http://www.alquds.com/news/article/view/id/548257
+# and http://www.raya.ps/ar/news/890705.html say Palestine areas will
+# start DST on 2015-03-28 00:00 which is one day later than expected.
+#
+# From Paul Eggert (2015-03-03):
+# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
+# says that the fall 2014 transition was Oct 23 at 24:00.
+# For future dates, guess the last Friday in March at 24:00 through
+# the first Friday on or after October 21 at 00:00. This is consistent with
+# the predictions in today's editions of the following URLs:
+# http://www.timeanddate.com/time/change/gaza-strip/gaza
+# http://www.timeanddate.com/time/change/west-bank/hebron
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S
Rule Palestine 2011 only - Aug 1 0:00 0 -
Rule Palestine 2011 only - Aug 30 0:00 1:00 S
Rule Palestine 2011 only - Sep 30 0:00 0 -
-Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S
+Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S
Rule Palestine 2012 only - Sep 21 1:00 0 -
-Rule Palestine 2013 max - Sep Fri>=21 0:00 0 -
+Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
+Rule Palestine 2014 max - Oct Fri>=21 0:00 0 -
+Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
diff --git a/test/sun/util/calendar/zi/tzdata/australasia b/test/sun/util/calendar/zi/tzdata/australasia
index f2a89e8ee37f222eb534816231afef3e0c498953..ec9f392f88f5fcd4eec08144bf0743e634828a1e 100644
--- a/test/sun/util/calendar/zi/tzdata/australasia
+++ b/test/sun/util/calendar/zi/tzdata/australasia
@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
9:39:00 - LMT 1901 # Agana
10:00 - GST 2000 Dec 23 # Guam
10:00 - ChST # Chamorro Standard Time
+Link Pacific/Guam Pacific/Saipan # N Mariana Is
# Kiribati
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901
14:00 - LINT
# N Mariana Is
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31
- 9:43:00 - LMT 1901
- 9:00 - MPT 1969 Oct # N Mariana Is Time
- 10:00 - MPT 2000 Dec 23
- 10:00 - ChST # Chamorro Standard Time
+# See Pacific/Guam.
# Marshall Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
+Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Samoa (formerly and also known as Western Samoa)
@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# uninhabited
# Midway
-#
-# From Mark Brader (2005-01-23):
-# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
-# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
-# reproduced a Pan American Airways timetable from 1936, for their weekly
-# "Orient Express" flights between San Francisco and Manila, and connecting
-# flights to Chicago and the US East Coast. As it uses some time zone
-# designations that I've never seen before:....
-# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
-# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
-#
-Zone Pacific/Midway -11:49:28 - LMT 1901
- -11:00 - NST 1956 Jun 3
- -11:00 1:00 NDT 1956 Sep 2
- -11:00 - NST 1967 Apr # N=Nome
- -11:00 - BST 1983 Nov 30 # B=Bering
- -11:00 - SST # S=Samoa
+# See Pacific/Pago_Pago.
# Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritimati
diff --git a/test/sun/util/calendar/zi/tzdata/europe b/test/sun/util/calendar/zi/tzdata/europe
index 89790f06c1766c788f8b6ca4ac8b4c2b4fc8622f..008268ac7633d32d781b84690e00682c2c36ac7b 100644
--- a/test/sun/util/calendar/zi/tzdata/europe
+++ b/test/sun/util/calendar/zi/tzdata/europe
@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T
3:00 Russia VOL%sT 1991 Mar 31 2:00s
4:00 - VOLT 1992 Mar 29 2:00s
- 3:00 Russia MSK 2011 Mar 27 2:00s
+ 3:00 Russia MSK/MSD 2011 Mar 27 2:00s
4:00 - MSK 2014 Oct 26 2:00s
3:00 - MSK
diff --git a/test/sun/util/calendar/zi/tzdata/northamerica b/test/sun/util/calendar/zi/tzdata/northamerica
index 5943cfeec4b55f9797135aab235a65793b165787..442a50eef0f5eeba936666af4862cef0a47f073e 100644
--- a/test/sun/util/calendar/zi/tzdata/northamerica
+++ b/test/sun/util/calendar/zi/tzdata/northamerica
@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# "...the new time zone will come into effect at two o'clock on the first Sunday
# of February, when we will have to advance the clock one hour from its current
# time..."
-#
# Also, the new zone will not use DST.
+#
+# From Carlos Raúl Perasso (2015-02-02):
+# The decree that modifies the Mexican Hour System Law has finally
+# been published at the Diario Oficial de la Federación
+# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015
+# It establishes 5 zones for Mexico:
+# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W,
+# includes most of Mexico, excluding what's mentioned below.
+# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the
+# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía
+# de Banderas which lies in Central Zone); Sinaloa and Sonora.
+# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the
+# state of Baja California.
+# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state
+# of Quintana Roo.
+# 5- The islands, reefs and keys shall take their timezone from the
+# longitude they are located at.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
###############################################################################
# Anguilla
-# See America/Port_of_Spain.
-
# Antigua and Barbuda
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
- -5:00 - EST 1951
- -4:00 - AST
+# See America/Port_of_Spain.
# Bahamas
#
@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
-4:00 US A%sT
# Cayman Is
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
- -5:07:11 - KMT 1912 Feb # Kingston Mean Time
- -5:00 - EST
+# See America/Panama.
# Costa Rica
@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890
Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST
+Link America/Panama America/Cayman
# Puerto Rico
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
diff --git a/test/sun/util/calendar/zi/tzdata/southamerica b/test/sun/util/calendar/zi/tzdata/southamerica
index 02cf12113a00d347dcbe40199171f132e7b9883a..238ae3dc5692b2fbd0bfb2be205b0ead2bff20ad 100644
--- a/test/sun/util/calendar/zi/tzdata/southamerica
+++ b/test/sun/util/calendar/zi/tzdata/southamerica
@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
-# From Juan Correa (2015-01-28):
-# ... today the Ministry of Energy announced that Chile will drop DST, will keep
-# "summer time" (UTC -3 / UTC -5) all year round....
-# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html
+# From Eduardo Romero Urra (2015-03-03):
+# Today has been published officially that Chile will use the DST time
+# permanently until March 25 of 2017
+# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg
+#
+# From Paul Eggert (2015-03-03):
+# For now, assume that the extension will persist indefinitely.
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file.
@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890
-3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time
- -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time
+ -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time
-6:00 Chile EAS%sT 2015 Apr 26 3:00u
-5:00 - EAST
#
@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
# These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla
+Link America/Port_of_Spain America/Antigua
Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe