--- a/jdk/make/CompileLaunchers.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/CompileLaunchers.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -32,7 +32,7 @@
# Setup the java compilers for the JDK build.
include Setup.gmk
-# Prepare the find cache. Only used on windows.
+# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/bin))
# Build tools
--- a/jdk/make/CompileNativeLibraries.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/CompileNativeLibraries.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -35,7 +35,7 @@
# Copy files (can now depend on $(COPY_FILES))
include CopyFiles.gmk
-# Prepare the find cache. Only used if running on windows.
+# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
# Build tools
--- a/jdk/make/CreateJars.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/CreateJars.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -30,9 +30,6 @@
default: all
-# Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind, $(JDK_OUTPUTDIR)/classes))
-
include Tools.gmk
include Profiles.gmk
--- a/jdk/make/Images.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/Images.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -30,7 +30,7 @@
default: images
-# Prepare the find cache. Only used if running on windows.
+# Prepare the find cache.
$(eval $(call FillCacheFind, \
$(wildcard $(JDK_OUTPUTDIR)/bin \
$(JDK_OUTPUTDIR)/lib \
--- a/jdk/make/Import.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/Import.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -252,7 +252,7 @@
$(ECHO) Unzipping $(<F)
$(MKDIR) -p $(@D)
$(RM) $@
- ($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) $< > $@.tmp)
+ ($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
$(MV) $@.tmp $@
endef
--- a/jdk/make/Setup.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/Setup.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -38,7 +38,7 @@
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to the previous JDK version.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
- JVM := $(JAVA), \
+ JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
@@ -60,7 +60,7 @@
# I.e. the rt.jar, but since rt.jar has not yet been generated
# (it will be in "make images") therefore we use classes instead.
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
- JVM := $(JAVA), \
+ JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -bootclasspath $(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
--- a/jdk/make/Tools.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/Tools.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 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
@@ -23,7 +23,7 @@
# questions.
#
-# Cache all finds needed for this file. Only used on windows.
+# Cache all finds needed for this file.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/src/classes))
# The exception handling of swing beaninfo which have the own tool directory
@@ -48,76 +48,76 @@
BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
-TOOL_ADDJSUM = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.addjsum.AddJsum
# The buildmetaindex tool creates a meta-index to make core class loaders lazier.
-TOOL_BUILDMETAINDEX = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.buildmetaindex.BuildMetaIndex
-TOOL_COMPILEFONTCONFIG = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.compilefontconfig.CompileFontConfig
-TOOL_COMPILEPROPERTIES = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.compileproperties.CompileProperties
-TOOL_JARREORDER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_JARREORDER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.jarreorder.JarReorder
-TOOL_GENERATECHARACTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecharacter.GenerateCharacter
-TOOL_CHARACTERNAME = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecharacter.CharacterName
-TOOL_DTDBUILDER = $(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \
+TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \
-cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
-TOOL_GENERATEBREAKITERATORDATA = $(JAVA) \
+TOOL_GENERATEBREAKITERATORDATA = $(JAVA_SMALL) \
-cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatebreakiteratordata.GenerateBreakIteratorData
-TOOL_GENERATECURRENCYDATA = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecurrencydata.GenerateCurrencyData
-TOOL_HASHER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_HASHER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.hasher.Hasher
-TOOL_TZDB = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_TZDB = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.tzdb.TzdbZoneRulesCompiler
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
# and nbproject/project.properties in the same dir. Needs to be looked at.
-TOOL_JDWPGEN = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
+TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
-TOOL_CHARSETMAPPING = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.charsetmapping.Main $(LOG_INFO)
-TOOL_SPP = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
+TOOL_SPP = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
# Nimbus is used somewhere in the swing build.
-TOOL_GENERATENIMBUS = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatenimbus.Generator
-TOOL_WRAPPERGENERATOR = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.x11wrappergen.WrapperGenerator
-TOOL_AWT_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.icondata.awt.ToBin
-TOOL_OSX_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.icondata.osxapp.ToBin
-TOOL_CLDRCONVERTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.cldrconverter.CLDRConverter
-TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
+TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
build.tools.deps.CheckDeps
-TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_ADDTORESTRICTEDPKGS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
##########################################################################################
--- a/jdk/make/data/tzdata/VERSION Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/VERSION Wed Mar 19 11:13:35 2014 -0700
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2013i
+tzdata2014a
--- a/jdk/make/data/tzdata/asia Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/asia Wed Mar 19 11:13:35 2014 -0700
@@ -1113,8 +1113,13 @@
Rule Zion 1986 only - Sep 7 0:00 0 S
Rule Zion 1987 only - Apr 15 0:00 1:00 D
Rule Zion 1987 only - Sep 13 0:00 0 S
-Rule Zion 1988 only - Apr 9 0:00 1:00 D
-Rule Zion 1988 only - Sep 3 0:00 0 S
+
+# From Avigdor Finkelstein (2014-03-05):
+# I check the Parliament (Knesset) records and there it's stated that the
+# [1988] transition should take place on Saturday night, when the Sabbath
+# ends and changes to Sunday.
+Rule Zion 1988 only - Apr 10 0:00 1:00 D
+Rule Zion 1988 only - Sep 4 0:00 0 S
# From Ephraim Silverberg
# (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22,
--- a/jdk/make/data/tzdata/australasia Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/australasia Wed Mar 19 11:13:35 2014 -0700
@@ -377,16 +377,18 @@
# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
-# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
-# on Sunday 19th January, 2014.... move clocks forward by one hour from 2am
+# Fiji will start daylight savings on Sunday 27th October, 2013 ...
+# move clocks forward by one hour from 2am
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
-#
-# From Paul Eggert (2013-09-09):
+
+# From Steffen Thorsen (2013-01-10):
+# Fiji will end DST on 2014-01-19 02:00:
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
+
+# From Paul Eggert (2014-01-10):
# For now, guess that Fiji springs forward the Sunday before the fourth
-# Monday in October. This matches both recent practice and
-# timeanddate.com's current spring-forward prediction.
-# For the January 2014 transition we guessed right while timeanddate.com
-# guessed wrong, so leave the fall-back prediction alone.
+# Monday in October, and springs back the penultimate Sunday in January.
+# This is ad hoc, but matches recent practice.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
@@ -395,7 +397,8 @@
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
-Rule Fiji 2012 max - Jan Sun>=18 3:00 0 -
+Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
+Rule Fiji 2014 max - Jan Sun>=18 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
--- a/jdk/make/data/tzdata/europe Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/europe Wed Mar 19 11:13:35 2014 -0700
@@ -2768,14 +2768,18 @@
# According to the articles linked below, Turkey will change into summer
# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
# This change is due to a nationwide exam on 27th.
-#
-# <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872">
# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
-# </a>
# Turkish:
-# <a href="http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373">
# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
-# </a>
+
+# From Faruk Pasin (2014-02-14):
+# The DST for Turkey has been changed for this year because of the
+# Turkish Local election....
+# http://www.sabah.com.tr/Ekonomi/2014/02/12/yaz-saatinde-onemli-degisiklik
+# ... so Turkey will move clocks forward one hour on March 31 at 3:00 a.m.
+# From Paul Eggert (2014-02-17):
+# Here is an English-language source:
+# http://www.worldbulletin.net/turkey/129016/turkey-switches-to-daylight-saving-time-march-31
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
@@ -2844,6 +2848,8 @@
2:00 Turkey EE%sT 2007
2:00 EU EE%sT 2011 Mar 27 1:00u
2:00 - EET 2011 Mar 28 1:00u
+ 2:00 EU EE%sT 2014 Mar 30 1:00u
+ 2:00 - EET 2014 Mar 31 1:00u
2:00 EU EE%sT
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
@@ -2865,19 +2871,13 @@
# approval from 266 deputies.
#
# Ukraine abolishes transter back to the winter time (in Russian)
-# <a href="http://news.mail.ru/politics/6861560/">
# http://news.mail.ru/politics/6861560/
-# </a>
#
# The Ukrainians will no longer change the clock (in Russian)
-# <a href="http://www.segodnya.ua/news/14290482.html">
# http://www.segodnya.ua/news/14290482.html
-# </a>
#
# Deputies cancelled the winter time (in Russian)
-# <a href="http://www.pravda.com.ua/rus/news/2011/09/20/6600616/">
# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
-# </a>
#
# From Philip Pizzey (2011-10-18):
# Today my Ukrainian colleagues have informed me that the
@@ -2888,18 +2888,39 @@
# As far as I understand, the recent change to the Ukrainian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
-#
-# <a href="http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995">
# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
-# </a>
#
# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
# The law documents themselves are at
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+
+# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28):
+# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST:
+# 03 25 1990 02:00 -03.00 1 Time Zone 3 with DST
+# 07 01 1990 02:00 -02.00 1 Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 18.06.1990, No. 134.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/T001500.html
#
-# <a href="http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484">
-# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
-# </a>
-
+# They did not end DST in September, 1990 (according to the law,
+# "summer time" was still in action):
+# 09 30 1990 03:00 -02.00 1 Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 21.09.1990, No. 272.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/KP900272.html
+#
+# Again no change in March, 1991 ("summer time" in action):
+# 03 31 1991 02:00 -02.00 1 Time Zone 2 with DST
+#
+# DST ended in September 1991 ("summer time" ended):
+# 09 29 1991 03:00 -02.00 0 Time Zone 2, no DST
+# * Ukrainian Government's Resolution of 25.09.1991, No. 225.
+# http://www.uazakon.com/documents/date_21/pg_iwgdoc.htm
+# This is an answer.
+#
+# Since 1992 they had normal DST procedure:
+# 03 29 1992 02:00 -02.00 1 DST started
+# 09 27 1992 03:00 -02.00 0 DST ended
+# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
+# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Most of Ukraine since 1970 has been like Kiev.
@@ -2910,9 +2931,8 @@
2:00 - EET 1930 Jun 21
3:00 - MSK 1941 Sep 20
1:00 C-Eur CE%sT 1943 Nov 6
- 3:00 Russia MSK/MSD 1990
- 3:00 - MSK 1990 Jul 1 2:00
- 2:00 - EET 1992
+ 3:00 Russia MSK/MSD 1990 Jul 1 2:00
+ 2:00 1:00 EEST 1991 Sep 29 3:00
2:00 E-Eur EE%sT 1995
2:00 EU EE%sT
# Ruthenia used CET 1990/1991.
--- a/jdk/make/data/tzdata/northamerica Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/northamerica Wed Mar 19 11:13:35 2014 -0700
@@ -414,9 +414,10 @@
# US Pacific time, represented by Los Angeles
#
# California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
-# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties,
-# and the northern three-quarters of Idaho county),
-# most of Nevada, most of Oregon, and Washington
+# Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county
+# north of the Salmon River, and the towns of Burgdorf and Warren),
+# Nevada (except West Wendover), Oregon (except the northern 3/4 of
+# Malheur county), and Washington
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule CA 1948 only - Mar 14 2:00 1:00 D
--- a/jdk/make/data/tzdata/southamerica Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/data/tzdata/southamerica Wed Mar 19 11:13:35 2014 -0700
@@ -1298,6 +1298,13 @@
# start date is 2013-09-08 00:00....
# http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm
+# From Jose Miguel Garrido (2014-02-19):
+# Today appeared in the Diario Oficial a decree amending the time change
+# dates to 2014.
+# DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC)
+# 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
+
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file.
@@ -1631,6 +1638,9 @@
# From Carlos Raul Perasso (2013-03-15):
# The change in Paraguay is now final. Decree number 10780
# http://www.presidencia.gov.py/uploads/pdf/presidencia-3b86ff4b691c79d4f5927ca964922ec74772ce857c02ca054a52a37b49afc7fb.pdf
+# From Carlos Raul Perasso (2014-02-28):
+# Decree 1264 can be found at:
+# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf
Rule Para 2013 max - Mar Sun>=22 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -1689,18 +1699,19 @@
Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
-4:00 - AST
+# These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla
Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe
-Link America/Port_of_Spain America/Marigot
+Link America/Port_of_Spain America/Marigot # St Martin (French part)
Link America/Port_of_Spain America/Montserrat
Link America/Port_of_Spain America/St_Barthelemy
-Link America/Port_of_Spain America/St_Kitts
+Link America/Port_of_Spain America/St_Kitts # St Kitts & Nevis
Link America/Port_of_Spain America/St_Lucia
-Link America/Port_of_Spain America/St_Thomas
+Link America/Port_of_Spain America/St_Thomas # Virgin Islands (US)
Link America/Port_of_Spain America/St_Vincent
-Link America/Port_of_Spain America/Tortola
+Link America/Port_of_Spain America/Tortola # Virgin Islands (UK)
# Uruguay
# From Paul Eggert (1993-11-18):
--- a/jdk/make/gensrc/GensrcProperties.gmk Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/make/gensrc/GensrcProperties.gmk Wed Mar 19 11:13:35 2014 -0700
@@ -23,8 +23,10 @@
# questions.
#
-# Prepare the find cache. This is only used on windows.
-$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/windows/classes))
+# Prepare the find cache.
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/classes \
+ $(JDK_TOPDIR)/src/windows/classes \
+ $(JDK_TOPDIR)/src/macosx/classes))
# All .properties files to be compiled are appended to this variable.
ALL_COMPILED_PROPSOURCES :=
--- a/jdk/src/share/classes/java/io/SequenceInputStream.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/java/io/SequenceInputStream.java Wed Mar 19 11:13:35 2014 -0700
@@ -135,7 +135,7 @@
* @since JDK1.1
*/
public int available() throws IOException {
- if(in == null) {
+ if (in == null) {
return 0; // no way to signal EOF from available()
}
return in.available();
@@ -160,15 +160,14 @@
* @exception IOException if an I/O error occurs.
*/
public int read() throws IOException {
- if (in == null) {
- return -1;
+ while (in != null) {
+ int c = in.read();
+ if (c != -1) {
+ return c;
+ }
+ nextStream();
}
- int c = in.read();
- if (c == -1) {
- nextStream();
- return read();
- }
- return c;
+ return -1;
}
/**
@@ -204,13 +203,14 @@
} else if (len == 0) {
return 0;
}
-
- int n = in.read(b, off, len);
- if (n <= 0) {
+ do {
+ int n = in.read(b, off, len);
+ if (n > 0) {
+ return n;
+ }
nextStream();
- return read(b, off, len);
- }
- return n;
+ } while (in != null);
+ return -1;
}
/**
--- a/jdk/src/share/classes/java/util/Arrays.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/java/util/Arrays.java Wed Mar 19 11:13:35 2014 -0700
@@ -28,6 +28,7 @@
import java.lang.reflect.Array;
import java.util.concurrent.ForkJoinPool;
import java.util.function.BinaryOperator;
+import java.util.function.Consumer;
import java.util.function.DoubleBinaryOperator;
import java.util.function.IntBinaryOperator;
import java.util.function.IntFunction;
@@ -35,6 +36,7 @@
import java.util.function.IntToLongFunction;
import java.util.function.IntUnaryOperator;
import java.util.function.LongBinaryOperator;
+import java.util.function.UnaryOperator;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
@@ -3848,12 +3850,13 @@
@Override
public int indexOf(Object o) {
- if (o==null) {
- for (int i=0; i<a.length; i++)
- if (a[i]==null)
+ E[] a = this.a;
+ if (o == null) {
+ for (int i = 0; i < a.length; i++)
+ if (a[i] == null)
return i;
} else {
- for (int i=0; i<a.length; i++)
+ for (int i = 0; i < a.length; i++)
if (o.equals(a[i]))
return i;
}
@@ -3869,6 +3872,28 @@
public Spliterator<E> spliterator() {
return Spliterators.spliterator(a, Spliterator.ORDERED);
}
+
+ @Override
+ public void forEach(Consumer<? super E> action) {
+ Objects.requireNonNull(action);
+ for (E e : a) {
+ action.accept(e);
+ }
+ }
+
+ @Override
+ public void replaceAll(UnaryOperator<E> operator) {
+ Objects.requireNonNull(operator);
+ E[] a = this.a;
+ for (int i = 0; i < a.length; i++) {
+ a[i] = operator.apply(a[i]);
+ }
+ }
+
+ @Override
+ public void sort(Comparator<? super E> c) {
+ Arrays.sort(a, c);
+ }
}
/**
--- a/jdk/src/share/classes/java/util/logging/LogManager.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/java/util/logging/LogManager.java Wed Mar 19 11:13:35 2014 -0700
@@ -570,7 +570,7 @@
// the context requires default loggers, will be added to the context
// logger's tree.
final Logger getGlobalLogger() {
- @SuppressWarnings("deprecated") // avoids initialization cycles.
+ @SuppressWarnings("deprecation") // avoids initialization cycles.
final Logger global = Logger.global;
return global;
}
@@ -642,7 +642,7 @@
// method be called for anything else than Logger.global
// or owner.rootLogger.
if (!requiresDefaultLoggers() || logger == null
- || logger != Logger.global && logger != LogManager.this.rootLogger) {
+ || logger != getGlobalLogger() && logger != LogManager.this.rootLogger ) {
// the case where we have a non null logger which is neither
// Logger.global nor manager.rootLogger indicates a serious
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java Wed Mar 19 11:13:35 2014 -0700
@@ -259,41 +259,68 @@
if (c >= '\001' && c <= '\177') {
data[len++] = (byte) c;
} else {
- int byteLength = i;
- for (int j = i; j < charLength; ++j) {
- c = s.charAt(j);
- if (c >= '\001' && c <= '\177') {
- byteLength++;
- } else if (c > '\u07FF') {
- byteLength += 3;
- } else {
- byteLength += 2;
- }
- }
- if (byteLength > 65535) {
- throw new IllegalArgumentException();
- }
- data[length] = (byte) (byteLength >>> 8);
- data[length + 1] = (byte) byteLength;
- if (length + 2 + byteLength > data.length) {
- length = len;
- enlarge(2 + byteLength);
- data = this.data;
- }
- for (int j = i; j < charLength; ++j) {
- c = s.charAt(j);
- if (c >= '\001' && c <= '\177') {
- data[len++] = (byte) c;
- } else if (c > '\u07FF') {
- data[len++] = (byte) (0xE0 | c >> 12 & 0xF);
- data[len++] = (byte) (0x80 | c >> 6 & 0x3F);
- data[len++] = (byte) (0x80 | c & 0x3F);
- } else {
- data[len++] = (byte) (0xC0 | c >> 6 & 0x1F);
- data[len++] = (byte) (0x80 | c & 0x3F);
- }
- }
- break;
+ length = len;
+ return encodeUTF8(s, i, 65535);
+ }
+ }
+ length = len;
+ return this;
+ }
+
+ /**
+ * Puts an UTF8 string into this byte vector. The byte vector is
+ * automatically enlarged if necessary. The string length is encoded in two
+ * bytes before the encoded characters, if there is space for that (i.e. if
+ * this.length - i - 2 >= 0).
+ *
+ * @param s
+ * the String to encode.
+ * @param i
+ * the index of the first character to encode. The previous
+ * characters are supposed to have already been encoded, using
+ * only one byte per character.
+ * @param maxByteLength
+ * the maximum byte length of the encoded string, including the
+ * already encoded characters.
+ * @return this byte vector.
+ */
+ ByteVector encodeUTF8(final String s, int i, int maxByteLength) {
+ int charLength = s.length();
+ int byteLength = i;
+ char c;
+ for (int j = i; j < charLength; ++j) {
+ c = s.charAt(j);
+ if (c >= '\001' && c <= '\177') {
+ byteLength++;
+ } else if (c > '\u07FF') {
+ byteLength += 3;
+ } else {
+ byteLength += 2;
+ }
+ }
+ if (byteLength > maxByteLength) {
+ throw new IllegalArgumentException();
+ }
+ int start = length - i - 2;
+ if (start >= 0) {
+ data[start] = (byte) (byteLength >>> 8);
+ data[start + 1] = (byte) byteLength;
+ }
+ if (length + byteLength - i > data.length) {
+ enlarge(byteLength - i);
+ }
+ int len = length;
+ for (int j = i; j < charLength; ++j) {
+ c = s.charAt(j);
+ if (c >= '\001' && c <= '\177') {
+ data[len++] = (byte) c;
+ } else if (c > '\u07FF') {
+ data[len++] = (byte) (0xE0 | c >> 12 & 0xF);
+ data[len++] = (byte) (0x80 | c >> 6 & 0x3F);
+ data[len++] = (byte) (0x80 | c & 0x3F);
+ } else {
+ data[len++] = (byte) (0xC0 | c >> 6 & 0x1F);
+ data[len++] = (byte) (0x80 | c & 0x3F);
}
}
length = len;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java Wed Mar 19 11:13:35 2014 -0700
@@ -716,7 +716,8 @@
sourceFile = newUTF8(file);
}
if (debug != null) {
- sourceDebug = new ByteVector().putUTF8(debug);
+ sourceDebug = new ByteVector().encodeUTF8(debug, 0,
+ Integer.MAX_VALUE);
}
}
@@ -857,7 +858,7 @@
}
if (sourceDebug != null) {
++attributeCount;
- size += sourceDebug.length + 4;
+ size += sourceDebug.length + 6;
newUTF8("SourceDebugExtension");
}
if (enclosingMethodOwner != 0) {
@@ -946,9 +947,9 @@
out.putShort(newUTF8("SourceFile")).putInt(2).putShort(sourceFile);
}
if (sourceDebug != null) {
- int len = sourceDebug.length - 2;
+ int len = sourceDebug.length;
out.putShort(newUTF8("SourceDebugExtension")).putInt(len);
- out.putByteArray(sourceDebug.data, 2, len);
+ out.putByteArray(sourceDebug.data, 0, len);
}
if (enclosingMethodOwner != 0) {
out.putShort(newUTF8("EnclosingMethod")).putInt(4);
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java Wed Mar 19 11:13:35 2014 -0700
@@ -99,8 +99,8 @@
* stack types. VALUE depends on KIND. For LOCAL types, it is an index in
* the input local variable types. For STACK types, it is a position
* relatively to the top of input frame stack. For BASE types, it is either
- * one of the constants defined in FrameVisitor, or for OBJECT and
- * UNINITIALIZED types, a tag and an index in the type table.
+ * one of the constants defined below, or for OBJECT and UNINITIALIZED
+ * types, a tag and an index in the type table.
*
* Output frames can contain types of any kind and with a positive or
* negative dimension (and even unassigned types, represented by 0 - which
@@ -537,7 +537,7 @@
/**
* The types that are initialized in the basic block. A constructor
* invocation on an UNINITIALIZED or UNINITIALIZED_THIS type must replace
- * <i>every occurrence</i> of this type in the local variables and in the
+ * <i>every occurence</i> of this type in the local variables and in the
* operand stack. This cannot be done during the first phase of the
* algorithm since, during this phase, the local variables and the operand
* stack are not completely computed. It is therefore necessary to store the
@@ -1446,6 +1446,7 @@
// if t is the NULL type, merge(u,t)=u, so there is no change
return false;
} else if ((t & (DIM | BASE_KIND)) == (u & (DIM | BASE_KIND))) {
+ // if t and u have the same dimension and same base kind
if ((u & BASE_KIND) == OBJECT) {
// if t is also a reference type, and if u and t have the
// same dimension merge(u,t) = dim(t) | common parent of the
@@ -1458,9 +1459,13 @@
v = OBJECT | cw.addType("java/lang/Object");
}
} else if ((t & BASE_KIND) == OBJECT || (t & DIM) != 0) {
- // if t is any other reference or array type,
- // merge(u,t)=java/lang/Object
- v = OBJECT | cw.addType("java/lang/Object");
+ // if t is any other reference or array type, the merged type
+ // is Object, or min(dim(u), dim(t)) | java/lang/Object is u
+ // and t have different array dimensions
+ int tdim = t & DIM;
+ int udim = u & DIM;
+ v = (udim != tdim ? Math.min(tdim, udim) : 0) | OBJECT
+ | cw.addType("java/lang/Object");
} else {
// if t is any other type, merge(u,t)=TOP
v = TOP;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java Wed Mar 19 11:13:35 2014 -0700
@@ -240,6 +240,7 @@
locals.add(types[i].getInternalName());
}
}
+ maxLocals = locals.size();
}
@Override
@@ -519,12 +520,12 @@
// ------------------------------------------------------------------------
private Object get(final int local) {
- maxLocals = Math.max(maxLocals, local);
+ maxLocals = Math.max(maxLocals, local + 1);
return local < locals.size() ? locals.get(local) : Opcodes.TOP;
}
private void set(final int local, final Object type) {
- maxLocals = Math.max(maxLocals, local);
+ maxLocals = Math.max(maxLocals, local + 1);
while (local >= locals.size()) {
locals.add(Opcodes.TOP);
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java Wed Mar 19 11:13:35 2014 -0700
@@ -556,6 +556,8 @@
AbstractInsnNode prev;
+ AbstractInsnNode remove;
+
InsnListIterator(int index) {
if (index == size()) {
next = null;
@@ -577,12 +579,22 @@
AbstractInsnNode result = next;
prev = result;
next = result.next;
+ remove = result;
return result;
}
public void remove() {
- InsnList.this.remove(prev);
- prev = prev.prev;
+ if (remove != null) {
+ if (remove == next) {
+ next = next.next;
+ } else {
+ prev = prev.prev;
+ }
+ InsnList.this.remove(remove);
+ remove = null;
+ } else {
+ throw new IllegalStateException();
+ }
}
public boolean hasPrevious() {
@@ -593,6 +605,7 @@
AbstractInsnNode result = prev;
next = result;
prev = result.prev;
+ remove = result;
return result;
}
@@ -619,6 +632,7 @@
public void add(Object o) {
InsnList.this.insertBefore(next, (AbstractInsnNode) o);
prev = (AbstractInsnNode) o;
+ remove = null;
}
public void set(Object o) {
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java Wed Mar 19 11:13:35 2014 -0700
@@ -404,7 +404,7 @@
* instruction of the method. The size of the returned array is
* equal to the number of instructions (and labels) of the method. A
* given frame is <tt>null</tt> if the corresponding instruction
- * cannot be reached, or if an error occurred during the analysis of
+ * cannot be reached, or if an error occured during the analysis of
* the method.
*/
public Frame<V>[] getFrames() {
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java Wed Mar 19 11:13:35 2014 -0700
@@ -66,7 +66,7 @@
* @author Bing Ran
* @author Eric Bruneton
*/
-@SuppressWarnings("serial") // JDK-implementation class
+@SuppressWarnings("serial") // implementation class
public class AnalyzerException extends Exception {
public final AbstractInsnNode node;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java Wed Mar 19 11:13:35 2014 -0700
@@ -111,7 +111,7 @@
* the bytecode instruction to be interpreted.
* @return the result of the interpretation of the given instruction.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V newOperation(AbstractInsnNode insn)
throws AnalyzerException;
@@ -130,7 +130,7 @@
* @return the result of the interpretation of the given instruction. The
* returned value must be <tt>equal</tt> to the given value.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V copyOperation(AbstractInsnNode insn, V value)
throws AnalyzerException;
@@ -151,7 +151,7 @@
* the argument of the instruction to be interpreted.
* @return the result of the interpretation of the given instruction.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V unaryOperation(AbstractInsnNode insn, V value)
throws AnalyzerException;
@@ -175,7 +175,7 @@
* the second argument of the instruction to be interpreted.
* @return the result of the interpretation of the given instruction.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V binaryOperation(AbstractInsnNode insn, V value1, V value2)
throws AnalyzerException;
@@ -196,7 +196,7 @@
* the third argument of the instruction to be interpreted.
* @return the result of the interpretation of the given instruction.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V ternaryOperation(AbstractInsnNode insn, V value1,
V value2, V value3) throws AnalyzerException;
@@ -214,7 +214,7 @@
* the arguments of the instruction to be interpreted.
* @return the result of the interpretation of the given instruction.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract V naryOperation(AbstractInsnNode insn,
List<? extends V> values) throws AnalyzerException;
@@ -232,7 +232,7 @@
* @param expected
* the expected return type of the analyzed method.
* @throws AnalyzerException
- * if an error occurred during the interpretation.
+ * if an error occured during the interpretation.
*/
public abstract void returnOperation(AbstractInsnNode insn, V value,
V expected) throws AnalyzerException;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java Wed Mar 19 11:13:35 2014 -0700
@@ -99,7 +99,7 @@
}
if (value instanceof Type) {
int sort = ((Type) value).getSort();
- if (sort != Type.OBJECT && sort != Type.ARRAY) {
+ if (sort == Type.METHOD) {
throw new IllegalArgumentException("Invalid annotation value");
}
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java Wed Mar 19 11:13:35 2014 -0700
@@ -166,6 +166,11 @@
*/
protected Map<Label, String> labelNames;
+ /**
+ * Class access flags
+ */
+ private int access;
+
private int valueNumber = 0;
/**
@@ -245,6 +250,7 @@
public void visit(final int version, final int access, final String name,
final String signature, final String superName,
final String[] interfaces) {
+ this.access = access;
int major = version & 0xFFFF;
int minor = version >>> 16;
buf.setLength(0);
@@ -447,6 +453,11 @@
if ((access & Opcodes.ACC_BRIDGE) != 0) {
buf.append("bridge ");
}
+ if ((this.access & Opcodes.ACC_INTERFACE) != 0
+ && (access & Opcodes.ACC_ABSTRACT) == 0
+ && (access & Opcodes.ACC_STATIC) == 0) {
+ buf.append("default ");
+ }
buf.append(name);
appendDescriptor(METHOD_DESCRIPTOR, desc);
@@ -856,7 +867,6 @@
appendDescriptor(INTERNAL_NAME, owner);
buf.append('.').append(name).append(' ');
appendDescriptor(METHOD_DESCRIPTOR, desc);
- buf.append(' ').append(itf ? "itf" : "");
buf.append('\n');
text.add(buf.toString());
}
@@ -869,26 +879,35 @@
buf.append(name);
appendDescriptor(METHOD_DESCRIPTOR, desc);
buf.append(" [");
+ buf.append('\n');
+ buf.append(tab3);
appendHandle(bsm);
+ buf.append('\n');
buf.append(tab3).append("// arguments:");
if (bsmArgs.length == 0) {
buf.append(" none");
} else {
- buf.append('\n').append(tab3);
+ buf.append('\n');
for (int i = 0; i < bsmArgs.length; i++) {
+ buf.append(tab3);
Object cst = bsmArgs[i];
if (cst instanceof String) {
Printer.appendString(buf, (String) cst);
} else if (cst instanceof Type) {
- buf.append(((Type) cst).getDescriptor()).append(".class");
+ Type type = (Type) cst;
+ if(type.getSort() == Type.METHOD){
+ appendDescriptor(METHOD_DESCRIPTOR, type.getDescriptor());
+ } else {
+ buf.append(type.getDescriptor()).append(".class");
+ }
} else if (cst instanceof Handle) {
appendHandle((Handle) cst);
} else {
buf.append(cst);
}
- buf.append(", ");
+ buf.append(", \n");
}
- buf.setLength(buf.length() - 2);
+ buf.setLength(buf.length() - 3);
}
buf.append('\n');
buf.append(tab2).append("]\n");
@@ -1234,10 +1253,10 @@
* a handle, non null.
*/
protected void appendHandle(final Handle h) {
- buf.append('\n').append(tab3);
int tag = h.getTag();
buf.append("// handle kind 0x").append(Integer.toHexString(tag))
.append(" : ");
+ boolean isMethodHandle = false;
switch (tag) {
case Opcodes.H_GETFIELD:
buf.append("GETFIELD");
@@ -1253,18 +1272,23 @@
break;
case Opcodes.H_INVOKEINTERFACE:
buf.append("INVOKEINTERFACE");
+ isMethodHandle = true;
break;
case Opcodes.H_INVOKESPECIAL:
buf.append("INVOKESPECIAL");
+ isMethodHandle = true;
break;
case Opcodes.H_INVOKESTATIC:
buf.append("INVOKESTATIC");
+ isMethodHandle = true;
break;
case Opcodes.H_INVOKEVIRTUAL:
buf.append("INVOKEVIRTUAL");
+ isMethodHandle = true;
break;
case Opcodes.H_NEWINVOKESPECIAL:
buf.append("NEWINVOKESPECIAL");
+ isMethodHandle = true;
break;
}
buf.append('\n');
@@ -1272,9 +1296,13 @@
appendDescriptor(INTERNAL_NAME, h.getOwner());
buf.append('.');
buf.append(h.getName());
- buf.append('(');
+ if(!isMethodHandle){
+ buf.append('(');
+ }
appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
- buf.append(')').append('\n');
+ if(!isMethodHandle){
+ buf.append(')');
+ }
}
/**
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/version.txt Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/version.txt Wed Mar 19 11:13:35 2014 -0700
@@ -1,12 +1,12 @@
Path: .
-Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/ASM_5_0_BETA
-URL: svn://svn.forge.objectweb.org/svnroot/asm/trunk/asm
-Repository Root: svn://svn.forge.objectweb.org/svnroot/asm
+Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-03-12
+URL: file:///svnroot/asm/trunk/asm
+Repository Root: file:///svnroot/asm
Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9
-Revision: 1700
+Revision: 1721
Node Kind: directory
Schedule: normal
Last Changed Author: ebruneton
-Last Changed Rev: 1700
-Last Changed Date: 2013-10-29 20:22:52 +0100 (Tue, 29 Oct 2013)
+Last Changed Rev: 1721
+Last Changed Date: 2014-03-02 17:25:35 +0100 (Sun, 02 Mar 2014)
--- a/jdk/src/share/classes/sun/security/krb5/KrbApReq.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/sun/security/krb5/KrbApReq.java Wed Mar 19 11:13:35 2014 -0700
@@ -284,7 +284,7 @@
if (dkey == null) {
throw new KrbException(Krb5.API_INVALID_ARG,
- "Cannot find key of appropriate type to decrypt AP REP - " +
+ "Cannot find key of appropriate type to decrypt AP-REQ - " +
EType.toString(encPartKeyType));
}
@@ -380,7 +380,7 @@
/**
* Returns the credentials that are contained in the ticket that
- * is part of this this AP-REP.
+ * is part of this AP-REQ.
*/
public Credentials getCreds() {
return creds;
--- a/jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java Wed Mar 19 11:13:35 2014 -0700
@@ -94,9 +94,6 @@
X509Certificate firstCert = certList.get(0);
// check trusted certificate's subject
selector.setSubject(firstCert.getIssuerX500Principal());
- // check the validity period
- selector.setValidityPeriod(firstCert.getNotBefore(),
- firstCert.getNotAfter());
/*
* Facilitate certification path construction with authority
* key identifier and subject key identifier.
--- a/jdk/src/share/classes/sun/security/util/DerInputStream.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/sun/security/util/DerInputStream.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -167,7 +167,7 @@
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
- return buffer.getInteger(getLength(buffer));
+ return buffer.getInteger(getDefiniteLength(buffer));
}
/**
@@ -179,7 +179,7 @@
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
- return buffer.getBigInteger(getLength(buffer), false);
+ return buffer.getBigInteger(getDefiniteLength(buffer), false);
}
/**
@@ -193,7 +193,7 @@
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
- return buffer.getBigInteger(getLength(buffer), true);
+ return buffer.getBigInteger(getDefiniteLength(buffer), true);
}
/**
@@ -205,7 +205,7 @@
if (buffer.read() != DerValue.tag_Enumerated) {
throw new IOException("DER input, Enumerated tag error");
}
- return buffer.getInteger(getLength(buffer));
+ return buffer.getInteger(getDefiniteLength(buffer));
}
/**
@@ -216,7 +216,7 @@
if (buffer.read() != DerValue.tag_BitString)
throw new IOException("DER input not an bit string");
- return buffer.getBitString(getLength(buffer));
+ return buffer.getBitString(getDefiniteLength(buffer));
}
/**
@@ -224,21 +224,32 @@
* not be byte-aligned.
*/
public BitArray getUnalignedBitString() throws IOException {
- if (buffer.read() != DerValue.tag_BitString)
+ if (buffer.read() != DerValue.tag_BitString) {
throw new IOException("DER input not a bit string");
+ }
- int length = getLength(buffer) - 1;
+ int length = getDefiniteLength(buffer);
+
+ if (length == 0) {
+ return new BitArray(0);
+ }
/*
* First byte = number of excess bits in the last octet of the
* representation.
*/
+ length--;
int validBits = length*8 - buffer.read();
+ if (validBits < 0) {
+ throw new IOException("valid bits of bit string invalid");
+ }
byte[] repn = new byte[length];
- if ((length != 0) && (buffer.read(repn) != length))
+ if ((length != 0) && (buffer.read(repn) != length)) {
throw new IOException("short read of DER bit string");
+ }
+
return new BitArray(validBits, repn);
}
@@ -249,7 +260,7 @@
if (buffer.read() != DerValue.tag_OctetString)
throw new IOException("DER input not an octet string");
- int length = getLength(buffer);
+ int length = getDefiniteLength(buffer);
byte[] retval = new byte[length];
if ((length != 0) && (buffer.read(retval) != length))
throw new IOException("short read of DER octet string");
@@ -363,7 +374,7 @@
if (tag != buffer.read())
throw new IOException("Indefinite length encoding" +
" not supported");
- len = DerInputStream.getLength(buffer);
+ len = DerInputStream.getDefiniteLength(buffer);
}
if (len == 0)
@@ -480,7 +491,7 @@
throw new IOException("DER input not a " +
stringName + " string");
- int length = getLength(buffer);
+ int length = getDefiniteLength(buffer);
byte[] retval = new byte[length];
if ((length != 0) && (buffer.read(retval) != length))
throw new IOException("short read of DER " +
@@ -495,7 +506,7 @@
public Date getUTCTime() throws IOException {
if (buffer.read() != DerValue.tag_UtcTime)
throw new IOException("DER input, UTCtime tag invalid ");
- return buffer.getUTCTime(getLength(buffer));
+ return buffer.getUTCTime(getDefiniteLength(buffer));
}
/**
@@ -504,7 +515,7 @@
public Date getGeneralizedTime() throws IOException {
if (buffer.read() != DerValue.tag_GeneralizedTime)
throw new IOException("DER input, GeneralizedTime tag invalid ");
- return buffer.getGeneralizedTime(getLength(buffer));
+ return buffer.getGeneralizedTime(getDefiniteLength(buffer));
}
/*
@@ -570,6 +581,24 @@
return value;
}
+ int getDefiniteLength() throws IOException {
+ return getDefiniteLength(buffer);
+ }
+
+ /*
+ * Get a length from the input stream.
+ *
+ * @return the length
+ * @exception IOException on parsing error or if indefinite length found.
+ */
+ static int getDefiniteLength(InputStream in) throws IOException {
+ int len = getLength(in);
+ if (len < 0) {
+ throw new IOException("Indefinite length encoding not supported");
+ }
+ return len;
+ }
+
/**
* Mark the current position in the buffer, so that
* a later call to <code>reset</code> will return here.
--- a/jdk/src/share/classes/sun/security/util/DerValue.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/sun/security/util/DerValue.java Wed Mar 19 11:13:35 2014 -0700
@@ -265,7 +265,7 @@
if (tag != inbuf.read())
throw new IOException
("Indefinite length encoding not supported");
- length = DerInputStream.getLength(inbuf);
+ length = DerInputStream.getDefiniteLength(inbuf);
buffer = inbuf.dup();
buffer.truncate(length);
data = new DerInputStream(buffer);
@@ -377,7 +377,7 @@
if (tag != in.read())
throw new IOException
("Indefinite length encoding not supported");
- length = DerInputStream.getLength(in);
+ length = DerInputStream.getDefiniteLength(in);
}
if (fullyBuffered && in.available() != length)
--- a/jdk/src/share/classes/sun/security/util/ObjectIdentifier.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/share/classes/sun/security/util/ObjectIdentifier.java Wed Mar 19 11:13:35 2014 -0700
@@ -255,7 +255,7 @@
+ " (tag = " + type_id + ")"
);
- encoding = new byte[in.getLength()];
+ encoding = new byte[in.getDefiniteLength()];
in.getBytes(encoding);
check(encoding);
}
--- a/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c Wed Mar 19 11:13:35 2014 -0700
@@ -127,12 +127,13 @@
char regserver[MAX_STR_LEN];
char override[MAX_STR_LEN];
char *s, *s2;
+ char *ctx = NULL;
int pport = 0;
int defport = 0;
char *phost;
/**
- * Let's opem the Registry entry. We'll check a few values in it:
+ * Let's open the Registry entry. We'll check a few values in it:
*
* - ProxyEnable: 0 means no proxy, 1 means use the proxy
* - ProxyServer: a string that can take 2 forms:
@@ -177,7 +178,7 @@
* The semicolons (;) separated entries have to be matched with the
* the beginning of the hostname.
*/
- s = strtok(override, "; ");
+ s = strtok_s(override, "; ", &ctx);
urlhost = (*env)->GetStringUTFChars(env, host, &isCopy);
if (urlhost == NULL) {
if (!(*env)->ExceptionCheck(env))
@@ -194,7 +195,7 @@
(*env)->ReleaseStringUTFChars(env, host, urlhost);
goto noproxy;
}
- s = strtok(NULL, "; ");
+ s = strtok_s(NULL, "; ", &ctx);
}
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, host, urlhost);
--- a/jdk/test/ProblemList.txt Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/ProblemList.txt Wed Mar 19 11:13:35 2014 -0700
@@ -221,15 +221,6 @@
java/security/KeyPairGenerator/SolarisShortDSA.java solaris-all
sun/security/tools/keytool/standard.sh solaris-all
-# 8000439: NPG: REGRESSION : sun/security/krb5/auto/MaxRetries.java fails with timeout
-sun/security/krb5/auto/MaxRetries.java solaris-sparcv9
-
-# 8006690: sun/security/krb5/auto/BadKdc1.java fails intermittently
-sun/security/krb5/auto/BadKdc1.java solaris-sparcv9
-sun/security/krb5/auto/BadKdc2.java solaris-sparcv9
-sun/security/krb5/auto/BadKdc3.java solaris-sparcv9
-sun/security/krb5/auto/BadKdc4.java solaris-sparcv9
-
############################################################################
# jdk_sound
@@ -270,6 +261,13 @@
############################################################################
+# jdk_instrument
+
+# 8037082
+java/lang/instrument/NativeMethodPrefixAgent.java generic-all
+
+############################################################################
+
# svc_tools
# 8031482
--- a/jdk/test/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -24,12 +24,9 @@
/*
* @test
* @bug 0000000
- * @ignore run main/timeout=900 PerformanceTest
- * @summary PerformanceTest
+ * @summary This test checks performance of various ciphers.
* @author Jan Luehe
- *
- * ignore since this test exists for performance
- * purpose and can be run separately if needed.
+ * @run main/manual PerformanceTest
*/
import java.security.*;
import java.security.spec.*;
--- a/jdk/test/com/sun/security/auth/callback/TextCallbackHandler/Default.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/security/auth/callback/TextCallbackHandler/Default.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,8 +25,7 @@
* @test
* @bug 4470717
* @summary fix default handling and other misc
- *
- * @ignore run these by hand
+ * @run main/manual Default
*/
import com.sun.security.auth.callback.TextCallbackHandler;
--- a/jdk/test/com/sun/security/auth/callback/TextCallbackHandler/Password.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/security/auth/callback/TextCallbackHandler/Password.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -25,7 +25,7 @@
* @test
* @bug 6825240
* @summary Password.readPassword() echos the input when System.Console is null
- * @ignore run these by hand
+ * @run main/manual Password
*/
import com.sun.security.auth.callback.TextCallbackHandler;
--- a/jdk/test/com/sun/security/sasl/gsskerb/AuthOnly.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/security/sasl/gsskerb/AuthOnly.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,11 +25,14 @@
* @test
* @bug 4634892
* @summary Ensure authentication via GSS-API/Kerberos v5 works.
- * @ignore see runwjaas.csh for instructions for how to run this test
+ * @run main/manual AuthOnly
*/
+
/*
- * Can set logging to FINEST to view exchange.
+ * Set logging to FINEST to view exchange.
+ * See runwjaas.csh for instructions for how to run this test.
*/
+
import javax.security.sasl.*;
import javax.security.auth.callback.*;
import java.security.*;
--- a/jdk/test/com/sun/security/sasl/gsskerb/ConfSecurityLayer.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/security/sasl/gsskerb/ConfSecurityLayer.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -25,12 +25,15 @@
* @test
* @bug 5014493
* @summary SaslServer.wrap throws NullPointerException when security
- * layer negotiated
- * @ignore see run-conf-wjaas.csh for instructions for how to run this test
+ * layer negotiated.
+ * @run main/manual ConfSecurityLayer
*/
+
/*
- * Can set logging to FINEST to view exchange.
+ * Set logging to FINEST to view exchange.
+ * See run-conf-wjaas.csh for instructions for how to run this test.
*/
+
import javax.security.sasl.*;
import javax.security.auth.callback.*;
import java.security.*;
--- a/jdk/test/com/sun/security/sasl/gsskerb/NoSecurityLayer.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/com/sun/security/sasl/gsskerb/NoSecurityLayer.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,13 +24,16 @@
/*
* @test
* @bug 4873552
- * @summary GSS-API/krb5 SASL mechanism should throw IllegalStateException for auth-only
-
- * @ignore see run-nosec-wjaas.csh for instructions for how to run this test
+ * @summary GSS-API/krb5 SASL mechanism should throw IllegalStateException
+ * for auth-only
+ * @run main/manual NoSecurityLayer
*/
+
/*
- * Can set logging to FINEST to view exchange.
+ * Set logging to FINEST to view exchange.
+ * See run-nosec-wjaas.csh for instructions for how to run this test.
*/
+
import javax.security.sasl.*;
import javax.security.auth.callback.*;
import java.security.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/SequenceInputStream/LotsOfStreams.java Wed Mar 19 11:13:35 2014 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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 7011804
+ * @summary SequenceInputStream#read() was implemented recursivly,
+ * which may cause stack overflow
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.SequenceInputStream;
+import java.util.Enumeration;
+
+public class LotsOfStreams {
+
+ static final int MAX_SUBSTREAMS = 32000;
+
+ public static void main(String[] argv) throws Exception {
+ try (InputStream stream =
+ new SequenceInputStream(new LOSEnumeration())) {
+ stream.read();
+ }
+ try (InputStream stream =
+ new SequenceInputStream(new LOSEnumeration())) {
+ byte[] b = new byte[1];
+ stream.read(b, 0, 1);
+ }
+ }
+
+ static class LOSEnumeration
+ implements Enumeration<InputStream> {
+
+ private static InputStream inputStream =
+ new ByteArrayInputStream(new byte[0]);
+ private int left = MAX_SUBSTREAMS;
+
+ public boolean hasMoreElements() {
+ return (left > 0);
+ }
+ public InputStream nextElement() {
+ left--;
+ return inputStream;
+ }
+ }
+}
--- a/jdk/test/java/lang/ClassLoader/Assert.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/lang/ClassLoader/Assert.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -24,7 +24,8 @@
/*
* @test
* @bug 4290640 4785473
- * @run shell/timeout=300 Assert.sh
+ * @build package1.Class1 package2.Class2 package1.package3.Class3 Assert
+ * @run main/othervm Assert
* @summary Test the assertion facility
* @author Mike McCloskey
*/
--- a/jdk/test/java/lang/ClassLoader/Assert.sh Wed Mar 19 21:05:28 2014 +0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-
-OS=`uname -s`
-case "$OS" in
- SunOS | Linux | Darwin )
- FS="/"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Windows* | CYGWIN* )
- CHMOD="chmod"
- ;;
- * )
- echo "Unrecognized system!"
- exit 1;
- ;;
-esac
-
-if [ "${TESTSRC}" = "" ]
-then
- echo "TESTSRC not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTSRC=${TESTSRC}"
-if [ "${TESTJAVA}" = "" ]
-then
- echo "TESTJAVA not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTJAVA=${TESTJAVA}"
-if [ "${COMPILEJAVA}" = "" ]; then
- COMPILEJAVA="${TESTJAVA}"
-fi
-echo "COMPILEJAVA=${COMPILEJAVA}"
-if [ "${TESTCLASSES}" = "" ]
-then
- echo "TESTCLASSES not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTCLASSES=${TESTCLASSES}"
-echo "CLASSPATH=${CLASSPATH}"
-
-cp ${TESTSRC}/Assert.java .
-cp -R ${TESTSRC}/package1 .
-cp -R ${TESTSRC}/package2 .
-${CHMOD} -R u+w *
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Assert.java
-
-${TESTJAVA}/bin/java ${TESTVMOPTS} Assert
-
-result=$?
-if [ $result -eq 0 ]
-then
- echo "Passed"
-else
- echo "Failed"
-fi
-exit $result
-
-
--- a/jdk/test/java/lang/ProcessBuilder/CloseRace.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/lang/ProcessBuilder/CloseRace.java Wed Mar 19 11:13:35 2014 -0700
@@ -33,6 +33,8 @@
import java.io.*;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
public class CloseRace {
private static final String BIG_FILE = "bigfile";
@@ -43,6 +45,9 @@
private static final int testDurationSeconds
= Integer.getInteger("test.duration", 600);
+ private static final CountDownLatch threadsStarted
+ = new CountDownLatch(2);
+
static boolean fdInUse(int i) {
return new File("/proc/self/fd/" + i).exists();
}
@@ -61,6 +66,18 @@
return count;
}
+ static void dumpAllStacks() {
+ System.err.println("Start of dump");
+ final Map<Thread, StackTraceElement[]> allStackTraces
+ = Thread.getAllStackTraces();
+ for (Thread thread : allStackTraces.keySet()) {
+ System.err.println("Thread " + thread.getName());
+ for (StackTraceElement element : allStackTraces.get(thread))
+ System.err.println("\t" + element);
+ }
+ System.err.println("End of dump");
+ }
+
public static void main(String args[]) throws Exception {
if (!(new File("/proc/self/fd").isDirectory()))
return;
@@ -84,26 +101,41 @@
for (Thread thread : threads)
thread.start();
+ threadsStarted.await();
Thread.sleep(testDurationSeconds * 1000);
for (Thread thread : threads)
thread.interrupt();
- for (Thread thread : threads)
- thread.join();
+ for (Thread thread : threads) {
+ thread.join(10_000);
+ if (thread.isAlive()) {
+ dumpAllStacks();
+ throw new Error("At least one child thread ("
+ + thread.getName()
+ + ") failed to finish gracefully");
+ }
+ }
}
static class OpenLoop implements Runnable {
public void run() {
+ threadsStarted.countDown();
while (!Thread.interrupted()) {
try {
// wait for ExecLoop to finish creating process
- do {} while (count(procFDsInUse()) != 3);
+ do {
+ if (Thread.interrupted())
+ return;
+ } while (count(procFDsInUse()) != 3);
List<InputStream> iss = new ArrayList<>(4);
// eat up three "holes" (closed ends of pipe fd pairs)
for (int i = 0; i < 3; i++)
iss.add(new FileInputStream(BIG_FILE));
- do {} while (count(procFDsInUse()) == procFDs.length);
+ do {
+ if (Thread.interrupted())
+ return;
+ } while (count(procFDsInUse()) == procFDs.length);
// hopefully this will racily occupy empty fd slot
iss.add(new FileInputStream(BIG_FILE));
Thread.sleep(1); // Widen race window
@@ -120,11 +152,15 @@
static class ExecLoop implements Runnable {
public void run() {
+ threadsStarted.countDown();
ProcessBuilder builder = new ProcessBuilder("/bin/true");
while (!Thread.interrupted()) {
try {
// wait for OpenLoop to finish
- do {} while (count(procFDsInUse()) > 0);
+ do {
+ if (Thread.interrupted())
+ return;
+ } while (count(procFDsInUse()) > 0);
Process process = builder.start();
InputStream is = process.getInputStream();
process.waitFor();
--- a/jdk/test/java/security/Policy/Root/Root.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/security/Policy/Root/Root.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -25,12 +25,13 @@
*
* @bug 4619757
* @summary User Policy Setting is not recognized on Netscape 6
- * when invoked as root
- * @ignore - must run test as root
- *
- * place Root.policy in the root home directory (/), as /.java.policy
- * run this test as root:
- * java Root
+ * when invoked as root.
+ * @run main/manual Root
+ */
+
+/*
+ * Place Root.policy in the root home directory (/),
+ * as /.java.policy and run as test as root user.
*/
import java.security.*;
--- a/jdk/test/java/security/cert/X509Certificate/X509BadCertificate.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/security/cert/X509Certificate/X509BadCertificate.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 8028431
+ * @bug 8028431 8028591
* @summary Make sure that proper CertificateException is thrown
* when loading bad x509 certificate
* @author Artem Smotrakov
@@ -39,6 +39,7 @@
public static void main(String[] args) throws Exception {
test("bad-cert-1.pem");
+ test("bad-cert-2.pem");
}
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/X509Certificate/bad-cert-2.pem Wed Mar 19 11:13:35 2014 -0700
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIJAJYB3qu9C2kiMA0GCSqGSIb3DQEBBQUAMEoxDTALBgNV
+BAMMBFRlc3QxDTALBgNVBAsMBEphdmExDzANBgNVBAoMBk9yYWNsZTEMMAoGA1UE
+BwwDU1BCMQswCQYDVQQGEwJSVTAeFw0xMzEyMjMwNzA4MDhaFw0yMzEyMjEwNzA4
+MDhaMEoxDTALBgNVBAMMBFRlc3QxDTALBgNVBAsMBEphdmExDzANBgNVBAoMBk9y
+YWNsZTEMMAoGA1UEBwwDU1BCMQswCQYDVQQGEwJSVTCCASIwDQYJKoZIhvcNAQEB
+BQADgGEPADCCAQoCggEBAOqiCN4gFxehl547Q7/VNGbGApr+wszLdanHPucAH6Wf
+LtcRhKNUSqtBAQxEpFrTpMNEqm2GElAjiPa6m48qIjLVSvOb/9w3G/yXB8zyZbIm
+/Nfp2sT4OEaa1JSEZSpolhS4FfqYzjGQp5cn4Xn4zKjDgiceHgfLls5x2dRydQZO
+Yf91qSIioZxVHUtlo8yztkieiSaqPWt3nJ4PIwhFbsu1HVmWaYZD+nBYCKgVHqrS
+cueO98Ca4Doz73O27X1dVbQBdLS0JI7qVAG8LD388iPL8qbsOkgWPzmEQ+kLRKO4
+g7RpuwlXuwaMSh95NWaxlu4Ob6GRJQmpconYoe13+7ECAwEAAaNQME4wHQYDVR0O
+BBYEFIG8TPobXcbNbDi+zKudd9whpxoNMB8GA1UdIwQYMBaAFIG8TPobXcbNbDi+
+zKudd9whpxoNMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAynN+e7
+h+ufT5SBKN/gBuJAnF1mKIPESiipuv5KoYUGZOY8ShgYLcwY+qnbuHYFUlvq6Zns
+K4/e+x/16h32vD7dEPkNvukbvER4YJQQiN6osDfXpTPzixYftWdmtX0u8xQfwb/g
+R8DS7bazz99jVXk+jTK4yWBY+gMwEat+LyNQ5cyq8Qhi1oBKUbGRbiOts19B97fn
+Rv8TsyXN3INLGYhdVxZoD7E5tyG1ydSFmOMadulAC2epBXDHOXZnz2UWauJc0XW5
+1L/YQVri47VkdHS3tisBzELEJdLmdMDb+5tAU+lItXmTXe2/PB53WIvsEIb4t+eQ
+wY0hCj9lVJlajTQ=
+-----END CERTIFICATE-----
--- a/jdk/test/java/util/Collection/CollectionDefaults.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/util/Collection/CollectionDefaults.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -21,6 +21,7 @@
* questions.
*/
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -44,8 +45,8 @@
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.function.Function;
import java.util.function.Predicate;
-import java.util.function.Supplier;
/**
* @test
@@ -59,26 +60,25 @@
public static final Predicate<Integer> pEven = x -> 0 == x % 2;
public static final Predicate<Integer> pOdd = x -> 1 == x % 2;
- @SuppressWarnings("unchecked")
- private static final Supplier<?>[] TEST_CLASSES = {
- // Collection
- ExtendsAbstractCollection<Integer>::new,
+ private static final List<Function<Collection<Integer>, Collection<Integer>>> TEST_SUPPLIERS = Arrays.asList(
+ // Collection
+ ExtendsAbstractCollection<Integer>::new,
- // Lists
- java.util.ArrayList<Integer>::new,
- java.util.LinkedList<Integer>::new,
- java.util.Vector<Integer>::new,
- java.util.concurrent.CopyOnWriteArrayList<Integer>::new,
- ExtendsAbstractList<Integer>::new,
+ // Lists
+ java.util.ArrayList<Integer>::new,
+ java.util.LinkedList<Integer>::new,
+ java.util.Vector<Integer>::new,
+ java.util.concurrent.CopyOnWriteArrayList<Integer>::new,
+ ExtendsAbstractList<Integer>::new,
- // Sets
- java.util.HashSet<Integer>::new,
- java.util.LinkedHashSet<Integer>::new,
- java.util.TreeSet<Integer>::new,
- java.util.concurrent.ConcurrentSkipListSet<Integer>::new,
- java.util.concurrent.CopyOnWriteArraySet<Integer>::new,
- ExtendsAbstractSet<Integer>::new
- };
+ // Sets
+ java.util.HashSet<Integer>::new,
+ java.util.LinkedHashSet<Integer>::new,
+ java.util.TreeSet<Integer>::new,
+ java.util.concurrent.ConcurrentSkipListSet<Integer>::new,
+ java.util.concurrent.CopyOnWriteArraySet<Integer>::new,
+ ExtendsAbstractSet<Integer>::new
+ );
private static final int SIZE = 100;
@@ -94,7 +94,7 @@
cases.add(new Object[] { new ExtendsAbstractSet<>() });
cases.add(new Object[] { Collections.newSetFromMap(new HashMap<>()) });
- cases.add(new Object[] { Collections.newSetFromMap(new LinkedHashMap()) });
+ cases.add(new Object[] { Collections.newSetFromMap(new LinkedHashMap<>()) });
cases.add(new Object[] { Collections.newSetFromMap(new TreeMap<>()) });
cases.add(new Object[] { Collections.newSetFromMap(new ConcurrentHashMap<>()) });
cases.add(new Object[] { Collections.newSetFromMap(new ConcurrentSkipListMap<>()) });
@@ -107,24 +107,23 @@
}
@Test(dataProvider = "setProvider")
- public void testProvidedWithNull(final Set<Integer> set) throws Exception {
+ public void testProvidedWithNull(final Set<Integer> set) {
try {
set.forEach(null);
fail("expected NPE not thrown");
- } catch (NullPointerException expected) {
- ; // expected
- }
+ } catch (NullPointerException expected) { // expected
+ }
try {
set.removeIf(null);
fail("expected NPE not thrown");
- } catch (NullPointerException expected) {
- ; // expected
+ } catch (NullPointerException expected) { // expected
}
}
@Test
- public void testForEach() throws Exception {
- final CollectionSupplier<Collection<Integer>> supplier = new CollectionSupplier((Supplier<Collection<Integer>>[]) TEST_CLASSES, SIZE);
+ public void testForEach() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<Collection<Integer>> supplier = new CollectionSupplier(TEST_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<Collection<Integer>> test : supplier.get()) {
final Collection<Integer> original = test.expected;
@@ -133,8 +132,7 @@
try {
set.forEach(null);
fail("expected NPE not thrown");
- } catch (NullPointerException expected) {
- ; // expected
+ } catch (NullPointerException expected) { // expected
}
if (set instanceof Set && !((set instanceof SortedSet) || (set instanceof LinkedHashSet))) {
CollectionAsserts.assertContentsUnordered(set, original, test.toString());
@@ -155,8 +153,9 @@
}
@Test
- public void testRemoveIf() throws Exception {
- final CollectionSupplier<Collection<Integer>> supplier = new CollectionSupplier((Supplier<Collection<Integer>>[]) TEST_CLASSES, SIZE);
+ public void testRemoveIf() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<Collection<Integer>> supplier = new CollectionSupplier(TEST_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<Collection<Integer>> test : supplier.get()) {
final Collection<Integer> original = test.expected;
final Collection<Integer> set = test.collection;
@@ -164,8 +163,7 @@
try {
set.removeIf(null);
fail("expected NPE not thrown");
- } catch (NullPointerException expected) {
- ; // expected
+ } catch (NullPointerException expected) { // expected
}
if (set instanceof Set && !((set instanceof SortedSet) || (set instanceof LinkedHashSet))) {
CollectionAsserts.assertContentsUnordered(set, original, test.toString());
--- a/jdk/test/java/util/Collection/testlibrary/CollectionSupplier.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/util/Collection/testlibrary/CollectionSupplier.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -25,6 +25,7 @@
import java.lang.Integer;
import java.lang.Iterable;
import java.lang.Override;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
@@ -36,6 +37,7 @@
import java.util.Collection;
import java.util.Collections;
+import java.util.function.Function;
import java.util.function.Supplier;
/**
@@ -44,20 +46,24 @@
*/
public final class CollectionSupplier<C extends Collection<Integer>> implements Supplier<Iterable<CollectionSupplier.TestCase<C>>> {
- private final Supplier<C>[] classes;
+ private final List<Function<Collection<Integer>, C>> suppliers;
private final int size;
/**
* A Collection test case.
*/
public static final class TestCase<C extends Collection<Integer>> {
-
/**
* The name of the test case.
*/
public final String name;
/**
+ * The supplier of a collection
+ */
+ public Function<Collection<Integer>, C> supplier;
+
+ /**
* Unmodifiable reference collection, useful for comparisons.
*/
public final List<Integer> expected;
@@ -71,11 +77,11 @@
* Create a Collection test case.
*
* @param name name of the test case
- * @param expected reference collection
* @param collection the modifiable test collection
*/
- public TestCase(String name, C collection) {
+ public TestCase(String name, Function<Collection<Integer>, C> supplier, C collection) {
this.name = name;
+ this.supplier = supplier;
this.expected = Collections.unmodifiableList(
Arrays.asList(collection.toArray(new Integer[0])));
this.collection = collection;
@@ -107,54 +113,52 @@
}
/**
- * Create a {@code Supplier} that creates instances of specified collection
- * classes of specified length.
+ * Create a {@code CollectionSupplier} that creates instances of specified
+ * collection suppliers of the specified size.
*
- * @param classNames class names that implement {@code Collection}
+ * @param suppliers the suppliers names that supply {@code Collection}
+ * instances
* @param size the desired size of each collection
*/
- public CollectionSupplier(Supplier<C>[] classes, int size) {
- this.classes = Arrays.copyOf(classes, classes.length);
+ public CollectionSupplier(List<Function<Collection<Integer>, C>> suppliers, int size) {
+ this.suppliers = suppliers;
this.size = size;
}
@Override
public Iterable<TestCase<C>> get() {
final Collection<TestCase<C>> cases = new LinkedList<>();
- for (final Supplier<C> type : classes) {
+ for (final Function<Collection<Integer>, C> supplier : suppliers)
try {
- final Collection<Integer> empty = type.get();
- cases.add(new TestCase("empty", empty));
+ cases.add(new TestCase<>("empty", supplier, supplier.apply(Collections.emptyList())));
- final Collection<Integer> single = type.get();
- single.add(42);
- cases.add(new TestCase("single", single));
+ cases.add(new TestCase<>("single", supplier, supplier.apply(Arrays.asList(42))));
- final Collection<Integer> regular = type.get();
+ final Collection<Integer> regular = new ArrayList<>();
for (int i = 0; i < size; i++) {
regular.add(i);
}
- cases.add(new TestCase("regular", regular));
+ cases.add(new TestCase<>("regular", supplier, supplier.apply(regular)));
- final Collection<Integer> reverse = type.get();
+ final Collection<Integer> reverse = new ArrayList<>();
for (int i = size; i >= 0; i--) {
reverse.add(i);
}
- cases.add(new TestCase("reverse", reverse));
+ cases.add(new TestCase<>("reverse", supplier, supplier.apply(reverse)));
- final Collection<Integer> odds = type.get();
+ final Collection<Integer> odds = new ArrayList<>();
for (int i = 0; i < size; i++) {
odds.add((i * 2) + 1);
}
- cases.add(new TestCase("odds", odds));
+ cases.add(new TestCase<>("odds", supplier, supplier.apply(odds)));
- final Collection<Integer> evens = type.get();
+ final Collection<Integer> evens = new ArrayList<>();
for (int i = 0; i < size; i++) {
evens.add(i * 2);
}
- cases.add(new TestCase("evens", evens));
+ cases.add(new TestCase<>("evens", supplier, supplier.apply(evens)));
- final Collection<Integer> fibonacci = type.get();
+ final Collection<Integer> fibonacci = new ArrayList<>();
int prev2 = 0;
int prev1 = 1;
for (int i = 0; i < size; i++) {
@@ -166,58 +170,62 @@
prev2 = prev1;
prev1 = n;
}
- cases.add(new TestCase("fibonacci", fibonacci));
+ cases.add(new TestCase<>("fibonacci", supplier, supplier.apply(fibonacci)));
+
- // variants where the size of the backing storage != reported size
+ boolean isStructurallyModifiable = false;
+ try {
+ C t = supplier.apply(Collections.emptyList());
+ t.add(1);
+ isStructurallyModifiable = true;
+ } catch (UnsupportedOperationException e) { }
+
+ if (!isStructurallyModifiable)
+ continue;
+
+
+ // variants where the size of the backing storage != reported size
// created by removing half of the elements
- final Collection<Integer> emptyWithSlack = type.get();
+ final C emptyWithSlack = supplier.apply(Collections.emptyList());
emptyWithSlack.add(42);
assertTrue(emptyWithSlack.remove(42));
- cases.add(new TestCase("emptyWithSlack", emptyWithSlack));
+ cases.add(new TestCase<>("emptyWithSlack", supplier, emptyWithSlack));
- final Collection<Integer> singleWithSlack = type.get();
+ final C singleWithSlack = supplier.apply(Collections.emptyList());
singleWithSlack.add(42);
singleWithSlack.add(43);
assertTrue(singleWithSlack.remove(43));
- cases.add(new TestCase("singleWithSlack", singleWithSlack));
+ cases.add(new TestCase<>("singleWithSlack", supplier, singleWithSlack));
- final Collection<Integer> regularWithSlack = type.get();
+ final C regularWithSlack = supplier.apply(Collections.emptyList());
for (int i = 0; i < (2 * size); i++) {
regularWithSlack.add(i);
}
- assertTrue(regularWithSlack.removeIf((x) -> {
- return x >= size;
- }));
- cases.add(new TestCase("regularWithSlack", regularWithSlack));
+ assertTrue(regularWithSlack.removeIf(x -> x < size));
+ cases.add(new TestCase<>("regularWithSlack", supplier, regularWithSlack));
- final Collection<Integer> reverseWithSlack = type.get();
+ final C reverseWithSlack = supplier.apply(Collections.emptyList());
for (int i = 2 * size; i >= 0; i--) {
reverseWithSlack.add(i);
}
- assertTrue(reverseWithSlack.removeIf((x) -> {
- return x < size;
- }));
- cases.add(new TestCase("reverseWithSlack", reverseWithSlack));
+ assertTrue(reverseWithSlack.removeIf(x -> x < size));
+ cases.add(new TestCase<>("reverseWithSlack", supplier, reverseWithSlack));
- final Collection<Integer> oddsWithSlack = type.get();
+ final C oddsWithSlack = supplier.apply(Collections.emptyList());
for (int i = 0; i < 2 * size; i++) {
oddsWithSlack.add((i * 2) + 1);
}
- assertTrue(oddsWithSlack.removeIf((x) -> {
- return x >= size;
- }));
- cases.add(new TestCase("oddsWithSlack", oddsWithSlack));
+ assertTrue(oddsWithSlack.removeIf(x -> x >= size));
+ cases.add(new TestCase<>("oddsWithSlack", supplier, oddsWithSlack));
- final Collection<Integer> evensWithSlack = type.get();
+ final C evensWithSlack = supplier.apply(Collections.emptyList());
for (int i = 0; i < 2 * size; i++) {
evensWithSlack.add(i * 2);
}
- assertTrue(evensWithSlack.removeIf((x) -> {
- return x >= size;
- }));
- cases.add(new TestCase("evensWithSlack", evensWithSlack));
+ assertTrue(evensWithSlack.removeIf(x -> x >= size));
+ cases.add(new TestCase<>("evensWithSlack", supplier, evensWithSlack));
- final Collection<Integer> fibonacciWithSlack = type.get();
+ final C fibonacciWithSlack = supplier.apply(Collections.emptyList());
prev2 = 0;
prev1 = 1;
for (int i = 0; i < size; i++) {
@@ -229,15 +237,12 @@
prev2 = prev1;
prev1 = n;
}
- assertTrue(fibonacciWithSlack.removeIf((x) -> {
- return x < 20;
- }));
- cases.add(new TestCase("fibonacciWithSlack",
- fibonacciWithSlack));
- } catch (Exception failed) {
+ assertTrue(fibonacciWithSlack.removeIf(x -> x < 20));
+ cases.add(new TestCase<>("fibonacciWithSlack", supplier, fibonacciWithSlack));
+ }
+ catch (Exception failed) {
throw new TestException(failed);
}
- }
return cases;
}
--- a/jdk/test/java/util/List/ListDefaults.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/java/util/List/ListDefaults.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -43,31 +44,45 @@
import java.lang.reflect.Constructor;
import java.util.ConcurrentModificationException;
+import java.util.function.Consumer;
+import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
/**
* @test
* @summary Unit tests for extension methods on List
- * @bug 8023367
+ * @bug 8023367 8037106
* @library ../Collection/testlibrary
* @build CollectionAsserts CollectionSupplier ExtendsAbstractList
* @run testng ListDefaults
*/
public class ListDefaults {
- private static final Supplier<?>[] LIST_CLASSES = {
- java.util.ArrayList::new,
- java.util.LinkedList::new,
- java.util.Vector::new,
- java.util.concurrent.CopyOnWriteArrayList::new,
- ExtendsAbstractList::new
- };
+ // Suppliers of lists that can support structural modifications
+ private static final List<Function<Collection, List>> LIST_STRUCT_MOD_SUPPLIERS = Arrays.asList(
+ java.util.ArrayList::new,
+ java.util.LinkedList::new,
+ java.util.Vector::new,
+ java.util.concurrent.CopyOnWriteArrayList::new,
+ ExtendsAbstractList::new
+ );
- private static final Supplier<?>[] LIST_CME_CLASSES = {
- java.util.ArrayList::new,
- java.util.Vector::new
- };
+ // Suppliers of lists that can support in place modifications
+ private static final List<Function<Collection, List>> LIST_SUPPLIERS = Arrays.asList(
+ java.util.ArrayList::new,
+ java.util.LinkedList::new,
+ java.util.Vector::new,
+ java.util.concurrent.CopyOnWriteArrayList::new,
+ ExtendsAbstractList::new,
+ c -> Arrays.asList(c.toArray())
+ );
+
+ // Suppliers of lists supporting CMEs
+ private static final List<Function<Collection, List>> LIST_CME_SUPPLIERS = Arrays.asList(
+ java.util.ArrayList::new,
+ java.util.Vector::new
+ );
private static final Predicate<Integer> pEven = x -> 0 == x % 2;
private static final Predicate<Integer> pOdd = x -> 1 == x % 2;
@@ -83,17 +98,13 @@
private static final int SUBLIST_TO = SIZE - 5;
private static final int SUBLIST_SIZE = SUBLIST_TO - SUBLIST_FROM;
- private static interface Callback {
- void call(List<Integer> list);
- }
-
// call the callback for each recursive subList
- private void trimmedSubList(final List<Integer> list, final Callback callback) {
+ private void trimmedSubList(final List<Integer> list, final Consumer<List<Integer>> callback) {
int size = list.size();
if (size > 1) {
// trim 1 element from both ends
final List<Integer> subList = list.subList(1, size - 1);
- callback.call(subList);
+ callback.accept(subList);
trimmedSubList(subList, callback);
}
}
@@ -107,17 +118,21 @@
cases.add(new Object[] { new Vector<>() });
cases.add(new Object[] { new Stack<>() });
cases.add(new Object[] { new CopyOnWriteArrayList<>() });
+ cases.add(new Object[] { Arrays.asList() });
- cases.add(new Object[] { new ArrayList(){{add(42);}} });
- cases.add(new Object[] { new LinkedList(){{add(42);}} });
- cases.add(new Object[] { new Vector(){{add(42);}} });
- cases.add(new Object[] { new Stack(){{add(42);}} });
- cases.add(new Object[] { new CopyOnWriteArrayList(){{add(42);}} });
+ List<Integer> l = Arrays.asList(42);
+ cases.add(new Object[] { new ArrayList<>(l) });
+ cases.add(new Object[] { new LinkedList<>(l) });
+ cases.add(new Object[] { new Vector<>(l) });
+ Stack<Integer> s = new Stack<>(); s.addAll(l);
+ cases.add(new Object[]{s});
+ cases.add(new Object[] { new CopyOnWriteArrayList<>(l) });
+ cases.add(new Object[] { l });
return cases.toArray(new Object[0][cases.size()]);
}
@Test(dataProvider = "listProvider")
- public void testProvidedWithNull(final List<Integer> list) throws Exception {
+ public void testProvidedWithNull(final List<Integer> list) {
try {
list.forEach(null);
fail("expected NPE not thrown");
@@ -138,11 +153,12 @@
}
@Test
- public void testForEach() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CLASSES, SIZE);
+ public void testForEach() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
try {
list.forEach(null);
@@ -165,23 +181,21 @@
}
}
- trimmedSubList(list, new Callback() {
- @Override
- public void call(final List<Integer> list) {
- final List<Integer> actual = new LinkedList<>();
- list.forEach(actual::add);
- CollectionAsserts.assertContents(actual, list);
- }
- });
+ trimmedSubList(list, l -> {
+ final List<Integer> a = new LinkedList<>();
+ l.forEach(a::add);
+ CollectionAsserts.assertContents(a, l);
+ });
}
}
@Test
- public void testRemoveIf() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CLASSES, SIZE);
+ public void testRemoveIf() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_STRUCT_MOD_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
try {
list.removeIf(null);
@@ -195,9 +209,9 @@
}
}
- for (final CollectionSupplier.TestCase test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
list.removeIf(pOdd);
for (int i : list) {
assertTrue((i % 2) == 0);
@@ -211,9 +225,9 @@
assertTrue(list.isEmpty());
}
- for (final CollectionSupplier.TestCase test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
final List<Integer> listCopy = new ArrayList<>(list);
if (original.size() > SUBLIST_SIZE) {
final List<Integer> subList = list.subList(SUBLIST_FROM, SUBLIST_TO);
@@ -237,22 +251,19 @@
}
}
- for (final CollectionSupplier.TestCase test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
- trimmedSubList(list, new Callback() {
- @Override
- public void call(final List<Integer> list) {
- final List<Integer> copy = new ArrayList<>(list);
- list.removeIf(pOdd);
- for (int i : list) {
- assertTrue((i % 2) == 0);
- }
- for (int i : copy) {
- if (i % 2 == 0) {
- assertTrue(list.contains(i));
- } else {
- assertFalse(list.contains(i));
- }
+ for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
+ final List<Integer> list = test.collection;
+ trimmedSubList(list, l -> {
+ final List<Integer> copy = new ArrayList<>(l);
+ l.removeIf(pOdd);
+ for (int i : l) {
+ assertTrue((i % 2) == 0);
+ }
+ for (int i : copy) {
+ if (i % 2 == 0) {
+ assertTrue(l.contains(i));
+ } else {
+ assertFalse(l.contains(i));
}
}
});
@@ -267,12 +278,13 @@
}
@Test
- public void testReplaceAll() throws Exception {
+ public void testReplaceAll() {
final int scale = 3;
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CLASSES, SIZE);
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
try {
list.replaceAll(null);
@@ -281,7 +293,7 @@
CollectionAsserts.assertContents(list, original);
list.replaceAll(x -> scale * x);
- for (int i=0; i < original.size(); i++) {
+ for (int i = 0; i < original.size(); i++) {
assertTrue(list.get(i) == (scale * original.get(i)), "mismatch at index " + i);
}
@@ -306,28 +318,26 @@
}
}
- for (final CollectionSupplier.TestCase test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
- trimmedSubList(list, new Callback() {
- @Override
- public void call(final List<Integer> list) {
- final List<Integer> copy = new ArrayList<>(list);
- final int offset = 5;
- list.replaceAll(x -> offset + x);
- for (int i=0; i < copy.size(); i++) {
- assertTrue(list.get(i) == (offset + copy.get(i)), "mismatch at index " + i);
- }
+ for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
+ final List<Integer> list = test.collection;
+ trimmedSubList(list, l -> {
+ final List<Integer> copy = new ArrayList<>(l);
+ final int offset = 5;
+ l.replaceAll(x -> offset + x);
+ for (int i = 0; i < copy.size(); i++) {
+ assertTrue(l.get(i) == (offset + copy.get(i)), "mismatch at index " + i);
}
});
}
}
@Test
- public void testSort() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CLASSES, SIZE);
+ public void testSort() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> original = test.expected;
+ final List<Integer> list = test.collection;
CollectionSupplier.shuffle(list);
list.sort(Integer::compare);
CollectionAsserts.assertSorted(list, Integer::compare);
@@ -338,23 +348,23 @@
CollectionSupplier.shuffle(list);
list.sort(null);
- CollectionAsserts.assertSorted(list, Comparator.<Integer>naturalOrder());
+ CollectionAsserts.assertSorted(list, Comparator.naturalOrder());
if (test.name.startsWith("reverse")) {
Collections.reverse(list);
}
CollectionAsserts.assertContents(list, original);
CollectionSupplier.shuffle(list);
- list.sort(Comparator.<Integer>naturalOrder());
- CollectionAsserts.assertSorted(list, Comparator.<Integer>naturalOrder());
+ list.sort(Comparator.naturalOrder());
+ CollectionAsserts.assertSorted(list, Comparator.naturalOrder());
if (test.name.startsWith("reverse")) {
Collections.reverse(list);
}
CollectionAsserts.assertContents(list, original);
CollectionSupplier.shuffle(list);
- list.sort(Comparator.<Integer>reverseOrder());
- CollectionAsserts.assertSorted(list, Comparator.<Integer>reverseOrder());
+ list.sort(Comparator.reverseOrder());
+ CollectionAsserts.assertSorted(list, Comparator.reverseOrder());
if (!test.name.startsWith("reverse")) {
Collections.reverse(list);
}
@@ -365,32 +375,35 @@
CollectionAsserts.assertSorted(list, BIT_COUNT_COMPARATOR);
// check sort by verifying that bitCount increases and never drops
int minBitCount = 0;
- int bitCount = 0;
for (final Integer i : list) {
- bitCount = Integer.bitCount(i);
+ int bitCount = Integer.bitCount(i);
assertTrue(bitCount >= minBitCount);
minBitCount = bitCount;
}
+ // Resuse the supplier to store AtomicInteger instead of Integer
+ // Hence the use of raw type and cast
+ List<AtomicInteger> incomparablesData = new ArrayList<>();
+ for (int i = 0; i < test.expected.size(); i++) {
+ incomparablesData.add(new AtomicInteger(i));
+ }
+ Function f = test.supplier;
@SuppressWarnings("unchecked")
- final Constructor<? extends List<?>> defaultConstructor = ((Class<? extends List<?>>)test.collection.getClass()).getConstructor();
- final List<AtomicInteger> incomparables = (List<AtomicInteger>) defaultConstructor.newInstance();
+ List<AtomicInteger> incomparables = (List<AtomicInteger>) f.apply(incomparablesData);
- for (int i=0; i < test.expected.size(); i++) {
- incomparables.add(new AtomicInteger(i));
- }
CollectionSupplier.shuffle(incomparables);
incomparables.sort(ATOMIC_INTEGER_COMPARATOR);
- for (int i=0; i < test.expected.size(); i++) {
+ for (int i = 0; i < test.expected.size(); i++) {
assertEquals(i, incomparables.get(i).intValue());
}
+
if (original.size() > SUBLIST_SIZE) {
final List<Integer> copy = new ArrayList<>(list);
final List<Integer> subList = list.subList(SUBLIST_FROM, SUBLIST_TO);
CollectionSupplier.shuffle(subList);
- subList.sort(Comparator.<Integer>naturalOrder());
- CollectionAsserts.assertSorted(subList, Comparator.<Integer>naturalOrder());
+ subList.sort(Comparator.naturalOrder());
+ CollectionAsserts.assertSorted(subList, Comparator.naturalOrder());
// verify that elements [0, from) remain unmodified
for (int i = 0; i < SUBLIST_FROM; i++) {
assertTrue(list.get(i) == copy.get(i),
@@ -404,25 +417,22 @@
}
}
- for (final CollectionSupplier.TestCase test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
- trimmedSubList(list, new Callback() {
- @Override
- public void call(final List<Integer> list) {
- final List<Integer> copy = new ArrayList<>(list);
- CollectionSupplier.shuffle(list);
- list.sort(Comparator.<Integer>naturalOrder());
- CollectionAsserts.assertSorted(list, Comparator.<Integer>naturalOrder());
- }
+ for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
+ final List<Integer> list = test.collection;
+ trimmedSubList(list, l -> {
+ CollectionSupplier.shuffle(l);
+ l.sort(Comparator.naturalOrder());
+ CollectionAsserts.assertSorted(l, Comparator.naturalOrder());
});
}
}
@Test
- public void testForEachThrowsCME() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CME_CLASSES, SIZE);
+ public void testForEachThrowsCME() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_CME_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> list = test.collection;
if (list.size() <= 1) {
continue;
@@ -430,7 +440,7 @@
boolean gotException = false;
try {
// bad predicate that modifies its list, should throw CME
- list.forEach((x) -> {list.add(x);});
+ list.forEach(list::add);
} catch (ConcurrentModificationException cme) {
gotException = true;
}
@@ -441,11 +451,11 @@
}
@Test
- public void testRemoveIfThrowsCME() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CME_CLASSES, SIZE);
+ public void testRemoveIfThrowsCME() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_CME_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> original = ((List<Integer>) test.expected);
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> list = test.collection;
if (list.size() <= 1) {
continue;
@@ -453,7 +463,7 @@
boolean gotException = false;
try {
// bad predicate that modifies its list, should throw CME
- list.removeIf((x) -> {return list.add(x);});
+ list.removeIf(list::add);
} catch (ConcurrentModificationException cme) {
gotException = true;
}
@@ -464,10 +474,11 @@
}
@Test
- public void testReplaceAllThrowsCME() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CME_CLASSES, SIZE);
+ public void testReplaceAllThrowsCME() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_CME_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> list = test.collection;
if (list.size() <= 1) {
continue;
@@ -486,10 +497,11 @@
}
@Test
- public void testSortThrowsCME() throws Exception {
- final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier((Supplier<List<Integer>>[])LIST_CME_CLASSES, SIZE);
+ public void testSortThrowsCME() {
+ @SuppressWarnings("unchecked")
+ final CollectionSupplier<List<Integer>> supplier = new CollectionSupplier(LIST_CME_SUPPLIERS, SIZE);
for (final CollectionSupplier.TestCase<List<Integer>> test : supplier.get()) {
- final List<Integer> list = ((List<Integer>) test.collection);
+ final List<Integer> list = test.collection;
if (list.size() <= 1) {
continue;
@@ -523,7 +535,7 @@
}
@Test(dataProvider = "shortIntListProvider")
- public void testRemoveIfFromSlice(final List<Integer> list) throws Exception {
+ public void testRemoveIfFromSlice(final List<Integer> list) {
final List<Integer> sublist = list.subList(3, 6);
assertTrue(sublist.removeIf(x -> x == 4));
CollectionAsserts.assertContents(list, SLICED_EXPECTED);
--- a/jdk/test/javax/security/auth/kerberos/KerberosHashEqualsTest.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/javax/security/auth/kerberos/KerberosHashEqualsTest.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -25,7 +25,11 @@
* @test
* @bug 4641821
* @summary hashCode() and equals() for KerberosKey and KerberosTicket
- * @ignore Must set up KDC and setup Kerberos configuration file
+ * @run main/manual KerberosHashEqualsTest
+ */
+
+/*
+ * Must setup KDC and Kerberos configuration file
*/
import java.net.InetAddress;
--- a/jdk/test/javax/security/auth/kerberos/KerberosTixDateTest.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/javax/security/auth/kerberos/KerberosTixDateTest.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -25,7 +25,11 @@
* @test
* @bug 6659990
* @summary test the immutability of the Date fields in KerberosTicket class.
- * @ignore Must set up KDC and setup Kerberos configuration file
+ * @run main/manual KerberosTixDateTest
+ */
+
+/*
+ * Must setup KDC and Kerberos configuration file
*/
import java.net.InetAddress;
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -98,6 +98,7 @@
ServerSocketFactory ssf =
PostThruProxy.getServerSocketFactory(useSSL);
ServerSocket ss = ssf.createServerSocket(serverPort);
+ ss.setSoTimeout(30000); // 30 seconds
serverPort = ss.getLocalPort();
new TestServer(ss);
} catch (Exception e) {
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -100,6 +100,7 @@
ServerSocketFactory ssf =
PostThruProxyWithAuth.getServerSocketFactory(useSSL);
ServerSocket ss = ssf.createServerSocket(serverPort);
+ ss.setSoTimeout(30000); // 30 seconds
serverPort = ss.getLocalPort();
new TestServer(ss);
} catch (Exception e) {
--- a/jdk/test/sun/security/krb5/auto/BadKdc.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/krb5/auto/BadKdc.java Wed Mar 19 11:13:35 2014 -0700
@@ -39,7 +39,29 @@
// ^ kdc# ^ timeout
static final Pattern re = Pattern.compile(
">>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " +
- "timeout=(\\d)000,");
+ "timeout=(\\d+),");
+
+ // Ratio for timeout values of all timeout tests. Not final so that
+ // each test can choose their own.
+ static float ratio = 2f;
+
+ static void setRatio(float ratio) {
+ BadKdc.ratio = ratio;
+ }
+
+ static float getRatio() {
+ return ratio;
+ }
+
+ // Gets real timeout value. This method is called when writing krb5.conf
+ static int toReal(int from) {
+ return (int)(from * ratio + .5);
+ }
+
+ // De-ratio a millisecond value to second
+ static int toSymbolicSec(int from) {
+ return (int)(from / ratio / 1000f + 0.5);
+ }
/*
* There are several cases this test fails:
@@ -101,7 +123,7 @@
fw.write("[libdefaults]\n" +
"default_realm = " + OneKDC.REALM + "\n" +
- "kdc_timeout = 2000\n");
+ "kdc_timeout = " + toReal(2000) + "\n");
fw.write("[realms]\n" + OneKDC.REALM + " = {\n" +
"kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" +
"kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" +
@@ -184,7 +206,8 @@
Matcher m = re.matcher(line);
if (m.find()) {
System.out.println(line);
- sb.append(m.group(1)).append(m.group(2));
+ sb.append(m.group(1))
+ .append(toSymbolicSec(Integer.parseInt(m.group(2))));
}
}
if (failed) sb.append('-');
--- a/jdk/test/sun/security/krb5/auto/BadKdc1.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/krb5/auto/BadKdc1.java Wed Mar 19 11:13:35 2014 -0700
@@ -28,14 +28,21 @@
* @summary krb5 should not try to access unavailable kdc too often
*/
-import java.io.*;
import java.security.Security;
public class BadKdc1 {
public static void main(String[] args)
throws Exception {
- Security.setProperty("krb5.kdc.bad.policy", "tryLess");
+
+ // 5 sec is default timeout for tryLess
+ if (BadKdc.getRatio() > 2.5) {
+ Security.setProperty("krb5.kdc.bad.policy",
+ "tryLess:1," + BadKdc.toReal(2000));
+ } else {
+ Security.setProperty("krb5.kdc.bad.policy", "tryLess");
+ }
+
BadKdc.go(
"121212222222(32){1,2}1222(32){1,2}", // 1 2
// The above line means try kdc1 for 2 seconds then kdc1
--- a/jdk/test/sun/security/krb5/auto/BadKdc2.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/krb5/auto/BadKdc2.java Wed Mar 19 11:13:35 2014 -0700
@@ -35,7 +35,12 @@
public static void main(String[] args)
throws Exception {
- Security.setProperty("krb5.kdc.bad.policy", "tryLess:2,1000");
+
+ // 1 sec is too short.
+ BadKdc.setRatio(3.0f);
+
+ Security.setProperty(
+ "krb5.kdc.bad.policy", "tryLess:2," + BadKdc.toReal(1000));
BadKdc.go(
"121212222222(32){1,2}11112121(32){1,2}", // 1 2
"11112121(32){1,2}11112121(32){1,2}", // 1 2
--- a/jdk/test/sun/security/krb5/auto/MaxRetries.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/krb5/auto/MaxRetries.java Wed Mar 19 11:13:35 2014 -0700
@@ -60,7 +60,7 @@
test1(5000, 2); // 2 2
// For tryLess
- Security.setProperty("krb5.kdc.bad.policy", "tryless");
+ Security.setProperty("krb5.kdc.bad.policy", "tryless:1," + BadKdc.toReal(5000));
rewriteMaxRetries(4);
test1(4000, 7); // 1 1 1 1 2 1 2
test1(4000, 4); // 1 2 1 2
@@ -94,7 +94,7 @@
* @param count the expected total try
*/
private static void test1(int timeout, int count) throws Exception {
- String timeoutTag = "timeout=" + timeout;
+ String timeoutTag = "timeout=" + BadKdc.toReal(timeout);
ByteArrayOutputStream bo = new ByteArrayOutputStream();
PrintStream oldout = System.out;
System.setOut(new PrintStream(bo));
@@ -192,12 +192,12 @@
if (s.startsWith("[realms]")) {
// Reconfig global setting
fw.write("max_retries = 2\n");
- fw.write("kdc_timeout = 5000\n");
+ fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n");
} else if (s.trim().startsWith("kdc = ")) {
if (value != -1) {
// Reconfig for realm
fw.write(" max_retries = " + value + "\n");
- fw.write(" kdc_timeout = " + (value*1000) + "\n");
+ fw.write(" kdc_timeout = " + BadKdc.toReal(value*1000) + "\n");
}
// Add a bad KDC as the first candidate
fw.write(" kdc = localhost:33333\n");
--- a/jdk/test/sun/security/krb5/auto/TcpTimeout.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/krb5/auto/TcpTimeout.java Wed Mar 19 11:13:35 2014 -0700
@@ -63,7 +63,7 @@
"udp_preference_limit = 1\n" +
"max_retries = 2\n" +
"default_realm = " + OneKDC.REALM + "\n" +
- "kdc_timeout = 5000\n");
+ "kdc_timeout = " + BadKdc.toReal(5000) + "\n");
fw.write("[realms]\n" + OneKDC.REALM + " = {\n" +
"kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" +
"kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" +
--- a/jdk/test/sun/security/pkcs11/fips/ClientJSSEServerJSSE.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/pkcs11/fips/ClientJSSEServerJSSE.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -26,10 +26,13 @@
* @bug 6313675 6323647
* @summary Verify that all ciphersuites work in FIPS mode
* @library ..
- * @ignore JSSE supported cipher suites are changed with CR 6916074,
- * need to update this test case in JDK 7 soon
- * @run main/othervm ClientJSSEServerJSSE
* @author Andreas Sterbenz
+ * @run main/manual ClientJSSEServerJSSE
+ */
+
+/*
+ * JSSE supported cipher suites are changed with CR 6916074,
+ * need to update this test case in JDK 7 soon
*/
import java.security.*;
--- a/jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -23,8 +23,7 @@
/*
* @test
- * @bug 4231980
- * @bug 4233913
+ * @bug 4231980 4233913
* @summary Make sure that when no system policy and user policy files exist,
* the built-in default policy will be used, which - amongst other things -
* grants standard extensions the AllPermission. This regression is for 2
@@ -34,7 +33,7 @@
*
* @build SomeExtensionClass
* @build GrantAllPermToExtWhenNoPolicy
- * @ignore shell GrantAllPermToExtWhenNoPolicy.sh
+ * @run shell/manual GrantAllPermToExtWhenNoPolicy.sh
*/
import java.security.*;
--- a/jdk/test/sun/security/provider/PolicyParser/ExtDirs.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/provider/PolicyParser/ExtDirs.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -26,13 +26,16 @@
* @bug 4215035
* @summary standard extensions path is hard-coded in default
* system policy file
- * @ignore run this by hand
- *
- * java -Djava.security.manager \
- * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
- * -Djava.security.policy==./ExtDirs.policy \
- * -Djava.security.debug=parser \
- * ExtDirs
+ * @run main/manual ExtDirs
+ */
+
+/*
+ * Run this test manually with:
+ * java -Djava.security.manager \
+ * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
+ * -Djava.security.policy==./ExtDirs.policy \
+ * -Djava.security.debug=parser \
+ * ExtDirs
*/
public class ExtDirs {
--- a/jdk/test/sun/security/provider/PolicyParser/ExtDirsChange.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/provider/PolicyParser/ExtDirsChange.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -26,16 +26,19 @@
* @bug 4993819
* @summary standard extensions path is hard-coded in default
* system policy file
- * @ignore run this by hand
- *
- * javac ExtDirChange
- * rm ExtDirsA*.class ExtDirsB*.class
- * java -Djava.security.manager \
- * -Dtest.src=. \
- * -Djava.security.policy=ExtDirsChange.policy \
- * -Djava.security.debug=parser \
- * -cp ExtDirsA/a.jar:ExtDirsB/b.jar:. \
- * ExtDirsChange
+ * @run main/manual ExtDirsChange
+ */
+
+/*
+ * Run this test manually with:
+ * javac ExtDirChange
+ * rm ExtDirsA*.class ExtDirsB*.class
+ * java -Djava.security.manager \
+ * -Dtest.src=. \
+ * -Djava.security.policy=ExtDirsChange.policy \
+ * -Djava.security.debug=parser \
+ * -cp ExtDirsA/a.jar:ExtDirsB/b.jar:. \
+ * ExtDirsChange
*/
import java.io.File;
--- a/jdk/test/sun/security/provider/PolicyParser/ExtDirsDefaultPolicy.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/provider/PolicyParser/ExtDirsDefaultPolicy.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -26,22 +26,25 @@
* @bug 4993819
* @summary standard extensions path is hard-coded in default
* system policy file
- * @ignore run this by hand
- *
- * java -Djava.security.manager \
- * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
- * -Djava.security.debug=parser \
- * ExtDirsDefaultPolicy
+ * @run main/manual ExtDirsDefaultPolicy
+ */
+
+/*
+ * Run this test manually with:
+ * java -Djava.security.manager \
+ * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
+ * -Djava.security.debug=parser \
+ * ExtDirsDefaultPolicy
*
* To test other varients of the ${{java.ext.dirs}} protocol, remove
* the grant statement for java.ext.dirs in $JAVA_HOME/lib/security/java.policy
* and then run against the 3 different policy files.
*
- * java -Djava.security.manager \
- * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
- * -Djava.security.debug=parser \
- * -Djava.security.policy=ExtDirs{1,2,3}.policy \
- * ExtDirsDefaultPolicy
+ * java -Djava.security.manager \
+ * -Djava.ext.dirs=./ExtDirsA:./ExtDirsB \
+ * -Djava.security.debug=parser \
+ * -Djava.security.policy=ExtDirs{1,2,3}.policy \
+ * ExtDirsDefaultPolicy
*/
public class ExtDirsDefaultPolicy {
--- a/jdk/test/sun/security/provider/PolicyParser/PrincipalExpansionError.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/provider/PolicyParser/PrincipalExpansionError.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -25,56 +25,54 @@
* @test
* @bug 4373996
* @summary parser incorrectly ignores a principal if the principal name
- * expands to nothing. this test is a bit complicated.
- *
- * 1) PrincipalExpansionError.java
- * the test itself. this test creates a Subject with a
- * SolarisPrincipal("TestPrincipal") and calls doAs
- * with a PrincipalExpansionErrorAction.
- *
- * 2) PrincipalExpansionErrorAction
- * this action tries to read the file, /testfile
+ * expands to nothing.
+ * @run main/manual PrincipalExpansionError
+ */
+
+/*
+ * This test is a bit complicated.
+ * 1) PrincipalExpansionError.java
+ * the test itself. this test creates a Subject with a
+ * SolarisPrincipal("TestPrincipal") and calls doAs
+ * with a PrincipalExpansionErrorAction.
+ * 2) PrincipalExpansionErrorAction
+ * this action tries to read the file, /testfile
+ * 3) to run the test:
+ * a) jtreg -verbose:all -testjdk:<your_jdk>/build/sparc
+ * PrincipalExpansionError.java
+ * b) PrincipalExpansionError is compiled and put into
+ * the "test.classes" directory
+ * c) PrincipalExpansionErrorAction is compiled and put into
+ * the "test.classes"/apackage directory
+ * (since it belongs to the 'apackage' package
+ * d) the PrincipalExpansionError shell script moves
+ * test.classes/apackage to test.src/apackage.
+ * this guarantees that the test will run
+ * with codebase test.classes, and the action
+ * will run with codebase test.src.
+ * e) the test is executed. permissions to read the file,
+ * /testfile, were granted to the PrincipalExpansionError.
+ * the policy entry for PrincipalExpansionErrorAction
+ * running as SolarisPrincipal("TestPrincipal")
+ * was also granted the file permission,
+ * but it has a bogus second SolarisPrincipal with
+ * a name that can't be property-expanded.
*
- * 3) to run the test:
- * a) jtreg -verbose:all -testjdk:<your_jdk>/build/sparc
- * PrincipalExpansionError.java
- * b) PrincipalExpansionError is compiled and put into
- * the "test.classes" directory
- * c) PrincipalExpansionErrorAction is compiled and put into
- * the "test.classes"/apackage directory
- * (since it belongs to the 'apackage' package
- * d) the PrincipalExpansionError shell script moves
- * test.classes/apackage to test.src/apackage.
- * this guarantees that the test will run
- * with codebase test.classes, and the action
- * will run with codebase test.src.
- * e) the test is executed. permissions to read the file,
- * /testfile, were granted to the PrincipalExpansionError.
- * the policy entry for PrincipalExpansionErrorAction
- * running as SolarisPrincipal("TestPrincipal")
- * was also granted the file permission,
- * but it has a bogus second SolarisPrincipal with
- * a name that can't be property-expanded.
- *
- * the old behavior of the code would ignore the
- * bogus entry and incorrectly grants the file permission
- * to SolarisPrincipal("TestPrincipal").
- * the new behavior correctly ignores the entire
- * policy entry.
- * Please note that the jtreg needs to be granted
- * allpermissions for this test to succeed. If the codebase
- * for jtreg changes, the PrincipalExpansionError.policy
- * needs to be updated.
- *
- * f) original @ tags:
- * compile PrincipalExpansionErrorAction.java
- * run shell PrincipalExpansionError.sh
- * run main/othervm/policy=PrincipalExpansionError.policy
- * -Djava.security.debug=access,domain,failure
- * PrincipalExpansionError
- *
- * @ignore unable to rely on location or javatest.jar
- * (so we can grant it AllPermission)
+ * the old behavior of the code would ignore the
+ * bogus entry and incorrectly grants the file permission
+ * to SolarisPrincipal("TestPrincipal").
+ * the new behavior correctly ignores the entire
+ * policy entry.
+ * Please note that the jtreg needs to be granted
+ * allpermissions for this test to succeed. If the codebase
+ * for jtreg changes, the PrincipalExpansionError.policy
+ * needs to be updated.
+ * f) original @ tags:
+ * compile PrincipalExpansionErrorAction.java
+ * run shell PrincipalExpansionError.sh
+ * run main/othervm/policy=PrincipalExpansionError.policy
+ * -Djava.security.debug=access,domain,failure
+ * PrincipalExpansionError
*/
import javax.security.auth.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/provider/certpath/PKIXCertPathValidator/Validity.java Wed Mar 19 11:13:35 2014 -0700
@@ -0,0 +1,134 @@
+/*
+ * 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 8021804
+ * @summary CertPath should validate even if the validity period of the
+ * root cert does not include the validity period of a subordinate
+ * cert.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.security.cert.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+public class Validity {
+
+ /*
+ * Subject: OU=TestOrg, CN=TestCA
+ * Issuer: OU=TestOrg, CN=TestCA
+ * Validity
+ * Not Before: Feb 26 21:33:55 2014 GMT
+ Not After : Feb 26 21:33:55 2024 GMT
+ * Version 1
+ */
+ static String CACertStr =
+ "-----BEGIN CERTIFICATE-----\n" +
+ "MIIBvTCCASYCCQCQRiTo4lBCFjANBgkqhkiG9w0BAQUFADAjMRAwDgYDVQQLDAdU\n" +
+ "ZXN0T3JnMQ8wDQYDVQQDDAZUZXN0Q0EwHhcNMTQwMjI2MjEzMzU1WhcNMjQwMjI2\n" +
+ "MjEzMzU1WjAjMRAwDgYDVQQLDAdUZXN0T3JnMQ8wDQYDVQQDDAZUZXN0Q0EwgZ8w\n" +
+ "DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOtKS4ZrsM3ansd61ZxitcrN0w184I+A\n" +
+ "z0kyrSP1eMtlam+cC2U91NpTz11FYV4XUfBhqqxaXW043AWTUer8pS90Pt4sCrUX\n" +
+ "COx1+QA1M3ZhbZ4sTM7XQ90JbGaBJ/sEza9mlQP7hQ2yQO/hATKbP6J5qvgG2sT2\n" +
+ "S2WYjEgwNwmFAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAQ/CXEpnx2WY4LJtv4jwE\n" +
+ "4jIVirur3pdzV5oBhPyqqHMsyhQBkukCfX7uD7L5wN1+xuM81DfANpIxlnUfybp5\n" +
+ "CpjcmktLpmyK4kJ6XnSd2blbLOIpsr9x6FqxPxpVDlyw/ySHYrIG/GZdsLHgmzGn\n" +
+ "B06jeYzH8OLf879VxAxSsPc=\n" +
+ "-----END CERTIFICATE-----";
+
+ /*
+ * Subject: OU=TestOrg, CN=TestEE0
+ * Issuer: OU=TestOrg, CN=TestCA
+ * Validity
+ * Not Before: Feb 26 22:55:12 2014 GMT
+ * Not After : Feb 25 22:55:12 2025 GMT
+ * Version 1
+ */
+ static String EECertStr =
+ "-----BEGIN CERTIFICATE-----\n" +
+ "MIIBtjCCAR8CAQQwDQYJKoZIhvcNAQEFBQAwIzEQMA4GA1UECwwHVGVzdE9yZzEP\n" +
+ "MA0GA1UEAwwGVGVzdENBMB4XDTE0MDIyNjIyNTUxMloXDTI1MDIyNTIyNTUxMlow\n" +
+ "JDEQMA4GA1UECwwHVGVzdE9yZzEQMA4GA1UEAwwHVGVzdEVFMDCBnzANBgkqhkiG\n" +
+ "9w0BAQEFAAOBjQAwgYkCgYEAt8xz9W3ruCTHjSOtTX6cxsUZ0nRP6EavEfzgcOYh\n" +
+ "CXGA0gr+viSHq3c2vQBxiRny2hm5rLcqpPo+2OxZtw/ajxfyrV6d/r8YyQLBvyl3\n" +
+ "xdCZdOkG1DCM1oFAQDaSRt9wN5Zm5kyg7uMig5Y4L45fP9Yee4x6Xyh36qYbsR89\n" +
+ "rFMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQDZrPqSo08va1m9TOWOztTuWilGdjK/\n" +
+ "2Ed2WXg8utIpy6uAV+NaOYtHQ7ULQBVRNmwg9nKghbVbh+E/xpoihjl1x7OXass4\n" +
+ "TbwXA5GKFIFpNtDvATQ/QQZoCuCzw1FW/mH0Q7UEQ/9/iJdDad6ebkapeMwtj/8B\n" +
+ "s2IZV7s85CEOXw==\n" +
+ "-----END CERTIFICATE-----";
+
+ public static void main(String[] args) throws Exception {
+
+ String[] certStrs = {EECertStr};
+ String[] trustedCertStrs = {CACertStr};
+ runTest(certStrs, trustedCertStrs);
+
+ System.out.println("Test passed.");
+ }
+
+ private static void runTest(String[] certStrs,
+ String[] trustedCertStrs)
+ throws Exception {
+
+ CertificateFactory cf = CertificateFactory.getInstance("X509");
+
+ // Generate the CertPath from the certs named in certStrs
+ ArrayList<X509Certificate> certs = new ArrayList<>();
+ for (String certStr : certStrs) {
+ certs.add(generateCert(certStr, cf));
+ }
+ CertPath cp = cf.generateCertPath(certs);
+
+ // Generate the set of Trust Anchors from the certs named in
+ // trustedCertStrs
+ Set<TrustAnchor> trustAnchors = new HashSet<>();
+ for (String trustedCertStr : trustedCertStrs) {
+ TrustAnchor ta = new TrustAnchor(generateCert(trustedCertStr, cf),
+ null);
+ trustAnchors.add(ta);
+ }
+ PKIXParameters params = new PKIXParameters(trustAnchors);
+ params.setDate(new Date(114, 3, 1)); // 2014-03-01
+ params.setRevocationEnabled(false);
+
+ // Attempt to validate the CertPath. If no exception thrown, successful.
+ CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
+ cpv.validate(cp, params);
+ System.out.println("CertPath validation successful.");
+ }
+
+ private static X509Certificate generateCert(String certStr,
+ CertificateFactory cf)
+ throws Exception {
+ ByteArrayInputStream stream
+ = new ByteArrayInputStream(certStr.getBytes());
+ return (X509Certificate) cf.generateCertificate(stream);
+
+ }
+}
--- a/jdk/test/sun/security/smartcardio/TestChannel.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestChannel.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6239117
* @summary test logical channels work
* @author Andreas Sterbenz
- * @ignore requires special hardware
- * @run main/manual TestExclusive
+ * @run main/manual TestChannel
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestConnect.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestConnect.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6293769 6294527 6309280
* @summary test connect() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestConnect
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestConnectAgain.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestConnectAgain.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6239117
* @summary test connect works correctly if called multiple times/card removed
* @author Andreas Sterbenz
- * @ignore requires special hardware
- * @run main/manual TestTransmit
+ * @run main/manual TestConnectAgain
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestControl.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestControl.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6239117 6470320
* @summary test if transmitControlCommand() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestControl
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestDefault.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestDefault.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6327047
* @summary verify that TerminalFactory.getDefault() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestDefault
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestExclusive.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestExclusive.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6239117
* @summary verify that beginExclusive()/endExclusive() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestExclusive
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestMultiplePresent.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestMultiplePresent.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6239117 6445367
* @summary test that CardTerminals.waitForCard() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
- * @run main/manual TestPresent
+ * @run main/manual TestMultiplePresent
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestPresent.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestPresent.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6293769 6294527
* @summary test that the isCardPresent()/waitForX() APIs work correctly
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestPresent
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/smartcardio/TestTransmit.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestTransmit.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -26,10 +26,11 @@
* @bug 6293769 6294527
* @summary test transmit() works
* @author Andreas Sterbenz
- * @ignore requires special hardware
* @run main/manual TestTransmit
*/
+// This test requires special hardware.
+
import java.io.*;
import java.util.*;
--- a/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -88,6 +88,7 @@
*/
SSLServerSocket sslss =
(SSLServerSocket)sslssf.createServerSocket(serverPort);
+ sslss.setSoTimeout(30000); // 30 seconds
serverPort = sslss.getLocalPort();
Server server = new Server(sslss);
server.start();
--- a/jdk/test/sun/security/ssl/X509TrustManagerImpl/ClientServer.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/ssl/X509TrustManagerImpl/ClientServer.java Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -24,14 +24,17 @@
/*
* @test
* @bug 4717766
+ * @author Brad Wetmore
* @summary 1.0.3 JsseX509TrustManager erroneously calls isClientTrusted()
- * @run main/othervm ClientServer
+ * @run main/manual ClientServer
+ */
+
+/*
+ * SunJSSE does not support dynamic system properties, no way to re-use
+ * system properties in samevm/agentvm mode.
*
- * SunJSSE does not support dynamic system properties, no way to re-use
- * system properties in samevm/agentvm mode.
- * @ignore JSSE supports algorithm constraints with CR 6916074,
- * need to update this test case in JDK 7 soon
- * @author Brad Wetmore
+ * JSSE supports algorithm constraints with CR 6916074, need to update
+ * this test case in JDK 7 soon.
*
* This problem didn't exist in JSSE 1.4, only JSSE 1.0.3. However,
* this is a useful test, so I decided to include it in 1.4.2.
--- a/jdk/test/sun/security/tools/keytool/console.sh Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/tools/keytool/console.sh Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -25,8 +25,6 @@
# @bug 6418647 8005527
# @summary Doc bug 5035358 shows sun.security.util.Password.readPassword() is buggy.
# @author Weijun Wang
-# @ignore unable to test manual tools that have input from stdin,
-# and output to stderr and stdout
# @run shell/manual console.sh
if [ "$ALT_PASS" = "" ]; then
--- a/jdk/test/sun/security/tools/keytool/i18n.sh Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/security/tools/keytool/i18n.sh Wed Mar 19 11:13:35 2014 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -25,9 +25,7 @@
# @bug 4348369
# @summary keytool not i18n compliant
# @author charlie lai
-#
-# @ignore unable to test manual tools that have input from stdin,
-# and output to stderr and stdout
+# @run shell/manual i18n.sh
# set a few environment variables so that the shell-script can run stand-alone
# in the source directory
--- a/jdk/test/sun/util/calendar/zi/Zoneinfo.java Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/Zoneinfo.java Wed Mar 19 11:13:35 2014 -0700
@@ -372,6 +372,7 @@
ZoneRec zrec = zone.get(zone.size()-1);
tz.getOffsetIndex(zrec.getGmtOffset());
+ int lastGmtOffsetValue = -1;
int currentSave = 0;
boolean usedZone;
for (int zindex = 0; zindex < zone.size(); zindex++) {
@@ -380,9 +381,12 @@
gmtOffset = zrec.getGmtOffset();
int stdOffset = zrec.getDirectSave();
+ if (gmtOffset != lastGmtOffsetValue) {
+ tz.setRawOffset(gmtOffset, fromTime);
+ lastGmtOffsetValue = gmtOffset;
+ }
// If this is the last zone record, take the last rule info.
if (!zrec.hasUntil()) {
- tz.setRawOffset(gmtOffset, fromTime);
if (zrec.hasRuleReference()) {
tz.setLastRules(zrec.getRuleRef().getLastRules());
} else if (stdOffset != 0) {
--- a/jdk/test/sun/util/calendar/zi/tzdata/VERSION Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/VERSION Wed Mar 19 11:13:35 2014 -0700
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2013i
+tzdata2014a
--- a/jdk/test/sun/util/calendar/zi/tzdata/asia Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/asia Wed Mar 19 11:13:35 2014 -0700
@@ -1113,8 +1113,13 @@
Rule Zion 1986 only - Sep 7 0:00 0 S
Rule Zion 1987 only - Apr 15 0:00 1:00 D
Rule Zion 1987 only - Sep 13 0:00 0 S
-Rule Zion 1988 only - Apr 9 0:00 1:00 D
-Rule Zion 1988 only - Sep 3 0:00 0 S
+
+# From Avigdor Finkelstein (2014-03-05):
+# I check the Parliament (Knesset) records and there it's stated that the
+# [1988] transition should take place on Saturday night, when the Sabbath
+# ends and changes to Sunday.
+Rule Zion 1988 only - Apr 10 0:00 1:00 D
+Rule Zion 1988 only - Sep 4 0:00 0 S
# From Ephraim Silverberg
# (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22,
--- a/jdk/test/sun/util/calendar/zi/tzdata/australasia Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/australasia Wed Mar 19 11:13:35 2014 -0700
@@ -377,16 +377,18 @@
# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
-# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
-# on Sunday 19th January, 2014.... move clocks forward by one hour from 2am
+# Fiji will start daylight savings on Sunday 27th October, 2013 ...
+# move clocks forward by one hour from 2am
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
-#
-# From Paul Eggert (2013-09-09):
+
+# From Steffen Thorsen (2013-01-10):
+# Fiji will end DST on 2014-01-19 02:00:
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
+
+# From Paul Eggert (2014-01-10):
# For now, guess that Fiji springs forward the Sunday before the fourth
-# Monday in October. This matches both recent practice and
-# timeanddate.com's current spring-forward prediction.
-# For the January 2014 transition we guessed right while timeanddate.com
-# guessed wrong, so leave the fall-back prediction alone.
+# Monday in October, and springs back the penultimate Sunday in January.
+# This is ad hoc, but matches recent practice.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
@@ -395,7 +397,8 @@
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
-Rule Fiji 2012 max - Jan Sun>=18 3:00 0 -
+Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
+Rule Fiji 2014 max - Jan Sun>=18 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
--- a/jdk/test/sun/util/calendar/zi/tzdata/europe Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/europe Wed Mar 19 11:13:35 2014 -0700
@@ -2768,14 +2768,18 @@
# According to the articles linked below, Turkey will change into summer
# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
# This change is due to a nationwide exam on 27th.
-#
-# <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872">
# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
-# </a>
# Turkish:
-# <a href="http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373">
# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
-# </a>
+
+# From Faruk Pasin (2014-02-14):
+# The DST for Turkey has been changed for this year because of the
+# Turkish Local election....
+# http://www.sabah.com.tr/Ekonomi/2014/02/12/yaz-saatinde-onemli-degisiklik
+# ... so Turkey will move clocks forward one hour on March 31 at 3:00 a.m.
+# From Paul Eggert (2014-02-17):
+# Here is an English-language source:
+# http://www.worldbulletin.net/turkey/129016/turkey-switches-to-daylight-saving-time-march-31
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
@@ -2844,6 +2848,8 @@
2:00 Turkey EE%sT 2007
2:00 EU EE%sT 2011 Mar 27 1:00u
2:00 - EET 2011 Mar 28 1:00u
+ 2:00 EU EE%sT 2014 Mar 30 1:00u
+ 2:00 - EET 2014 Mar 31 1:00u
2:00 EU EE%sT
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
@@ -2865,19 +2871,13 @@
# approval from 266 deputies.
#
# Ukraine abolishes transter back to the winter time (in Russian)
-# <a href="http://news.mail.ru/politics/6861560/">
# http://news.mail.ru/politics/6861560/
-# </a>
#
# The Ukrainians will no longer change the clock (in Russian)
-# <a href="http://www.segodnya.ua/news/14290482.html">
# http://www.segodnya.ua/news/14290482.html
-# </a>
#
# Deputies cancelled the winter time (in Russian)
-# <a href="http://www.pravda.com.ua/rus/news/2011/09/20/6600616/">
# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
-# </a>
#
# From Philip Pizzey (2011-10-18):
# Today my Ukrainian colleagues have informed me that the
@@ -2888,18 +2888,39 @@
# As far as I understand, the recent change to the Ukrainian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
-#
-# <a href="http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995">
# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
-# </a>
#
# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
# The law documents themselves are at
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+
+# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28):
+# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST:
+# 03 25 1990 02:00 -03.00 1 Time Zone 3 with DST
+# 07 01 1990 02:00 -02.00 1 Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 18.06.1990, No. 134.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/T001500.html
#
-# <a href="http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484">
-# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
-# </a>
-
+# They did not end DST in September, 1990 (according to the law,
+# "summer time" was still in action):
+# 09 30 1990 03:00 -02.00 1 Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 21.09.1990, No. 272.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/KP900272.html
+#
+# Again no change in March, 1991 ("summer time" in action):
+# 03 31 1991 02:00 -02.00 1 Time Zone 2 with DST
+#
+# DST ended in September 1991 ("summer time" ended):
+# 09 29 1991 03:00 -02.00 0 Time Zone 2, no DST
+# * Ukrainian Government's Resolution of 25.09.1991, No. 225.
+# http://www.uazakon.com/documents/date_21/pg_iwgdoc.htm
+# This is an answer.
+#
+# Since 1992 they had normal DST procedure:
+# 03 29 1992 02:00 -02.00 1 DST started
+# 09 27 1992 03:00 -02.00 0 DST ended
+# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
+# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Most of Ukraine since 1970 has been like Kiev.
@@ -2910,9 +2931,8 @@
2:00 - EET 1930 Jun 21
3:00 - MSK 1941 Sep 20
1:00 C-Eur CE%sT 1943 Nov 6
- 3:00 Russia MSK/MSD 1990
- 3:00 - MSK 1990 Jul 1 2:00
- 2:00 - EET 1992
+ 3:00 Russia MSK/MSD 1990 Jul 1 2:00
+ 2:00 1:00 EEST 1991 Sep 29 3:00
2:00 E-Eur EE%sT 1995
2:00 EU EE%sT
# Ruthenia used CET 1990/1991.
--- a/jdk/test/sun/util/calendar/zi/tzdata/northamerica Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/northamerica Wed Mar 19 11:13:35 2014 -0700
@@ -414,9 +414,10 @@
# US Pacific time, represented by Los Angeles
#
# California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
-# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties,
-# and the northern three-quarters of Idaho county),
-# most of Nevada, most of Oregon, and Washington
+# Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county
+# north of the Salmon River, and the towns of Burgdorf and Warren),
+# Nevada (except West Wendover), Oregon (except the northern 3/4 of
+# Malheur county), and Washington
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule CA 1948 only - Mar 14 2:00 1:00 D
--- a/jdk/test/sun/util/calendar/zi/tzdata/southamerica Wed Mar 19 21:05:28 2014 +0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/southamerica Wed Mar 19 11:13:35 2014 -0700
@@ -1298,6 +1298,13 @@
# start date is 2013-09-08 00:00....
# http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm
+# From Jose Miguel Garrido (2014-02-19):
+# Today appeared in the Diario Oficial a decree amending the time change
+# dates to 2014.
+# DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC)
+# 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
+
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file.
@@ -1631,6 +1638,9 @@
# From Carlos Raul Perasso (2013-03-15):
# The change in Paraguay is now final. Decree number 10780
# http://www.presidencia.gov.py/uploads/pdf/presidencia-3b86ff4b691c79d4f5927ca964922ec74772ce857c02ca054a52a37b49afc7fb.pdf
+# From Carlos Raul Perasso (2014-02-28):
+# Decree 1264 can be found at:
+# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf
Rule Para 2013 max - Mar Sun>=22 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -1689,18 +1699,19 @@
Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
-4:00 - AST
+# These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla
Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe
-Link America/Port_of_Spain America/Marigot
+Link America/Port_of_Spain America/Marigot # St Martin (French part)
Link America/Port_of_Spain America/Montserrat
Link America/Port_of_Spain America/St_Barthelemy
-Link America/Port_of_Spain America/St_Kitts
+Link America/Port_of_Spain America/St_Kitts # St Kitts & Nevis
Link America/Port_of_Spain America/St_Lucia
-Link America/Port_of_Spain America/St_Thomas
+Link America/Port_of_Spain America/St_Thomas # Virgin Islands (US)
Link America/Port_of_Spain America/St_Vincent
-Link America/Port_of_Spain America/Tortola
+Link America/Port_of_Spain America/Tortola # Virgin Islands (UK)
# Uruguay
# From Paul Eggert (1993-11-18):