Merge
authorjwilhelm
Thu, 16 Nov 2017 01:11:32 +0100
changeset 47825 13e39ca700d0
parent 47824 cf127be65014 (current diff)
parent 47753 a2008587c13f (diff)
child 47826 7f06714e7f0b
child 47842 1ade1286b38f
child 55820 76d033c9908f
Merge
make/conf/jib-profiles.js
make/mapfiles/libextnet/mapfile-vers
src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
test/jdk/ProblemList.txt
--- a/.hgtags	Sat Nov 11 01:21:09 2017 +0100
+++ b/.hgtags	Thu Nov 16 01:11:32 2017 +0100
@@ -455,3 +455,4 @@
 92f08900cb3c0d694e5c529a676c1c9e5909193f jdk-10+28
 a6e591e12f122768f675428e1e5a838fd0e9c7ec jdk-10+29
 8fee80b92e65149f7414250fd5e34b6f35d417b4 jdk-10+30
+e6278add9ff28fab70fe1cc4c1d65f7363dc9445 jdk-10+31
--- a/make/CreateJmods.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/CreateJmods.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -80,8 +80,8 @@
 endif
 
 LEGAL_NOTICES := \
-    $(SUPPORT_OUTPUTDIR)/modules_legal/java.base \
-    $(call FindModuleLegalDirs, $(MODULE)) \
+    $(call uniq, $(SUPPORT_OUTPUTDIR)/modules_legal/java.base \
+    $(call FindModuleLegalDirs, $(MODULE))) \
     #
 
 LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
--- a/make/Help.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/Help.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -36,15 +36,18 @@
 	$(info =====================)
 	$(info )
 	$(info Common make targets)
-	$(info $(_) make [default]         # Compile all modules in langtools, hotspot, jdk, jaxws,)
-	$(info $(_)                        # jaxp and corba, and create a runnable "exploded" image)
-	$(info $(_) make all               # Compile everything, all repos, docs and images)
-	$(info $(_) make images            # Create complete jdk and jre images (alias for product-images))
-	$(info $(_) make <name>-image      # Build just the image (jdk, jre, test, docs etc))
+	$(info $(_) make [default]         # Compile all modules and create a runnable "exploded")
+	$(info $(_)                        # image (alias for jdk or exploded-image))
+	$(info $(_) make all               # Create all images: product, test, docs)
+	$(info $(_)                        # (alias for all-images))
+	$(info $(_) make images            # Create complete jdk and jre images)
+	$(info $(_)                        # (alias for product-images))
+	$(info $(_) make <name>-image      # Build just the image for any of: )
+	$(info $(_)                        # jdk, jre, test, docs, symbols, profiles)
 	$(info $(_) make <phase>           # Build the specified phase and everything it depends on)
 	$(info $(_)                        # (gensrc, java, copy, libs, launchers, gendata, rmic))
-	$(info $(_) make *-only            # Applies to most targets and disables compling the)
-	$(info $(_)                        # dependencies for the target. This is faster but may)
+	$(info $(_) make *-only            # Applies to most targets and disables building the)
+	$(info $(_)                        # dependencies for that target. This is faster but may)
 	$(info $(_)                        # result in incorrect build results!)
 	$(info $(_) make docs              # Create all docs)
 	$(info $(_) make docs-jdk-api      # Create just JDK javadocs)
@@ -74,7 +77,7 @@
 	$(info $(_) make hotspot           # Build all of hotspot)
 	$(info $(_) make hotspot-<variant> # Build just the specified jvm variant)
 	$(info $(_) make hotspot-gensrc    # Only build the gensrc part of hotspot)
-	$(info $(_) make hotspot-<variant>-<phase> # Build the specified phase for the specified module)
+	$(info $(_) make hotspot-<variant>-<phase> # Build the specified phase for the variant)
 	$(info )
 	$(info Targets for specific modules)
 	$(info $(_) make <module>          # Build <module> and everything it depends on)
--- a/make/common/MakeBase.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/common/MakeBase.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -473,15 +473,32 @@
     $(subst $(SPACE),?,$(strip $1))
 
 ################################################################################
-# Make directory without forking mkdir if not needed
+# Make directory without forking mkdir if not needed.
+#
+# If a directory with an encoded space is provided, the wildcard function
+# sometimes returns false answers (typically if the dir existed when the
+# makefile was parsed, but was deleted by a previous rule). In that case, always
+# call mkdir regardless of what wildcard says.
+#
 # 1: List of directories to create
 MakeDir = \
     $(strip \
-        $(eval MakeDir_dirs_to_make := $(strip $(foreach d, $1, $(if $(wildcard $d), , \
-            "$(call DecodeSpace, $d)")))) \
+        $(eval MakeDir_dirs_to_make := $(strip $(foreach d, $1, \
+          $(if $(findstring ?, $d), '$(call DecodeSpace, $d)', \
+            $(if $(wildcard $d), , $d) \
+          ) \
+        ))) \
         $(if $(MakeDir_dirs_to_make), $(shell $(MKDIR) -p $(MakeDir_dirs_to_make))) \
     )
 
+# Make directory for target file. Should handle spaces in filenames. Just
+# calling $(call MakeDir $(@D)) will not work if the directory contains a space
+# and the target file already exists. In that case, the target file will have
+# its wildcard ? resolved and the $(@D) will evaluate each space separated dir
+# part on its own.
+MakeTargetDir = \
+    $(call MakeDir, $(dir $(call EncodeSpace, $@)))
+
 ################################################################################
 # Assign a variable only if it is empty
 # Param 1 - Variable to assign
@@ -499,7 +516,7 @@
   # If the source and target parent directories are the same, recursive copy doesn't work
   # so we fall back on regular copy, which isn't preserving symlinks.
   define install-file
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(RM) '$(call DecodeSpace, $@)'
 	if [ '$(call DecodeSpace, $(dir $@))' != \
 	    '$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \
@@ -526,21 +543,21 @@
   # If copying a soft link to a directory, need to delete the target first to avoid
   # weird errors.
   define install-file
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(RM) '$(call DecodeSpace, $@)'
 	$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
 	if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then $(XATTR) -cs '$(call DecodeSpace, $@)'; fi
   endef
 else
   define install-file
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(CP) -fP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
   endef
 endif
 
 # Variant of install file that does not preserve symlinks
 define install-file-nolink
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
 endef
 
@@ -590,13 +607,13 @@
 # careful when using this on Windows since the symlink created is only valid in
 # the unix emulation environment.
 define link-file-relative
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(RM) '$(call DecodeSpace, $@)'
 	$(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)'
 endef
 
 define link-file-absolute
-	$(call MakeDir, $(@D))
+	$(call MakeTargetDir)
 	$(RM) '$(call DecodeSpace, $@)'
 	$(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
 endef
--- a/make/common/Modules.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/common/Modules.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -409,8 +409,10 @@
 # $1 - Module to find legal dirs for
 FindModuleLegalDirs = \
     $(strip $(wildcard \
-        $(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \
-        $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
+        $(addsuffix /$(strip $1), $(SUPPORT_OUTPUTDIR)/modules_legal \
+            $(IMPORT_MODULES_LEGAL)) \
+        $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))) \
+    ))
 
 ################################################################################
 
--- a/make/data/tzdata/VERSION	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/VERSION	Thu Nov 16 01:11:32 2017 +0100
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2017b
+tzdata2017c
--- a/make/data/tzdata/africa	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/africa	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@@ -241,7 +241,7 @@
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
 # From Jesper Nørgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
-# http://www.timeanddate.com/worldclock/city.html?n=53
+# https://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
 # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
 Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	0	-
@@ -279,8 +279,8 @@
 # timeanddate[2] and another site I've found[3] also support that.
 #
 # [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
+# [2] https://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] https://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -290,10 +290,10 @@
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
+# https://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
 #
 # The Middle East News Agency
-# http://www.mena.org.eg/index.aspx
+# https://www.mena.org.eg/index.aspx
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -343,7 +343,7 @@
 # Thursday of April....  Clocks will still be turned back for Ramadan, but
 # dates not yet announced....
 # http://almogaz.com/news/weird-news/2015/04/05/1947105 ...
-# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
+# https://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
 
 # From Ahmed Nazmy (2015-04-20):
 # Egypt's ministers cabinet just announced ... that it will cancel DST at
@@ -470,11 +470,11 @@
 
 # From Even Scharning (2012-11-10):
 # Libya set their time one hour back at 02:00 on Saturday November 10.
-# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
+# https://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
 # Here is an official source [in Arabic]: http://ls.ly/fb6Yc
 #
 # Steffen Thorsen forwarded a translation (2012-11-10) in
-# http://mm.icann.org/pipermail/tz/2012-November/018451.html
+# https://mm.icann.org/pipermail/tz/2012-November/018451.html
 #
 # From Tim Parenti (2012-11-11):
 # Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1.
@@ -485,7 +485,7 @@
 # From Even Scharning (2013-10-25):
 # The scheduled end of DST in Libya on Friday, October 25, 2013 was
 # cancelled yesterday....
-# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
+# https://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
 #
 # From Paul Eggert (2013-10-25):
 # For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
@@ -538,7 +538,7 @@
 # basis....
 # It seems that Mauritius observed daylight saving time from 1982-10-10 to
 # 1983-03-20 as well, but that was not successful....
-# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
+# https://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
 
 # From Alex Krivenyshev (2008-06-25):
 # http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD
@@ -606,7 +606,7 @@
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
 #
 # Our wrap-up:
-# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
+# https://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -638,7 +638,7 @@
 # be one hour ahead of GMT between 1 June and 27 September, according to
 # Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
+# http://www.worldtimezone.com/dst_news/dst_news_morocco01.html
 # http://en.afrik.com/news11892.html
 
 # From Alex Krivenyshev (2008-05-09):
@@ -651,7 +651,7 @@
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
+# https://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
 # (and republished here: <http://www.actu.ma/heure-dete-comment_i127896_0.html>)
 # the changes occur at midnight:
 #
@@ -673,7 +673,7 @@
 # posted in English).
 #
 # The following Google query will generate many relevant hits:
-# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
+# https://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -684,7 +684,7 @@
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
 #
 # We have some further details posted here:
-# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
+# https://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
@@ -694,7 +694,7 @@
 # (French)
 #
 # Our summary:
-# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
+# https://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
@@ -717,7 +717,7 @@
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
 # (French)
 # Our page:
-# http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
+# https://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -734,7 +734,7 @@
 # They said that the decision was already taken.
 #
 # More articles in the press
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
+# https://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
 
@@ -826,7 +826,7 @@
 # 1433 (18 April 2012) and the decision of the Head of Government of
 # 16 N. 3-29-15 Chaaban 1435 (4 June 2015).
 # Source (french):
-# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
+# https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
 #
 # From Milamber (2015-06-09):
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=863
@@ -835,7 +835,7 @@
 # [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go
 # from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch....
 # I think the patch is correct and the quoted text is wrong; the text in
-# <http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
+# <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
 # with the patch.
 
 # From Paul Eggert (2015-06-08):
@@ -960,9 +960,17 @@
 Link Africa/Maputo Africa/Lubumbashi	# E Dem. Rep. of Congo
 Link Africa/Maputo Africa/Lusaka	# Zambia
 
+
 # Namibia
-# The 1994-04-03 transition is from Shanks & Pottenger.
-# Shanks & Pottenger report no DST after 1998-04; go with IATA.
+
+# From Arthur David Olson (2017-08-09):
+# The text of the "Namibia Time Act, 1994" is available online at
+# www.lac.org.na/laws/1994/811.pdf
+# and includes this nugget:
+# Notwithstanding the provisions of subsection (2) of section 1, the
+# first winter period after the commencement of this Act shall
+# commence at OOhOO on Monday 21 March 1994 and shall end at 02h00 on
+# Sunday 4 September 1994.
 
 # From Petronella Sibeene (2007-03-30):
 # http://allafrica.com/stories/200703300178.html
@@ -978,19 +986,30 @@
 # observes Botswana time, we have no details about historical practice.
 # In the meantime people there can use Africa/Gaborone.
 # See: Immanuel S. The Namibian. 2017-02-23.
-# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
+# https://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
+
+# From Steffen Thorsen (2017-08-09):
+# Namibia is going to change their time zone to what is now their DST:
+# https://www.newera.com.na/2017/02/23/namibias-winter-time-might-be-repealed/
+# This video is from the government decision:
+# https://www.nbc.na/news/na-passes-namibia-time-bill-repealing-1994-namibia-time-act.8665
+# We have made the assumption so far that they will change their time zone at
+# the same time they would normally start DST, the first Sunday in September:
+# https://www.timeanddate.com/news/time/namibia-new-time-zone.html
 
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Namibia	1994	max	-	Sep	Sun>=1	2:00	1:00	S
-Rule	Namibia	1995	max	-	Apr	Sun>=1	2:00	0	-
+Rule	Namibia	1994	only	-	Mar	21	0:00	0	-
+Rule	Namibia	1994	2016	-	Sep	Sun>=1	2:00	1:00	S
+Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Windhoek	1:08:24 -	LMT	1892 Feb 8
 			1:30	-	+0130	1903 Mar
 			2:00	-	SAST	1942 Sep 20  2:00
 			2:00	1:00	SAST	1943 Mar 21  2:00
 			2:00	-	SAST	1990 Mar 21 # independence
-			2:00	-	CAT	1994 Apr  3
-			1:00	Namibia	WA%sT
+			2:00	-	CAT	1994 Mar 21  0:00
+			1:00	Namibia	WA%sT	2017 Sep  3  2:00
+			2:00	-	CAT
 
 # Niger
 # See Africa/Lagos.
@@ -1077,14 +1096,24 @@
 # no information
 
 # Sudan
-#
+
 # From <http://www.sunanews.net/sn13jane.html>
 # Sudan News Agency (2000-01-13),
 # also reported by Michaël De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
+
+# From Ahmed Atyya, National Telecommunications Corp. (NTC), Sudan (2017-10-17):
+# ... the Republic of Sudan is going to change the time zone from (GMT+3:00)
+# to (GMT+ 2:00) starting from Wednesday 1 November 2017.
 #
+# From Paul Eggert (2017-10-18):
+# A scanned copy (in Arabic) of Cabinet Resolution No. 352 for the
+# year 2017 can be found as an attachment in email today from Yahia
+# Abdalla of NTC, archived at:
+# https://mm.icann.org/pipermail/tz/2017-October/025333.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Sudan	1970	only	-	May	 1	0:00	1:00	S
 Rule	Sudan	1970	1985	-	Oct	15	0:00	0	-
@@ -1093,10 +1122,14 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
-			3:00	-	EAT
+			3:00	-	EAT	2017 Nov  1
+			2:00	-	CAT
 
 # South Sudan
-Link Africa/Khartoum Africa/Juba
+# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+Zone	Africa/Juba	2:06:28 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
 
 # Swaziland
 # See Africa/Johannesburg.
@@ -1134,11 +1167,11 @@
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# http://www.babnet.net/kiwidetail-15295.asp
+# https://www.babnet.net/kiwidetail-15295.asp
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
+# https://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
--- a/make/data/tzdata/antarctica	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/antarctica	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
 #	Margaret Turner reports
-#	http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
+#	https://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
 #	(1999-09-30) that they're UT +05, with no DST;
 #	presumably this is when they have visitors.
 #
@@ -70,7 +70,7 @@
 # http://www.aad.gov.au/default.asp?casid=37079
 #
 # We have more background information here:
-# http://www.timeanddate.com/news/time/antarctica-new-times.html
+# https://www.timeanddate.com/news/time/antarctica-new-times.html
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -85,7 +85,7 @@
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# https://www.timeanddate.com/news/time/antartica-time-changes-2010.html
 
 # From Steffen Thorsen (2016-10-28):
 # Australian Antarctica Division informed us that Casey changed time
@@ -168,7 +168,7 @@
 #
 # year-round base in the main continent
 # Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11
-# <http://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
+# <https://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
--- a/make/data/tzdata/asia	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/asia	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # For Russian data circa 1919, a source is:
 # Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
@@ -98,8 +98,8 @@
 Rule RussiaAsia	1981	1984	-	Apr	1	 0:00	1:00	S
 Rule RussiaAsia	1981	1983	-	Oct	1	 0:00	0	-
 Rule RussiaAsia	1984	1995	-	Sep	lastSun	 2:00s	0	-
-Rule RussiaAsia	1985	2011	-	Mar	lastSun	 2:00s	1:00	S
-Rule RussiaAsia	1996	2011	-	Oct	lastSun	 2:00s	0	-
+Rule RussiaAsia	1985	2010	-	Mar	lastSun	 2:00s	1:00	S
+Rule RussiaAsia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # Afghanistan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -132,13 +132,17 @@
 # or
 # (brief)
 # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule Armenia	2011	only	-	Mar	lastSun	 2:00s	1:00	S
+Rule Armenia	2011	only	-	Oct	lastSun	 2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May  2
 			3:00	-	+03	1957 Mar
 			4:00 RussiaAsia +04/+05	1991 Mar 31  2:00s
 			3:00 RussiaAsia	+03/+04	1995 Sep 24  2:00s
 			4:00	-	+04	1997
-			4:00 RussiaAsia	+04/+05
+			4:00 RussiaAsia	+04/+05	2011
+			4:00	Armenia	+04/+05
 
 # Azerbaijan
 
@@ -150,7 +154,7 @@
 # From Steffen Thorsen (2016-03-17):
 # ... the Azerbaijani Cabinet of Ministers has cancelled switching to
 # daylight saving time....
-# http://www.azernews.az/azerbaijan/94137.html
+# https://www.azernews.az/azerbaijan/94137.html
 # http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html
 # http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html
 
@@ -191,11 +195,11 @@
 # the 19th and 20th, and they have not set the end date yet.
 #
 # Some sources:
-# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
+# https://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
 # http://bdnews24.com/details.php?id=85889&cid=2
 #
 # Our wrap-up:
-# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
+# https://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
 
 # From A. N. M. Kamrus Saadat (2009-06-15):
 # Finally we've got the official mail regarding DST start time where DST start
@@ -281,9 +285,15 @@
 
 # Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon.
 
+# From Paul Eggert (2017-04-20):
+# Page 27 of Reed & Low (cited for Asia/Kolkata) says "Rangoon local time is
+# used upon the railways and telegraphs of Burma, and is 6h. 24m. 47s. ahead
+# of Greenwich."  This refers to the period before Burma's transition to +0630,
+# a transition for which Shanks is the only source.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Yangon	6:24:40 -	LMT	1880        # or Rangoon
-			6:24:40	-	RMT	1920        # Rangoon Mean Time?
+Zone	Asia/Yangon	6:24:47 -	LMT	1880        # or Rangoon
+			6:24:47	-	RMT	1920        # Rangoon local time
 			6:30	-	+0630	1942 May
 			9:00	-	+09	1945 May  3
 			6:30	-	+0630
@@ -340,7 +350,7 @@
 #
 # From Jesper Nørgaard Welen (2006-07-14):
 # I have investigated the timezones around 1970 on the
-# http://www.astro.com/atlas site [with provinces and county
+# https://www.astro.com/atlas site [with provinces and county
 # boundaries summarized below]....  A few other exceptions were two
 # counties on the Sichuan side of the Xizang-Sichuan border,
 # counties Dege and Baiyu which lies on the Sichuan side and are
@@ -492,7 +502,7 @@
 
 # From David Cochrane (2014-03-26):
 # Just a confirmation that Ürümqi time was implemented in Ürümqi on 1 Feb 1986:
-# http://content.time.com/time/magazine/article/0,9171,960684,00.html
+# https://content.time.com/time/magazine/article/0,9171,960684,00.html
 
 # From Luther Ma (2014-04-22):
 # I have interviewed numerous people of various nationalities and from
@@ -649,7 +659,7 @@
 # (both in Okinawa) adopt the Western Standard Time which is based on
 # 120E. The adoption began from Jan 1, 1896. The original text can be
 # found on Wikisource:
-# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
+# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
 # ... This could be the first adoption of time zone in Taiwan, because
 # during the Qing Dynasty, it seems that there was no time zone
 # declared officially.
@@ -662,7 +672,7 @@
 # territory, including later occupations, adopt Japan Central Time
 # (UTC+9). The adoption began on Oct 1, 1937. The original text can
 # be found on Wikisource:
-# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
+# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
 #
 # That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
 
@@ -798,6 +808,12 @@
 # Looks like the time zone split in Cyprus went through last night.
 # http://cyprus-mail.com/2016/10/30/cyprus-new-division-two-time-zones-now-reality/
 
+# From Paul Eggert (2017-10-18):
+# Northern Cyprus will reinstate winter time on October 29, thus
+# staying in sync with the rest of Cyprus.  See: Anastasiou A.
+# Cyprus to remain united in time.  Cyprus Mail 2017-10-17.
+# https://cyprus-mail.com/2017/10/17/cyprus-remain-united-time/
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cyprus	1975	only	-	Apr	13	0:00	1:00	S
 Rule	Cyprus	1975	only	-	Oct	12	0:00	0	-
@@ -815,7 +831,8 @@
 Zone	Asia/Famagusta	2:15:48	-	LMT	1921 Nov 14
 			2:00	Cyprus	EE%sT	1998 Sep
 			2:00	EUAsia	EE%sT	2016 Sep  8
-			3:00	-	+03
+			3:00	-	+03	2017 Oct 29 1:00u
+			2:00	EUAsia	EE%sT
 
 # Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72.
 # However, for various reasons many users expect to find it under Europe.
@@ -875,7 +892,7 @@
 
 # From João Carrascalão, brother of the former governor of East Timor, in
 # East Timor may be late for its millennium
-# <http://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
+# <https://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
 # Portugal tried to change the time forward in 1974 because the sun
 # rises too early but the suggestion raised a lot of problems with the
 # Timorese and I still don't think it would work today because it
@@ -903,21 +920,62 @@
 # India
 
 # From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic
-# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
+# https://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
 # (2015-12-22):
 # In January 1906, several thousand cotton-mill workers rioted on the
 # outskirts of Bombay....  They were protesting the proposed abolition of
 # local time in favor of Indian Standard Time....  Journalists called this
 # dispute the "Battle of the Clocks."  It lasted nearly half a century.
 
+# From Paul Eggert (2017-04-20):
+# Good luck trying to nail down old timekeeping records in India.
+# "... in the nineteenth century ... Madras Observatory took its magnetic
+# measurements on Göttingen time, its meteorological measurements on Madras
+# (local) time, dropped its time ball on Greenwich (ocean navigator's) time,
+# and distributed civil (local time)." -- Bartky IR. Selling the true time:
+# 19th-century timekeeping in america. Stanford U Press (2000), 247 note 19.
+# "A more potent cause of resistance to the general adoption of the present
+# standard time lies in the fact that it is Madras time.  The citizen of
+# Bombay, proud of being 'primus in Indis' and of Calcutta, equally proud of
+# his city being the Capital of India, and - for a part of the year - the Seat
+# of the Supreme Government, alike look down on Madras, and refuse to change
+# the time they are using, for that of what they regard as a benighted
+# Presidency; while Madras, having for long given the standard time to the
+# rest of India, would resist the adoption of any other Indian standard in its
+# place." -- Oldham RD. On Time in India: a suggestion for its improvement.
+# Proceedings of the Asiatic Society of Bengal (April 1899), 49-55.
+#
+# "In 1870 ... Madras time - 'now used by the telegraph and regulated from the
+# only government observatory' - was suggested as a standard railway time,
+# first to be adopted on the Great Indian Peninsular Railway (GIPR)....
+# Calcutta, Bombay, and Karachi, were to be allowed to continue with their
+# local time for civil purposes." - Prasad R. Tracks of Change: Railways and
+# Everyday Life in Colonial India. Cambridge University Press (2016), 145.
+#
+# Reed S, Low F. The Indian Year Book 1936-37. Bennett, Coleman, pp 27-8.
+# https://archive.org/details/in.ernet.dli.2015.282212
+# This lists +052110 as Madras local time used in railways, and says that on
+# 1906-01-01 railways and telegraphs in India switched to +0530.  Some
+# municipalities retained their former time, and the time in Calcutta
+# continued to depend on whether you were at the railway station or at
+# government offices.  Government time was at +055320 (according to Shanks) or
+# at +0554 (according to the Indian Year Book).  Railway time is more
+# appropriate for our purposes, as it was better documented, it is what we do
+# elsewhere (e.g., Europe/London before 1880), and after 1906 it was
+# consistent in the region now identified by Asia/Kolkata.  So, use railway
+# time for 1870-1941.  Shanks is our only (and dubious) source for the
+# 1941-1945 data.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Kolkata	5:53:28 -	LMT	1880        # Kolkata
-			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
-			6:30	-	+0630	1942 May 15
+Zone	Asia/Kolkata	5:53:28 -	LMT	1854 Jun 28 # Kolkata
+			5:53:20	-	HMT	1870	    # Howrah Mean Time?
+			5:21:10	-	MMT	1906 Jan  1 # Madras local time
+			5:30	-	IST	1941 Oct
+			5:30	1:00	+0630	1942 May 15
 			5:30	-	IST	1942 Sep
 			5:30	1:00	+0630	1945 Oct 15
 			5:30	-	IST
-# The following are like Asia/Kolkata:
+# Since 1970 the following are like Asia/Kolkata:
 #	Andaman Is
 #	Lakshadweep (Laccadive, Minicoy and Amindivi Is)
 #	Nicobar Is
@@ -1059,7 +1117,7 @@
 # From Reuters (2007-09-16), with a heads-up from Jesper Nørgaard Welen:
 # ... the Guardian Council ... approved a law on Sunday to re-introduce
 # daylight saving time ...
-# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
+# https://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
 #
 # From Roozbeh Pournader (2007-11-05):
 # This is quoted from Official Gazette of the Islamic Republic of
@@ -1158,7 +1216,7 @@
 # http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10
 #
 # We have published a short article in English about the change:
-# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
+# https://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iraq	1982	only	-	May	1	0:00	1:00	D
@@ -1466,12 +1524,12 @@
 # From Yu-Cheng Chuang (2013-07-12):
 # ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause
 # about standard time" ... The adoption began from Jan 1, 1896.
-# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
+# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
 #
 # ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
 # means the whole Japan territory, including later occupations, adopt Japan
 # Central Time (UTC+9). The adoption began on Oct 1, 1937.
-# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
+# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Tokyo	9:18:59	-	LMT	1887 Dec 31 15:00u
@@ -1533,7 +1591,7 @@
 # Official, in Arabic:
 # http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
 # ... Our background/permalink about it
-# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
+# https://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
 # ...
 # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
 # ... says midnight for the coming one and 1:00 for the ones in the future
@@ -1891,9 +1949,9 @@
 # between 1987 and 1988 ...
 
 # From Sanghyuk Jung (2014-10-29):
-# http://mm.icann.org/pipermail/tz/2014-October/021830.html
+# https://mm.icann.org/pipermail/tz/2014-October/021830.html
 # According to the Korean Wikipedia
-# http://ko.wikipedia.org/wiki/한국_표준시
+# https://ko.wikipedia.org/wiki/한국_표준시
 # [oldid=12896437 2014-09-04 08:03 UTC]
 # DST in Republic of Korea was as follows....  And I checked old
 # newspapers in Korean, all articles correspond with data in Wikipedia.
@@ -2115,7 +2173,7 @@
 # +08:00 instead. Different sources appear to disagree with the tz
 # database on this, e.g.:
 #
-# http://www.timeanddate.com/worldclock/city.html?n=1026
+# https://www.timeanddate.com/worldclock/city.html?n=1026
 # http://www.worldtimeserver.com/current_time_in_MN.aspx
 #
 # both say GMT+08:00.
@@ -2245,7 +2303,7 @@
 # help reduce load shedding by approving the closure of commercial centres at
 # 9pm and moving clocks forward by one hour for the next three months. ...."
 #
-# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
+# http://www.worldtimezone.com/dst_news/dst_news_pakistan01.html
 # http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4
 
 # From Arthur David Olson (2008-05-19):
@@ -2311,7 +2369,7 @@
 #
 # We have confirmed this year's end date with both with the Ministry of
 # Water and Power and the Pakistan Electric Power Company:
-# http://www.timeanddate.com/news/time/pakistan-ends-dst09.html
+# https://www.timeanddate.com/news/time/pakistan-ends-dst09.html
 
 # From Christoph Göhre (2009-10-01):
 # [T]he German Consulate General in Karachi reported me today that Pakistan
@@ -2493,7 +2551,7 @@
 #
 # We are not sure if Gaza will do the same, last year they had a different
 # end date, we will keep this page updated:
-# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
+# https://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
 
 # From Alexander Krivenyshev (2009-09-02):
 # Seems that Gaza Strip will go back to Winter Time same date as West Bank.
@@ -2531,7 +2589,7 @@
 # the clocks were set back one hour at 2010-08-11 00:00:00 local time in
 # Gaza and the West Bank.
 # Some more background info:
-# http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
+# https://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 
 # From Steffen Thorsen (2011-08-26):
 # Gaza and the West Bank did go back to standard time in the beginning of
@@ -2541,7 +2599,7 @@
 #
 # http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
 # Additional info:
-# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# https://www.timeanddate.com/news/time/palestine-dst-2011.html
 
 # From Alexander Krivenyshev (2011-08-27):
 # According to the article in The Jerusalem Post:
@@ -2551,7 +2609,7 @@
 # The Hamas government said on Saturday that it won't observe summertime after
 # the Muslim feast of Id al-Fitr, which begins on Tuesday..."
 # ...
-# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# https://www.jpost.com/MiddleEast/Article.aspx?id=235650
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
 # The rules for Egypt are stolen from the 'africa' file.
 
@@ -2572,7 +2630,7 @@
 # http://safa.ps/details/news/74352/%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-%D8%A8%D8%A7%D9%84%D8%B6%D9%81%D8%A9-%D9%88%D8%BA%D8%B2%D8%A9-%D9%84%D9%8A%D9%84%D8%A9-%D8%A7%D9%84%D8%AC%D9%85%D8%B9%D8%A9.html
 #
 # Our brief summary:
-# http://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
+# https://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
 
 # From Steffen Thorsen (2013-03-26):
 # The following news sources tells that Palestine will "start daylight saving
@@ -2592,11 +2650,11 @@
 
 # From Steffen Thorsen (2015-03-03):
 # Sources such as http://www.alquds.com/news/article/view/id/548257
-# and http://www.raya.ps/ar/news/890705.html say Palestine areas will
+# and https://www.raya.ps/ar/news/890705.html say Palestine areas will
 # start DST on 2015-03-28 00:00 which is one day later than expected.
 #
 # From Paul Eggert (2015-03-03):
-# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
+# https://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
 # says that the fall 2014 transition was Oct 23 at 24:00.
 
 # From Hannah Kreitem (2016-03-09):
@@ -2620,8 +2678,8 @@
 #
 # From Paul Eggert (2016-10-19):
 # It's also consistent with predictions in the following URLs today:
-# http://www.timeanddate.com/time/change/gaza-strip/gaza
-# http://www.timeanddate.com/time/change/west-bank/hebron
+# https://www.timeanddate.com/time/change/gaza-strip/gaza
+# https://www.timeanddate.com/time/change/west-bank/hebron
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2684,7 +2742,7 @@
 # Philippines, issued a proclamation announcing that 1844-12-30 was to
 # be immediately followed by 1845-01-01; see R.H. van Gent's
 # History of the International Date Line
-# http://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
+# https://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
 # The rest of the data entries are from Shanks & Pottenger.
 
 # From Jesper Nørgaard Welen (2006-04-26):
@@ -2948,7 +3006,7 @@
 # We have not found any sources saying anything about when DST ends this year.
 #
 # Our summary
-# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
+# https://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 
 # From Steffen Thorsen (2009-10-27):
 # The Syrian Arab News Network on 2009-09-29 reported that Syria will
@@ -2975,7 +3033,7 @@
 # http://www.sana.sy/ara/2/2012/03/26/408215.htm
 #
 # Our brief summary:
-# http://www.timeanddate.com/news/time/syria-dst-2012.html
+# https://www.timeanddate.com/news/time/syria-dst-2012.html
 
 # From Arthur David Olson (2012-03-27):
 # Assume last Friday in March going forward XXX.
@@ -3058,7 +3116,7 @@
 # is quoted verbatim in:
 # http://www.thoigian.com.vn/?mPage=P80D01
 # is translated by Brian Inglis in:
-# http://mm.icann.org/pipermail/tz/2014-October/021654.html
+# https://mm.icann.org/pipermail/tz/2014-October/021654.html
 # and is the basis for the information below.
 #
 # The 1906 transition was effective July 1 and standardized Indochina to
--- a/make/data/tzdata/australasia	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/australasia	Thu Nov 16 01:11:32 2017 +0100
@@ -316,7 +316,7 @@
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166
 #
 # A bit more background info here:
-# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
+# https://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
 
 # From Alexander Krivenyshev (2010-10-24):
 # According to Radio Fiji and Fiji Times online, Fiji will end DST 3
@@ -380,9 +380,12 @@
 # clocks go forward an hour at 2am to 3am....  Daylight Saving will
 # end at 3.00am on Sunday 15th January 2017."
 
-# From Paul Eggert (2016-10-03):
-# For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# From Paul Eggert (2017-08-21):
+# Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
+# Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
+# [Legal Notice No. 41] of an order of the previous day by J Usamate.
+# For now, guess DST from 02:00 the first Sunday in November to 03:00
+# the first Sunday on or after January 14.  Although ad hoc, it matches
 # transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
@@ -396,7 +399,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Fiji	2015	max	-	Jan	Sun>=15	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=14	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	+12/+13
@@ -580,7 +583,7 @@
 # The World War II entries below are instead based on Arawa-Kieta.
 # The Japanese occupied Kieta in July 1942,
 # according to the Pacific War Online Encyclopedia
-# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
+# https://pwencycl.kgbudge.com/B/o/Bougainville.htm
 # and seem to have controlled it until their 1945-08-21 surrender.
 #
 # The Autonomous Region of Bougainville switched from UT +10 to +11
@@ -602,7 +605,7 @@
 			-8:00	-	-08
 
 # American Samoa
-Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1879 Jul  5
+Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1892 Jul  5
 			-11:22:48 -	LMT	1911
 			-11:00	-	SST	            # S=Samoa
 Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
@@ -618,7 +621,7 @@
 # Sunday of April 2011."
 #
 # Background info:
-# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
+# https://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
 #
 # Samoa's Daylight Saving Time Act 2009 is available here, but does not
 # contain any dates:
@@ -682,7 +685,7 @@
 Rule	WS	2012	max	-	Apr	Sun>=1	4:00	0	S
 Rule	WS	2012	max	-	Sep	lastSun	3:00	1	D
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
+Zone Pacific/Apia	 12:33:04 -	LMT	1892 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	-1130	1950
 			-11:00	WS	-11/-10	2011 Dec 29 24:00
@@ -709,7 +712,7 @@
 # From Paul Eggert (2012-07-25)
 # A Google Books snippet of Appendix to the Journals of the House of
 # Representatives of New Zealand, Session 1948,
-# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
+# <https://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
 # was "11 hours slow on G.M.T."  Go with Thorsen and assume Shanks & Pottenger
 # are off by an hour starting in 1901.
 
@@ -724,8 +727,8 @@
 Rule	Tonga	2000	only	-	Mar	19	2:00s	0	-
 Rule	Tonga	2000	2001	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Tonga	2001	2002	-	Jan	lastSun	2:00	0	-
-Rule	Tonga	2016	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Tonga	2017	max	-	Jan	Sun>=15	3:00	0	-
+Rule	Tonga	2016	only	-	Nov	Sun>=1	2:00	1:00	S
+Rule	Tonga	2017	only	-	Jan	Sun>=15	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Pacific/Tongatapu	12:19:20 -	LMT	1901
 			12:20	-	+1220	1941
@@ -779,7 +782,7 @@
 # Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin,
 # "The United States High-Altitude Test Experience: A Review Emphasizing the
 # Impact on the Environment", Los Alamos LA-6405, Oct 1976.
-# http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
+# https://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
 # See the table on page 4 where he lists GMT and local times for the tests; a
 # footnote for the JI tests reads that local time is "JI time = Hawaii Time
 # Minus One Hour".
@@ -845,7 +848,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@@ -992,7 +995,7 @@
 #   AEST ACST AWST AEDT ACDT
 #
 #   Parliamentary Library (2008-11-10)
-#   http://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
+#   https://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
 #   EST CST WST preferred for standard time; AEST AEDT ACST ACDT also used
 #
 #   The Transport Safety Bureau has an extensive series of accident reports,
@@ -1028,13 +1031,13 @@
 #
 # NSW (including LHI and Broken Hill):
 # Standard Time Act 1987 (updated 1995-04-04)
-# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
+# https://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
 # ACT
 # Standard Time and Summer Time Act 1972
-# http://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
+# https://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
 # SA
 # Standard Time Act, 1898
-# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
+# https://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
 
 # From David Grosz (2005-06-13):
 # It was announced last week that Daylight Saving would be extended by
@@ -1329,7 +1332,7 @@
 # http://abc.net.au/news/regionals/neweng/monthly/regeng-22jul1999-1.htm
 # (1999-07-22).  For now, we'll wait to see if this really happens.
 #
-# Victoria will following NSW.  See:
+# Victoria will follow NSW.  See:
 # Vic to extend daylight saving (1999-07-28)
 # http://abc.net.au/local/news/olympics/1999/07/item19990728112314_1.htm
 #
@@ -1432,7 +1435,7 @@
 # the ACT for all 52 weeks of the year...
 #
 # We have a wrap-up here:
-# http://www.timeanddate.com/news/time/south-australia-extends-dst.html
+# https://www.timeanddate.com/news/time/south-australia-extends-dst.html
 ###############################################################################
 
 # New Zealand
@@ -1486,7 +1489,7 @@
 # From Paul Eggert (2014-07-14):
 # Chatham Island time was formally standardized on 1957-01-01 by
 # New Zealand's Standard Time Amendment Act 1956 (1956-10-26).
-# http://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
+# https://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
 # According to Google Books snippet view, a speaker in the New Zealand
 # parliamentary debates in 1956 said "Clause 78 makes provision for standard
 # time in the Chatham Islands.  The time there is 45 minutes in advance of New
@@ -1601,7 +1604,7 @@
 # the Norfolk Island Museum and the Australian Bureau of Meteorology's
 # Norfolk Island station, and found no record of Norfolk observing DST
 # other than in 1974/5.  See:
-# http://www.timeanddate.com/time/australia/norfolk-island.html
+# https://www.timeanddate.com/time/australia/norfolk-island.html
 
 # Pitcairn
 
@@ -1629,11 +1632,13 @@
 
 # (Western) Samoa and American Samoa
 
-# Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald)
-# that in 1879 the King of Samoa decided to change
+# Howse writes (p 153) that after the 1879 standardization on Antipodean
+# time by the British governor of Fiji, the King of Samoa decided to change
 # "the date in his kingdom from the Antipodean to the American system,
 # ordaining - by a masterpiece of diplomatic flattery - that
 # the Fourth of July should be celebrated twice in that year."
+# This happened in 1892, according to the Evening News (Sydney) of 1892-07-20.
+# https://www.staff.science.uu.nl/~gent0113/idl/idl.htm
 
 # Although Shanks & Pottenger says they both switched to UT -11:30
 # in 1911, and to -11 in 1950. many earlier sources give -11
@@ -1644,6 +1649,7 @@
 # day in 2011.  Assume also that the Samoas follow the US and New
 # Zealand's "ST"/"DT" style of daylight-saving abbreviations.
 
+
 # Tonga
 
 # From Paul Eggert (1996-01-22):
@@ -1738,6 +1744,15 @@
 # Assume Tonga will observe DST from the first Sunday in November at 02:00
 # through the third Sunday in January at 03:00, like Fiji, for now.
 
+# From David Wade (2017-10-18):
+# In August government was disolved by the King.  The current prime minister
+# continued in office in care taker mode.  It is easy to see that few
+# decisions will be made until elections 16th November.
+#
+# From Paul Eggert (2017-10-18):
+# For now, guess that DST is discontinued.  That's what the IATA is guessing.
+
+
 # Wake
 
 # From Vernice Anderson, Personal Secretary to Philip Jessup,
@@ -1750,7 +1765,7 @@
 # making calculation of time in Washington difficult if not almost
 # impossible.
 #
-# http://www.trumanlibrary.org/wake/meeting.htm
+# https://www.trumanlibrary.org/oralhist/andrsonv.htm
 
 # From Paul Eggert (2003-03-23):
 # We have no other report of DST in Wake Island, so omit this info for now.
@@ -1778,7 +1793,7 @@
 # an international standard, there are some places on the high seas where the
 # correct date is ambiguous.
 
-# From Wikipedia <http://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
+# From Wikipedia <https://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
 # Before 1920, all ships kept local apparent time on the high seas by setting
 # their clocks at night or at the morning sight so that, given the ship's
 # speed and direction, it would be 12 o'clock when the Sun crossed the ship's
--- a/make/data/tzdata/backward	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/backward	Thu Nov 16 01:11:32 2017 +0100
@@ -84,7 +84,9 @@
 Link	America/Manaus		Brazil/West
 Link	America/Halifax		Canada/Atlantic
 Link	America/Winnipeg	Canada/Central
-Link	America/Regina		Canada/East-Saskatchewan
+# This line is commented out, as the name exceeded the 14-character limit
+# and was an unused misnomer.
+#Link	America/Regina		Canada/East-Saskatchewan
 Link	America/Toronto		Canada/Eastern
 Link	America/Edmonton	Canada/Mountain
 Link	America/St_Johns	Canada/Newfoundland
--- a/make/data/tzdata/europe	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/europe	Thu Nov 16 01:11:32 2017 +0100
@@ -60,14 +60,14 @@
 #	[PDF] (1914-03)
 #
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
-#	<http://www.jstor.org/stable/1774359>.  He writes:
+#	<https://www.jstor.org/stable/1774359>.  He writes:
 #	"It is requested that corrections and additions to these tables
 #	may be sent to Mr. John Milne, Royal Geographical Society,
 #	Savile Row, London."  Nowadays please email them to tz@iana.org.
 #
 #	Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
 #	This Russian-language source was consulted by Vladimir Karpinsky; see
-#	http://mm.icann.org/pipermail/tz/2014-August/021320.html
+#	https://mm.icann.org/pipermail/tz/2014-August/021320.html
 #	The full Russian citation is:
 #	Бялокоз, Евгений Людвигович. Новый счет времени в течении суток
 #	введенный декретом Совета народных комиссаров для всей России с 1-го
@@ -210,7 +210,7 @@
 # foundations of civilization throughout the world.
 #	-- "A Silent Toast to William Willett", Pictorial Weekly;
 #	republished in Finest Hour (Spring 2002) 1(114):26
-#	http://www.winstonchurchill.org/images/finesthour/Vol.01%20No.114.pdf
+#	https://www.winstonchurchill.org/publications/finest-hour/finest-hour-114/a-silent-toast-to-william-willett-by-winston-s-churchill
 
 # From Paul Eggert (2015-08-08):
 # The OED Supplement says that the English originally said "Daylight Saving"
@@ -248,8 +248,8 @@
 # official designation; the reply of the 21st was that there wasn't
 # but he couldn't think of anything better than the "Double British
 # Summer Time" that the BBC had been using informally.
-# http://www.polyomino.org.uk/british-time/bbc-19410418.png
-# http://www.polyomino.org.uk/british-time/ho-19410421.png
+# https://www.polyomino.org.uk/british-time/bbc-19410418.png
+# https://www.polyomino.org.uk/british-time/ho-19410421.png
 
 # From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21):
 # [N]o official designation has as far as I know been adopted for the time
@@ -266,13 +266,13 @@
 # the history of summer time legislation in the United Kingdom.
 # Since 1998 Joseph S. Myers has been updating
 # and extending this list, which can be found in
-# http://www.polyomino.org.uk/british-time/
+# https://www.polyomino.org.uk/british-time/
 
 # From Joseph S. Myers (1998-01-06):
 #
 # The legal time in the UK outside of summer time is definitely GMT, not UTC;
 # see Lord Tanlaw's speech
-# http://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
+# https://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
 # (Lords Hansard 11 June 1997 columns 964 to 976).
 
 # From Paul Eggert (2006-03-22):
@@ -318,7 +318,7 @@
 # Irish 'public feeling (was) outraged by forcing of English time on us'."
 # -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising.
 # Irish Times 2014-10-27.
-# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
+# https://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
 
 # From Joseph S. Myers (2005-01-26):
 # Irish laws are available online at <http://www.irishstatutebook.ie>.
@@ -371,6 +371,12 @@
 # Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
 # "Irish Summer Time", abbreviated to "IST".
 
+# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
+# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
+# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
+# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
+# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Summer Time Act, 1916
 Rule	GB-Eire	1916	only	-	May	21	2:00s	1:00	BST
@@ -495,14 +501,14 @@
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Dublin	-0:25:00 -	LMT	1880 Aug  2
-			-0:25:21 -	DMT	1916 May 21  2:00 # Dublin MT
+			-0:25:21 -	DMT	1916 May 21  2:00s # Dublin MT
 			-0:25:21 1:00	IST	1916 Oct  1  2:00s
 			 0:00	GB-Eire	%s	1921 Dec  6 # independence
-			 0:00	GB-Eire	GMT/IST	1940 Feb 25  2:00
-			 0:00	1:00	IST	1946 Oct  6  2:00
-			 0:00	-	GMT	1947 Mar 16  2:00
-			 0:00	1:00	IST	1947 Nov  2  2:00
-			 0:00	-	GMT	1948 Apr 18  2:00
+			 0:00	GB-Eire	GMT/IST	1940 Feb 25  2:00s
+			 0:00	1:00	IST	1946 Oct  6  2:00s
+			 0:00	-	GMT	1947 Mar 16  2:00s
+			 0:00	1:00	IST	1947 Nov  2  2:00s
+			 0:00	-	GMT	1948 Apr 18  2:00s
 			 0:00	GB-Eire	GMT/IST	1968 Oct 27
 			 1:00	-	IST	1971 Oct 31  2:00u
 			 0:00	GB-Eire	GMT/IST	1996
@@ -648,7 +654,7 @@
 # Council of Ministers of the USSR from 1989-03-14 No. 227.
 #
 # I did not find full texts of these acts.  For the 1989 one we have
-# title at http://base.garant.ru/70754136/ :
+# title at https://base.garant.ru/70754136/ :
 # "About change in calculation of time on the territories of
 # Lithuanian SSR, Latvian SSR and Estonian SSR, Astrakhan,
 # Kaliningrad, Kirov, Kuybyshev, Ulyanovsk and Uralsk oblasts".
@@ -679,7 +685,7 @@
 # http://bmockbe.ru/events/?ID=7583
 #
 # Medvedev signed a law on the calculation of the time (in russian):
-# http://www.regnum.ru/news/polit/1413906.html
+# https://www.regnum.ru/news/polit/1413906.html
 
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
@@ -806,7 +812,7 @@
 # Sources (Russian language):
 # http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
 # http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
-# http://news.tut.by/society/250578.html
+# https://news.tut.by/society/250578.html
 #
 # From Alexander Bokovoy (2014-10-09):
 # Belarussian government decided against changing to winter time....
@@ -1127,7 +1133,7 @@
 # for their standard and summer times. He says no, they use "suveaeg"
 # (summer time) and "talveaeg" (winter time).
 
-# From The Baltic Times <http://www.baltictimes.com/> (1999-09-09)
+# From The Baltic Times <https://www.baltictimes.com/> (1999-09-09)
 # via Steffen Thorsen:
 # This year will mark the last time Estonia shifts to summer time,
 # a council of the ruling coalition announced Sept. 6....
@@ -1179,7 +1185,7 @@
 # This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
 # Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
 # Finnish) at
-# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# https://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
 #
 # Page 105 (56 in PDF version) has a handy table of all past daylight savings
 # transitions. It is easy enough to interpret without Finnish skills.
@@ -1192,7 +1198,7 @@
 
 # From Konstantin Hyppönen (2014-06-13):
 # [Heikki Oja's book Aikakirja 2013]
-# http://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
+# https://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
 # pages 104-105, including a scan from a newspaper published on Apr 2 1942
 # say that ... [o]n Apr 2 1942, 24 o'clock (which means Apr 3 1942,
 # 00:00), clocks were moved one hour forward. The newspaper
@@ -1322,7 +1328,7 @@
 
 # From Jörg Schilling (2002-10-23):
 # In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
-# http://www.dhm.de/lemo/html/biografien/BersarinNikolai/
+# https://www.dhm.de/lemo/html/biografien/BersarinNikolai/
 # General [Nikolai] Bersarin.
 
 # From Paul Eggert (2003-03-08):
@@ -1547,7 +1553,7 @@
 # From Paul Eggert (2016-10-27):
 # Go with INRiM for DST rules, except as corrected by Inglis for 1944
 # for the Kingdom of Italy.  This is consistent with Renzo Baldini.
-# Model Rome's occupation by using using C-Eur rules from 1943-09-10
+# Model Rome's occupation by using C-Eur rules from 1943-09-10
 # to 1944-06-04; although Rome was an open city during this period, it
 # was effectively controlled by Germany.
 #
@@ -1862,14 +1868,14 @@
 # Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)-
 # Tiraspol will go back to winter time on October 30, 2011.
 # News from Moldova (in russian):
-# http://ru.publika.md/link_317061.html
+# https://ru.publika.md/link_317061.html
 
 # From Roman Tudos (2015-07-02):
 # http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077
 # From Paul Eggert (2015-07-01):
 # The abovementioned official link to IGO1445-868/2014 states that
 # 2014-10-26's fallback transition occurred at 03:00 local time.  Also,
-# http://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
+# https://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
 # says the 2014-03-30 spring-forward transition was at 02:00 local time.
 # Guess that since 1997 Moldova has switched one hour before the EU.
 
@@ -1941,7 +1947,7 @@
 # Amsterdam mean time.
 
 # The data entries before 1945 are taken from
-# http://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
+# https://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Neth	1916	only	-	May	 1	0:00	1:00	NST	# Netherlands Summer Time
@@ -2022,7 +2028,7 @@
 # so it must have diverged from Oslo time during the war, as Oslo was
 # keeping Berlin time.
 #
-# <http://home.no.net/janmayen/history.htm> says that the meteorologists
+# <https://www.jan-mayen.no/history.htm> says that the meteorologists
 # burned down their station in 1940 and left the island, but returned in
 # 1941 with a small Norwegian garrison and continued operations despite
 # frequent air attacks from Germans.  In 1943 the Americans established a
@@ -2060,7 +2066,7 @@
 Rule	Poland	1945	only	-	Nov	 1	0:00	0	-
 # For 1946 on the source is Kazimierz Borkowski,
 # Toruń Center for Astronomy, Dept. of Radio Astronomy, Nicolaus Copernicus U.,
-# http://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
+# https://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
 # Thanks to Przemysław Augustyniak (2005-05-28) for this reference.
 # He also gives these further references:
 # Mon Pol nr 13, poz 162 (1995) <http://www.abc.com.pl/serwis/mp/1995/0162.htm>
@@ -2094,7 +2100,7 @@
 #
 # From Paul Eggert (2014-08-11), after a heads-up from Stephen Colebourne:
 # According to a Portuguese decree (1911-05-26)
-# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
+# https://dre.pt/application/dir/pdf1sdip/1911/05/12500/23132313.pdf
 # Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00.
 # Round the old offset to -0:36:45.  This agrees with Willett but disagrees
 # with Shanks, who says the transition occurred on 1911-05-24 at 00:00 for
@@ -2276,7 +2282,7 @@
 # 2011 No. 725" and contains no other dates or "effective date" information.
 #
 # Another source is
-# http://www.rg.ru/2011/09/06/chas-zona-dok.html
+# https://rg.ru/2011/09/06/chas-zona-dok.html
 # which, according to translate.google.com, begins "Resolution of the
 # Government of the Russian Federation on August 31, 2011 N 725" and also
 # contains "Date first official publication: September 6, 2011 Posted on:
@@ -2284,7 +2290,7 @@
 # does not contain any "effective date" information.
 #
 # Another source is
-# http://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
+# https://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
 # which, in note 8, contains "Resolution No. 725 of August 31, 2011...
 # Effective as of after 7 days following the day of the official publication"
 # but which does not contain any reference to September 6, 2011.
@@ -2320,7 +2326,7 @@
 # http://itar-tass.com/obschestvo/1333711
 # http://www.pravo.gov.ru:8080/page.aspx?111660
 # http://www.kremlin.ru/acts/46279
-# From October 26, 2014 the new Russian time zone map will looks like this:
+# From October 26, 2014 the new Russian time zone map will look like this:
 # http://www.worldtimezone.com/dst_news/dst_news_russia-map-2014-07.html
 
 # From Paul Eggert (2006-03-22):
@@ -2367,7 +2373,7 @@
 # with maintenance only and represent our best guesses as to which regions
 # are covered by each zone.  They are not meant to be taken as an authoritative
 # listing.  The region codes listed come from
-# http://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
+# https://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
 # and are used for convenience only; no guarantees are made regarding their
 # future stability.  ISO 3166-2:RU codes are also listed for first-level
 # divisions where available.
@@ -2532,7 +2538,7 @@
 # http://www.kaliningradka.ru/site_pc/cherez/index.php?ELEMENT_ID=40091
 # says that Kaliningrad decided not to be an exception 2 days before the
 # 1991-03-31 switch and one person at
-# http://izhevsk.ru/forum_light_message/50/682597-m8369040.html
+# https://izhevsk.ru/forum_light_message/50/682597-m8369040.html
 # says he remembers that Samara opted out of the 1992-01-19 exception
 # 2 days before the switch.
 #
@@ -2604,7 +2610,7 @@
 			 3:00	-	MSK	1997 Mar lastSun  1:00u
 # From Alexander Krivenyshev (2014-03-17):
 # time change at 2:00 (2am) on March 30, 2014
-# http://vz.ru/news/2014/3/17/677464.html
+# https://vz.ru/news/2014/3/17/677464.html
 # From Paul Eggert (2014-03-30):
 # Simferopol and Sevastopol reportedly changed their central town clocks
 # late the previous day, but this appears to have been ceremonial
@@ -2787,7 +2793,7 @@
 # suggests that Altai Republic transitioned to Moscow+3 on
 # 1995-05-28.
 #
-# http://regnum.ru/news/society/1957270.html
+# https://regnum.ru/news/society/1957270.html
 # has some historical data for Altai Krai:
 # before 1957: west part on UTC+6, east on UTC+7
 # after 1957: UTC+7
@@ -3161,8 +3167,8 @@
 # districts, but have very similar populations.  In fact, Wikipedia currently
 # lists them both as having 3528 people, exactly 1668 males and 1860 females
 # each!  (Yikes!)
-# http://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
-# http://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
+# https://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
+# https://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
 # Assume this is a mistake, albeit an amusing one.
 #
 # Looking at censuses, the populations of the two municipalities seem to have
@@ -3483,7 +3489,7 @@
 #
 # From Alois Treindl (2013-09-11):
 # The Federal regulations say
-# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
+# https://www.admin.ch/opc/de/classified-compilation/20071096/index.html
 # ... the meridian for Bern mean time ... is 7 degrees 26' 22.50".
 # Expressed in time, it is 0h29m45.5s.
 
@@ -3560,9 +3566,9 @@
 # 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.
-# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
+# https://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # Turkish:
-# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
+# https://www.hurriyet.com.tr/yaz-saati-uygulamasi-bir-gun-ileri-alindi-17230464
 
 # From Faruk Pasin (2014-02-14):
 # The DST for Turkey has been changed for this year because of the
@@ -3698,7 +3704,7 @@
 # http://www.segodnya.ua/news/14290482.html
 #
 # Deputies cancelled the winter time (in Russian)
-# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# https://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 #
 # From Philip Pizzey (2011-10-18):
 # Today my Ukrainian colleagues have informed me that the
--- a/make/data/tzdata/leapseconds	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/leapseconds	Thu Nov 16 01:11:32 2017 +0100
@@ -26,19 +26,18 @@
 # This file is in the public domain.
 
 # This file is generated automatically from the data in the public-domain
-# leap-seconds.list file available from most NIST time servers.
-# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
-# you should be able to pick up leap-seconds.list from a secondary NIST server.
-# See <http://tf.nist.gov/tf-cgi/servers.cgi> for a list of secondary servers.
+# leap-seconds.list file, which is copied from:
+# ftp://ftp.nist.gov/pub/time/leap-seconds.list
 # For more about leap-seconds.list, please see
 # The NTP Timescale and Leap Seconds
-# http://www.eecis.udel.edu/~mills/leap.html
+# https://www.eecis.udel.edu/~mills/leap.html
 
 # The International Earth Rotation and Reference Systems Service
 # periodically uses leap seconds to keep UTC to within 0.9 s of UT1
 # (which measures the true angular orientation of the earth in space); see
-# Terry J Quinn, The BIPM and the accurate measure of time,
-# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
+# Levine J. Coordinated Universal Time and the leap second.
+# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
+# http://ieeexplore.ieee.org/document/7909995/
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
 # did not exist until the early 1970s.
@@ -81,5 +80,5 @@
 Leap	2015	Jun	30	23:59:60	+	S
 Leap	2016	Dec	31	23:59:60	+	S
 
-#	Updated through IERS Bulletin C53
-#	File expires on:  28 December 2017
+#	Updated through IERS Bulletin C54
+#	File expires on:  28 June 2018
--- a/make/data/tzdata/northamerica	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/northamerica	Thu Nov 16 01:11:32 2017 +0100
@@ -128,10 +128,13 @@
 # Last night I heard part of a rebroadcast of a 1945 Arch Oboler radio drama.
 # In the introduction, Oboler spoke of "Eastern Peace Time."
 # An AltaVista search turned up:
-# http://rowayton.org/rhs/hstaug45.html
+# https://web.archive.org/web/20000926032210/http://rowayton.org/rhs/hstaug45.html
 # "When the time is announced over the radio now, it is 'Eastern Peace
 # Time' instead of the old familiar 'Eastern War Time.'  Peace is wonderful."
 # (August 1945) by way of confirmation.
+#
+# From Paul Eggert (2017-09-23):
+# This was the V-J Day issue of the Clamdigger, a Rowayton, CT newsletter.
 
 # From Joseph Gallant citing
 # George H. Douglas, _The Early Days of Radio Broadcasting_ (1987):
@@ -280,7 +283,7 @@
 # HST and HDT are standardized abbreviations for Hawaii-Aleutian
 # standard and daylight times.  See section 9.47 (p 234) of the
 # U.S. Government Printing Office Style Manual (2008)
-# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
+# https://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
 
 # From Arthur David Olson, 2005-08-09
 # The following was signed into law on 2005-08-08.
@@ -369,7 +372,7 @@
 # western Tennessee, most of Texas, Wisconsin
 
 # From Larry M. Smith (2006-04-26) re Wisconsin:
-# http://www.legis.state.wi.us/statutes/Stat0175.pdf ...
+# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
 # is currently enforced at the 01:00 time of change.  Because the local
 # "bar time" in the state corresponds to 02:00, a number of citations
 # are issued for the "sale of class 'B' alcohol after prohibited
@@ -378,7 +381,7 @@
 # From Douglas R. Bomberg (2007-03-12):
 # Wisconsin has enacted (nearly eleventh-hour) legislation to get WI
 # Statue 175 closer in synch with the US Congress' intent....
-# http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf
+# https://docs.legis.wisconsin.gov/2007/related/acts/3
 
 # From an email administrator of the City of Fort Pierre, SD (2015-12-21):
 # Fort Pierre is technically located in the Mountain time zone as is
@@ -425,7 +428,7 @@
 # ...it appears that Mercer County, North Dakota, changed from the
 # mountain time zone to the central time zone at the last transition from
 # daylight-saving to standard time (on Nov. 7, 2010):
-# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
+# https://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
 # http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html
 
 # From Andy Lipscomb (2011-01-24):
@@ -476,7 +479,7 @@
 # legal time, and is not part of the data here.)  See:
 # Ross SA. An energy crisis from the past: Northern California in 1948.
 # Working Paper No. 8, Institute of Governmental Studies, UC Berkeley,
-# 1973-11.  http://escholarship.org/uc/item/8x22k30c
+# 1973-11.  https://escholarship.org/uc/item/8x22k30c
 #
 # In another measure to save electricity, DST was instituted from 1948-03-14
 # at 02:01 to 1949-01-16 at 02:00, with the governor having the option to move
@@ -497,8 +500,8 @@
 # which established DST from April's last Sunday at 01:00 until September's
 # last Sunday at 02:00. This was amended by 1962's Proposition 6, which changed
 # the fall-back date to October's last Sunday. See:
-# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
-# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
+# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
+# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	CA	1948	only	-	Mar	14	2:01	1:00	D
@@ -515,20 +518,31 @@
 # Alaska
 # AK%sT is the modern abbreviation for -09 per USNO.
 #
-# From Paul Eggert (2001-05-30):
+# From Paul Eggert (2017-06-15):
 # Howse writes that Alaska switched from the Julian to the Gregorian calendar,
 # and from east-of-GMT to west-of-GMT days, when the US bought it from Russia.
-# This was on 1867-10-18, a Friday; the previous day was 1867-10-06 Julian,
-# also a Friday.  Include only the time zone part of this transition,
-# ignoring the switch from Julian to Gregorian, since we can't represent
-# the Julian calendar.
+# On Friday, 1867-10-18 (Gregorian), at precisely 15:30 local time, the
+# Russian forts and fleet at Sitka fired salutes to mark the ceremony of
+# formal transfer.  See the Sacramento Daily Union (1867-11-14), p 3, col 2.
+# https://cdnc.ucr.edu/cgi-bin/cdnc?a=d&d=SDU18671114.2.12.1
+# Sitka workers did not change their calendars until Sunday, 1867-10-20,
+# and so celebrated two Sundays that week.  See: Ahllund T (tr Hallamaa P).
+# From the memoirs of a Finnish workman. Alaska History. 2006 Fall;21(2):1-25.
+# http://alaskahistoricalsociety.org/wp-content/uploads/2016/12/Ahllund-2006-Memoirs-of-a-Finnish-Workman.pdf
+# Include only the time zone part of this transition, ignoring the switch
+# from Julian to Gregorian, since we can't represent the Julian calendar.
 #
-# As far as we know, none of the exact locations mentioned below were
+# As far as we know, of the locations mentioned below only Sitka was
 # permanently inhabited in 1867 by anyone using either calendar.
-# (Yakutat was colonized by the Russians in 1799, but the settlement
-# was destroyed in 1805 by a Yakutat-kon war party.)  However, there
-# were nearby inhabitants in some cases and for our purposes perhaps
-# it's best to simply use the official transition.
+# (Yakutat was colonized by the Russians in 1799, but the settlement was
+# destroyed in 1805 by a Yakutat-kon war party.)  Many of Alaska's inhabitants
+# were unaware of the US acquisition of Alaska, much less of any calendar or
+# time change.  However, the Russian-influenced part of Alaska did observe
+# Russian time, and it is more accurate to model this than to ignore it.
+# The database format requires an exact transition time; use the Russian
+# salute as a somewhat-arbitrary time for the formal transfer of control for
+# all of Alaska.  Sitka's UTC offset is -9:01:13; adjust its 15:30 to the
+# local times of other Alaskan locations so that they change simultaneously.
 
 # From Paul Eggert (2014-07-18):
 # One opinion of the early-1980s turmoil in Alaska over time zones and
@@ -581,10 +595,10 @@
 # It seems Metlakatla did go off PST on Sunday, November 1, changing
 # their time to AKST and are going to follow Alaska's DST, switching
 # between AKST and AKDT from now on....
-# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
+# https://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
+Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 19 15:33:32
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -594,7 +608,7 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 19 15:30
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -602,7 +616,7 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18
+Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 19 15:44:55
 			 -8:46:18 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -610,14 +624,14 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -8:00	-	PST	2015 Nov  1  2:00
 			 -9:00	US	AK%sT
-Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
+Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 19 15:12:18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
 			 -9:00	US	Y%sT	1946
 			 -9:00	-	YST	1969
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Anchorage	 14:00:24 -	LMT	1867 Oct 18
+Zone America/Anchorage	 14:00:24 -	LMT	1867 Oct 19 14:31:37
 			 -9:59:36 -	LMT	1900 Aug 20 12:00
 			-10:00	-	AST	1942
 			-10:00	US	A%sT	1967 Apr
@@ -625,7 +639,7 @@
 			-10:00	US	AH%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Nome	 12:58:21 -	LMT	1867 Oct 18
+Zone America/Nome	 12:58:22 -	LMT	1867 Oct 19 13:29:35
 			-11:01:38 -	LMT	1900 Aug 20 12:00
 			-11:00	-	NST	1942
 			-11:00	US	N%sT	1946
@@ -634,7 +648,7 @@
 			-11:00	US	B%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Adak	 12:13:21 -	LMT	1867 Oct 18
+Zone America/Adak	 12:13:22 -	LMT	1867 Oct 19 12:44:35
 			-11:46:38 -	LMT	1900 Aug 20 12:00
 			-11:00	-	NST	1942
 			-11:00	US	N%sT	1946
@@ -670,7 +684,7 @@
 # "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225
 # of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09,
 # the article is available at
-# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
+# https://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
 # and indicates that standard time was adopted effective noon, January
 # 13, 1896 (page 218), that in "1933, the Legislature decreed daylight
 # saving for the period between the last Sunday of each April and the
@@ -769,7 +783,7 @@
 # Indiana
 #
 # For a map of Indiana's time zone regions, see:
-# http://en.wikipedia.org/wiki/Time_in_Indiana
+# https://en.wikipedia.org/wiki/Time_in_Indiana
 #
 # From Paul Eggert (2007-08-17):
 # Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
@@ -996,7 +1010,7 @@
 # From Paul Eggert (2001-07-16):
 # The final rule was published in the
 # Federal Register 65, 160 (2000-08-17), pp 50154-50158.
-# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=2000_register&docid=fr17au00-22
+# https://www.gpo.gov/fdsys/pkg/FR-2000-08-17/html/00-20854.htm
 #
 Zone America/Kentucky/Monticello -5:39:24 - LMT	1883 Nov 18 12:20:36
 			-6:00	US	C%sT	1946
@@ -1022,7 +1036,7 @@
 # West Wendover, NV officially switched from Pacific to mountain time on
 # 1999-10-31.  See the
 # Federal Register 64, 203 (1999-10-21), pp 56705-56707.
-# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=fr21oc99-15
+# https://www.gpo.gov/fdsys/pkg/FR-1999-10-21/html/99-27240.htm
 # However, the Federal Register says that West Wendover already operated
 # on mountain time, and the rule merely made this official;
 # hence a separate tz entry is not needed.
@@ -1052,12 +1066,23 @@
 # one hour in 1914."  This change is not in Shanks.  We have no more
 # info, so omit this for now.
 #
+# From Paul Eggert (2017-07-26):
+# Although Shanks says Detroit observed DST in 1967 from 06-14 00:01
+# until 10-29 00:01, I now see multiple reports that this is incorrect.
+# For example, according to a 50-year anniversary report about the 1967
+# Detroit riots and a major-league doubleheader on 1967-07-23, "By the time
+# the last fly ball of the doubleheader settled into the glove of leftfielder
+# Lenny Green, it was after 7 p.m.  Detroit did not observe daylight saving
+# time, so light was already starting to fail.  Twilight was made even deeper
+# by billowing columns of smoke that ascended in an unbroken wall north of the
+# ballpark."  See: Dow B. Detroit '67: As violence unfolded, Tigers played two
+# at home vs. Yankees. Detroit Free Press 2017-07-23.
+# https://www.freep.com/story/sports/mlb/tigers/2017/07/23/detroit-tigers-1967-riot-new-york-yankees/499951001/
+#
 # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	Detroit	1948	only	-	Apr	lastSun	2:00	1:00	D
 Rule	Detroit	1948	only	-	Sep	lastSun	2:00	0	S
-Rule	Detroit	1967	only	-	Jun	14	2:00	1:00	D
-Rule	Detroit	1967	only	-	Oct	lastSun	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Detroit	-5:32:11 -	LMT	1905
 			-6:00	-	CST	1915 May 15  2:00
@@ -1121,7 +1146,7 @@
 #	[PDF] (1914-03)
 #
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
-#	<http://www.jstor.org/stable/1774359>.
+#	<https://www.jstor.org/stable/1774359>.
 #
 # See the 'europe' file for Greenland.
 
@@ -1167,19 +1192,19 @@
 # The British Columbia government announced yesterday that it will
 # adjust daylight savings next year to align with changes in the
 # U.S. and the rest of Canada....
-# http://www2.news.gov.bc.ca/news_releases_2005-2009/2006AG0014-000330.htm
+# https://archive.news.gov.bc.ca/releases/news_releases_2005-2009/2006AG0014-000330.htm
 # ...
 # Nova Scotia
 # Daylight saving time will be extended by four weeks starting in 2007....
-# http://www.gov.ns.ca/just/regulations/rg2/2006/ma1206.pdf
+# https://www.novascotia.ca/just/regulations/rg2/2006/ma1206.pdf
 #
 # [For New Brunswick] the new legislation dictates that the time change is to
 # be done at 02:00 instead of 00:01.
-# http://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
+# https://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
 # ...
 # Manitoba has traditionally changed the clock every fall at 03:00.
 # As of 2006, the transition is to take place one hour earlier at 02:00.
-# http://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
+# https://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
 # ...
 # [Alberta, Ontario, Quebec] will follow US rules.
 # http://www.qp.gov.ab.ca/documents/spring/CH03_06.CFM
@@ -1193,7 +1218,7 @@
 # http://www.hoa.gov.nl.ca/hoa/bills/Bill0634.htm
 # ...
 # Yukon
-# http://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
+# https://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
 # ...
 # N.W.T. will follow US rules.  Whoever maintains the government web site
 # does not seem to believe in bookmarks.  To see the news release, click the
@@ -1214,8 +1239,8 @@
 # time and daylight saving time arrangements in Canada circa 1998.
 #
 # National Research Council Canada maintains info about time zones and DST.
-# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
-# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
+# https://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
+# https://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
 # Its unofficial information is often taken from Matthews and Vincent.
 
 # From Paul Eggert (2006-06-27):
@@ -1252,11 +1277,13 @@
 
 # Newfoundland and Labrador
 
-# From Paul Eggert (2000-10-02):
-# Matthews and Vincent (1998) write that Labrador should use NST/NDT,
-# but the only part of Labrador that follows the rules is the
-# southeast corner, including Port Hope Simpson and Mary's Harbour,
-# but excluding, say, Black Tickle.
+# From Paul Eggert (2017-10-14):
+# Legally Labrador should observe Newfoundland time; see:
+# McLeod J. Labrador time - legal or not? St. John's Telegram, 2017-10-07
+# http://www.thetelegram.com/news/local/labrador-time--legal-or-not-154860/
+# Matthews and Vincent (1998) write that the only part of Labrador
+# that follows the rules is the southeast corner, including Port Hope
+# Simpson and Mary's Harbour, but excluding, say, Black Tickle.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	StJohns	1917	only	-	Apr	 8	2:00	1:00	D
@@ -1456,7 +1483,7 @@
 # http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
 # that the coastal strip from just east of Natashquan to Blanc-Sablon
 # observes Atlantic standard time all year round.
-# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
+# https://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
 # says this common practice was codified into law as of 2007.
 # For lack of better info, guess this practice began around 1970, contra to
 # Shanks & Pottenger who have this region observing AST/ADT.
@@ -1488,6 +1515,11 @@
 # earlier in June).
 #
 # Kenora, Ontario, was to abandon DST on 1914-06-01 (-05-21).
+#
+# From Paul Eggert (2017-07-08):
+# For more on Orillia, see: Daubs K. Bold attempt at daylight saving
+# time became a comic failure in Orillia. Toronto Star 2017-07-08.
+# https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html
 
 # From Paul Eggert (1997-10-17):
 # Mark Brader writes that an article in the 1997-10-14 Toronto Star
@@ -1979,7 +2011,7 @@
 #	* 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
 #	c. 7 defines Yukon standard time as UTC-9....
 #	see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
-#	[http://canlii.ca/t/7vhg]
+#	[https://www.canlii.org/en/ca/laws/stat/rsc-1985-c-i-21/latest/rsc-1985-c-i-21.html]
 #	* C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
 #	* O.I.C. 1980/02 established DST.
 #	* O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00.
@@ -2044,7 +2076,7 @@
 #     hours behind Greenwich Time.
 #
 # * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214
-#   http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
+#   https://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
 #   C.O. 1973/214 INTERPRETATION ACT ...
 #
 #     1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby
@@ -2059,7 +2091,7 @@
 #   http://? - no online source found
 #
 # * Yukon Daylight Saving Time, YOIC 1987/56
-#   http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
+#   https://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
 #   O.I.C. 1987/056 INTERPRETATION ACT ...
 #
 #   In every year between
@@ -2071,7 +2103,7 @@
 #   Dated ... 9th day of March, A.D., 1987.
 #
 # * Yukon Daylight Saving Time 2006, YOIC 2006/127
-#   http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
+#   https://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
 #   O.I.C. 2006/127 INTERPRETATION ACT ...
 #
 #     1. In Yukon each year the time for general purposes shall be 7 hours
@@ -2085,7 +2117,7 @@
 #     3. This order comes into force January 1, 2007.
 #
 # * Interpretation Act, RSY 2002, c 125
-# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
+# https://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
 
 # From Rives McDow (1999-09-04):
 # Nunavut ... moved ... to incorporate the whole territory into one time zone.
@@ -2128,7 +2160,7 @@
 
 # From Michaela Rodrigue, writing in the
 # Nunatsiaq News (1999-11-19):
-# http://www.nunatsiaq.com/archives/nunavut991130/nvt91119_17.html
+# http://www.nunatsiaqonline.ca/archives/nunavut991130/nvt91119_17.html
 # Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones,
 # central - or Nunavut time - for government offices, and eastern time
 # for municipal offices and schools....  Igloolik [was similar but then]
@@ -2146,7 +2178,7 @@
 # Central Time and Southampton Island [in the Central zone] is not
 # required to use daylight savings.
 
-# From <http://www.nunatsiaq.com/archives/nunavut001130/nvt21110_02.html>
+# From <http://www.nunatsiaqonline.ca/archives/nunavut001130/nvt21110_02.html>
 # Nunavut now has two time zones (2000-11-10):
 # The Nunavut government would allow its employees in Kugluktuk and
 # Cambridge Bay to operate on central time year-round, putting them
@@ -2477,7 +2509,7 @@
 # http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
 #
 # Our page:
-# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# https://www.timeanddate.com/news/time/north-mexico-dst-change.html
 
 # From Arthur David Olson (2010-01-20):
 # The page
@@ -2896,7 +2928,7 @@
 # http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm
 #
 # Some more background information is posted here:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
 #
 # The article also says that Cuba has been observing DST since 1963,
 # while Shanks (and tzdata) has 1965 as the first date (except in the
@@ -2943,7 +2975,7 @@
 # http://granma.co.cu/2011/03/08/nacional/artic01.html
 #
 # Our info:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
 #
 # From Steffen Thorsen (2011-10-30)
 # Cuba will end DST two weeks later this year. Instead of going back
@@ -2953,7 +2985,7 @@
 # http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html
 #
 # Our page:
-# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html
+# https://www.timeanddate.com/news/time/cuba-time-changes-2011.html
 #
 # From Steffen Thorsen (2012-03-01)
 # According to Radio Reloj, Cuba will start DST on Midnight between March
@@ -2963,7 +2995,7 @@
 # http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril
 #
 # Our info on it:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
 
 # From Steffen Thorsen (2012-11-03):
 # Radio Reloj and many other sources report that Cuba is changing back
@@ -3158,8 +3190,8 @@
 # From Steffen Thorsen (2016-03-12):
 # Jean Antoine, editor of www.haiti-reference.com informed us that Haiti
 # are not going on DST this year.  Several other resources confirm this: ...
-# http://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
-# http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
+# https://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
+# https://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
 # http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/
 
 # From Steffen Thorsen (2017-03-12):
@@ -3358,7 +3390,7 @@
 # Turks and Caicos
 #
 # From Chris Dunn in
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415007
+# https://bugs.debian.org/415007
 # (2007-03-15): In the Turks & Caicos Islands (America/Grand_Turk) the
 # daylight saving dates for time changes have been adjusted to match
 # the recent U.S. change of dates.
@@ -3380,12 +3412,25 @@
 # "permanent daylight saving time" by one year....
 # http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm
 #
+# From the Turks & Caicos Cabinet (2017-07-20), heads-up from Steffen Thorsen:
+# ... agreed to the reintroduction in TCI of Daylight Saving Time (DST)
+# during the summer months and Standard Time, also known as Local
+# Time, during the winter months with effect from April 2018 ...
+# https://www.gov.uk/government/news/turks-and-caicos-post-cabinet-meeting-statement--3
+#
+# From Paul Eggert (2017-08-26):
+# The date of effect of the spring 2018 change appears to be March 11,
+# which makes more sense.  See: Hamilton D. Time change back
+# by March 2018 for TCI. Magnetic Media. 2017-08-25.
+# http://magneticmediatv.com/2017/08/time-change-back-by-march-2018-for-tci/
+#
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Grand_Turk	-4:44:32 -	LMT	1890
 			-5:07:11 -	KMT	1912 Feb # Kingston Mean Time
 			-5:00	-	EST	1979
 			-5:00	US	E%sT	2015 Nov Sun>=1 2:00
-			-4:00	-	AST
+			-4:00	-	AST	2018 Mar 11 3:00
+			-5:00	US	E%sT
 
 # British Virgin Is
 # Virgin Is
--- a/make/data/tzdata/southamerica	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/southamerica	Thu Nov 16 01:11:32 2017 +0100
@@ -45,7 +45,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # These tables use numeric abbreviations like -03 and -0330 for
 # integer hour and minute UTC offsets.  Although earlier editions used
@@ -288,8 +288,8 @@
 #
 # Es inminente que en San Luis atrasen una hora los relojes
 # (It is imminent in San Luis clocks one hour delay)
-# http://www.lagaceta.com.ar/nota/253414/Economia/Es-inminente-que-en-San-Luis-atrasen-una-hora-los-relojes.html
-# http://www.worldtimezone.net/dst_news/dst_news_argentina02.html
+# https://www.lagaceta.com.ar/nota/253414/Economia/Es-inminente-que-en-San-Luis-atrasen-una-hora-los-relojes.html
+# http://www.worldtimezone.com/dst_news/dst_news_argentina02.html
 
 # From Jesper Nørgaard Welen (2008-01-18):
 # The page of the San Luis provincial government
@@ -408,7 +408,7 @@
 # Perhaps San Luis operates on the legal fiction that it is at -04
 # with perpetual summer time, but ordinary usage typically seems to
 # just say it's at -03; see, for example,
-# http://es.wikipedia.org/wiki/Hora_oficial_argentina
+# https://es.wikipedia.org/wiki/Hora_oficial_argentina
 # We've documented similar situations as being plain changes to
 # standard time, so let's do that here too.  This does not change UTC
 # offsets, only tm_isdst and the time zone abbreviations.  One minor
@@ -739,7 +739,7 @@
 # (Portuguese)
 #
 # We have a written a short article about it as well:
-# http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
+# https://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 #
 # From Alexander Krivenyshev (2011-10-04):
 # State Bahia will return to Daylight savings time this year after 8 years off.
@@ -748,7 +748,7 @@
 
 # In Portuguese:
 # http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
-# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# https://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
 
 # From Guilherme Bernardes Rodrigues (2011-10-07):
 # There is news in the media, however there is still no decree about it.
@@ -774,16 +774,16 @@
 
 # From Rodrigo Severo (2012-10-16):
 # Tocantins state will have DST.
-# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
+# https://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
 
 # From Steffen Thorsen (2013-09-20):
 # Tocantins in Brazil is very likely not to observe DST from October....
 # http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
 # We will keep this article updated when this is confirmed:
-# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
+# https://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
 
 # From Steffen Thorsen (2013-10-17):
-# http://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
+# https://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
 # Senator Jorge Viana announced that Acre will change time zone on November 10.
 # He did not specify the time of the change, nor if western parts of Amazonas
 # will change as well.
@@ -1099,18 +1099,18 @@
 # the following source, cited by Oscar van Vlijmen (2006-10-08):
 # [1] Chile Law
 # http://www.webexhibits.org/daylightsaving/chile.html
-# This contains a copy of a this official table:
+# This contains a copy of this official table:
 # Cambios en la hora oficial de Chile desde 1900 (retrieved 2008-03-30)
-# http://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm
+# https://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm
 # [1] needs several corrections, though.
 #
 # The first set of corrections is from:
 # [2] History of the Official Time of Chile
 # http://www.horaoficial.cl/ing/horaof_ing.html (retrieved 2012-03-06).  See:
-# http://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html
+# https://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html
 # This is an English translation of:
 # Historia de la hora oficial de Chile (retrieved 2012-10-24).  See:
-# http://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm
+# https://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm
 # A fancier Spanish version (requiring mouse-clicking) is at:
 # http://www.horaoficial.cl/historia_hora.html
 # Conflicts between [1] and [2] were resolved as follows:
@@ -1386,10 +1386,10 @@
 # Milne says the Central and South American Telegraph Company used -5:24:15.
 #
 # From Alois Treindl (2016-12-15):
-# http://www.elcomercio.com/actualidad/hora-sixto-1993.html
+# https://www.elcomercio.com/actualidad/hora-sixto-1993.html
 # ... Whether the law applied also to Galápagos, I do not know.
 # From Paul Eggert (2016-12-15):
-# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html
+# https://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html
 # This says President Sixto Durán Ballén signed decree No. 285, which
 # established DST from 1992-11-28 to 1993-02-05; it does not give transition
 # times.  The people called it "hora de Sixto" ("Sixto hour").  The change did
@@ -1801,7 +1801,7 @@
 # hours of presidential broadcasts, hours of lines,' quipped comedian
 # Jean Mary Curró ...". See: Cawthorne A, Kai D. Venezuela scraps
 # half-hour time difference set by Chavez. Reuters 2016-04-15 14:50 -0400
-# http://www.reuters.com/article/us-venezuela-timezone-idUSKCN0XC2BE
+# https://www.reuters.com/article/us-venezuela-timezone-idUSKCN0XC2BE
 #
 # From Matt Johnson (2016-04-20):
 # ... published in the official Gazette [2016-04-18], here:
--- a/make/data/tzdata/zone.tab	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/data/tzdata/zone.tab	Thu Nov 16 01:11:32 2017 +0100
@@ -209,7 +209,7 @@
 GD	+1203-06145	America/Grenada
 GE	+4143+04449	Asia/Tbilisi
 GF	+0456-05220	America/Cayenne
-GG	+4927-00232	Europe/Guernsey
+GG	+492717-0023210	Europe/Guernsey
 GH	+0533-00013	Africa/Accra
 GI	+3608-00521	Europe/Gibraltar
 GL	+6411-05144	America/Godthab	Greenland (most areas)
@@ -244,7 +244,7 @@
 IR	+3540+05126	Asia/Tehran
 IS	+6409-02151	Atlantic/Reykjavik
 IT	+4154+01229	Europe/Rome
-JE	+4912-00207	Europe/Jersey
+JE	+491101-0020624	Europe/Jersey
 JM	+175805-0764736	America/Jamaica
 JO	+3157+03556	Asia/Amman
 JP	+353916+1394441	Asia/Tokyo
--- a/make/lib/Lib-jdk.net.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/lib/Lib-jdk.net.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
       SRC := $(TOPDIR)/src/jdk.net/solaris/native/libextnet, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-vers, \
+      MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-solaris, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := -lsocket -lc -ljava, \
@@ -48,4 +48,25 @@
 endif
 
 
+ifeq ($(OPENJDK_TARGET_OS), linux)
+
+  $(eval $(call SetupNativeCompilation, BUILD_LIBEXTNET, \
+      LIBRARY := extnet, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(TOPDIR)/src/jdk.net/linux/native/libextnet, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \
+      MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-linux, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LIBS := -ljvm -ljava -lc, \
+      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libextnet, \
+  ))
+
+  $(BUILD_LIBEXTNET): $(call FindLib, java.base, java)
+
+  TARGETS += $(BUILD_LIBEXTNET)
+endif
+
+
 ################################################################################
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mapfiles/libextnet/mapfile-linux	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2017, 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.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+SUNWprivate_1.1 {
+	global:
+    	Java_jdk_net_LinuxSocketOptions_setQuickAck0;
+    	Java_jdk_net_LinuxSocketOptions_getQuickAck0;
+    	Java_jdk_net_LinuxSocketOptions_quickAckSupported0;
+	local:
+	    *;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mapfiles/libextnet/mapfile-solaris	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2017, 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.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+SUNWprivate_1.1 {
+	global:
+	    Java_jdk_net_SolarisSocketOptions_init;
+	    Java_jdk_net_SolarisSocketOptions_setFlowOption;
+	    Java_jdk_net_SolarisSocketOptions_getFlowOption;
+	    Java_jdk_net_SolarisSocketOptions_flowSupported;
+	local:
+	    *;
+};
--- a/make/mapfiles/libextnet/mapfile-vers	Sat Nov 11 01:21:09 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2016, 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.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# 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.
-#
-
-SUNWprivate_1.1 {
-	global:
-	    Java_jdk_net_SolarisSocketOptions_init;
-	    Java_jdk_net_SolarisSocketOptions_setFlowOption;
-	    Java_jdk_net_SolarisSocketOptions_getFlowOption;
-	    Java_jdk_net_SolarisSocketOptions_flowSupported;
-	local:
-	    *;
-};
--- a/make/nashorn/build.xml	Sat Nov 11 01:21:09 2017 +0100
+++ b/make/nashorn/build.xml	Thu Nov 16 01:11:32 2017 +0100
@@ -830,8 +830,8 @@
 
     <!-- underscorejs -->
     <mkdir dir="${test.external.dir}/underscore"/>
-    <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
-    <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
+    <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true" tryGzipEncoding="true"/>
+    <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true" tryGzipEncoding="true"/>
 
     <!-- yui -->
     <mkdir dir="${test.external.dir}/yui"/>
--- a/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Thu Nov 16 01:11:32 2017 +0100
@@ -25,25 +25,21 @@
 
 package java.lang.invoke;
 
-import jdk.internal.loader.BootLoader;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.FieldVisitor;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.vm.annotation.Stable;
 import sun.invoke.util.ValueConversions;
-import sun.invoke.util.Wrapper;
 
-import java.lang.invoke.LambdaForm.NamedFunction;
-import java.lang.invoke.MethodHandles.Lookup;
-import java.lang.reflect.Field;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.function.Function;
+import java.util.ArrayList;
+import java.util.List;
 
 import static java.lang.invoke.LambdaForm.BasicType;
 import static java.lang.invoke.LambdaForm.BasicType.*;
-import static java.lang.invoke.MethodHandleStatics.*;
-import static jdk.internal.org.objectweb.asm.Opcodes.*;
+import static java.lang.invoke.LambdaForm.BasicType.V_TYPE_NUM;
+import static java.lang.invoke.LambdaForm.BasicType.V_TYPE_NUM;
+import static java.lang.invoke.LambdaForm.BasicType.V_TYPE_NUM;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import static java.lang.invoke.MethodHandleStatics.newInternalError;
+import static java.lang.invoke.MethodHandleStatics.uncaughtException;
 
 /**
  * The flavor of method handle which emulates an invoke instruction
@@ -56,7 +52,7 @@
 
     /*non-public*/ BoundMethodHandle(MethodType type, LambdaForm form) {
         super(type, form);
-        assert(speciesData() == speciesData(form));
+        assert(speciesData() == speciesDataFor(form));
     }
 
     //
@@ -70,13 +66,13 @@
             case L_TYPE:
                 return bindSingle(type, form, x);  // Use known fast path.
             case I_TYPE:
-                return (BoundMethodHandle) SpeciesData.EMPTY.extendWith(I_TYPE).constructor().invokeBasic(type, form, ValueConversions.widenSubword(x));
+                return (BoundMethodHandle) SPECIALIZER.topSpecies().extendWith(I_TYPE_NUM).factory().invokeBasic(type, form, ValueConversions.widenSubword(x));
             case J_TYPE:
-                return (BoundMethodHandle) SpeciesData.EMPTY.extendWith(J_TYPE).constructor().invokeBasic(type, form, (long) x);
+                return (BoundMethodHandle) SPECIALIZER.topSpecies().extendWith(J_TYPE_NUM).factory().invokeBasic(type, form, (long) x);
             case F_TYPE:
-                return (BoundMethodHandle) SpeciesData.EMPTY.extendWith(F_TYPE).constructor().invokeBasic(type, form, (float) x);
+                return (BoundMethodHandle) SPECIALIZER.topSpecies().extendWith(F_TYPE_NUM).factory().invokeBasic(type, form, (float) x);
             case D_TYPE:
-                return (BoundMethodHandle) SpeciesData.EMPTY.extendWith(D_TYPE).constructor().invokeBasic(type, form, (double) x);
+                return (BoundMethodHandle) SPECIALIZER.topSpecies().extendWith(D_TYPE_NUM).factory().invokeBasic(type, form, (double) x);
             default : throw newInternalError("unexpected xtype: " + xtype);
             }
         } catch (Throwable t) {
@@ -98,6 +94,7 @@
     BoundMethodHandle bindArgumentL(int pos, Object value) {
         return editor().bindArgumentL(this, pos, value);
     }
+
     /*non-public*/
     BoundMethodHandle bindArgumentI(int pos, int value) {
         return editor().bindArgumentI(this, pos, value);
@@ -114,7 +111,6 @@
     BoundMethodHandle bindArgumentD(int pos, double value) {
         return editor().bindArgumentD(this, pos, value);
     }
-
     @Override
     BoundMethodHandle rebind() {
         if (!tooComplex()) {
@@ -137,28 +133,29 @@
     static BoundMethodHandle makeReinvoker(MethodHandle target) {
         LambdaForm form = DelegatingMethodHandle.makeReinvokerForm(
                 target, MethodTypeForm.LF_REBIND,
-                Species_L.SPECIES_DATA, Species_L.SPECIES_DATA.getterFunction(0));
+                Species_L.BMH_SPECIES, Species_L.BMH_SPECIES.getterFunction(0));
         return Species_L.make(target.type(), form, target);
     }
 
     /**
-     * Return the {@link SpeciesData} instance representing this BMH species. All subclasses must provide a
+     * Return the {@link BoundMethodHandle.SpeciesData} instance representing this BMH species. All subclasses must provide a
      * static field containing this value, and they must accordingly implement this method.
      */
-    /*non-public*/ abstract SpeciesData speciesData();
+    /*non-public*/ abstract BoundMethodHandle.SpeciesData speciesData();
 
-    /*non-public*/ static SpeciesData speciesData(LambdaForm form) {
+    /*non-public*/ static BoundMethodHandle.SpeciesData speciesDataFor(LambdaForm form) {
         Object c = form.names[0].constraint;
-        if (c instanceof SpeciesData)
+        if (c instanceof SpeciesData) {
             return (SpeciesData) c;
+        }
         // if there is no BMH constraint, then use the null constraint
-        return SpeciesData.EMPTY;
+        return SPECIALIZER.topSpecies();
     }
 
     /**
      * Return the number of fields in this BMH.  Equivalent to speciesData().fieldCount().
      */
-    /*non-public*/ abstract int fieldCount();
+    /*non-public*/ final int fieldCount() { return speciesData().fieldCount(); }
 
     @Override
     Object internalProperties() {
@@ -167,7 +164,7 @@
 
     @Override
     final String internalValues() {
-        int count = speciesData().fieldCount();
+        int count = fieldCount();
         if (count == 1) {
             return "[" + arg(0) + "]";
         }
@@ -180,17 +177,18 @@
 
     /*non-public*/ final Object arg(int i) {
         try {
-            switch (speciesData().fieldType(i)) {
-            case L_TYPE: return          speciesData().getters[i].invokeBasic(this);
-            case I_TYPE: return (int)    speciesData().getters[i].invokeBasic(this);
-            case J_TYPE: return (long)   speciesData().getters[i].invokeBasic(this);
-            case F_TYPE: return (float)  speciesData().getters[i].invokeBasic(this);
-            case D_TYPE: return (double) speciesData().getters[i].invokeBasic(this);
+            Class<?> fieldType = speciesData().fieldTypes().get(i);
+            switch (BasicType.basicType(fieldType)) {
+                case L_TYPE: return          speciesData().getter(i).invokeBasic(this);
+                case I_TYPE: return (int)    speciesData().getter(i).invokeBasic(this);
+                case J_TYPE: return (long)   speciesData().getter(i).invokeBasic(this);
+                case F_TYPE: return (float)  speciesData().getter(i).invokeBasic(this);
+                case D_TYPE: return (double) speciesData().getter(i).invokeBasic(this);
             }
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
-        throw new InternalError("unexpected type: " + speciesData().typeChars+"."+i);
+        throw new InternalError("unexpected type: " + speciesData().key()+"."+i);
     }
 
     //
@@ -210,20 +208,21 @@
 
     private  // make it private to force users to access the enclosing class first
     static final class Species_L extends BoundMethodHandle {
+
         final Object argL0;
+
         private Species_L(MethodType mt, LambdaForm lf, Object argL0) {
             super(mt, lf);
             this.argL0 = argL0;
         }
+
         @Override
         /*non-public*/ SpeciesData speciesData() {
-            return SPECIES_DATA;
+            return BMH_SPECIES;
         }
-        @Override
-        /*non-public*/ int fieldCount() {
-            return 1;
-        }
-        /*non-public*/ static final SpeciesData SPECIES_DATA = new SpeciesData("L", Species_L.class);
+
+        /*non-public*/ static @Stable SpeciesData BMH_SPECIES;
+
         /*non-public*/ static BoundMethodHandle make(MethodType mt, LambdaForm lf, Object argL0) {
             return new Species_L(mt, lf, argL0);
         }
@@ -234,7 +233,7 @@
         @Override
         /*non-public*/ final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object narg) {
             try {
-                return (BoundMethodHandle) SPECIES_DATA.extendWith(L_TYPE).constructor().invokeBasic(mt, lf, argL0, narg);
+                return (BoundMethodHandle) BMH_SPECIES.extendWith(L_TYPE_NUM).factory().invokeBasic(mt, lf, argL0, narg);
             } catch (Throwable ex) {
                 throw uncaughtException(ex);
             }
@@ -242,7 +241,7 @@
         @Override
         /*non-public*/ final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg) {
             try {
-                return (BoundMethodHandle) SPECIES_DATA.extendWith(I_TYPE).constructor().invokeBasic(mt, lf, argL0, narg);
+                return (BoundMethodHandle) BMH_SPECIES.extendWith(I_TYPE_NUM).factory().invokeBasic(mt, lf, argL0, narg);
             } catch (Throwable ex) {
                 throw uncaughtException(ex);
             }
@@ -250,7 +249,7 @@
         @Override
         /*non-public*/ final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg) {
             try {
-                return (BoundMethodHandle) SPECIES_DATA.extendWith(J_TYPE).constructor().invokeBasic(mt, lf, argL0, narg);
+                return (BoundMethodHandle) BMH_SPECIES.extendWith(J_TYPE_NUM).factory().invokeBasic(mt, lf, argL0, narg);
             } catch (Throwable ex) {
                 throw uncaughtException(ex);
             }
@@ -258,7 +257,7 @@
         @Override
         /*non-public*/ final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg) {
             try {
-                return (BoundMethodHandle) SPECIES_DATA.extendWith(F_TYPE).constructor().invokeBasic(mt, lf, argL0, narg);
+                return (BoundMethodHandle) BMH_SPECIES.extendWith(F_TYPE_NUM).factory().invokeBasic(mt, lf, argL0, narg);
             } catch (Throwable ex) {
                 throw uncaughtException(ex);
             }
@@ -266,7 +265,7 @@
         @Override
         /*non-public*/ final BoundMethodHandle copyWithExtendD(MethodType mt, LambdaForm lf, double narg) {
             try {
-                return (BoundMethodHandle) SPECIES_DATA.extendWith(D_TYPE).constructor().invokeBasic(mt, lf, argL0, narg);
+                return (BoundMethodHandle) BMH_SPECIES.extendWith(D_TYPE_NUM).factory().invokeBasic(mt, lf, argL0, narg);
             } catch (Throwable ex) {
                 throw uncaughtException(ex);
             }
@@ -277,601 +276,177 @@
     // BMH species meta-data
     //
 
-    /**
-     * Meta-data wrapper for concrete BMH types.
-     * Each BMH type corresponds to a given sequence of basic field types (LIJFD).
-     * The fields are immutable; their values are fully specified at object construction.
-     * Each BMH type supplies an array of getter functions which may be used in lambda forms.
-     * A BMH is constructed by cloning a shorter BMH and adding one or more new field values.
-     * The shortest possible BMH has zero fields; its class is SimpleMethodHandle.
-     * BMH species are not interrelated by subtyping, even though it would appear that
-     * a shorter BMH could serve as a supertype of a longer one which extends it.
-     */
-    static class SpeciesData {
-        private final String                             typeChars;
-        private final BasicType[]                        typeCodes;
-        private final Class<? extends BoundMethodHandle> clazz;
-        // Bootstrapping requires circular relations MH -> BMH -> SpeciesData -> MH
-        // Therefore, we need a non-final link in the chain.  Use array elements.
-        @Stable private final MethodHandle[]             constructor;
-        @Stable private final MethodHandle[]             getters;
-        @Stable private final NamedFunction[]            nominalGetters;
-        @Stable private final SpeciesData[]              extensions;
+    /*non-public*/
+    static final class SpeciesData extends ClassSpecializer<BoundMethodHandle, String, SpeciesData>.SpeciesData {
+        // This array is filled in lazily, as new species come into being over time.
+        @Stable final private SpeciesData[] extensions = new SpeciesData[ARG_TYPE_LIMIT];
 
-        /*non-public*/ int fieldCount() {
-            return typeCodes.length;
-        }
-        /*non-public*/ BasicType fieldType(int i) {
-            return typeCodes[i];
-        }
-        /*non-public*/ char fieldTypeChar(int i) {
-            return typeChars.charAt(i);
+        public SpeciesData(Specializer outer, String key) {
+            outer.super(key);
         }
-        String fieldSignature() {
-            return typeChars;
-        }
-        public Class<? extends BoundMethodHandle> fieldHolder() {
-            return clazz;
-        }
-        public String toString() {
-            return "SpeciesData<"+fieldSignature()+">";
+
+        @Override
+        protected String deriveClassName() {
+            String typeString = deriveTypeString();
+            if (typeString.isEmpty()) {
+                return SimpleMethodHandle.class.getName();
+            }
+            return BoundMethodHandle.class.getName() + "$Species_" + typeString;
         }
 
-        /**
-         * Return a {@link LambdaForm.Name} containing a {@link LambdaForm.NamedFunction} that
-         * represents a MH bound to a generic invoker, which in turn forwards to the corresponding
-         * getter.
-         */
-        NamedFunction getterFunction(int i) {
-            NamedFunction nf = nominalGetters[i];
-            assert(nf.memberDeclaringClassOrNull() == fieldHolder());
-            assert(nf.returnType() == fieldType(i));
-            return nf;
-        }
-
-        NamedFunction[] getterFunctions() {
-            return nominalGetters;
-        }
-
-        MethodHandle[] getterHandles() { return getters; }
-
-        MethodHandle constructor() {
-            return constructor[0];
+        @Override
+        protected List<Class<?>> deriveFieldTypes(String key) {
+            ArrayList<Class<?>> types = new ArrayList<>(key.length());
+            for (int i = 0; i < key.length(); i++) {
+                types.add(basicType(key.charAt(i)).basicTypeClass());
+            }
+            return types;
         }
 
-        static final SpeciesData EMPTY = new SpeciesData("", BoundMethodHandle.class);
-
-        SpeciesData(String types, Class<? extends BoundMethodHandle> clazz) {
-            this.typeChars = types;
-            this.typeCodes = basicTypes(types);
-            this.clazz = clazz;
-            if (!INIT_DONE) {
-                this.constructor = new MethodHandle[1];  // only one ctor
-                this.getters = new MethodHandle[types.length()];
-                this.nominalGetters = new NamedFunction[types.length()];
-            } else {
-                this.constructor = Factory.makeCtors(clazz, types, null);
-                this.getters = Factory.makeGetters(clazz, types, null);
-                this.nominalGetters = Factory.makeNominalGetters(types, null, this.getters);
-            }
-            this.extensions = new SpeciesData[ARG_TYPE_LIMIT];
+        @Override
+        protected String deriveTypeString() {
+            // (If/when we have to add nominal types, just inherit the more complex default.)
+            return key();
         }
 
-        private void initForBootstrap() {
-            assert(!INIT_DONE);
-            if (constructor() == null) {
-                String types = typeChars;
-                CACHE.put(types, this);
-                Factory.makeCtors(clazz, types, this.constructor);
-                Factory.makeGetters(clazz, types, this.getters);
-                Factory.makeNominalGetters(types, this.nominalGetters, this.getters);
+        @Override
+        protected MethodHandle deriveTransformHelper(MemberName transform, int whichtm) {
+            if (whichtm == Specializer.TN_COPY_NO_EXTEND) {
+                return factory();
+            } else if (whichtm < ARG_TYPE_LIMIT) {
+                return extendWith((byte) whichtm).factory();
+            } else {
+                throw newInternalError("bad transform");
             }
         }
 
-        private static final ConcurrentMap<String, SpeciesData> CACHE = new ConcurrentHashMap<>();
-        private static final boolean INIT_DONE;  // set after <clinit> finishes...
-
-        SpeciesData extendWith(byte type) {
-            return extendWith(BasicType.basicType(type));
-        }
-
-        SpeciesData extendWith(BasicType type) {
-            int ord = type.ordinal();
-            SpeciesData d = extensions[ord];
-            if (d != null)  return d;
-            extensions[ord] = d = get(typeChars+type.basicTypeChar());
-            return d;
+        @Override
+        protected <X> List<X> deriveTransformHelperArguments(MemberName transform, int whichtm, List<X> args, List<X> fields) {
+            assert(verifyTHAargs(transform, whichtm, args, fields));
+            // The rule is really simple:  Keep the first two arguments
+            // the same, then put in the fields, then put any other argument.
+            args.addAll(2, fields);
+            return args;
         }
 
-        private static SpeciesData get(String types) {
-            return CACHE.computeIfAbsent(types, new Function<String, SpeciesData>() {
-                @Override
-                public SpeciesData apply(String types) {
-                    Class<? extends BoundMethodHandle> bmhcl = Factory.getConcreteBMHClass(types);
-                    // SpeciesData instantiation may throw VirtualMachineError because of
-                    // code cache overflow...
-                    SpeciesData speciesData = new SpeciesData(types, bmhcl);
-                    // CHM.computeIfAbsent ensures only one SpeciesData will be set
-                    // successfully on the concrete BMH class if ever
-                    Factory.setSpeciesDataToConcreteBMHClass(bmhcl, speciesData);
-                    // the concrete BMH class is published via SpeciesData instance
-                    // returned here only after it's SPECIES_DATA field is set
-                    return speciesData;
-                }
-            });
-        }
-
-        /**
-         * This is to be called when assertions are enabled. It checks whether SpeciesData for all of the statically
-         * defined species subclasses of BoundMethodHandle has been added to the SpeciesData cache. See below in the
-         * static initializer for
-         */
-        static boolean speciesDataCachePopulated() {
-            Class<BoundMethodHandle> rootCls = BoundMethodHandle.class;
-            for (Class<?> c : rootCls.getDeclaredClasses()) {
-                if (rootCls.isAssignableFrom(c)) {
-                    final Class<? extends BoundMethodHandle> cbmh = c.asSubclass(BoundMethodHandle.class);
-                    SpeciesData d = Factory.getSpeciesDataFromConcreteBMHClass(cbmh);
-                    assert(d != null) : cbmh.getName();
-                    assert(d.clazz == cbmh);
-                    assert(CACHE.get(d.typeChars) == d);
-                }
+        private boolean verifyTHAargs(MemberName transform, int whichtm, List<?> args, List<?> fields) {
+            assert(transform == Specializer.BMH_TRANSFORMS.get(whichtm));
+            assert(args.size() == transform.getMethodType().parameterCount());
+            assert(fields.size() == this.fieldCount());
+            final int MH_AND_LF = 2;
+            if (whichtm == Specializer.TN_COPY_NO_EXTEND) {
+                assert(transform.getMethodType().parameterCount() == MH_AND_LF);
+            } else if (whichtm < ARG_TYPE_LIMIT) {
+                assert(transform.getMethodType().parameterCount() == MH_AND_LF+1);
+                final BasicType type = basicType((byte) whichtm);
+                assert(transform.getParameterTypes()[MH_AND_LF] == type.basicTypeClass());
+            } else {
+                return false;
             }
             return true;
         }
 
-        static {
-            // Pre-fill the BMH species-data cache with EMPTY and all BMH's inner subclasses.
-            EMPTY.initForBootstrap();
-            Species_L.SPECIES_DATA.initForBootstrap();
-            // check that all static SpeciesData instances have been initialized
-            assert speciesDataCachePopulated();
-            // Note:  Do not simplify this, because INIT_DONE must not be
-            // a compile-time constant during bootstrapping.
-            INIT_DONE = Boolean.TRUE;
+        /*non-public*/ SpeciesData extendWith(byte typeNum) {
+            SpeciesData sd = extensions[typeNum];
+            if (sd != null)  return sd;
+            sd = SPECIALIZER.findSpecies(key() + BasicType.basicType(typeNum).basicTypeChar());
+            extensions[typeNum] = sd;
+            return sd;
         }
     }
 
-    static SpeciesData getSpeciesData(String types) {
-        return SpeciesData.get(types);
+    /*non-public*/
+    static final Specializer SPECIALIZER = new Specializer();
+    static {
+        SimpleMethodHandle.BMH_SPECIES = BoundMethodHandle.SPECIALIZER.findSpecies("");
+        Species_L.BMH_SPECIES = BoundMethodHandle.SPECIALIZER.findSpecies("L");
     }
 
-    /**
-     * Generation of concrete BMH classes.
-     *
-     * A concrete BMH species is fit for binding a number of values adhering to a
-     * given type pattern. Reference types are erased.
-     *
-     * BMH species are cached by type pattern.
-     *
-     * A BMH species has a number of fields with the concrete (possibly erased) types of
-     * bound values. Setters are provided as an API in BMH. Getters are exposed as MHs,
-     * which can be included as names in lambda forms.
-     */
-    static class Factory {
+    /*non-public*/
+    static final class Specializer extends ClassSpecializer<BoundMethodHandle, String, SpeciesData> {
+
+        private static final MemberName SPECIES_DATA_ACCESSOR;
 
-        private static final String JLO_SIG  = "Ljava/lang/Object;";
-        private static final String MH       = "java/lang/invoke/MethodHandle";
-        private static final String MH_SIG   = "L"+MH+";";
-        private static final String BMH      = "java/lang/invoke/BoundMethodHandle";
-        private static final String BMH_NAME = "java.lang.invoke.BoundMethodHandle";
-        private static final String BMH_SIG  = "L"+BMH+";";
-        private static final String SPECIES_DATA     = "java/lang/invoke/BoundMethodHandle$SpeciesData";
-        private static final String SPECIES_DATA_SIG = "L"+SPECIES_DATA+";";
-        private static final String STABLE_SIG       = "Ljdk/internal/vm/annotation/Stable;";
+        static {
+            try {
+                SPECIES_DATA_ACCESSOR = IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BoundMethodHandle.class,
+                        "speciesData", MethodType.methodType(BoundMethodHandle.SpeciesData.class));
+            } catch (ReflectiveOperationException ex) {
+                throw newInternalError("Bootstrap link error", ex);
+            }
+        }
 
-        private static final String SPECIES_PREFIX_NAME = "Species_";
-        private static final String SPECIES_PREFIX_PATH = BMH + "$" + SPECIES_PREFIX_NAME;
-        private static final String SPECIES_CLASS_PREFIX = BMH_NAME + "$" + SPECIES_PREFIX_NAME;
-
-        private static final String BMHSPECIES_DATA_EWI_SIG = "(B)" + SPECIES_DATA_SIG;
-        private static final String MYSPECIES_DATA_SIG = "()" + SPECIES_DATA_SIG;
-        private static final String INT_SIG    = "()I";
+        private Specializer() {
+            super(  // Reified type parameters:
+                    BoundMethodHandle.class, String.class, BoundMethodHandle.SpeciesData.class,
+                    // Principal constructor type:
+                    MethodType.methodType(void.class, MethodType.class, LambdaForm.class),
+                    // Required linkage between class and species:
+                    SPECIES_DATA_ACCESSOR,
+                    "BMH_SPECIES",
+                    BMH_TRANSFORMS);
+        }
 
-        private static final String SIG_INCIPIT = "(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;";
+        @Override
+        protected String topSpeciesKey() {
+            return "";
+        }
 
-        private static final String[] E_THROWABLE = new String[] { "java/lang/Throwable" };
-
-        private static final ConcurrentMap<String, Class<? extends BoundMethodHandle>> CLASS_CACHE = new ConcurrentHashMap<>();
+        @Override
+        protected BoundMethodHandle.SpeciesData newSpeciesData(String key) {
+            return new BoundMethodHandle.SpeciesData(this, key);
+        }
 
-        /**
-         * Get a concrete subclass of BMH for a given combination of bound types.
-         *
-         * @param types the type signature, wherein reference types are erased to 'L'
-         * @return the concrete BMH class
-         */
-        static Class<? extends BoundMethodHandle> getConcreteBMHClass(String types) {
-            // CHM.computeIfAbsent ensures generateConcreteBMHClass is called
-            // only once per key.
-            return CLASS_CACHE.computeIfAbsent(
-                types, new Function<String, Class<? extends BoundMethodHandle>>() {
-                    @Override
-                    public Class<? extends BoundMethodHandle> apply(String types) {
-                        String shortTypes = LambdaForm.shortenSignature(types);
-                        String className = SPECIES_CLASS_PREFIX + shortTypes;
-                        Class<?> c = BootLoader.loadClassOrNull(className);
-                        if (TRACE_RESOLVE) {
-                            System.out.println("[BMH_RESOLVE] " + shortTypes +
-                                    (c != null ? " (success)" : " (fail)") );
-                        }
-                        if (c != null) {
-                            return c.asSubclass(BoundMethodHandle.class);
-                        } else {
-                            // Not pregenerated, generate the class
-                            return generateConcreteBMHClass(shortTypes, types);
-                        }
-                    }
-                });
+        static final List<MemberName> BMH_TRANSFORMS;
+        static final int TN_COPY_NO_EXTEND = V_TYPE_NUM;
+        static {
+            final Class<BoundMethodHandle> BMH = BoundMethodHandle.class;
+            // copyWithExtendLIJFD + copyWith
+            try {
+                BMH_TRANSFORMS = List.of(
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWithExtendL", MethodType.methodType(BMH, MethodType.class, LambdaForm.class, Object.class)),
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWithExtendI", MethodType.methodType(BMH, MethodType.class, LambdaForm.class, int.class)),
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWithExtendJ", MethodType.methodType(BMH, MethodType.class, LambdaForm.class, long.class)),
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWithExtendF", MethodType.methodType(BMH, MethodType.class, LambdaForm.class, float.class)),
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWithExtendD", MethodType.methodType(BMH, MethodType.class, LambdaForm.class, double.class)),
+                        IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, BMH, "copyWith", MethodType.methodType(BMH, MethodType.class, LambdaForm.class))
+                );
+            } catch (ReflectiveOperationException ex) {
+                throw newInternalError("Failed resolving copyWith methods", ex);
+            }
+
+            // as it happens, there is one transform per BasicType including V_TYPE
+            assert(BMH_TRANSFORMS.size() == TYPE_LIMIT);
         }
 
         /**
-         * Generate a concrete subclass of BMH for a given combination of bound types.
-         *
-         * A concrete BMH species adheres to the following schema:
+         * Generation of concrete BMH classes.
          *
-         * <pre>
-         * class Species_[[types]] extends BoundMethodHandle {
-         *     [[fields]]
-         *     final SpeciesData speciesData() { return SpeciesData.get("[[types]]"); }
-         * }
-         * </pre>
-         *
-         * The {@code [[types]]} signature is precisely the string that is passed to this
-         * method.
-         *
-         * The {@code [[fields]]} section consists of one field definition per character in
-         * the type signature, adhering to the naming schema described in the definition of
-         * {@link #makeFieldName}.
-         *
-         * For example, a concrete BMH species for two reference and one integral bound values
-         * would have the following shape:
+         * A concrete BMH species is fit for binding a number of values adhering to a
+         * given type pattern. Reference types are erased.
          *
-         * <pre>
-         * class BoundMethodHandle { ... private static
-         * final class Species_LLI extends BoundMethodHandle {
-         *     final Object argL0;
-         *     final Object argL1;
-         *     final int argI2;
-         *     private Species_LLI(MethodType mt, LambdaForm lf, Object argL0, Object argL1, int argI2) {
-         *         super(mt, lf);
-         *         this.argL0 = argL0;
-         *         this.argL1 = argL1;
-         *         this.argI2 = argI2;
-         *     }
-         *     final SpeciesData speciesData() { return SPECIES_DATA; }
-         *     final int fieldCount() { return 3; }
-         *     &#64;Stable static SpeciesData SPECIES_DATA; // injected afterwards
-         *     static BoundMethodHandle make(MethodType mt, LambdaForm lf, Object argL0, Object argL1, int argI2) {
-         *         return new Species_LLI(mt, lf, argL0, argL1, argI2);
-         *     }
-         *     final BoundMethodHandle copyWith(MethodType mt, LambdaForm lf) {
-         *         return new Species_LLI(mt, lf, argL0, argL1, argI2);
-         *     }
-         *     final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object narg) {
-         *         return SPECIES_DATA.extendWith(L_TYPE).constructor().invokeBasic(mt, lf, argL0, argL1, argI2, narg);
-         *     }
-         *     final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg) {
-         *         return SPECIES_DATA.extendWith(I_TYPE).constructor().invokeBasic(mt, lf, argL0, argL1, argI2, narg);
-         *     }
-         *     final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg) {
-         *         return SPECIES_DATA.extendWith(J_TYPE).constructor().invokeBasic(mt, lf, argL0, argL1, argI2, narg);
-         *     }
-         *     final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg) {
-         *         return SPECIES_DATA.extendWith(F_TYPE).constructor().invokeBasic(mt, lf, argL0, argL1, argI2, narg);
-         *     }
-         *     public final BoundMethodHandle copyWithExtendD(MethodType mt, LambdaForm lf, double narg) {
-         *         return SPECIES_DATA.extendWith(D_TYPE).constructor().invokeBasic(mt, lf, argL0, argL1, argI2, narg);
-         *     }
-         * }
-         * </pre>
+         * BMH species are cached by type pattern.
          *
-         * @param types the type signature, wherein reference types are erased to 'L'
-         * @return the generated concrete BMH class
+         * A BMH species has a number of fields with the concrete (possibly erased) types of
+         * bound values. Setters are provided as an API in BMH. Getters are exposed as MHs,
+         * which can be included as names in lambda forms.
          */
-        static Class<? extends BoundMethodHandle> generateConcreteBMHClass(String shortTypes,
-                String types) {
-            final String className  = speciesInternalClassName(shortTypes);
-            byte[] classFile = generateConcreteBMHClassBytes(shortTypes, types, className);
-
-            // load class
-            InvokerBytecodeGenerator.maybeDump(className, classFile);
-            Class<? extends BoundMethodHandle> bmhClass =
-                UNSAFE.defineClass(className, classFile, 0, classFile.length,
-                                   BoundMethodHandle.class.getClassLoader(), null)
-                    .asSubclass(BoundMethodHandle.class);
-
-            return bmhClass;
-        }
-
-        static String speciesInternalClassName(String shortTypes) {
-            return SPECIES_PREFIX_PATH + shortTypes;
-        }
-
-        static byte[] generateConcreteBMHClassBytes(final String shortTypes,
-                final String types, final String className) {
-            final String sourceFile = SPECIES_PREFIX_NAME + shortTypes;
-
-            final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
-            final int NOT_ACC_PUBLIC = 0;  // not ACC_PUBLIC
-            cw.visit(V1_6, NOT_ACC_PUBLIC + ACC_FINAL + ACC_SUPER, className, null, BMH, null);
-            cw.visitSource(sourceFile, null);
-
-            // emit static types and SPECIES_DATA fields
-            FieldVisitor fw = cw.visitField(NOT_ACC_PUBLIC + ACC_STATIC, "SPECIES_DATA", SPECIES_DATA_SIG, null, null);
-            fw.visitAnnotation(STABLE_SIG, true);
-            fw.visitEnd();
-
-            // emit bound argument fields
-            for (int i = 0; i < types.length(); ++i) {
-                final char t = types.charAt(i);
-                final String fieldName = makeFieldName(types, i);
-                final String fieldDesc = t == 'L' ? JLO_SIG : String.valueOf(t);
-                cw.visitField(ACC_FINAL, fieldName, fieldDesc, null, null).visitEnd();
-            }
-
-            MethodVisitor mv;
-
-            // emit constructor
-            mv = cw.visitMethod(ACC_PRIVATE, "<init>", makeSignature(types, true), null, null);
-            mv.visitCode();
-            mv.visitVarInsn(ALOAD, 0); // this
-            mv.visitVarInsn(ALOAD, 1); // type
-            mv.visitVarInsn(ALOAD, 2); // form
-
-            mv.visitMethodInsn(INVOKESPECIAL, BMH, "<init>", makeSignature("", true), false);
-
-            for (int i = 0, j = 0; i < types.length(); ++i, ++j) {
-                // i counts the arguments, j counts corresponding argument slots
-                char t = types.charAt(i);
-                mv.visitVarInsn(ALOAD, 0);
-                mv.visitVarInsn(typeLoadOp(t), j + 3); // parameters start at 3
-                mv.visitFieldInsn(PUTFIELD, className, makeFieldName(types, i), typeSig(t));
-                if (t == 'J' || t == 'D') {
-                    ++j; // adjust argument register access
-                }
-            }
-
-            mv.visitInsn(RETURN);
-            mv.visitMaxs(0, 0);
-            mv.visitEnd();
-
-            // emit implementation of speciesData()
-            mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_FINAL, "speciesData", MYSPECIES_DATA_SIG, null, null);
-            mv.visitCode();
-            mv.visitFieldInsn(GETSTATIC, className, "SPECIES_DATA", SPECIES_DATA_SIG);
-            mv.visitInsn(ARETURN);
-            mv.visitMaxs(0, 0);
-            mv.visitEnd();
-
-            // emit implementation of fieldCount()
-            mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_FINAL, "fieldCount", INT_SIG, null, null);
-            mv.visitCode();
-            int fc = types.length();
-            if (fc <= (ICONST_5 - ICONST_0)) {
-                mv.visitInsn(ICONST_0 + fc);
-            } else {
-                mv.visitIntInsn(SIPUSH, fc);
-            }
-            mv.visitInsn(IRETURN);
-            mv.visitMaxs(0, 0);
-            mv.visitEnd();
-            // emit make()  ...factory method wrapping constructor
-            mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_STATIC, "make", makeSignature(types, false), null, null);
-            mv.visitCode();
-            // make instance
-            mv.visitTypeInsn(NEW, className);
-            mv.visitInsn(DUP);
-            // load mt, lf
-            mv.visitVarInsn(ALOAD, 0);  // type
-            mv.visitVarInsn(ALOAD, 1);  // form
-            // load factory method arguments
-            for (int i = 0, j = 0; i < types.length(); ++i, ++j) {
-                // i counts the arguments, j counts corresponding argument slots
-                char t = types.charAt(i);
-                mv.visitVarInsn(typeLoadOp(t), j + 2); // parameters start at 3
-                if (t == 'J' || t == 'D') {
-                    ++j; // adjust argument register access
-                }
-            }
-
-            // finally, invoke the constructor and return
-            mv.visitMethodInsn(INVOKESPECIAL, className, "<init>", makeSignature(types, true), false);
-            mv.visitInsn(ARETURN);
-            mv.visitMaxs(0, 0);
-            mv.visitEnd();
-
-            // emit copyWith()
-            mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_FINAL, "copyWith", makeSignature("", false), null, null);
-            mv.visitCode();
-            // make instance
-            mv.visitTypeInsn(NEW, className);
-            mv.visitInsn(DUP);
-            // load mt, lf
-            mv.visitVarInsn(ALOAD, 1);
-            mv.visitVarInsn(ALOAD, 2);
-            // put fields on the stack
-            emitPushFields(types, className, mv);
-            // finally, invoke the constructor and return
-            mv.visitMethodInsn(INVOKESPECIAL, className, "<init>", makeSignature(types, true), false);
-            mv.visitInsn(ARETURN);
-            mv.visitMaxs(0, 0);
-            mv.visitEnd();
-
-            // for each type, emit copyWithExtendT()
-            for (BasicType type : BasicType.ARG_TYPES) {
-                int ord = type.ordinal();
-                char btChar = type.basicTypeChar();
-                mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_FINAL, "copyWithExtend" + btChar, makeSignature(String.valueOf(btChar), false), null, E_THROWABLE);
-                mv.visitCode();
-                // return SPECIES_DATA.extendWith(t).constructor().invokeBasic(mt, lf, argL0, ..., narg)
-                // obtain constructor
-                mv.visitFieldInsn(GETSTATIC, className, "SPECIES_DATA", SPECIES_DATA_SIG);
-                int iconstInsn = ICONST_0 + ord;
-                assert(iconstInsn <= ICONST_5);
-                mv.visitInsn(iconstInsn);
-                mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "extendWith", BMHSPECIES_DATA_EWI_SIG, false);
-                mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "constructor", "()" + MH_SIG, false);
-                // load mt, lf
-                mv.visitVarInsn(ALOAD, 1);
-                mv.visitVarInsn(ALOAD, 2);
-                // put fields on the stack
-                emitPushFields(types, className, mv);
-                // put narg on stack
-                mv.visitVarInsn(typeLoadOp(btChar), 3);
-                // finally, invoke the constructor and return
-                mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types + btChar, false), false);
-                mv.visitInsn(ARETURN);
-                mv.visitMaxs(0, 0);
-                mv.visitEnd();
-            }
-
-            cw.visitEnd();
-
-            return cw.toByteArray();
-        }
-
-        private static int typeLoadOp(char t) {
-            switch (t) {
-            case 'L': return ALOAD;
-            case 'I': return ILOAD;
-            case 'J': return LLOAD;
-            case 'F': return FLOAD;
-            case 'D': return DLOAD;
-            default : throw newInternalError("unrecognized type " + t);
+        class Factory extends ClassSpecializer<BoundMethodHandle, String, BoundMethodHandle.SpeciesData>.Factory {
+            @Override
+            protected String chooseFieldName(Class<?> type, int index) {
+                return "arg" + super.chooseFieldName(type, index);
             }
         }
 
-        private static void emitPushFields(String types, String className, MethodVisitor mv) {
-            for (int i = 0; i < types.length(); ++i) {
-                char tc = types.charAt(i);
-                mv.visitVarInsn(ALOAD, 0);
-                mv.visitFieldInsn(GETFIELD, className, makeFieldName(types, i), typeSig(tc));
-            }
-        }
-
-        static String typeSig(char t) {
-            return t == 'L' ? JLO_SIG : String.valueOf(t);
-        }
-
-        //
-        // Getter MH generation.
-        //
-
-        private static MethodHandle makeGetter(Class<?> cbmhClass, String types, int index) {
-            String fieldName = makeFieldName(types, index);
-            Class<?> fieldType = Wrapper.forBasicType(types.charAt(index)).primitiveType();
-            try {
-                return LOOKUP.findGetter(cbmhClass, fieldName, fieldType);
-            } catch (NoSuchFieldException | IllegalAccessException e) {
-                throw newInternalError(e);
-            }
+        @Override
+        protected Factory makeFactory() {
+            return new Factory();
         }
-
-        static MethodHandle[] makeGetters(Class<?> cbmhClass, String types, MethodHandle[] mhs) {
-            if (mhs == null)  mhs = new MethodHandle[types.length()];
-            for (int i = 0; i < mhs.length; ++i) {
-                mhs[i] = makeGetter(cbmhClass, types, i);
-                assert(mhs[i].internalMemberName().getDeclaringClass() == cbmhClass);
-            }
-            return mhs;
-        }
-
-        static MethodHandle[] makeCtors(Class<? extends BoundMethodHandle> cbmh, String types, MethodHandle mhs[]) {
-            if (mhs == null)  mhs = new MethodHandle[1];
-            if (types.equals(""))  return mhs;  // hack for empty BMH species
-            mhs[0] = makeCbmhCtor(cbmh, types);
-            return mhs;
-        }
-
-        static NamedFunction[] makeNominalGetters(String types, NamedFunction[] nfs, MethodHandle[] getters) {
-            if (nfs == null)  nfs = new NamedFunction[types.length()];
-            for (int i = 0; i < nfs.length; ++i) {
-                nfs[i] = new NamedFunction(getters[i]);
-            }
-            return nfs;
-        }
-
-        //
-        // Auxiliary methods.
-        //
-
-        static SpeciesData getSpeciesDataFromConcreteBMHClass(Class<? extends BoundMethodHandle> cbmh) {
-            try {
-                Field F_SPECIES_DATA = cbmh.getDeclaredField("SPECIES_DATA");
-                return (SpeciesData) F_SPECIES_DATA.get(null);
-            } catch (ReflectiveOperationException ex) {
-                throw newInternalError(ex);
-            }
-        }
+      }
 
-        static void setSpeciesDataToConcreteBMHClass(Class<? extends BoundMethodHandle> cbmh, SpeciesData speciesData) {
-            try {
-                Field F_SPECIES_DATA = cbmh.getDeclaredField("SPECIES_DATA");
-                // ## FIXME: annotation parser can't create proxy classes until module system is fully initialzed
-                // assert F_SPECIES_DATA.getDeclaredAnnotation(Stable.class) != null;
-                F_SPECIES_DATA.set(null, speciesData);
-            } catch (ReflectiveOperationException ex) {
-                throw newInternalError(ex);
-            }
-        }
-
-        /**
-         * Field names in concrete BMHs adhere to this pattern:
-         * arg + type + index
-         * where type is a single character (L, I, J, F, D).
-         */
-        private static String makeFieldName(String types, int index) {
-            assert index >= 0 && index < types.length();
-            return "arg" + types.charAt(index) + index;
-        }
-
-        private static String makeSignature(String types, boolean ctor) {
-            StringBuilder buf = new StringBuilder(SIG_INCIPIT);
-            int len = types.length();
-            for (int i = 0; i < len; i++) {
-                buf.append(typeSig(types.charAt(i)));
-            }
-            return buf.append(')').append(ctor ? "V" : BMH_SIG).toString();
-        }
-
-        private static MethodType makeConstructorType(String types) {
-            int length = types.length();
-            Class<?> ptypes[] = new Class<?>[length + 2];
-            ptypes[0] = MethodType.class;
-            ptypes[1] = LambdaForm.class;
-            for (int i = 0; i < length; i++) {
-                ptypes[i + 2] = BasicType.basicType(types.charAt(i)).basicTypeClass();
-            }
-            return MethodType.makeImpl(BoundMethodHandle.class, ptypes, true);
-        }
-
-        static MethodHandle makeCbmhCtor(Class<? extends BoundMethodHandle> cbmh, String types) {
-            try {
-                return LOOKUP.findStatic(cbmh, "make", makeConstructorType(types));
-            } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | TypeNotPresentException e) {
-                throw newInternalError(e);
-            }
-        }
-    }
-
-    static final Lookup LOOKUP = Lookup.IMPL_LOOKUP;
-
-    /**
-     * All subclasses must provide such a value describing their type signature.
-     */
-    static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
-
-    private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[6];
-    private static SpeciesData checkCache(int size, String types) {
-        int idx = size - 1;
-        SpeciesData data = SPECIES_DATA_CACHE[idx];
-        if (data != null)  return data;
-        SPECIES_DATA_CACHE[idx] = data = getSpeciesData(types);
-        return data;
-    }
-    static SpeciesData speciesData_L()      { return checkCache(1, "L"); }
-    static SpeciesData speciesData_LL()     { return checkCache(2, "LL"); }
-    static SpeciesData speciesData_LLL()    { return checkCache(3, "LLL"); }
-    static SpeciesData speciesData_LLLL()   { return checkCache(4, "LLLL"); }
-    static SpeciesData speciesData_LLLLL()  { return checkCache(5, "LLLLL"); }
+    static SpeciesData speciesData_L()      { return Species_L.BMH_SPECIES; }
+    static SpeciesData speciesData_LL()     { return SPECIALIZER.findSpecies("LL"); }
+    static SpeciesData speciesData_LLL()    { return SPECIALIZER.findSpecies("LLL"); }
+    static SpeciesData speciesData_LLLL()   { return SPECIALIZER.findSpecies("LLLL"); }
+    static SpeciesData speciesData_LLLLL()  { return SPECIALIZER.findSpecies("LLLLL"); }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,1030 @@
+/*
+ * Copyright (c) 2017, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+package java.lang.invoke;
+
+import jdk.internal.loader.BootLoader;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.FieldVisitor;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.vm.annotation.Stable;
+import sun.invoke.util.BytecodeName;
+
+import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.function.Function;
+
+import static java.lang.invoke.LambdaForm.*;
+import static java.lang.invoke.MethodHandleNatives.Constants.REF_getStatic;
+import static java.lang.invoke.MethodHandleNatives.Constants.REF_putStatic;
+import static java.lang.invoke.MethodHandleStatics.*;
+import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
+import static jdk.internal.org.objectweb.asm.Opcodes.*;
+
+/**
+ * Class specialization code.
+ * @param <T> top class under which species classes are created.
+ * @param <K> key which identifies individual specializations.
+ * @param <S> species data type.
+ */
+/*non-public*/
+abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesData> {
+    private final Class<T> topClass;
+    private final Class<K> keyType;
+    private final Class<S> metaType;
+    private final MemberName sdAccessor;
+    private final String sdFieldName;
+    private final List<MemberName> transformMethods;
+    private final MethodType baseConstructorType;
+    private final S topSpecies;
+    private final ConcurrentMap<K, S> cache = new ConcurrentHashMap<>();
+    private final Factory factory;
+    private @Stable boolean topClassIsSuper;
+
+    /** Return the top type mirror, for type {@code T} */
+    public final Class<T> topClass() { return topClass; }
+
+    /** Return the key type mirror, for type {@code K} */
+    public final Class<K> keyType() { return keyType; }
+
+    /** Return the species metadata type mirror, for type {@code S} */
+    public final Class<S> metaType() { return metaType; }
+
+    /** Report the leading arguments (if any) required by every species factory.
+     * Every species factory adds its own field types as additional arguments,
+     * but these arguments always come first, in every factory method.
+     */
+    protected MethodType baseConstructorType() { return baseConstructorType; }
+
+    /** Return the trivial species for the null sequence of arguments. */
+    protected final S topSpecies() { return topSpecies; }
+
+    /** Return the list of transform methods originally given at creation of this specializer. */
+    protected final List<MemberName> transformMethods() { return transformMethods; }
+
+    /** Return the factory object used to build and load concrete species code. */
+    protected final Factory factory() { return factory; }
+
+    /**
+     * Constructor for this class specializer.
+     * @param topClass type mirror for T
+     * @param keyType type mirror for K
+     * @param metaType type mirror for S
+     * @param baseConstructorType principal constructor type
+     * @param sdAccessor the method used to get the speciesData
+     * @param sdFieldName the name of the species data field, inject the speciesData object
+     * @param transformMethods optional list of transformMethods
+     */
+    protected ClassSpecializer(Class<T> topClass,
+                               Class<K> keyType,
+                               Class<S> metaType,
+                               MethodType baseConstructorType,
+                               MemberName sdAccessor,
+                               String sdFieldName,
+                               List<MemberName> transformMethods) {
+        this.topClass = topClass;
+        this.keyType = keyType;
+        this.metaType = metaType;
+        this.sdAccessor = sdAccessor;
+        // FIXME: use List.copyOf once 8177290 is in
+        this.transformMethods = List.of(transformMethods.toArray(new MemberName[transformMethods.size()]));
+        this.sdFieldName = sdFieldName;
+        this.baseConstructorType = baseConstructorType.changeReturnType(void.class);
+        this.factory = makeFactory();
+        K tsk = topSpeciesKey();
+        S topSpecies = null;
+        if (tsk != null && topSpecies == null) {
+            // if there is a key, build the top species if needed:
+            topSpecies = findSpecies(tsk);
+        }
+        this.topSpecies = topSpecies;
+    }
+
+    // Utilities for subclass constructors:
+    protected static <T> Constructor<T> reflectConstructor(Class<T> defc, Class<?>... ptypes) {
+        try {
+            return defc.getDeclaredConstructor(ptypes);
+        } catch (NoSuchMethodException ex) {
+            throw newIAE(defc.getName()+"("+MethodType.methodType(void.class, ptypes)+")", ex);
+        }
+    }
+
+    protected static Field reflectField(Class<?> defc, String name) {
+        try {
+            return defc.getDeclaredField(name);
+        } catch (NoSuchFieldException ex) {
+            throw newIAE(defc.getName()+"."+name, ex);
+        }
+    }
+
+    private static RuntimeException newIAE(String message, Throwable cause) {
+        return new IllegalArgumentException(message, cause);
+    }
+
+    public final S findSpecies(K key) {
+        S speciesData = cache.computeIfAbsent(key, new Function<>() {
+            @Override
+            public S apply(K key1) {
+                return factory.loadSpecies(newSpeciesData(key1));
+            }
+        });
+        // Note:  Species instantiation may throw VirtualMachineError because of
+        // code cache overflow.  If this happens the species bytecode may be
+        // loaded but not linked to its species metadata (with MH's etc).
+        // That will cause a throw out of CHM.computeIfAbsent,
+        // which will shut down the caller thread.
+        //
+        // In a latter attempt to get the same species, the already-loaded
+        // class will be present in the system dictionary, causing an
+        // error when the species generator tries to reload it.
+        // We try to detect this case and link the pre-existing code.
+        //
+        // Although it would be better to start fresh by loading a new
+        // copy, we have to salvage the previously loaded but broken code.
+        // (As an alternative, we might spin a new class with a new name,
+        // or use the anonymous class mechanism.)
+        //
+        // In the end, as long as everybody goes through the same CHM,
+        // CHM.computeIfAbsent will ensure only one SpeciesData will be set
+        // successfully on a concrete class if ever.
+        // The concrete class is published via SpeciesData instance
+        // returned here only after the class and species data are linked together.
+        assert(speciesData != null);
+        return speciesData;
+    }
+
+    /**
+     * Meta-data wrapper for concrete subtypes of the top class.
+     * Each concrete subtype corresponds to a given sequence of basic field types (LIJFD).
+     * The fields are immutable; their values are fully specified at object construction.
+     * Each species supplies an array of getter functions which may be used in lambda forms.
+     * A concrete value is always constructed from the full tuple of its field values,
+     * accompanied by the required constructor parameters.
+     * There *may* also be transforms which cloning a species instance and
+     * either replace a constructor parameter or add one or more new field values.
+     * The shortest possible species has zero fields.
+     * Subtypes are not interrelated among themselves by subtyping, even though
+     * it would appear that a shorter species could serve as a supertype of a
+     * longer one which extends it.
+     */
+    public abstract class SpeciesData {
+        // Bootstrapping requires circular relations Class -> SpeciesData -> Class
+        // Therefore, we need non-final links in the chain.  Use @Stable fields.
+        private final K key;
+        private final List<Class<?>> fieldTypes;
+        @Stable private Class<? extends T> speciesCode;
+        @Stable private List<MethodHandle> factories;
+        @Stable private List<MethodHandle> getters;
+        @Stable private List<LambdaForm.NamedFunction> nominalGetters;
+        @Stable private final MethodHandle[] transformHelpers = new MethodHandle[transformMethods.size()];
+
+        protected SpeciesData(K key) {
+            this.key = keyType.cast(Objects.requireNonNull(key));
+            List<Class<?>> types = deriveFieldTypes(key);
+            // TODO: List.copyOf
+            int arity = types.size();
+            this.fieldTypes = List.of(types.toArray(new Class<?>[arity]));
+        }
+
+        public final K key() {
+            return key;
+        }
+
+        protected final List<Class<?>> fieldTypes() {
+            return fieldTypes;
+        }
+
+        protected final int fieldCount() {
+            return fieldTypes.size();
+        }
+
+        protected ClassSpecializer<T,K,S> outer() {
+            return ClassSpecializer.this;
+        }
+
+        protected final boolean isResolved() {
+            return speciesCode != null && factories != null && !factories.isEmpty();
+        }
+
+        @Override public String toString() {
+            return metaType.getSimpleName() + "[" + key.toString() + " => " + (isResolved() ? speciesCode.getSimpleName() : "UNRESOLVED") + "]";
+        }
+
+        @Override
+        public int hashCode() {
+            return key.hashCode();
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof ClassSpecializer.SpeciesData)) {
+                return false;
+            }
+            @SuppressWarnings("rawtypes")
+            ClassSpecializer.SpeciesData that = (ClassSpecializer.SpeciesData) obj;
+            return this.outer() == that.outer() && this.key.equals(that.key);
+        }
+
+        /** Throws NPE if this species is not yet resolved. */
+        protected final Class<? extends T> speciesCode() {
+            return Objects.requireNonNull(speciesCode);
+        }
+
+        /**
+         * Return a {@link MethodHandle} which can get the indexed field of this species.
+         * The return type is the type of the species field it accesses.
+         * The argument type is the {@code fieldHolder} class of this species.
+         */
+        protected MethodHandle getter(int i) {
+            return getters.get(i);
+        }
+
+        /**
+         * Return a {@link LambdaForm.Name} containing a {@link LambdaForm.NamedFunction} that
+         * represents a MH bound to a generic invoker, which in turn forwards to the corresponding
+         * getter.
+         */
+        protected LambdaForm.NamedFunction getterFunction(int i) {
+            LambdaForm.NamedFunction nf = nominalGetters.get(i);
+            assert(nf.memberDeclaringClassOrNull() == speciesCode());
+            assert(nf.returnType() == BasicType.basicType(fieldTypes.get(i)));
+            return nf;
+        }
+
+        protected List<LambdaForm.NamedFunction> getterFunctions() {
+            return nominalGetters;
+        }
+
+        protected List<MethodHandle> getters() {
+            return getters;
+        }
+
+        protected MethodHandle factory() {
+            return factories.get(0);
+        }
+
+        protected MethodHandle transformHelper(int whichtm) {
+            MethodHandle mh = transformHelpers[whichtm];
+            if (mh != null)  return mh;
+            mh = deriveTransformHelper(transformMethods().get(whichtm), whichtm);
+            // Do a little type checking before we start using the MH.
+            // (It will be called with invokeBasic, so this is our only chance.)
+            final MethodType mt = transformHelperType(whichtm);
+            mh = mh.asType(mt);
+            return transformHelpers[whichtm] = mh;
+        }
+
+        private final MethodType transformHelperType(int whichtm) {
+            MemberName tm = transformMethods().get(whichtm);
+            ArrayList<Class<?>> args = new ArrayList<>();
+            ArrayList<Class<?>> fields = new ArrayList<>();
+            Collections.addAll(args, tm.getParameterTypes());
+            fields.addAll(fieldTypes());
+            List<Class<?>> helperArgs = deriveTransformHelperArguments(tm, whichtm, args, fields);
+            return MethodType.methodType(tm.getReturnType(), helperArgs);
+        }
+
+        // Hooks for subclasses:
+
+        /**
+         * Given a key, derive the list of field types, which all instances of this
+         * species must store.
+         */
+        protected abstract List<Class<?>> deriveFieldTypes(K key);
+
+        /**
+         * Given the index of a method in the transforms list, supply a factory
+         * method that takes the arguments of the transform, plus the local fields,
+         * and produce a value of the required type.
+         * You can override this to return null or throw if there are no transforms.
+         * This method exists so that the transforms can be "grown" lazily.
+         * This is necessary if the transform *adds* a field to an instance,
+         * which sometimtes requires the creation, on the fly, of an extended species.
+         * This method is only called once for any particular parameter.
+         * The species caches the result in a private array.
+         *
+         * @param transform the transform being implemented
+         * @param whichtm the index of that transform in the original list of transforms
+         * @return the method handle which creates a new result from a mix of transform
+         * arguments and field values
+         */
+        protected abstract MethodHandle deriveTransformHelper(MemberName transform, int whichtm);
+
+        /**
+         * During code generation, this method is called once per transform to determine
+         * what is the mix of arguments to hand to the transform-helper.  The bytecode
+         * which marshals these arguments is open-coded in the species-specific transform.
+         * The two lists are of opaque objects, which you shouldn't do anything with besides
+         * reordering them into the output list.  (They are both mutable, to make editing
+         * easier.)  The imputed types of the args correspond to the transform's parameter
+         * list, while the imputed types of the fields correspond to the species field types.
+         * After code generation, this method may be called occasionally by error-checking code.
+         *
+         * @param transform the transform being implemented
+         * @param whichtm the index of that transform in the original list of transforms
+         * @param args a list of opaque objects representing the incoming transform arguments
+         * @param fields a list of opaque objects representing the field values of the receiver
+         * @param <X> the common element type of the various lists
+         * @return a new list
+         */
+        protected abstract <X> List<X> deriveTransformHelperArguments(MemberName transform, int whichtm,
+                                                                      List<X> args, List<X> fields);
+
+        /** Given a key, generate the name of the class which implements the species for that key.
+         * This algorithm must be stable.
+         *
+         * @return class name, which by default is {@code outer().topClass().getName() + "$Species_" + deriveTypeString(key)}
+         */
+        protected String deriveClassName() {
+            return outer().topClass().getName() + "$Species_" + deriveTypeString();
+        }
+
+        /**
+         * Default implementation collects basic type characters,
+         * plus possibly type names, if some types don't correspond
+         * to basic types.
+         *
+         * @return a string suitable for use in a class name
+         */
+        protected String deriveTypeString() {
+            List<Class<?>> types = fieldTypes();
+            StringBuilder buf = new StringBuilder();
+            StringBuilder end = new StringBuilder();
+            for (Class<?> type : types) {
+                BasicType basicType = BasicType.basicType(type);
+                if (basicType.basicTypeClass() == type) {
+                    buf.append(basicType.basicTypeChar());
+                } else {
+                    buf.append('V');
+                    end.append(classSig(type));
+                }
+            }
+            String typeString;
+            if (end.length() > 0) {
+                typeString = BytecodeName.toBytecodeName(buf.append("_").append(end).toString());
+            } else {
+                typeString = buf.toString();
+            }
+            return LambdaForm.shortenSignature(typeString);
+        }
+
+        /**
+         * Report what immediate super-class to use for the concrete class of this species.
+         * Normally this is {@code topClass}, but if that is an interface, the factory must override.
+         * The super-class must provide a constructor which takes the {@code baseConstructorType} arguments, if any.
+         * This hook also allows the code generator to use more than one canned supertype for species.
+         *
+         * @return the super-class of the class to be generated
+         */
+        protected Class<? extends T> deriveSuperClass() {
+            final Class<T> topc = topClass();
+            if (!topClassIsSuper) {
+                try {
+                    final Constructor<T> con = reflectConstructor(topc, baseConstructorType().parameterArray());
+                    if (!topc.isInterface() && !Modifier.isPrivate(con.getModifiers())) {
+                        topClassIsSuper = true;
+                    }
+                } catch (Exception|InternalError ex) {
+                    // fall through...
+                }
+                if (!topClassIsSuper) {
+                    throw newInternalError("must override if the top class cannot serve as a super class");
+                }
+            }
+            return topc;
+        }
+    }
+
+    protected abstract S newSpeciesData(K key);
+
+    protected K topSpeciesKey() {
+        return null;  // null means don't report a top species
+    }
+
+    /**
+     * Code generation support for instances.
+     * Subclasses can modify the behavior.
+     */
+    public class Factory {
+        /**
+         * Get a concrete subclass of the top class for a given combination of bound types.
+         *
+         * @param speciesData the species requiring the class, not yet linked
+         * @return a linked version of the same species
+         */
+        S loadSpecies(S speciesData) {
+            String className = speciesData.deriveClassName();
+            assert(className.indexOf('/') < 0) : className;
+            Class<?> salvage = null;
+            try {
+                salvage = BootLoader.loadClassOrNull(className);
+                if (TRACE_RESOLVE && salvage != null) {
+                    // Used by jlink species pregeneration plugin, see
+                    // jdk.tools.jlink.internal.plugins.GenerateJLIClassesPlugin
+                    System.out.println("[SPECIES_RESOLVE] " + className + " (salvaged)");
+                }
+            } catch (Error ex) {
+                if (TRACE_RESOLVE) {
+                    System.out.println("[SPECIES_FRESOLVE] " + className + " (Error) " + ex.getMessage());
+                }
+            }
+            final Class<? extends T> speciesCode;
+            if (salvage != null) {
+                speciesCode = salvage.asSubclass(topClass());
+                factory.linkSpeciesDataToCode(speciesData, speciesCode);
+                factory.linkCodeToSpeciesData(speciesCode, speciesData, true);
+            } else {
+                // Not pregenerated, generate the class
+                try {
+                    speciesCode = generateConcreteSpeciesCode(className, speciesData);
+                    if (TRACE_RESOLVE) {
+                        // Used by jlink species pregeneration plugin, see
+                        // jdk.tools.jlink.internal.plugins.GenerateJLIClassesPlugin
+                        System.out.println("[SPECIES_RESOLVE] " + className + " (generated)");
+                    }
+                    // This operation causes a lot of churn:
+                    linkSpeciesDataToCode(speciesData, speciesCode);
+                    // This operation commits the relation, but causes little churn:
+                    linkCodeToSpeciesData(speciesCode, speciesData, false);
+                } catch (Error ex) {
+                    if (TRACE_RESOLVE) {
+                        System.out.println("[SPECIES_RESOLVE] " + className + " (Error #2)" );
+                    }
+                    // We can get here if there is a race condition loading a class.
+                    // Or maybe we are out of resources.  Back out of the CHM.get and retry.
+                    throw ex;
+                }
+            }
+
+            if (!speciesData.isResolved()) {
+                throw newInternalError("bad species class linkage for " + className + ": " + speciesData);
+            }
+            assert(speciesData == factory.loadSpeciesDataFromCode(speciesCode));
+            return speciesData;
+        }
+
+        /**
+         * Generate a concrete subclass of the top class for a given combination of bound types.
+         *
+         * A concrete species subclass roughly matches the following schema:
+         *
+         * <pre>
+         * class Species_[[types]] extends [[T]] {
+         *     final [[S]] speciesData() { return ... }
+         *     static [[T]] make([[fields]]) { return ... }
+         *     [[fields]]
+         *     final [[T]] transform([[args]]) { return ... }
+         * }
+         * </pre>
+         *
+         * The {@code [[types]]} signature is precisely the key for the species.
+         *
+         * The {@code [[fields]]} section consists of one field definition per character in
+         * the type signature, adhering to the naming schema described in the definition of
+         * {@link #chooseFieldName}.
+         *
+         * For example, a concrete species for two references and one integral bound value
+         * has a shape like the following:
+         *
+         * <pre>
+         * class TopClass { ... private static
+         * final class Species_LLI extends TopClass {
+         *     final Object argL0;
+         *     final Object argL1;
+         *     final int argI2;
+         *     private Species_LLI(CT ctarg, ..., Object argL0, Object argL1, int argI2) {
+         *         super(ctarg, ...);
+         *         this.argL0 = argL0;
+         *         this.argL1 = argL1;
+         *         this.argI2 = argI2;
+         *     }
+         *     final SpeciesData speciesData() { return BMH_SPECIES; }
+         *     &#64;Stable static SpeciesData BMH_SPECIES; // injected afterwards
+         *     static TopClass make(CT ctarg, ..., Object argL0, Object argL1, int argI2) {
+         *         return new Species_LLI(ctarg, ..., argL0, argL1, argI2);
+         *     }
+         *     final TopClass copyWith(CT ctarg, ...) {
+         *         return new Species_LLI(ctarg, ..., argL0, argL1, argI2);
+         *     }
+         *     // two transforms, for the sake of illustration:
+         *     final TopClass copyWithExtendL(CT ctarg, ..., Object narg) {
+         *         return BMH_SPECIES.transform(L_TYPE).invokeBasic(ctarg, ..., argL0, argL1, argI2, narg);
+         *     }
+         *     final TopClass copyWithExtendI(CT ctarg, ..., int narg) {
+         *         return BMH_SPECIES.transform(I_TYPE).invokeBasic(ctarg, ..., argL0, argL1, argI2, narg);
+         *     }
+         * }
+         * </pre>
+         *
+         * @param className of the species
+         * @param speciesData what species we are generating
+         * @return the generated concrete TopClass class
+         */
+        Class<? extends T> generateConcreteSpeciesCode(String className, ClassSpecializer<T,K,S>.SpeciesData speciesData) {
+            byte[] classFile = generateConcreteSpeciesCodeFile(className, speciesData);
+
+            // load class
+            InvokerBytecodeGenerator.maybeDump(classBCName(className), classFile);
+            Class<?> speciesCode;
+
+            ClassLoader cl = topClass().getClassLoader();
+            ProtectionDomain pd = null;
+            if (cl != null) {
+                pd = AccessController.doPrivileged(
+                        new PrivilegedAction<>() {
+                            @Override
+                            public ProtectionDomain run() {
+                                return topClass().getProtectionDomain();
+                            }
+                        });
+            }
+            try {
+                speciesCode = UNSAFE.defineClass(className, classFile, 0, classFile.length, cl, pd);
+            } catch (Exception ex) {
+                throw newInternalError(ex);
+            }
+
+            return speciesCode.asSubclass(topClass());
+        }
+
+        // These are named like constants because there is only one per specialization scheme:
+        private final String SPECIES_DATA = classBCName(metaType);
+        private final String SPECIES_DATA_SIG = classSig(SPECIES_DATA);
+        private final String SPECIES_DATA_NAME = sdAccessor.getName();
+        private final int SPECIES_DATA_MODS = sdAccessor.getModifiers();
+        private final List<String> TRANSFORM_NAMES;  // derived from transformMethods
+        private final List<MethodType> TRANSFORM_TYPES;
+        private final List<Integer> TRANSFORM_MODS;
+        {
+            // Tear apart transformMethods to get the names, types, and modifiers.
+            List<String> tns = new ArrayList<>();
+            List<MethodType> tts = new ArrayList<>();
+            List<Integer> tms = new ArrayList<>();
+            for (int i = 0; i < transformMethods.size(); i++) {
+                MemberName tm = transformMethods.get(i);
+                tns.add(tm.getName());
+                final MethodType tt = tm.getMethodType();
+                tts.add(tt);
+                tms.add(tm.getModifiers());
+            }
+            TRANSFORM_NAMES = List.of(tns.toArray(new String[0]));
+            TRANSFORM_TYPES = List.of(tts.toArray(new MethodType[0]));
+            TRANSFORM_MODS = List.of(tms.toArray(new Integer[0]));
+        }
+        private static final int ACC_PPP = ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED;
+
+        /*non-public*/ byte[] generateConcreteSpeciesCodeFile(String className0, ClassSpecializer<T,K,S>.SpeciesData speciesData) {
+            final String className = classBCName(className0);
+            final String superClassName = classBCName(speciesData.deriveSuperClass());
+
+            final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
+            final int NOT_ACC_PUBLIC = 0;  // not ACC_PUBLIC
+            cw.visit(V1_6, NOT_ACC_PUBLIC + ACC_FINAL + ACC_SUPER, className, null, superClassName, null);
+
+            final String sourceFile = className.substring(className.lastIndexOf('.')+1);
+            cw.visitSource(sourceFile, null);
+
+            // emit static types and BMH_SPECIES fields
+            FieldVisitor fw = cw.visitField(NOT_ACC_PUBLIC + ACC_STATIC, sdFieldName, SPECIES_DATA_SIG, null, null);
+            fw.visitAnnotation(STABLE_SIG, true);
+            fw.visitEnd();
+
+            // handy holder for dealing with groups of typed values (ctor arguments and fields)
+            class Var {
+                final int index;
+                final String name;
+                final Class<?> type;
+                final String desc;
+                final BasicType basicType;
+                final int slotIndex;
+                Var(int index, int slotIndex) {
+                    this.index = index;
+                    this.slotIndex = slotIndex;
+                    name = null; type = null; desc = null;
+                    basicType = BasicType.V_TYPE;
+                }
+                Var(String name, Class<?> type, Var prev) {
+                    int slotIndex = prev.nextSlotIndex();
+                    int index = prev.nextIndex();
+                    if (name == null)  name = "x";
+                    if (name.endsWith("#"))
+                        name = name.substring(0, name.length()-1) + index;
+                    assert(!type.equals(void.class));
+                    String desc = classSig(type);
+                    BasicType basicType = BasicType.basicType(type);
+                    this.index = index;
+                    this.name = name;
+                    this.type = type;
+                    this.desc = desc;
+                    this.basicType = basicType;
+                    this.slotIndex = slotIndex;
+                }
+                Var lastOf(List<Var> vars) {
+                    int n = vars.size();
+                    return (n == 0 ? this : vars.get(n-1));
+                }
+                <X> List<Var> fromTypes(List<X> types) {
+                    Var prev = this;
+                    ArrayList<Var> result = new ArrayList<>(types.size());
+                    int i = 0;
+                    for (X x : types) {
+                        String vn = name;
+                        Class<?> vt;
+                        if (x instanceof Class) {
+                            vt = (Class<?>) x;
+                            // make the names friendlier if debugging
+                            assert((vn = vn + "_" + (i++)) != null);
+                        } else {
+                            @SuppressWarnings("unchecked")
+                            Var v = (Var) x;
+                            vn = v.name;
+                            vt = v.type;
+                        }
+                        prev = new Var(vn, vt, prev);
+                        result.add(prev);
+                    }
+                    return result;
+                }
+
+                int slotSize() { return basicType.basicTypeSlots(); }
+                int nextIndex() { return index + (slotSize() == 0 ? 0 : 1); }
+                int nextSlotIndex() { return slotIndex >= 0 ? slotIndex + slotSize() : slotIndex; }
+                boolean isInHeap() { return slotIndex < 0; }
+                void emitVarInstruction(int asmop, MethodVisitor mv) {
+                    if (asmop == ALOAD)
+                        asmop = typeLoadOp(basicType.basicTypeChar());
+                    else
+                        throw new AssertionError("bad op="+asmop+" for desc="+desc);
+                    mv.visitVarInsn(asmop, slotIndex);
+                }
+                public void emitFieldInsn(int asmop, MethodVisitor mv) {
+                    mv.visitFieldInsn(asmop, className, name, desc);
+                }
+            }
+
+            final Var NO_THIS = new Var(0, 0),
+                    AFTER_THIS = new Var(0, 1),
+                    IN_HEAP = new Var(0, -1);
+
+            // figure out the field types
+            final List<Class<?>> fieldTypes = speciesData.fieldTypes();
+            final List<Var> fields = new ArrayList<>(fieldTypes.size());
+            {
+                Var nextF = IN_HEAP;
+                for (Class<?> ft : fieldTypes) {
+                    String fn = chooseFieldName(ft, nextF.nextIndex());
+                    nextF = new Var(fn, ft, nextF);
+                    fields.add(nextF);
+                }
+            }
+
+            // emit bound argument fields
+            for (Var field : fields) {
+                cw.visitField(ACC_FINAL, field.name, field.desc, null, null).visitEnd();
+            }
+
+            MethodVisitor mv;
+
+            // emit implementation of speciesData()
+            mv = cw.visitMethod((SPECIES_DATA_MODS & ACC_PPP) + ACC_FINAL,
+                    SPECIES_DATA_NAME, "()" + SPECIES_DATA_SIG, null, null);
+            mv.visitCode();
+            mv.visitFieldInsn(GETSTATIC, className, sdFieldName, SPECIES_DATA_SIG);
+            mv.visitInsn(ARETURN);
+            mv.visitMaxs(0, 0);
+            mv.visitEnd();
+
+            // figure out the constructor arguments
+            MethodType superCtorType = ClassSpecializer.this.baseConstructorType();
+            MethodType thisCtorType = superCtorType.appendParameterTypes(fieldTypes);
+
+            // emit constructor
+            {
+                mv = cw.visitMethod(ACC_PRIVATE,
+                        "<init>", methodSig(thisCtorType), null, null);
+                mv.visitCode();
+                mv.visitVarInsn(ALOAD, 0); // this
+
+                final List<Var> ctorArgs = AFTER_THIS.fromTypes(superCtorType.parameterList());
+                for (Var ca : ctorArgs) {
+                    ca.emitVarInstruction(ALOAD, mv);
+                }
+
+                // super(ca...)
+                mv.visitMethodInsn(INVOKESPECIAL, superClassName,
+                        "<init>", methodSig(superCtorType), false);
+
+                // store down fields
+                Var lastFV = AFTER_THIS.lastOf(ctorArgs);
+                for (Var f : fields) {
+                    // this.argL1 = argL1
+                    mv.visitVarInsn(ALOAD, 0);  // this
+                    lastFV = new Var(f.name, f.type, lastFV);
+                    lastFV.emitVarInstruction(ALOAD, mv);
+                    f.emitFieldInsn(PUTFIELD, mv);
+                }
+
+                mv.visitInsn(RETURN);
+                mv.visitMaxs(0, 0);
+                mv.visitEnd();
+            }
+
+            // emit make()  ...factory method wrapping constructor
+            {
+                MethodType ftryType = thisCtorType.changeReturnType(topClass());
+                mv = cw.visitMethod(NOT_ACC_PUBLIC + ACC_STATIC,
+                        "make", methodSig(ftryType), null, null);
+                mv.visitCode();
+                // make instance
+                mv.visitTypeInsn(NEW, className);
+                mv.visitInsn(DUP);
+                // load factory method arguments:  ctarg... and arg...
+                for (Var v : NO_THIS.fromTypes(ftryType.parameterList())) {
+                    v.emitVarInstruction(ALOAD, mv);
+                }
+
+                // finally, invoke the constructor and return
+                mv.visitMethodInsn(INVOKESPECIAL, className,
+                        "<init>", methodSig(thisCtorType), false);
+                mv.visitInsn(ARETURN);
+                mv.visitMaxs(0, 0);
+                mv.visitEnd();
+            }
+
+            // For each transform, emit the customized override of the transform method.
+            // This method mixes together some incoming arguments (from the transform's
+            // static type signature) with the field types themselves, and passes
+            // the resulting mish-mosh of values to a method handle produced by
+            // the species itself.  (Typically this method handle is the factory
+            // method of this species or a related one.)
+            for (int whichtm = 0; whichtm < TRANSFORM_NAMES.size(); whichtm++) {
+                final String     TNAME = TRANSFORM_NAMES.get(whichtm);
+                final MethodType TTYPE = TRANSFORM_TYPES.get(whichtm);
+                final int        TMODS = TRANSFORM_MODS.get(whichtm);
+                mv = cw.visitMethod((TMODS & ACC_PPP) | ACC_FINAL,
+                        TNAME, TTYPE.toMethodDescriptorString(), null, E_THROWABLE);
+                mv.visitCode();
+                // return a call to the corresponding "transform helper", something like this:
+                //   MY_SPECIES.transformHelper(whichtm).invokeBasic(ctarg, ..., argL0, ..., xarg)
+                mv.visitFieldInsn(GETSTATIC, className,
+                        sdFieldName, SPECIES_DATA_SIG);
+                emitIntConstant(whichtm, mv);
+                mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA,
+                        "transformHelper", "(I)" + MH_SIG, false);
+
+                List<Var> targs = AFTER_THIS.fromTypes(TTYPE.parameterList());
+                List<Var> tfields = new ArrayList<>(fields);
+                // mix them up and load them for the transform helper:
+                List<Var> helperArgs = speciesData.deriveTransformHelperArguments(transformMethods.get(whichtm), whichtm, targs, tfields);
+                List<Class<?>> helperTypes = new ArrayList<>(helperArgs.size());
+                for (Var ha : helperArgs) {
+                    helperTypes.add(ha.basicType.basicTypeClass());
+                    if (ha.isInHeap()) {
+                        assert(tfields.contains(ha));
+                        mv.visitVarInsn(ALOAD, 0);
+                        ha.emitFieldInsn(GETFIELD, mv);
+                    } else {
+                        assert(targs.contains(ha));
+                        ha.emitVarInstruction(ALOAD, mv);
+                    }
+                }
+
+                // jump into the helper (which is probably a factory method)
+                final Class<?> rtype = TTYPE.returnType();
+                final BasicType rbt = BasicType.basicType(rtype);
+                MethodType invokeBasicType = MethodType.methodType(rbt.basicTypeClass(), helperTypes);
+                mv.visitMethodInsn(INVOKEVIRTUAL, MH,
+                        "invokeBasic", methodSig(invokeBasicType), false);
+                if (rbt == BasicType.L_TYPE) {
+                    mv.visitTypeInsn(CHECKCAST, classBCName(rtype));
+                    mv.visitInsn(ARETURN);
+                } else {
+                    throw newInternalError("NYI: transform of type "+rtype);
+                }
+                mv.visitMaxs(0, 0);
+                mv.visitEnd();
+            }
+
+            cw.visitEnd();
+
+            return cw.toByteArray();
+        }
+
+        private int typeLoadOp(char t) {
+            switch (t) {
+            case 'L': return ALOAD;
+            case 'I': return ILOAD;
+            case 'J': return LLOAD;
+            case 'F': return FLOAD;
+            case 'D': return DLOAD;
+            default : throw newInternalError("unrecognized type " + t);
+            }
+        }
+
+        private void emitIntConstant(int con, MethodVisitor mv) {
+            if (ICONST_M1 - ICONST_0 <= con && con <= ICONST_5 - ICONST_0)
+                mv.visitInsn(ICONST_0 + con);
+            else if (con == (byte) con)
+                mv.visitIntInsn(BIPUSH, con);
+            else if (con == (short) con)
+                mv.visitIntInsn(SIPUSH, con);
+            else {
+                mv.visitLdcInsn(con);
+            }
+
+        }
+
+        //
+        // Getter MH generation.
+        //
+
+        private MethodHandle findGetter(Class<?> speciesCode, List<Class<?>> types, int index) {
+            Class<?> fieldType = types.get(index);
+            String fieldName = chooseFieldName(fieldType, index);
+            try {
+                return IMPL_LOOKUP.findGetter(speciesCode, fieldName, fieldType);
+            } catch (NoSuchFieldException | IllegalAccessException e) {
+                throw newInternalError(e);
+            }
+        }
+
+        private List<MethodHandle> findGetters(Class<?> speciesCode, List<Class<?>> types) {
+            MethodHandle[] mhs = new MethodHandle[types.size()];
+            for (int i = 0; i < mhs.length; ++i) {
+                mhs[i] = findGetter(speciesCode, types, i);
+                assert(mhs[i].internalMemberName().getDeclaringClass() == speciesCode);
+            }
+            return List.of(mhs);
+        }
+
+        private List<MethodHandle> findFactories(Class<? extends T> speciesCode, List<Class<?>> types) {
+            MethodHandle[] mhs = new MethodHandle[1];
+            mhs[0] = findFactory(speciesCode, types);
+            return List.of(mhs);
+        }
+
+        List<LambdaForm.NamedFunction> makeNominalGetters(List<Class<?>> types, List<MethodHandle> getters) {
+            LambdaForm.NamedFunction[] nfs = new LambdaForm.NamedFunction[types.size()];
+            for (int i = 0; i < nfs.length; ++i) {
+                nfs[i] = new LambdaForm.NamedFunction(getters.get(i));
+            }
+            return List.of(nfs);
+        }
+
+        //
+        // Auxiliary methods.
+        //
+
+        protected void linkSpeciesDataToCode(ClassSpecializer<T,K,S>.SpeciesData speciesData, Class<? extends T> speciesCode) {
+            speciesData.speciesCode = speciesCode.asSubclass(topClass);
+            final List<Class<?>> types = speciesData.fieldTypes;
+            speciesData.factories = this.findFactories(speciesCode, types);
+            speciesData.getters = this.findGetters(speciesCode, types);
+            speciesData.nominalGetters = this.makeNominalGetters(types, speciesData.getters);
+        }
+
+        private Field reflectSDField(Class<? extends T> speciesCode) {
+            final Field field = reflectField(speciesCode, sdFieldName);
+            assert(field.getType() == metaType);
+            assert(Modifier.isStatic(field.getModifiers()));
+            return field;
+        }
+
+        private S readSpeciesDataFromCode(Class<? extends T> speciesCode) {
+            try {
+                MemberName sdField = IMPL_LOOKUP.resolveOrFail(REF_getStatic, speciesCode, sdFieldName, metaType);
+                Object base = MethodHandleNatives.staticFieldBase(sdField);
+                long offset = MethodHandleNatives.staticFieldOffset(sdField);
+                UNSAFE.loadFence();
+                return metaType.cast(UNSAFE.getObject(base, offset));
+            } catch (Error err) {
+                throw err;
+            } catch (Exception ex) {
+                throw newInternalError("Failed to load speciesData from speciesCode: " + speciesCode.getName(), ex);
+            } catch (Throwable t) {
+                throw uncaughtException(t);
+            }
+        }
+
+        protected S loadSpeciesDataFromCode(Class<? extends T> speciesCode) {
+            if (speciesCode == topClass()) {
+                return topSpecies;
+            }
+            S result = readSpeciesDataFromCode(speciesCode);
+            if (result.outer() != ClassSpecializer.this) {
+                throw newInternalError("wrong class");
+            }
+            return result;
+        }
+
+        protected void linkCodeToSpeciesData(Class<? extends T> speciesCode, ClassSpecializer<T,K,S>.SpeciesData speciesData, boolean salvage) {
+            try {
+                assert(readSpeciesDataFromCode(speciesCode) == null ||
+                    (salvage && readSpeciesDataFromCode(speciesCode).equals(speciesData)));
+
+                MemberName sdField = IMPL_LOOKUP.resolveOrFail(REF_putStatic, speciesCode, sdFieldName, metaType);
+                Object base = MethodHandleNatives.staticFieldBase(sdField);
+                long offset = MethodHandleNatives.staticFieldOffset(sdField);
+                UNSAFE.storeFence();
+                UNSAFE.putObject(base, offset, speciesData);
+                UNSAFE.storeFence();
+            } catch (Error err) {
+                throw err;
+            } catch (Exception ex) {
+                throw newInternalError("Failed to link speciesData to speciesCode: " + speciesCode.getName(), ex);
+            } catch (Throwable t) {
+                throw uncaughtException(t);
+            }
+        }
+
+        /**
+         * Field names in concrete species classes adhere to this pattern:
+         * type + index, where type is a single character (L, I, J, F, D).
+         * The factory subclass can customize this.
+         * The name is purely cosmetic, since it applies to a private field.
+         */
+        protected String chooseFieldName(Class<?> type, int index) {
+            BasicType bt = BasicType.basicType(type);
+            return "" + bt.basicTypeChar() + index;
+        }
+
+        MethodHandle findFactory(Class<? extends T> speciesCode, List<Class<?>> types) {
+            final MethodType type = baseConstructorType().changeReturnType(topClass()).appendParameterTypes(types);
+            try {
+                return IMPL_LOOKUP.findStatic(speciesCode, "make", type);
+            } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | TypeNotPresentException e) {
+                throw newInternalError(e);
+            }
+        }
+    }
+
+    /** Hook that virtualizes the Factory class, allowing subclasses to extend it. */
+    protected Factory makeFactory() {
+        return new Factory();
+    }
+
+
+    // Other misc helpers:
+    private static final String MH = "java/lang/invoke/MethodHandle";
+    private static final String MH_SIG = "L" + MH + ";";
+    private static final String STABLE = "jdk/internal/vm/annotation/Stable";
+    private static final String STABLE_SIG = "L" + STABLE + ";";
+    private static final String[] E_THROWABLE = new String[] { "java/lang/Throwable" };
+    static {
+        assert(MH_SIG.equals(classSig(MethodHandle.class)));
+        assert(MH.equals(classBCName(MethodHandle.class)));
+    }
+
+    static String methodSig(MethodType mt) {
+        return mt.toMethodDescriptorString();
+    }
+    static String classSig(Class<?> cls) {
+        if (cls.isPrimitive() || cls.isArray())
+            return MethodType.methodType(cls).toMethodDescriptorString().substring(2);
+        return classSig(classBCName(cls));
+    }
+    static String classSig(String bcName) {
+        assert(bcName.indexOf('.') < 0);
+        assert(!bcName.endsWith(";"));
+        assert(!bcName.startsWith("["));
+        return "L" + bcName + ";";
+    }
+    static String classBCName(Class<?> cls) {
+        return classBCName(className(cls));
+    }
+    static String classBCName(String str) {
+        assert(str.indexOf('/') < 0) : str;
+        return str.replace('.', '/');
+    }
+    static String className(Class<?> cls) {
+        assert(!cls.isArray() && !cls.isPrimitive());
+        return cls.getName();
+    }
+}
--- a/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java	Thu Nov 16 01:11:32 2017 +0100
@@ -25,14 +25,14 @@
 
 package java.lang.invoke;
 
-import java.util.Map;
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.Opcodes;
+import sun.invoke.util.Wrapper;
+
 import java.util.ArrayList;
 import java.util.HashSet;
-import sun.invoke.util.Wrapper;
-
-import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Helper class to assist the GenerateJLIClassesPlugin to get access to
@@ -118,8 +118,7 @@
                 // require an even more complex naming scheme
                 LambdaForm reinvoker = makeReinvokerFor(methodTypes[i]);
                 forms.add(reinvoker);
-                String speciesSig = BoundMethodHandle
-                        .speciesData(reinvoker).fieldSignature();
+                String speciesSig = BoundMethodHandle.speciesDataFor(reinvoker).key();
                 assert(speciesSig.equals("L"));
                 names.add(reinvoker.kind.defaultLambdaName + "_" + speciesSig);
 
@@ -205,20 +204,19 @@
                 DelegatingMethodHandle.NF_getTarget);
     }
 
-    static Map.Entry<String, byte[]> generateConcreteBMHClassBytes(
-            final String types) {
+    @SuppressWarnings({"rawtypes", "unchecked"})
+    static Map.Entry<String, byte[]> generateConcreteBMHClassBytes(final String types) {
         for (char c : types.toCharArray()) {
             if ("LIJFD".indexOf(c) < 0) {
                 throw new IllegalArgumentException("All characters must "
                         + "correspond to a basic field type: LIJFD");
             }
         }
-        String shortTypes = LambdaForm.shortenSignature(types);
-        final String className =
-                BoundMethodHandle.Factory.speciesInternalClassName(shortTypes);
-        return Map.entry(className,
-                         BoundMethodHandle.Factory.generateConcreteBMHClassBytes(
-                                 shortTypes, types, className));
+        final BoundMethodHandle.SpeciesData species = BoundMethodHandle.SPECIALIZER.findSpecies(types);
+        final String className = species.speciesCode().getName();
+        final ClassSpecializer.Factory factory = BoundMethodHandle.SPECIALIZER.factory();
+        final byte[] code = factory.generateConcreteSpeciesCodeFile(className, species);
+        return Map.entry(className.replace('.', '/'), code);
     }
 
 }
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Nov 16 01:11:32 2017 +0100
@@ -183,8 +183,7 @@
             new java.security.PrivilegedAction<>() {
                 public Void run() {
                     try {
-                        String dumpName = className;
-                        //dumpName = dumpName.replace('/', '-');
+                        String dumpName = className.replace('.','/');
                         File dumpFile = new File(DUMP_CLASS_FILES_DIR, dumpName+".class");
                         System.out.println("dump: " + dumpFile);
                         dumpFile.getParentFile().mkdirs();
@@ -630,7 +629,7 @@
         String name = form.kind.methodName;
         switch (form.kind) {
             case BOUND_REINVOKER: {
-                name = name + "_" + BoundMethodHandle.speciesData(form).fieldSignature();
+                name = name + "_" + BoundMethodHandle.speciesDataFor(form).key();
                 return resolveFrom(name, invokerType, DelegatingMethodHandle.Holder.class);
             }
             case DELEGATE:                  return resolveFrom(name, invokerType, DelegatingMethodHandle.Holder.class);
--- a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Thu Nov 16 01:11:32 2017 +0100
@@ -143,12 +143,22 @@
         D_TYPE('D', double.class, Wrapper.DOUBLE),  // all primitive types
         V_TYPE('V', void.class,   Wrapper.VOID);    // not valid in all contexts
 
-        static final BasicType[] ALL_TYPES = BasicType.values();
-        static final BasicType[] ARG_TYPES = Arrays.copyOf(ALL_TYPES, ALL_TYPES.length-1);
+        static final @Stable BasicType[] ALL_TYPES = BasicType.values();
+        static final @Stable BasicType[] ARG_TYPES = Arrays.copyOf(ALL_TYPES, ALL_TYPES.length-1);
 
         static final int ARG_TYPE_LIMIT = ARG_TYPES.length;
         static final int TYPE_LIMIT = ALL_TYPES.length;
 
+        // Derived int constants, which (unlike the enums) can be constant folded.
+        // We can remove them when JDK-8161245 is fixed.
+        static final byte
+                L_TYPE_NUM = (byte) L_TYPE.ordinal(),
+                I_TYPE_NUM = (byte) I_TYPE.ordinal(),
+                J_TYPE_NUM = (byte) J_TYPE.ordinal(),
+                F_TYPE_NUM = (byte) F_TYPE.ordinal(),
+                D_TYPE_NUM = (byte) D_TYPE.ordinal(),
+                V_TYPE_NUM = (byte) V_TYPE.ordinal();
+
         final char btChar;
         final Class<?> btClass;
         final Wrapper btWrapper;
@@ -679,6 +689,9 @@
         Class<?> rtype = signatureReturn(sig).btClass;
         return MethodType.makeImpl(rtype, ptypes, true);
     }
+    static MethodType basicMethodType(MethodType mt) {
+        return signatureType(basicTypeSignature(mt));
+    }
 
     /**
      * Check if i-th name is a call to MethodHandleImpl.selectAlternative.
@@ -1291,14 +1304,28 @@
         assert(sigp == sig.length);
         return String.valueOf(sig);
     }
+
+    /** Hack to make signatures more readable when they show up in method names.
+     * Signature should start with a sequence of uppercase ASCII letters.
+     * Runs of three or more are replaced by a single letter plus a decimal repeat count.
+     * A tail of anything other than uppercase ASCII is passed through unchanged.
+     * @param signature sequence of uppercase ASCII letters with possible repetitions
+     * @return same sequence, with repetitions counted by decimal numerals
+     */
     public static String shortenSignature(String signature) {
-        // Hack to make signatures more readable when they show up in method names.
         final int NO_CHAR = -1, MIN_RUN = 3;
         int c0, c1 = NO_CHAR, c1reps = 0;
         StringBuilder buf = null;
         int len = signature.length();
         if (len < MIN_RUN)  return signature;
         for (int i = 0; i <= len; i++) {
+            if (c1 != NO_CHAR && !('A' <= c1 && c1 <= 'Z')) {
+                // wrong kind of char; bail out here
+                if (buf != null) {
+                    buf.append(signature.substring(i - c1reps, len));
+                }
+                break;
+            }
             // shift in the next char:
             c0 = c1; c1 = (i == len ? NO_CHAR : signature.charAt(i));
             if (c1 == c0) { ++c1reps; continue; }
@@ -1342,7 +1369,7 @@
             this.arguments = that.arguments;
             this.constraint = constraint;
             assert(constraint == null || isParam());  // only params have constraints
-            assert(constraint == null || constraint instanceof BoundMethodHandle.SpeciesData || constraint instanceof Class);
+            assert(constraint == null || constraint instanceof ClassSpecializer.SpeciesData || constraint instanceof Class);
         }
         Name(MethodHandle function, Object... arguments) {
             this(new NamedFunction(function), arguments);
--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java	Thu Nov 16 01:11:32 2017 +0100
@@ -27,6 +27,8 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
+
 import static java.lang.invoke.LambdaForm.*;
 import static java.lang.invoke.LambdaForm.BasicType.*;
 
@@ -325,15 +327,15 @@
      *  whose function is in the corresponding position in newFns.
      *  Only do this if the arguments are exactly equal to the given.
      */
-    LambdaFormBuffer replaceFunctions(NamedFunction[] oldFns, NamedFunction[] newFns,
+    LambdaFormBuffer replaceFunctions(List<NamedFunction> oldFns, List<NamedFunction> newFns,
                                       Object... forArguments) {
         assert(inTrans());
-        if (oldFns.length == 0)  return this;
+        if (oldFns.isEmpty())  return this;
         for (int i = arity; i < length; i++) {
             Name n = names[i];
-            int nfi = indexOf(n.function, oldFns);
+            int nfi = oldFns.indexOf(n.function);
             if (nfi >= 0 && Arrays.equals(n.arguments, forArguments)) {
-                changeName(i, new Name(newFns[nfi], n.arguments));
+                changeName(i, new Name(newFns.get(nfi), n.arguments));
             }
         }
         return this;
--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Thu Nov 16 01:11:32 2017 +0100
@@ -381,10 +381,11 @@
     /// Editing methods for method handles.  These need to have fast paths.
 
     private BoundMethodHandle.SpeciesData oldSpeciesData() {
-        return BoundMethodHandle.speciesData(lambdaForm);
+        return BoundMethodHandle.speciesDataFor(lambdaForm);
     }
+
     private BoundMethodHandle.SpeciesData newSpeciesData(BasicType type) {
-        return oldSpeciesData().extendWith(type);
+        return oldSpeciesData().extendWith((byte) type.ordinal());
     }
 
     BoundMethodHandle bindArgumentL(BoundMethodHandle mh, int pos, Object value) {
@@ -461,7 +462,7 @@
             buf.replaceParameterByNewExpression(pos, new Name(getter, newBaseAddress));
         } else {
             // cannot bind the MH arg itself, unless oldData is empty
-            assert(oldData == BoundMethodHandle.SpeciesData.EMPTY);
+            assert(oldData == BoundMethodHandle.SPECIALIZER.topSpecies());
             newBaseAddress = new Name(L_TYPE).withConstraint(newData);
             buf.replaceParameterByNewExpression(0, new Name(getter, newBaseAddress));
             buf.insertParameter(0, newBaseAddress);
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Nov 16 01:11:32 2017 +0100
@@ -776,11 +776,11 @@
             if (PROFILE_GWT) {
                 int[] counts = new int[2];
                 mh = (BoundMethodHandle)
-                        BoundMethodHandle.speciesData_LLLL().constructor().invokeBasic(type, form,
+                        BoundMethodHandle.speciesData_LLLL().factory().invokeBasic(type, form,
                                 (Object) test, (Object) profile(target), (Object) profile(fallback), counts);
             } else {
                 mh = (BoundMethodHandle)
-                        BoundMethodHandle.speciesData_LLL().constructor().invokeBasic(type, form,
+                        BoundMethodHandle.speciesData_LLL().factory().invokeBasic(type, form,
                                 (Object) test, (Object) profile(target), (Object) profile(fallback));
             }
         } catch (Throwable ex) {
@@ -1089,7 +1089,7 @@
         BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLLL();
         BoundMethodHandle mh;
         try {
-            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) exType,
+            mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) target, (Object) exType,
                     (Object) catcher, (Object) collectArgs, (Object) unboxResult);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
@@ -1890,7 +1890,7 @@
         BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLL();
         BoundMethodHandle mh;
         try {
-            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) clauseData,
+            mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) clauseData,
                     (Object) collectArgs, (Object) unboxResult);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
@@ -2133,7 +2133,7 @@
         BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLL();
         BoundMethodHandle mh;
         try {
-            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) cleanup,
+            mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) target, (Object) cleanup,
                     (Object) collectArgs, (Object) unboxResult);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
--- a/src/java.base/share/classes/java/lang/invoke/SimpleMethodHandle.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/SimpleMethodHandle.java	Thu Nov 16 01:11:32 2017 +0100
@@ -25,6 +25,8 @@
 
 package java.lang.invoke;
 
+import jdk.internal.vm.annotation.Stable;
+
 import static java.lang.invoke.LambdaForm.BasicType.*;
 import static java.lang.invoke.MethodHandleStatics.*;
 
@@ -33,6 +35,7 @@
  * @author jrose
  */
 final class SimpleMethodHandle extends BoundMethodHandle {
+
     private SimpleMethodHandle(MethodType type, LambdaForm form) {
         super(type, form);
     }
@@ -41,10 +44,11 @@
         return new SimpleMethodHandle(type, form);
     }
 
-    /*non-public*/ static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
+    /*non-public*/ static @Stable BoundMethodHandle.SpeciesData BMH_SPECIES;
 
-    /*non-public*/ public SpeciesData speciesData() {
-            return SPECIES_DATA;
+    @Override
+    /*non-public*/ BoundMethodHandle.SpeciesData speciesData() {
+            return BMH_SPECIES;
     }
 
     @Override
@@ -58,18 +62,13 @@
     }
 
     @Override
-    /*non-public*/ public int fieldCount() {
-        return 0;
-    }
-
-    @Override
     /*non-public*/ final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object narg) {
         return BoundMethodHandle.bindSingle(mt, lf, narg); // Use known fast path.
     }
     @Override
     /*non-public*/ final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg) {
         try {
-            return (BoundMethodHandle) SPECIES_DATA.extendWith(I_TYPE).constructor().invokeBasic(mt, lf, narg);
+            return (BoundMethodHandle) BMH_SPECIES.extendWith(I_TYPE_NUM).factory().invokeBasic(mt, lf, narg);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
@@ -77,7 +76,7 @@
     @Override
     /*non-public*/ final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg) {
         try {
-            return (BoundMethodHandle) SPECIES_DATA.extendWith(J_TYPE).constructor().invokeBasic(mt, lf, narg);
+            return (BoundMethodHandle) BMH_SPECIES.extendWith(J_TYPE_NUM).factory().invokeBasic(mt, lf, narg);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
@@ -85,7 +84,7 @@
     @Override
     /*non-public*/ final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg) {
         try {
-            return (BoundMethodHandle) SPECIES_DATA.extendWith(F_TYPE).constructor().invokeBasic(mt, lf, narg);
+            return (BoundMethodHandle) BMH_SPECIES.extendWith(F_TYPE_NUM).factory().invokeBasic(mt, lf, narg);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
@@ -93,7 +92,7 @@
     @Override
     /*non-public*/ final BoundMethodHandle copyWithExtendD(MethodType mt, LambdaForm lf, double narg) {
         try {
-            return (BoundMethodHandle) SPECIES_DATA.extendWith(D_TYPE).constructor().invokeBasic(mt, lf, narg);
+            return (BoundMethodHandle) BMH_SPECIES.extendWith(D_TYPE_NUM).factory().invokeBasic(mt, lf, narg);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
--- a/src/java.base/share/classes/java/net/InetAddress.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1133,7 +1133,7 @@
 
     /**
      * Create an instance of the NameService interface based on
-     * the setting of the {@codejdk.net.hosts.file} system property.
+     * the setting of the {@code jdk.net.hosts.file} system property.
      *
      * <p>The default NameService is the PlatformNameService, which typically
      * delegates name and address resolution calls to the underlying
--- a/src/java.base/share/classes/java/security/Certificate.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/Certificate.java	Thu Nov 16 01:11:32 2017 +0100
@@ -57,13 +57,12 @@
  *
  * @author Benjamin Renaud
  * @since 1.1
- * @deprecated A new certificate handling package is created in the Java platform.
- *             This Certificate interface is entirely deprecated and
- *             is here to allow for a smooth transition to the new
- *             package.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by
+ *     {@code java.security.cert.Certificate} and related classes.
  * @see java.security.cert.Certificate
  */
-@Deprecated(since="1.2")
+@Deprecated(since="1.2", forRemoval=true)
 public interface Certificate {
 
     /**
--- a/src/java.base/share/classes/java/security/Identity.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/Identity.java	Thu Nov 16 01:11:32 2017 +0100
@@ -52,12 +52,13 @@
  *
  * @author Benjamin Renaud
  * @since 1.1
- * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by
+ *     {@code java.security.KeyStore}, the {@code java.security.cert} package,
+ *     and {@code java.security.Principal}.
  */
-@Deprecated(since="1.2")
+@Deprecated(since="1.2", forRemoval=true)
+@SuppressWarnings("removal")
 public abstract class Identity implements Principal, Serializable {
 
     /** use serialVersionUID from JDK 1.1.x for interoperability */
--- a/src/java.base/share/classes/java/security/IdentityScope.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/IdentityScope.java	Thu Nov 16 01:11:32 2017 +0100
@@ -57,12 +57,13 @@
  * @author Benjamin Renaud
  * @since 1.1
  *
- * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by
+ *     {@code java.security.KeyStore}, the {@code java.security.cert} package,
+ *     and {@code java.security.Principal}.
  */
-@Deprecated(since="1.2")
+@Deprecated(since="1.2", forRemoval=true)
+@SuppressWarnings("removal")
 public abstract
 class IdentityScope extends Identity {
 
--- a/src/java.base/share/classes/java/security/Signer.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/Signer.java	Thu Nov 16 01:11:32 2017 +0100
@@ -40,12 +40,13 @@
  * @author Benjamin Renaud
  * @since 1.1
  *
- * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by
+ *     {@code java.security.KeyStore}, the {@code java.security.cert} package,
+ *     and {@code java.security.Principal}.
  */
-@Deprecated(since="1.2")
+@Deprecated(since="1.2", forRemoval=true)
+@SuppressWarnings("removal")
 public abstract class Signer extends Identity {
 
     private static final long serialVersionUID = -1763464102261361480L;
--- a/src/java.base/share/classes/java/security/acl/Acl.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/Acl.java	Thu Nov 16 01:11:32 2017 +0100
@@ -84,11 +84,13 @@
  * @author Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
 
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
+@SuppressWarnings("removal")
 public interface Acl extends Owner {
 
     /**
--- a/src/java.base/share/classes/java/security/acl/AclEntry.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/AclEntry.java	Thu Nov 16 01:11:32 2017 +0100
@@ -52,10 +52,12 @@
  * @author      Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
+@SuppressWarnings("removal")
 public interface AclEntry extends Cloneable {
 
     /**
--- a/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Thu Nov 16 01:11:32 2017 +0100
@@ -32,10 +32,11 @@
  * @author      Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public class AclNotFoundException extends Exception {
 
     private static final long serialVersionUID = 5684295034092681791L;
--- a/src/java.base/share/classes/java/security/acl/Group.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/Group.java	Thu Nov 16 01:11:32 2017 +0100
@@ -41,10 +41,11 @@
  * @author      Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public interface Group extends Principal {
 
     /**
--- a/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Thu Nov 16 01:11:32 2017 +0100
@@ -34,10 +34,11 @@
  * @author Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public class LastOwnerException extends Exception {
 
     private static final long serialVersionUID = -5141997548211140359L;
--- a/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Thu Nov 16 01:11:32 2017 +0100
@@ -33,10 +33,11 @@
  * @author      Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public class NotOwnerException extends Exception {
 
     private static final long serialVersionUID = -5555597911163362399L;
--- a/src/java.base/share/classes/java/security/acl/Owner.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/Owner.java	Thu Nov 16 01:11:32 2017 +0100
@@ -37,10 +37,12 @@
  * @since 1.1
  * @see java.security.acl.Acl
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
+@SuppressWarnings("removal")
 public interface Owner {
 
     /**
--- a/src/java.base/share/classes/java/security/acl/Permission.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/Permission.java	Thu Nov 16 01:11:32 2017 +0100
@@ -33,10 +33,11 @@
  * @author Satish Dharmaraj
  * @since 1.1
  *
- * @deprecated This package has been replaced by {@code java.security.Policy}
- *      and related classes since 1.2.
+ * @deprecated This class is deprecated and subject to removal in a future
+ *     version of Java SE. It has been replaced by {@code java.security.Policy}
+ *     and related classes since 1.2.
  */
-@Deprecated(since="9")
+@Deprecated(since="9", forRemoval=true)
 public interface Permission {
 
     /**
--- a/src/java.base/share/classes/java/security/acl/package-info.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/security/acl/package-info.java	Thu Nov 16 01:11:32 2017 +0100
@@ -27,7 +27,8 @@
  * The classes and interfaces in this package have been deprecated. New
  * classes should not be added to this package. The {@code java.security}
  * package contains suitable replacements. See {@link java.security.Policy}
- * and related classes for details.
+ * and related classes for details. This package is subject to removal in a
+ * future version of Java SE.
  *
  * @since 1.1
  */
--- a/src/java.base/share/classes/java/time/format/ZoneName.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/time/format/ZoneName.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -192,7 +192,7 @@
         "Africa/Ndjamena", "Africa_Western", "Africa/Lagos",
         "Asia/Macau", "China", "Asia/Shanghai",
         "America/Lima", "Peru", "America/Lima",
-        "Africa/Windhoek", "Africa_Western", "Africa/Lagos",
+        "Africa/Windhoek", "Africa_Central", "Africa/Maputo",
         "America/Sitka", "Alaska", "America/Juneau",
         "America/Mazatlan", "America_Mountain", "America/Denver",
         "Asia/Saigon", "Indochina", "Asia/Saigon",
@@ -324,7 +324,7 @@
         "Atlantic/Faroe", "Europe_Western", "Atlantic/Canary",
         "America/Cambridge_Bay", "America_Mountain", "America/Denver",
         "America/Los_Angeles", "America_Pacific", "America/Los_Angeles",
-        "Africa/Khartoum", "Africa_Eastern", "Africa/Nairobi",
+        "Africa/Khartoum", "Africa_Central", "Africa/Maputo",
         "Europe/Simferopol", "Europe_Eastern", "Europe/Bucharest",
         "Australia/Currie", "Australia_Eastern", "Australia/Sydney",
         "Europe/Guernsey", "GMT", "Atlantic/Reykjavik",
@@ -744,7 +744,6 @@
         "UTC", "Etc/UTC",
         "Canada/Newfoundland", "America/St_Johns",
         "Europe/Skopje", "Europe/Belgrade",
-        "Canada/East-Saskatchewan", "America/Regina",
         "PRC", "Asia/Shanghai",
         "UCT", "Etc/UCT",
         "America/Mendoza", "America/Argentina/Mendoza",
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Thu Nov 16 01:11:32 2017 +0100
@@ -695,8 +695,9 @@
      * stale pointer that is now off the list.
      */
     final Node<E> pred(Node<E> p) {
-        Node<E> q = p.prev;
-        return (p == q) ? last() : q;
+        if (p == (p = p.prev))
+            p = last();
+        return p;
     }
 
     /**
@@ -867,31 +868,31 @@
 
     public E peekFirst() {
         restart: for (;;) {
-            for (Node<E> first = first(), p = first;;) {
-                final E item;
-                if ((item = p.item) != null) {
-                    // recheck for linearizability
-                    if (first.prev != null) continue restart;
-                    return item;
-                }
-                if ((p = succ(p)) == null)
-                    return null;
+            E item;
+            Node<E> first = first(), p = first;
+            while ((item = p.item) == null) {
+                if (p == (p = p.next)) continue restart;
+                if (p == null)
+                    break;
             }
+            // recheck for linearizability
+            if (first.prev != null) continue restart;
+            return item;
         }
     }
 
     public E peekLast() {
         restart: for (;;) {
-            for (Node<E> last = last(), p = last;;) {
-                final E item;
-                if ((item = p.item) != null) {
-                    // recheck for linearizability
-                    if (last.next != null) continue restart;
-                    return item;
-                }
-                if ((p = pred(p)) == null)
-                    return null;
+            E item;
+            Node<E> last = last(), p = last;
+            while ((item = p.item) == null) {
+                if (p == (p = p.prev)) continue restart;
+                if (p == null)
+                    break;
             }
+            // recheck for linearizability
+            if (last.next != null) continue restart;
+            return item;
         }
     }
 
@@ -921,8 +922,11 @@
                         return item;
                     }
                 }
-                if ((p = succ(p)) == null)
+                if (p == (p = p.next)) continue restart;
+                if (p == null) {
+                    if (first.prev != null) continue restart;
                     return null;
+                }
             }
         }
     }
@@ -939,8 +943,11 @@
                         return item;
                     }
                 }
-                if ((p = pred(p)) == null)
+                if (p == (p = p.prev)) continue restart;
+                if (p == null) {
+                    if (last.next != null) continue restart;
                     return null;
+                }
             }
         }
     }
--- a/src/java.base/share/classes/java/util/stream/AbstractTask.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/util/stream/AbstractTask.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 import java.util.Spliterator;
 import java.util.concurrent.CountedCompleter;
 import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.ForkJoinWorkerThread;
 
 /**
  * Abstract base class for most fork-join tasks used to implement stream ops.
@@ -88,13 +89,7 @@
                             K extends AbstractTask<P_IN, P_OUT, R, K>>
         extends CountedCompleter<R> {
 
-    /**
-     * Default target factor of leaf tasks for parallel decomposition.
-     * To allow load balancing, we over-partition, currently to approximately
-     * four tasks per processor, which enables others to help out
-     * if leaf tasks are uneven or some processors are otherwise busy.
-     */
-    static final int LEAF_TARGET = ForkJoinPool.getCommonPoolParallelism() << 2;
+    private static final int LEAF_TARGET = ForkJoinPool.getCommonPoolParallelism() << 2;
 
     /** The pipeline helper, common to all tasks in a computation */
     protected final PipelineHelper<P_OUT> helper;
@@ -157,6 +152,22 @@
     }
 
     /**
+     * Default target of leaf tasks for parallel decomposition.
+     * To allow load balancing, we over-partition, currently to approximately
+     * four tasks per processor, which enables others to help out
+     * if leaf tasks are uneven or some processors are otherwise busy.
+     */
+    public static int getLeafTarget() {
+        Thread t = Thread.currentThread();
+        if (t instanceof ForkJoinWorkerThread) {
+            return ((ForkJoinWorkerThread) t).getPool().getParallelism() << 2;
+        }
+        else {
+            return LEAF_TARGET;
+        }
+    }
+
+    /**
      * Constructs a new node of type T whose parent is the receiver; must call
      * the AbstractTask(T, Spliterator) constructor with the receiver and the
      * provided Spliterator.
@@ -181,7 +192,7 @@
      * @return suggested target leaf size
      */
     public static long suggestTargetSize(long sizeEstimate) {
-        long est = sizeEstimate / LEAF_TARGET;
+        long est = sizeEstimate / getLeafTarget();
         return est > 0L ? est : 1L;
     }
 
--- a/src/java.base/share/classes/java/util/stream/ForEachOps.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/util/stream/ForEachOps.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -28,7 +28,6 @@
 import java.util.Spliterator;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
 import java.util.function.Consumer;
 import java.util.function.DoubleConsumer;
 import java.util.function.IntConsumer;
@@ -378,7 +377,7 @@
             this.spliterator = spliterator;
             this.targetSize = AbstractTask.suggestTargetSize(spliterator.estimateSize());
             // Size map to avoid concurrent re-sizes
-            this.completionMap = new ConcurrentHashMap<>(Math.max(16, AbstractTask.LEAF_TARGET << 1));
+            this.completionMap = new ConcurrentHashMap<>(Math.max(16, AbstractTask.getLeafTarget() << 1));
             this.action = action;
             this.leftPredecessor = null;
         }
--- a/src/java.base/share/classes/java/util/stream/StreamSpliterators.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/java/util/stream/StreamSpliterators.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -897,7 +897,7 @@
      * Note: The source spliterator may report {@code ORDERED} since that
      * spliterator be the result of a previous pipeline stage that was
      * collected to a {@code Node}. It is the order of the pipeline stage
-     * that governs whether the this slice spliterator is to be used or not.
+     * that governs whether this slice spliterator is to be used or not.
      */
     abstract static class UnorderedSliceSpliterator<T, T_SPLITR extends Spliterator<T>> {
         static final int CHUNK_SIZE = 1 << 7;
@@ -914,7 +914,7 @@
             this.unlimited = limit < 0;
             this.skipThreshold = limit >= 0 ? limit : 0;
             this.chunkSize = limit >= 0 ? (int)Math.min(CHUNK_SIZE,
-                ((skip + limit) / AbstractTask.LEAF_TARGET) + 1) : CHUNK_SIZE;
+                                                        ((skip + limit) / AbstractTask.getLeafTarget()) + 1) : CHUNK_SIZE;
             this.permits = new AtomicLong(limit >= 0 ? skip + limit : skip);
         }
 
--- a/src/java.base/share/classes/sun/nio/ch/IOUtil.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/sun/nio/ch/IOUtil.java	Thu Nov 16 01:11:32 2017 +0100
@@ -297,7 +297,7 @@
                      NativeDispatcher nd)
         throws IOException
     {
-        return read(fd, bufs, offset, bufs.length, false, -1, nd);
+        return read(fd, bufs, offset, length, false, -1, nd);
     }
 
     static long read(FileDescriptor fd, ByteBuffer[] bufs, int offset, int length,
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Thu Nov 16 01:11:32 2017 +0100
@@ -456,21 +456,21 @@
         {"the.tsa.certificate", "The TSA certificate"},
         {"the.input", "The input"},
         {"reply", "Reply"},
-        {"one.in.many", "%s #%d of %d"},
+        {"one.in.many", "%1$s #%2$d of %3$d"},
         {"alias.in.cacerts", "Issuer <%s> in cacerts"},
         {"alias.in.keystore", "Issuer <%s>"},
         {"with.weak", "%s (weak)"},
-        {"key.bit", "%d-bit %s key"},
-        {"key.bit.weak", "%d-bit %s key (weak)"},
+        {"key.bit", "%1$d-bit %2$s key"},
+        {"key.bit.weak", "%1$d-bit %2$s key (weak)"},
         {"unknown.size.1", "unknown size %s key"},
         {".PATTERN.printX509Cert.with.weak",
                 "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"},
         {"PKCS.10.with.weak",
                 "PKCS #10 Certificate Request (Version 1.0)\n" +
-                        "Subject: %s\nFormat: %s\nPublic Key: %s\nSignature algorithm: %s\n"},
-        {"verified.by.s.in.s.weak", "Verified by %s in %s with a %s"},
-        {"whose.sigalg.risk", "%s uses the %s signature algorithm which is considered a security risk."},
-        {"whose.key.risk", "%s uses a %s which is considered a security risk."},
+                        "Subject: %1$s\nFormat: %2$s\nPublic Key: %3$s\nSignature algorithm: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Verified by %1$s in %2$s with a %3$s"},
+        {"whose.sigalg.risk", "%1$s uses the %2$s signature algorithm which is considered a security risk."},
+        {"whose.key.risk", "%1$s uses a %2$s which is considered a security risk."},
         {"jks.storetype.warning", "The %1$s keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
         {"migrate.keystore.warning", "Migrated \"%1$s\" to %4$s. The %2$s keystore is backed up as \"%3$s\"."},
         {"backup.keystore.warning", "The original keystore \"%1$s\" is backed up as \"%3$s\"..."},
--- a/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -349,7 +349,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -374,7 +374,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -777,7 +777,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, 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
@@ -85,10 +85,18 @@
 
     protected Set<SocketOption<?>> supportedOptions() {
         HashSet<SocketOption<?>> options = new HashSet<>(super.supportedOptions());
-        options.addAll(extendedOptions.options());
+        addExtSocketOptions(extendedOptions.options(), options);
         return options;
     }
 
+    private void addExtSocketOptions(Set<SocketOption<?>> extOptions,
+                                     Set<SocketOption<?>> options) {
+        // TCP_QUICKACK is applicable for TCP Sockets only.
+        extOptions.stream()
+                .filter((option) -> !option.name().equals("TCP_QUICKACK"))
+                .forEach((option) -> options.add(option));
+    }
+
     protected void socketSetOption(int opt, Object val) throws SocketException {
         if (opt == SocketOptions.SO_REUSEPORT &&
             !supportedOptions().contains(StandardSocketOptions.SO_REUSEPORT)) {
--- a/src/java.logging/share/classes/java/util/logging/FileHandler.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.logging/share/classes/java/util/logging/FileHandler.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -616,79 +616,96 @@
      * @throws IOException
      */
     private File generate(String pattern, int generation, int unique)
-            throws IOException {
-        File file = null;
-        String word = "";
-        int ix = 0;
+            throws IOException
+    {
+        return generate(pattern, count, generation, unique);
+    }
+
+    // The static method here is provided for whitebox testing of the algorithm.
+    static File generate(String pat, int count, int generation, int unique)
+            throws IOException
+    {
+        Path path = Paths.get(pat);
+        Path result = null;
         boolean sawg = false;
         boolean sawu = false;
-        while (ix < pattern.length()) {
-            char ch = pattern.charAt(ix);
-            ix++;
-            char ch2 = 0;
-            if (ix < pattern.length()) {
-                ch2 = Character.toLowerCase(pattern.charAt(ix));
+        StringBuilder word = new StringBuilder();
+        Path prev = null;
+        for (Path elem : path) {
+            if (prev != null) {
+                prev = prev.resolveSibling(word.toString());
+                result = result == null ? prev : result.resolve(prev);
             }
-            if (ch == '/') {
-                if (file == null) {
-                    file = new File(word);
-                } else {
-                    file = new File(file, word);
+            String pattern = elem.toString();
+            int ix = 0;
+            word.setLength(0);
+            while (ix < pattern.length()) {
+                char ch = pattern.charAt(ix);
+                ix++;
+                char ch2 = 0;
+                if (ix < pattern.length()) {
+                    ch2 = Character.toLowerCase(pattern.charAt(ix));
                 }
-                word = "";
-                continue;
-            } else  if (ch == '%') {
-                if (ch2 == 't') {
-                    String tmpDir = System.getProperty("java.io.tmpdir");
-                    if (tmpDir == null) {
-                        tmpDir = System.getProperty("user.home");
+                if (ch == '%') {
+                    if (ch2 == 't') {
+                        String tmpDir = System.getProperty("java.io.tmpdir");
+                        if (tmpDir == null) {
+                            tmpDir = System.getProperty("user.home");
+                        }
+                        result = Paths.get(tmpDir);
+                        ix++;
+                        word.setLength(0);
+                        continue;
+                    } else if (ch2 == 'h') {
+                        result = Paths.get(System.getProperty("user.home"));
+                        if (jdk.internal.misc.VM.isSetUID()) {
+                            // Ok, we are in a set UID program.  For safety's sake
+                            // we disallow attempts to open files relative to %h.
+                            throw new IOException("can't use %h in set UID program");
+                        }
+                        ix++;
+                        word.setLength(0);
+                        continue;
+                    } else if (ch2 == 'g') {
+                        word = word.append(generation);
+                        sawg = true;
+                        ix++;
+                        continue;
+                    } else if (ch2 == 'u') {
+                        word = word.append(unique);
+                        sawu = true;
+                        ix++;
+                        continue;
+                    } else if (ch2 == '%') {
+                        word = word.append('%');
+                        ix++;
+                        continue;
                     }
-                    file = new File(tmpDir);
-                    ix++;
-                    word = "";
-                    continue;
-                } else if (ch2 == 'h') {
-                    file = new File(System.getProperty("user.home"));
-                    if (jdk.internal.misc.VM.isSetUID()) {
-                        // Ok, we are in a set UID program.  For safety's sake
-                        // we disallow attempts to open files relative to %h.
-                        throw new IOException("can't use %h in set UID program");
-                    }
-                    ix++;
-                    word = "";
-                    continue;
-                } else if (ch2 == 'g') {
-                    word = word + generation;
-                    sawg = true;
-                    ix++;
-                    continue;
-                } else if (ch2 == 'u') {
-                    word = word + unique;
-                    sawu = true;
-                    ix++;
-                    continue;
-                } else if (ch2 == '%') {
-                    word = word + "%";
-                    ix++;
-                    continue;
                 }
+                word = word.append(ch);
             }
-            word = word + ch;
+            prev = elem;
         }
+
         if (count > 1 && !sawg) {
-            word = word + "." + generation;
+            word = word.append('.').append(generation);
         }
         if (unique > 0 && !sawu) {
-            word = word + "." + unique;
+            word = word.append('.').append(unique);
         }
         if (word.length() > 0) {
-            if (file == null) {
-                file = new File(word);
-            } else {
-                file = new File(file, word);
-            }
+            String n = word.toString();
+            Path p = prev == null ? Paths.get(n) : prev.resolveSibling(n);
+            result = result == null ? p : result.resolve(p);
+        } else if (result == null) {
+            result = Paths.get("");
         }
-        return file;
+
+        if (path.getRoot() == null) {
+            return result.toFile();
+        } else {
+            return path.getRoot().resolve(result).toFile();
+        }
     }
 
     /**
--- a/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java	Thu Nov 16 01:11:32 2017 +0100
@@ -176,6 +176,8 @@
      * @param args names of the arguments in the method call.
      *
      * @return The String used to invoke the method in the syntax of the scripting language.
+     *
+     * @throws NullPointerException if obj or m or args or any of the elements of args is null.
      */
     public String getMethodCallSyntax(String obj, String m, String... args);
 
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Thu Nov 16 01:11:32 2017 +0100
@@ -270,7 +270,7 @@
         {"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk.",
                 "The %1$s algorithm specified for the %2$s option is considered a security risk."},
         {"The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk.",
-                "The %s signing key has a keysize of %d which is considered a security risk."},
+                "The %1$s signing key has a keysize of %2$d which is considered a security risk."},
         {"This.jar.contains.entries.whose.certificate.chain.is.invalid.reason.1",
                  "This jar contains entries whose certificate chain is invalid. Reason: %s"},
         {"This.jar.contains.entries.whose.tsa.certificate.chain.is.invalid.reason.1",
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FrameOutputWriter.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FrameOutputWriter.java	Thu Nov 16 01:11:32 2017 +0100
@@ -139,7 +139,7 @@
         head.addContent(windowTitle);
         Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE, configuration.charset);
         head.addContent(meta);
-        head.addContent(getStyleSheetProperties(configuration));
+        addStyleSheetProperties(configuration, head);
         head.addContent(getFramesJavaScript());
         Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
                 head, body);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Thu Nov 16 01:11:32 2017 +0100
@@ -133,6 +133,11 @@
     public String stylesheetfile = "";
 
     /**
+     * Argument for command line option "--add-stylesheet".
+     */
+    public List<String> additionalStylesheets = new ArrayList<>();
+
+    /**
      * Argument for command line option "-Xdocrootparent".
      */
     public String docrootparent = "";
@@ -304,6 +309,22 @@
                 return false;
             }
         }
+        // check if stylesheetfile exists
+        if (!stylesheetfile.isEmpty()) {
+            DocFile stylesheet = DocFile.createFileForInput(this, stylesheetfile);
+            if (!stylesheet.exists()) {
+                reporter.print(ERROR, getText("doclet.File_not_found", stylesheetfile));
+                return false;
+            }
+        }
+        // check if additional stylesheets exists
+        for (String ssheet : additionalStylesheets) {
+            DocFile ssfile = DocFile.createFileForInput(this, ssheet);
+            if (!ssfile.exists()) {
+                reporter.print(ERROR, getText("doclet.File_not_found", ssheet));
+                return false;
+            }
+        }
 
         // In a more object-oriented world, this would be done by methods on the Option objects.
         // Note that -windowtitle silently removes any and all HTML elements, and so does not need
@@ -554,6 +575,13 @@
     public Set<Doclet.Option> getSupportedOptions() {
         Resources resources = getResources();
         Doclet.Option[] options = {
+            new Option(resources, "--add-stylesheet", 1) {
+                @Override
+                public boolean process(String opt, List<String> args) {
+                    additionalStylesheets.add(args.get(0));
+                    return true;
+                }
+            },
             new Option(resources, "-bottom", 1) {
                 @Override
                 public boolean process(String opt,  List<String> args) {
@@ -722,7 +750,7 @@
                     return true;
                 }
             },
-            new Option(resources, "-stylesheetfile", 1) {
+            new Option(resources, "--main-stylesheet -stylesheetfile", 1) {
                 @Override
                 public boolean process(String opt,  List<String> args) {
                     stylesheetfile = args.get(0);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java	Thu Nov 16 01:11:32 2017 +0100
@@ -125,6 +125,9 @@
         boolean nodeprecated = configuration.nodeprecated;
         performCopy(configuration.helpfile);
         performCopy(configuration.stylesheetfile);
+        for (String stylesheet : configuration.additionalStylesheets) {
+            performCopy(stylesheet);
+        }
         // do early to reduce memory footprint
         if (configuration.classuse) {
             ClassUseWriter.generate(configuration, classtree);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Thu Nov 16 01:11:32 2017 +0100
@@ -2162,6 +2162,7 @@
                 pathToRoot.resolve(stylesheet).getPath(),
                 "Style");
         head.addContent(link);
+        addStylesheets(configuration, head);
         if (configuration.createindex) {
             HtmlTree jq_link = HtmlTree.LINK("stylesheet", "text/css",
                     pathToRoot.resolve(DocPaths.JQUERY_FILES.resolve(DocPaths.JQUERY_STYLESHEET_FILE)).getPath(),
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java	Thu Nov 16 01:11:32 2017 +0100
@@ -94,7 +94,7 @@
             head.addContent(metaRefresh);
         }
 
-        head.addContent(getStyleSheetProperties(configuration));
+        addStyleSheetProperties(configuration, head);
 
         ContentBuilder bodyContent = new ContentBuilder();
         bodyContent.addContent(HtmlTree.NOSCRIPT(
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java	Thu Nov 16 01:11:32 2017 +0100
@@ -26,6 +26,7 @@
 package jdk.javadoc.internal.doclets.formats.html;
 
 import java.io.*;
+import java.util.List;
 
 import javax.lang.model.element.Element;
 import javax.lang.model.element.PackageElement;
@@ -210,7 +211,7 @@
         Content head = new HtmlTree(HtmlTag.HEAD);
         head.addContent(HtmlTree.TITLE(new StringContent(
                 configuration.getText("doclet.Window_Source_title"))));
-        head.addContent(getStyleSheetProperties());
+        addStyleSheetProperties(head);
         Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
                 head, body);
         Content htmlDocument = new HtmlDocument(htmlDocType, htmlTree);
@@ -227,9 +228,9 @@
     /**
      * Returns a link to the stylesheet file.
      *
-     * @return an HtmlTree for the lINK tag which provides the stylesheet location
+     * @param head an HtmlTree to which the stylesheet links will be added
      */
-    public HtmlTree getStyleSheetProperties() {
+    public void addStyleSheetProperties(Content head) {
         String filename = configuration.stylesheetfile;
         DocPath stylesheet;
         if (filename.length() > 0) {
@@ -240,7 +241,21 @@
         }
         DocPath p = relativePath.resolve(stylesheet);
         HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style");
-        return link;
+        head.addContent(link);
+        addStylesheets(head);
+    }
+
+    protected void addStylesheets(Content tree) {
+        List<String> stylesheets = configuration.additionalStylesheets;
+        if (!stylesheets.isEmpty()) {
+            stylesheets.forEach((ssheet) -> {
+                DocFile file = DocFile.createFileForInput(configuration, ssheet);
+                DocPath ssheetPath = DocPath.create(file.getName());
+                HtmlTree slink = HtmlTree.LINK("stylesheet", "text/css", relativePath.resolve(ssheetPath).getPath(),
+                        "Style");
+                tree.addContent(slink);
+            });
+        }
     }
 
     /**
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocWriter.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocWriter.java	Thu Nov 16 01:11:32 2017 +0100
@@ -311,9 +311,9 @@
      * Returns a link to the stylesheet file.
      *
      * @param configuration the configuration for this doclet
-     * @return an HtmlTree for the lINK tag which provides the stylesheet location
+     * @param head HtmlTree to which the stylesheet links will be added
      */
-    public HtmlTree getStyleSheetProperties(HtmlConfiguration configuration) {
+    public void addStyleSheetProperties(HtmlConfiguration configuration, Content head) {
         String stylesheetfile = configuration.stylesheetfile;
         DocPath stylesheet;
         if (stylesheetfile.isEmpty()) {
@@ -325,7 +325,21 @@
         HtmlTree link = HtmlTree.LINK("stylesheet", "text/css",
                 pathToRoot.resolve(stylesheet).getPath(),
                 "Style");
-        return link;
+        head.addContent(link);
+        addStylesheets(configuration, head);
+    }
+
+    protected void addStylesheets(HtmlConfiguration configuration, Content tree) {
+        List<String> stylesheets = configuration.additionalStylesheets;
+        if (!stylesheets.isEmpty()) {
+            stylesheets.forEach((ssheet) -> {
+                DocFile file = DocFile.createFileForInput(configuration, ssheet);
+                DocPath ssheetPath = DocPath.create(file.getName());
+                HtmlTree slink = HtmlTree.LINK("stylesheet", "text/css", pathToRoot.resolve(ssheetPath).getPath(),
+                        "Style");
+                tree.addContent(slink);
+            });
+        }
     }
 
     protected Comment getGeneratedBy(boolean timestamp) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Thu Nov 16 01:11:32 2017 +0100
@@ -175,6 +175,10 @@
 doclet.Same_element_name_used=Element name or pattern used twice: {0}
 
 # option specifiers
+doclet.usage.add-stylesheet.parameters=\
+    <file>
+doclet.usage.add-stylesheet.description=\
+    Additional stylesheet file for the generated documentation
 doclet.usage.d.parameters=\
     <directory>
 doclet.usage.d.description=\
@@ -329,9 +333,9 @@
 doclet.usage.keywords.description=\
     Include HTML meta tags with package, class and member info
 
-doclet.usage.stylesheetfile.parameters=\
-    <path>
-doclet.usage.stylesheetfile.description=\
+doclet.usage.main-stylesheet.parameters=\
+    <file>
+doclet.usage.main-stylesheet.description=\
     File to change style of the generated documentation
 
 doclet.usage.docencoding.parameters=\
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JarArchive.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JarArchive.java	Thu Nov 16 01:11:32 2017 +0100
@@ -74,14 +74,16 @@
 
     private final Path file;
     private final String moduleName;
+    private final Runtime.Version version;
     // currently processed JarFile
     private JarFile jarFile;
 
-    protected JarArchive(String mn, Path file) {
+    protected JarArchive(String mn, Path file, Runtime.Version version) {
         Objects.requireNonNull(mn);
         Objects.requireNonNull(file);
         this.moduleName = mn;
         this.file = file;
+        this.version = Objects.requireNonNull(version);
     }
 
     @Override
@@ -126,7 +128,7 @@
         if (jarFile != null) {
             jarFile.close();
         }
-        jarFile = new JarFile(file.toFile(), true, ZipFile.OPEN_READ, JarFile.runtimeVersion());
+        jarFile = new JarFile(file.toFile(), true, ZipFile.OPEN_READ, version);
     }
 
     protected JarFile getJarFile() {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java	Thu Nov 16 01:11:32 2017 +0100
@@ -421,6 +421,9 @@
      * the observable modules to those in the transitive closure of
      * the modules specified in {@code limitMods} plus other modules
      * specified in the {@code roots} set.
+     *
+     * @throws IllegalArgumentException if java.base module is present
+     * but its descriptor has no version
      */
     public static ModuleFinder newModuleFinder(List<Path> paths,
                                                Set<String> limitMods,
@@ -429,8 +432,25 @@
         if (Objects.requireNonNull(paths).isEmpty()) {
              throw new IllegalArgumentException("Empty module path");
         }
+
         Path[] entries = paths.toArray(new Path[0]);
-        ModuleFinder finder = ModulePath.of(Runtime.version(), true, entries);
+        Runtime.Version version = Runtime.version();
+        ModuleFinder finder = ModulePath.of(version, true, entries);
+
+        if (finder.find("java.base").isPresent()) {
+            // use the version of java.base module, if present, as
+            // the release version for multi-release JAR files
+            ModuleDescriptor.Version v = finder.find("java.base").get()
+                .descriptor().version().orElseThrow(() ->
+                    new IllegalArgumentException("No version in java.base descriptor")
+                );
+
+            // java.base version is different than the current runtime version
+            version = Runtime.Version.parse(v.toString());
+            if (Runtime.version().major() != version.major()) {
+                finder = ModulePath.of(version, true, entries);
+            }
+        }
 
         // if limitmods is specified then limit the universe
         if (limitMods != null && !limitMods.isEmpty()) {
@@ -744,6 +764,7 @@
         final ByteOrder order;
         final Path packagedModulesPath;
         final boolean ignoreSigning;
+        final Runtime.Version version;
         final Set<Archive> archives;
 
         ImageHelper(Configuration cf,
@@ -754,6 +775,17 @@
             this.order = order;
             this.packagedModulesPath = packagedModulesPath;
             this.ignoreSigning = ignoreSigning;
+
+            // use the version of java.base module, if present, as
+            // the release version for multi-release JAR files
+            this.version = cf.findModule("java.base")
+                .map(ResolvedModule::reference)
+                .map(ModuleReference::descriptor)
+                .flatMap(ModuleDescriptor::version)
+                .map(ModuleDescriptor.Version::toString)
+                .map(Runtime.Version::parse)
+                .orElse(Runtime.version());
+
             this.archives = modsPaths.entrySet().stream()
                                 .map(e -> newArchive(e.getKey(), e.getValue()))
                                 .collect(Collectors.toSet());
@@ -763,7 +795,7 @@
             if (path.toString().endsWith(".jmod")) {
                 return new JmodArchive(module, path);
             } else if (path.toString().endsWith(".jar")) {
-                ModularJarArchive modularJarArchive = new ModularJarArchive(module, path);
+                ModularJarArchive modularJarArchive = new ModularJarArchive(module, path, version);
 
                 Stream<Archive.Entry> signatures = modularJarArchive.entries().filter((entry) -> {
                     String name = entry.name().toUpperCase(Locale.ENGLISH);
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModularJarArchive.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModularJarArchive.java	Thu Nov 16 01:11:32 2017 +0100
@@ -39,8 +39,8 @@
     private static final String JAR_EXT = ".jar";
     private static final String MODULE_INFO = "module-info.class";
 
-    public ModularJarArchive(String mn, Path jmod) {
-        super(mn, jmod);
+    public ModularJarArchive(String mn, Path jmod, Runtime.Version version) {
+        super(mn, jmod, version);
         String filename = Objects.requireNonNull(jmod.getFileName()).toString();
         if (!filename.endsWith(JAR_EXT)) {
             throw new UnsupportedOperationException("Unsupported format: " + filename);
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Thu Nov 16 01:11:32 2017 +0100
@@ -242,8 +242,14 @@
         lines.map(line -> line.split(" "))
              .forEach(parts -> {
                 switch (parts[0]) {
-                    case "[BMH_RESOLVE]":
-                        speciesTypes.add(expandSignature(parts[1]));
+                    case "[SPECIES_RESOLVE]":
+                        // Allow for new types of species data classes being resolved here
+                        if (parts.length == 3 && parts[1].startsWith("java.lang.invoke.BoundMethodHandle$Species_")) {
+                            String species = parts[1].substring("java.lang.invoke.BoundMethodHandle$Species_".length());
+                            if (!"L".equals(species)) {
+                                speciesTypes.add(expandSignature(species));
+                            }
+                        }
                         break;
                     case "[LF_RESOLVE]":
                         String methodType = parts[3];
@@ -449,7 +455,7 @@
             "/java.base/" + INVOKERS_HOLDER + ".class";
 
     // Convert LL -> LL, L3 -> LLL
-    private static String expandSignature(String signature) {
+    public static String expandSignature(String signature) {
         StringBuilder sb = new StringBuilder();
         char last = 'X';
         int count = 0;
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_es.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_es.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_fr.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_fr.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_it.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_it.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ja.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ja.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ko.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ko.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_pt_BR.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_pt_BR.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_sv.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_sv.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_CN.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_CN.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -778,7 +778,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_TW.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_TW.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -350,7 +350,7 @@
             {"Africa/Johannesburg", SAST},
             {"Africa/Juba", EAT},
             {"Africa/Kampala", EAT},
-            {"Africa/Khartoum", EAT},
+            {"Africa/Khartoum", CAT},
             {"Africa/Kigali", CAT},
             {"Africa/Kinshasa", WAT},
             {"Africa/Lagos", WAT},
@@ -375,7 +375,7 @@
             {"Africa/Timbuktu", GMT},
             {"Africa/Tripoli", EET},
             {"Africa/Tunis", CET},
-            {"Africa/Windhoek", WAT},
+            {"Africa/Windhoek", CAT},
             {"America/Adak", HST},
             {"America/Anguilla", AST},
             {"America/Antigua", AST},
@@ -780,7 +780,6 @@
             {"Brazil/West", AMT},
             {"Canada/Atlantic", AST},
             {"Canada/Central", CST},
-            {"Canada/East-Saskatchewan", CST},
             {"Canada/Eastern", EST},
             {"Canada/Mountain", MST},
             {"Canada/Newfoundland", NST},
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.net/linux/classes/jdk/net/LinuxSocketOptions.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+package jdk.net;
+
+import java.net.SocketException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import jdk.net.ExtendedSocketOptions.PlatformSocketOptions;
+
+class LinuxSocketOptions extends PlatformSocketOptions {
+
+    public LinuxSocketOptions() {
+    }
+
+    @Override
+    void setQuickAck(int fd, boolean on) throws SocketException {
+        setQuickAck0(fd, on);
+    }
+
+    @Override
+    boolean getQuickAck(int fd) throws SocketException {
+        return getQuickAck0(fd);
+    }
+
+    @Override
+    public boolean quickAckSupported() {
+        return quickAckSupported0();
+    }
+
+    native static private void setQuickAck0(int fd, boolean on) throws SocketException;
+
+    native static private boolean getQuickAck0(int fd) throws SocketException;
+
+    native static private boolean quickAckSupported0();
+
+    static {
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            System.loadLibrary("extnet");
+            return null;
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.net/linux/native/libextnet/LinuxSocketOptions.c	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+#include <sys/socket.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <jni.h>
+#include <netinet/tcp.h>
+#include "jni_util.h"
+
+/*
+ * Class:     jdk_net_LinuxSocketOptions
+ * Method:    setQuickAck
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL Java_jdk_net_LinuxSocketOptions_setQuickAck0
+(JNIEnv *env, jobject unused, jint fd, jboolean on) {
+    int optval;
+    int rv;
+    optval = (on ? 1 : 0);
+    rv = setsockopt(fd, SOL_SOCKET, TCP_QUICKACK, &optval, sizeof (optval));
+    if (rv < 0) {
+        if (errno == ENOPROTOOPT) {
+            JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
+                            "unsupported socket option");
+        } else {
+            JNU_ThrowByNameWithLastError(env, "java/net/SocketException",
+                                        "set option TCP_QUICKACK failed");
+        }
+    }
+}
+
+/*
+ * Class:     jdk_net_LinuxSocketOptions
+ * Method:    getQuickAck
+ * Signature: (I)Z;
+ */
+JNIEXPORT jboolean JNICALL Java_jdk_net_LinuxSocketOptions_getQuickAck0
+(JNIEnv *env, jobject unused, jint fd) {
+    int on;
+    socklen_t sz = sizeof (on);
+    int rv = getsockopt(fd, SOL_SOCKET, TCP_QUICKACK, &on, &sz);
+    if (rv < 0) {
+        if (errno == ENOPROTOOPT) {
+            JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
+                            "unsupported socket option");
+        } else {
+            JNU_ThrowByNameWithLastError(env, "java/net/SocketException",
+                                        "get option TCP_QUICKACK failed");
+        }
+    }
+    return on != 0;
+}
+
+/*
+ * Class:     jdk_net_LinuxSocketOptions
+ * Method:    quickAckSupported
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_jdk_net_LinuxSocketOptions_quickAckSupported0
+(JNIEnv *env, jobject unused) {
+    int one = 1;
+    int rv, s;
+    s = socket(PF_INET, SOCK_STREAM, 0);
+    if (s < 0) {
+        return JNI_FALSE;
+    }
+    rv = setsockopt(s, SOL_SOCKET, TCP_QUICKACK, (void *) &one, sizeof (one));
+    if (rv != 0 && errno == ENOPROTOOPT) {
+        rv = JNI_FALSE;
+    } else {
+        rv = JNI_TRUE;
+    }
+    close(s);
+    return rv;
+}
--- a/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, 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
@@ -67,20 +67,53 @@
     public static final SocketOption<SocketFlow> SO_FLOW_SLA = new
         ExtSocketOption<SocketFlow>("SO_FLOW_SLA", SocketFlow.class);
 
+    /**
+     * Disable Delayed Acknowledgements.
+     *
+     * <p>
+     * This socket option can be used to reduce or disable delayed
+     * acknowledgments (ACKs). When {@code TCP_QUICKACK} is enabled, ACKs are
+     * sent immediately, rather than delayed if needed in accordance to normal
+     * TCP operation. This option is not permanent, it only enables a switch to
+     * or from {@code TCP_QUICKACK} mode. Subsequent operations of the TCP
+     * protocol will once again disable/enable {@code TCP_QUICKACK} mode
+     * depending on internal protocol processing and factors such as delayed ACK
+     * timeouts occurring and data transfer, therefore this option needs to be
+     * set with {@code setOption} after each operation of TCP on a given socket.
+     *
+     * <p>
+     * The value of this socket option is a {@code Boolean} that represents
+     * whether the option is enabled or disabled. The socket option is specific
+     * to stream-oriented sockets using the TCP/IP protocol. The exact semantics
+     * of this socket option are socket type and system dependent.
+     *
+     * @since 10
+     */
+    public static final SocketOption<Boolean> TCP_QUICKACK =
+            new ExtSocketOption<Boolean>("TCP_QUICKACK", Boolean.class);
 
     private static final PlatformSocketOptions platformSocketOptions =
             PlatformSocketOptions.get();
 
     private static final boolean flowSupported =
             platformSocketOptions.flowSupported();
+    private static final boolean quickAckSupported =
+            platformSocketOptions.quickAckSupported();
 
     private static final Set<SocketOption<?>> extendedOptions = options();
 
     static Set<SocketOption<?>> options() {
-        if (flowSupported)
-            return Set.of(SO_FLOW_SLA);
-        else
+        if (flowSupported) {
+            if (quickAckSupported) {
+                return Set.of(SO_FLOW_SLA, TCP_QUICKACK);
+            } else {
+                return Set.of(SO_FLOW_SLA);
+            }
+        } else if (quickAckSupported) {
+            return Set.of(TCP_QUICKACK);
+        } else {
             return Collections.<SocketOption<?>>emptySet();
+        }
     }
 
     static {
@@ -105,6 +138,8 @@
                     assert flowSupported;
                     SocketFlow flow = checkValueType(value, option.type());
                     setFlowOption(fd, flow);
+                } else if (option == TCP_QUICKACK) {
+                    setQuickAckOption(fd, (boolean) value);
                 } else {
                     throw new InternalError("Unexpected option " + option);
                 }
@@ -127,6 +162,8 @@
                     SocketFlow flow = SocketFlow.create();
                     getFlowOption(fd, flow);
                     return flow;
+                } else if (option == TCP_QUICKACK) {
+                    return getQuickAckOption(fd);
                 } else {
                     throw new InternalError("Unexpected option " + option);
                 }
@@ -156,12 +193,21 @@
     }
 
     private static void getFlowOption(FileDescriptor fd, SocketFlow f)
-        throws SocketException
-    {
+            throws SocketException {
         int status = platformSocketOptions.getFlowOption(fdAccess.get(fd), f);
         f.status(status);  // augment the given flow with the status
     }
 
+    private static void setQuickAckOption(FileDescriptor fd, boolean enable)
+            throws SocketException {
+        platformSocketOptions.setQuickAck(fdAccess.get(fd), enable);
+    }
+
+    private static Object getQuickAckOption(FileDescriptor fd)
+            throws SocketException {
+        return platformSocketOptions.getQuickAck(fdAccess.get(fd));
+    }
+
     static class PlatformSocketOptions {
 
         protected PlatformSocketOptions() {}
@@ -184,9 +230,13 @@
                             return System.getProperty("os.name");
                         }
                     });
-            if ("SunOS".equals(osname))
+            if ("SunOS".equals(osname)) {
                 return newInstance("jdk.net.SolarisSocketOptions");
-            return new PlatformSocketOptions();
+            } else if ("Linux".equals(osname)) {
+                return newInstance("jdk.net.LinuxSocketOptions");
+            } else {
+                return new PlatformSocketOptions();
+            }
         }
 
         private static final PlatformSocketOptions instance = create();
@@ -208,5 +258,17 @@
         boolean flowSupported() {
             return false;
         }
+
+        void setQuickAck(int fd, boolean on) throws SocketException {
+            throw new UnsupportedOperationException("unsupported TCP_QUICKACK option");
+        }
+
+        boolean getQuickAck(int fd) throws SocketException {
+            throw new UnsupportedOperationException("unsupported TCP_QUICKACK option");
+        }
+
+        boolean quickAckSupported() {
+            return false;
+        }
     }
 }
--- a/src/jdk.net/share/classes/jdk/net/Sockets.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.net/share/classes/jdk/net/Sockets.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -279,6 +279,9 @@
         if (flowsupported) {
             set.add(ExtendedSocketOptions.SO_FLOW_SLA);
         }
+        if (QuickAck.available) {
+            set.add(ExtendedSocketOptions.TCP_QUICKACK);
+        }
         set = Collections.unmodifiableSet(set);
         options.put(Socket.class, set);
 
@@ -290,6 +293,9 @@
         if (reuseportsupported) {
             set.add(StandardSocketOptions.SO_REUSEPORT);
         }
+        if (QuickAck.available) {
+            set.add(ExtendedSocketOptions.TCP_QUICKACK);
+        }
         set.add(StandardSocketOptions.IP_TOS);
         set = Collections.unmodifiableSet(set);
         options.put(ServerSocket.class, set);
@@ -331,4 +337,17 @@
 
         return Collections.unmodifiableMap(options);
     }
+
+    /**
+     * Tells whether TCP_QUICKACK is supported.
+     */
+    static class QuickAck {
+
+        static final boolean available;
+
+        static {
+            Set<SocketOption<?>> s = new Socket().supportedOptions();
+            available = s.contains(ExtendedSocketOptions.TCP_QUICKACK);
+        }
+    }
 }
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngineFactory.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngineFactory.java	Thu Nov 16 01:11:32 2017 +0100
@@ -76,14 +76,16 @@
 
     @Override
     public String getMethodCallSyntax(final String obj, final String method, final String... args) {
-        final StringBuilder sb = new StringBuilder().append(obj).append('.').append(method).append('(');
+        final StringBuilder sb = new StringBuilder().
+            append(Objects.requireNonNull(obj)).append('.').
+            append(Objects.requireNonNull(method)).append('(');
         final int len = args.length;
 
         if (len > 0) {
-            sb.append(args[0]);
+            sb.append(Objects.requireNonNull(args[0]));
         }
         for (int i = 1; i < len; i++) {
-            sb.append(',').append(args[i]);
+            sb.append(',').append(Objects.requireNonNull(args[i]));
         }
         sb.append(')');
 
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/types/IntType.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/types/IntType.java	Thu Nov 16 01:11:32 2017 +0100
@@ -138,7 +138,7 @@
         } else if (to.isLong()) {
             method.visitInsn(I2L);
         } else if (to.isBoolean()) {
-            //nop
+            invokestatic(method, JSType.TO_BOOLEAN_I);
         } else if (to.isString()) {
             invokestatic(method, TO_STRING);
         } else if (to.isObject()) {
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeMath.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeMath.java	Thu Nov 16 01:11:32 2017 +0100
@@ -105,8 +105,8 @@
      * @return abs of argument
      */
     @SpecializedFunction
-    public static int abs(final Object self, final int x) {
-        return Math.abs(x);
+    public static double abs(final Object self, final int x) {
+        return x == Integer.MIN_VALUE? Math.abs((double)x) : Math.abs(x);
     }
 
     /**
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSType.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSType.java	Thu Nov 16 01:11:32 2017 +0100
@@ -89,6 +89,9 @@
     /** JavaScript compliant conversion function from number to boolean */
     public static final Call TO_BOOLEAN_D = staticCall(JSTYPE_LOOKUP, JSType.class, "toBoolean", boolean.class, double.class);
 
+    /** JavaScript compliant conversion function from int to boolean */
+    public static final Call TO_BOOLEAN_I = staticCall(JSTYPE_LOOKUP, JSType.class, "toBoolean", boolean.class, int.class);
+
     /** JavaScript compliant conversion function from Object to integer */
     public static final Call TO_INTEGER = staticCall(JSTYPE_LOOKUP, JSType.class, "toInteger", int.class, Object.class);
 
@@ -548,6 +551,17 @@
     }
 
     /**
+     * JavaScript compliant conversion of int to boolean
+     *
+     * @param num an int
+     *
+     * @return a boolean
+     */
+    public static boolean toBoolean(final int num) {
+        return num != 0;
+    }
+
+    /**
      * JavaScript compliant conversion of Object to boolean
      * See ECMA 9.2 ToBoolean
      *
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Thu Nov 16 01:11:32 2017 +0100
@@ -2050,7 +2050,7 @@
 
         final PropertyMap newMap = oldMap.replaceProperty(property, property.removeFlags(Property.NEEDS_DECLARATION));
         setMap(newMap);
-        set(key, value, 0);
+        set(key, value, NashornCallSiteDescriptor.CALLSITE_DECLARE);
     }
 
     /**
@@ -3071,7 +3071,7 @@
         }
 
         if (f != null) {
-            if (!f.getProperty().isWritable() || !f.getProperty().hasNativeSetter()) {
+            if ((!f.getProperty().isWritable() && !NashornCallSiteDescriptor.isDeclaration(callSiteFlags)) || !f.getProperty().hasNativeSetter()) {
                 if (isScopeFlag(callSiteFlags) && f.getProperty().isLexicalBinding()) {
                     throw typeError("assign.constant", key.toString()); // Overwriting ES6 const should throw also in non-strict mode.
                 }
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java	Thu Nov 16 01:11:32 2017 +0100
@@ -505,6 +505,15 @@
     }
 
     /**
+     * Returns true if {@code flags} has the {@link  #CALLSITE_DECLARE} bit set.
+     * @param flags the flags
+     * @return true if the flag is set, false otherwise.
+     */
+    public static boolean isDeclaration(final int flags) {
+        return (flags & CALLSITE_DECLARE) != 0;
+    }
+
+    /**
      * Get a program point from a descriptor (must be optimistic)
      * @param desc descriptor
      * @return program point
--- a/test/jdk/ProblemList.txt	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/ProblemList.txt	Thu Nov 16 01:11:32 2017 +0100
@@ -174,6 +174,8 @@
 
 java/net/DatagramSocket/SendDatagramToBadAddress.java           7143960 macosx-all
 
+java/net/httpclient/websocket/ConnectionHandover.java           8188895 windows-all
+
 ############################################################################
 
 # jdk_nio
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/invoke/ClassSpecializerTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @summary Smoke-test class specializer, used to create BoundMethodHandle classes
+ * @compile/module=java.base java/lang/invoke/ClassSpecializerHelper.java
+ * @run testng/othervm/timeout=250 -ea -esa ClassSpecializerTest
+ */
+
+// Useful diagnostics to try:
+//   -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true
+//   -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true
+
+
+import org.testng.annotations.*;
+import java.lang.invoke.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static java.lang.invoke.ClassSpecializerHelper.*;
+
+
+public class ClassSpecializerTest {
+    @Test
+    public void testFindSpecies() throws Throwable {
+        System.out.println("testFindSpecies");
+        System.out.println("test = " + SPEC_TEST);
+        ArrayList<Object> args = new ArrayList<>();
+        for (int key = 0; key <= Kind.MAX_KEY; key++) {
+            Kind k = SpecTest.kind(key);
+            System.out.println("k = " + k);
+            MethodHandle mh = k.factory();
+            System.out.println("k.f = " + mh);
+            args.clear();
+            for (Class<?> pt : mh.type().parameterList()) {
+                args.add(coughUpA(pt));
+            }
+            args.set(0, key * 1000 + 42);
+            Frob f = (Frob) mh.invokeWithArguments(args.toArray());
+            assert(f.kind() == k);
+            System.out.println("k.f(...) = " + f.toString());
+            List<Object> l = f.asList();
+            System.out.println("f.l = " + l);
+            args.subList(0,1).clear();  // drop label
+            assert(args.equals(l));
+        }
+    }
+    private static Object coughUpA(Class<?> pt) throws Throwable {
+        if (pt == String.class)  return "foo";
+        if (pt.isArray()) return java.lang.reflect.Array.newInstance(pt.getComponentType(), 2);
+        if (pt == Integer.class)  return 42;
+        if (pt == Double.class)  return 3.14;
+        if (pt.isAssignableFrom(List.class))
+            return Arrays.asList("hello", "world", "from", pt.getSimpleName());
+        return MethodHandles.zero(pt).invoke();
+    }
+    public static void main(String... av) throws Throwable {
+        System.out.println("TEST: ClassSpecializerTest");
+        new ClassSpecializerTest().testFindSpecies();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/invoke/java.base/java/lang/invoke/ClassSpecializerHelper.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2017, 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.
+ */
+
+package java.lang.invoke;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+
+/**
+ * Helper class, injected into java.lang.invoke,
+ * that bridges to the private ClassSpecializer mechanism.
+ */
+
+public interface ClassSpecializerHelper {
+    interface Frob {
+        Kind kind();
+        int label();
+        List<Object> asList();
+    }
+    abstract class FrobImpl implements Frob {
+        private final int label;
+        public FrobImpl(int label) {
+            this.label = label;
+        }
+        public int label() { return label; }
+        @Override public abstract Kind kind();
+
+        public String toString() {
+            final StringBuilder buf = new StringBuilder();
+            buf.append("Frob[label=").append(label);
+            final Kind k = kind();
+            if (k != null) {
+                for (MethodHandle mh : k.getters()) {
+                    Object x = "?";
+                    try {
+                        x = mh.invoke(this);
+                    } catch (Throwable ex) {
+                        x = "<<"+ex.getMessage()+">>";
+                    }
+                    buf.append(", ").append(x);
+                }
+            }
+            buf.append("]");
+            return buf.toString();
+        }
+
+        public List<Object> asList() {
+            final List<MethodHandle> getters = kind().getters();
+            ArrayList<Object> res = new ArrayList<>(getters.size());
+            for (MethodHandle getter : getters) {
+                try {
+                    res.add(getter.invoke(this));
+                } catch (Throwable ex) {
+                    throw new AssertionError(ex);
+                }
+            }
+            return res;
+        }
+    }
+
+    public static class Kind extends ClassSpecializer<Frob, Byte, Kind>.SpeciesData {
+        public Kind(SpecTest outer, Byte key) {
+            outer.super(key);
+        }
+
+        public MethodHandle factory() {
+            return super.factory();
+        }
+
+        public List<MethodHandle> getters() {
+            return super.getters();
+        }
+
+        private static final List<Class<?>> FIELD_TYPES
+                = Arrays.asList(String.class, float.class, Double.class, boolean.class, Object[].class, Object.class);
+
+        public static int MAX_KEY = FIELD_TYPES.size();
+
+        @Override
+        protected List<Class<?>> deriveFieldTypes(Byte key) {
+            return FIELD_TYPES.subList(0, key);
+        }
+
+        @Override
+        protected Class<? extends Frob> deriveSuperClass() {
+            return FrobImpl.class;
+        }
+
+        @Override
+        protected MethodHandle deriveTransformHelper(MemberName transform, int whichtm) {
+            throw new AssertionError();
+        }
+
+        @Override
+        protected <X> List<X> deriveTransformHelperArguments(MemberName transform, int whichtm, List<X> args, List<X> fields) {
+            throw new AssertionError();
+        }
+    }
+
+    class SpecTest extends ClassSpecializer<Frob, Byte, Kind> {
+        private static final MemberName SPECIES_DATA_ACCESSOR;
+        static {
+            try {
+                SPECIES_DATA_ACCESSOR = MethodHandles.publicLookup()
+                    .resolveOrFail(REF_invokeVirtual, FrobImpl.class, "kind", MethodType.methodType(Kind.class));
+            } catch (ReflectiveOperationException ex) {
+                throw new AssertionError("Bootstrap link error", ex);
+            }
+        }
+
+        public SpecTest() {
+            super(Frob.class, Byte.class, Kind.class,
+                    MethodType.methodType(void.class, int.class),
+                    SPECIES_DATA_ACCESSOR,
+                    "KIND",
+                    Arrays.asList());
+        }
+
+        @Override
+        protected Kind newSpeciesData(Byte key) {
+            return new Kind(this, key);
+        }
+
+        public static Kind kind(int key) {
+            return (Kind) SPEC_TEST.findSpecies((byte)key);
+        }
+    }
+
+    static final SpecTest SPEC_TEST = new SpecTest();
+
+}
+
--- a/test/jdk/java/nio/channels/SocketChannel/VectorIO.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/nio/channels/SocketChannel/VectorIO.java	Thu Nov 16 01:11:32 2017 +0100
@@ -22,6 +22,7 @@
  */
 
 /* @test
+ * @bug 8191025
  * @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed)
  * @library .. /test/lib
  * @build jdk.test.lib.RandomFactory
@@ -42,11 +43,16 @@
 
     static int testSize;
 
+    // whether to use the write/read variant with a length parameter
+    static boolean setLength;
+
     public static void main(String[] args) throws Exception {
         testSize = 1;
+        setLength = false;
         runTest();
         for(int i=15; i<18; i++) {
             testSize = i;
+            setLength = !setLength;
             runTest();
         }
     }
@@ -75,6 +81,9 @@
             total += bufs[i].remaining();
         }
 
+        ByteBuffer[] bufsPlus1 = new ByteBuffer[bufs.length + 1];
+        System.arraycopy(bufs, 0, bufsPlus1, 0, bufs.length);
+
         // Get a connection to the server
         InetAddress lh = InetAddress.getLocalHost();
         InetSocketAddress isa = new InetSocketAddress(lh, port);
@@ -85,7 +94,12 @@
         // Write the data out
         long rem = total;
         while (rem > 0L) {
-            long bytesWritten = sc.write(bufs);
+            long bytesWritten;
+            if (setLength) {
+                bytesWritten = sc.write(bufsPlus1, 0, bufs.length);
+            } else {
+                bytesWritten = sc.write(bufs);
+            }
             if (bytesWritten == 0) {
                 if (sc.isBlocking()) {
                     throw new RuntimeException("write did not block");
@@ -134,6 +148,9 @@
                 total += bufs[i].capacity();
             }
 
+            ByteBuffer[] bufsPlus1 = new ByteBuffer[bufs.length + 1];
+            System.arraycopy(bufs, 0, bufsPlus1, 0, bufs.length);
+
             // Get a connection from client
             SocketChannel sc = null;
 
@@ -155,7 +172,12 @@
                 // Read data into multiple buffers
                 long avail = total;
                 while (avail > 0) {
-                    long bytesRead = sc.read(bufs);
+                    long bytesRead;
+                    if (setLength) {
+                        bytesRead = sc.read(bufsPlus1, 0, bufs.length);
+                    } else {
+                        bytesRead = sc.read(bufs);
+                    }
                     if (bytesRead < 0)
                         break;
                     if (bytesRead == 0) {
--- a/test/jdk/java/time/tck/java/time/zone/TCKZoneRules.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/time/tck/java/time/zone/TCKZoneRules.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -941,21 +941,21 @@
     }
 
     public void test_Apia_jumpForwardOverInternationalDateLine_P12_to_M12() {
-        // transition occurred at 1879-07-04T00:00+12:33:04
+        // transition occurred at 1892-07-04T00:00+12:33:04
         ZoneRules test = pacificApia();
-        Instant instantBefore = LocalDate.of(1879, 7, 2).atStartOfDay(ZoneOffset.UTC).toInstant();
+        Instant instantBefore = LocalDate.of(1892, 7, 2).atStartOfDay(ZoneOffset.UTC).toInstant();
         ZoneOffsetTransition trans = test.nextTransition(instantBefore);
-        assertEquals(trans.getDateTimeBefore(), LocalDateTime.of(1879, 7, 5, 0, 0));
-        assertEquals(trans.getDateTimeAfter(), LocalDateTime.of(1879, 7, 4, 0, 0));
+        assertEquals(trans.getDateTimeBefore(), LocalDateTime.of(1892, 7, 5, 0, 0));
+        assertEquals(trans.getDateTimeAfter(), LocalDateTime.of(1892, 7, 4, 0, 0));
         assertEquals(trans.isGap(), false);
         assertEquals(trans.isOverlap(), true);
         assertEquals(trans.isValidOffset(ZoneOffset.ofHoursMinutesSeconds(+12, 33, 4)), true);
         assertEquals(trans.isValidOffset(ZoneOffset.ofHoursMinutesSeconds(-11, -26, -56)), true);
         assertEquals(trans.getDuration(), Duration.ofHours(-24));
-        assertEquals(trans.getInstant(), LocalDateTime.of(1879, 7, 4, 0, 0).toInstant(ZoneOffset.ofHoursMinutesSeconds(-11, -26, -56)));
+        assertEquals(trans.getInstant(), LocalDateTime.of(1892, 7, 4, 0, 0).toInstant(ZoneOffset.ofHoursMinutesSeconds(-11, -26, -56)));
 
-        ZonedDateTime zdt = ZonedDateTime.of(1879, 7, 4, 23, 0, 0, 0, ZoneId.of("Pacific/Apia"));
-        assertEquals(zdt.plusHours(2).toLocalDateTime(), LocalDateTime.of(1879, 7, 4, 1, 0, 0));
+        ZonedDateTime zdt = ZonedDateTime.of(1892, 7, 4, 23, 0, 0, 0, ZoneId.of("Pacific/Apia"));
+        assertEquals(zdt.plusHours(2).toLocalDateTime(), LocalDateTime.of(1892, 7, 4, 1, 0, 0));
     }
 
     //-------------------------------------------------------------------------
--- a/test/jdk/java/time/test/java/time/format/ZoneName.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/time/test/java/time/format/ZoneName.java	Thu Nov 16 01:11:32 2017 +0100
@@ -104,7 +104,7 @@
         "Pacific/Chuuk", "Truk", "Pacific/Truk",
         "Africa/Gaborone", "Africa_Central", "Africa/Maputo",
         "Africa/Tunis", "Europe_Central", "Europe/Paris",
-        "Africa/Khartoum", "Africa_Eastern", "Africa/Nairobi",
+        "Africa/Khartoum", "Africa_Central", "Africa/Maputo",
         "Europe/Isle_of_Man", "GMT", "Atlantic/Reykjavik",
         "Europe/Skopje", "Europe_Central", "Europe/Paris",
         "America/Merida", "America_Central", "America/Chicago",
@@ -221,7 +221,7 @@
         "Africa/Algiers", "Europe_Central", "Europe/Paris",
         "America/Miquelon", "Pierre_Miquelon", "America/Miquelon",
         "Asia/Tokyo", "Japan", "Asia/Tokyo",
-        "Africa/Windhoek", "Africa_Western", "Africa/Lagos",
+        "Africa/Windhoek", "Africa_Central", "Africa/Maputo",
         "Africa/Bujumbura", "Africa_Central", "Africa/Maputo",
         "America/Guatemala", "America_Central", "America/Chicago",
         "Africa/Dakar", "GMT", "Atlantic/Reykjavik",
@@ -662,7 +662,6 @@
         "America/Rosario", "America/Argentina/Cordoba",
         "Jamaica", "America/Jamaica",
         "Asia/Katmandu", "Asia/Kathmandu",
-        "Canada/East-Saskatchewan", "America/Regina",
         "ROK", "Asia/Seoul",
         "Asia/Macao", "Asia/Macau",
         "Australia/South", "Australia/Adelaide",
--- a/test/jdk/java/util/AbstractList/FailFastIterator.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/AbstractList/FailFastIterator.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4189896
  * @summary AbstractList iterators previously checked for co-modification
--- a/test/jdk/java/util/AbstractSequentialList/AddAll.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/AbstractSequentialList/AddAll.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4295163
  * @summary AddAll(int, Collection) intersperses the Collection with this List.
--- a/test/jdk/java/util/Collection/IteratorMicroBenchmark.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collection/IteratorMicroBenchmark.java	Thu Nov 16 01:11:32 2017 +0100
@@ -233,7 +233,7 @@
     }
 
     // Checks for correctness *and* prevents loop optimizations
-    class Check {
+    static class Check {
         private int sum;
         public void sum(int sum) {
             if (this.sum == 0)
--- a/test/jdk/java/util/Collection/MOAT.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collection/MOAT.java	Thu Nov 16 01:11:32 2017 +0100
@@ -1584,11 +1584,11 @@
     }
     interface Fun {void f() throws Throwable;}
     private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
-          for (Fun f : fs)
-              try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
-              catch (Throwable t) {
-                  if (k.isAssignableFrom(t.getClass())) pass();
-                  else unexpected(t);}}
+        for (Fun f : fs)
+            try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
+            catch (Throwable t) {
+                if (k.isAssignableFrom(t.getClass())) pass();
+                else unexpected(t);}}
     static byte[] serializedForm(Object obj) {
         try {
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
--- a/test/jdk/java/util/Collection/RemoveMicroBenchmark.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collection/RemoveMicroBenchmark.java	Thu Nov 16 01:11:32 2017 +0100
@@ -230,7 +230,7 @@
     }
 
     // Checks for correctness *and* prevents loop optimizations
-    class Check {
+    static class Check {
         private int sum;
         public void sum(int sum) {
             if (this.sum == 0)
--- a/test/jdk/java/util/Collections/AddAll.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/AddAll.java	Thu Nov 16 01:11:32 2017 +0100
@@ -33,7 +33,7 @@
 
 public class AddAll {
     static final int N = 100;
-    public static void main(String args[]) {
+    public static void main(String[] args) {
         test(new ArrayList<Integer>());
         test(new LinkedList<Integer>());
         test(new HashSet<Integer>());
--- a/test/jdk/java/util/Collections/BinarySearchNullComparator.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/BinarySearchNullComparator.java	Thu Nov 16 01:11:32 2017 +0100
@@ -30,7 +30,7 @@
 import java.util.*;
 
 public class BinarySearchNullComparator {
-    public static void main(String args[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         List list = Arrays.asList(new String[] {"I", "Love", "You"});
 
         int result = Collections.binarySearch(list, "You", null);
--- a/test/jdk/java/util/Collections/CheckedListBash.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/CheckedListBash.java	Thu Nov 16 01:11:32 2017 +0100
@@ -209,15 +209,14 @@
     }
 
     static void AddRandoms(List s, int n) {
-        for (int i=0; i<n; i++) {
-            int r = rnd.nextInt() % n;
-            Integer e = new Integer(r < 0 ? -r : r);
+        for (int i = 0; i < n; i++) {
+            Integer e = rnd.nextInt(n);
 
             int preSize = s.size();
             if (!s.add(e))
                 fail("Add failed.");
             int postSize = s.size();
-            if (postSize-preSize != 1)
+            if (postSize - preSize != 1)
                 fail("Add didn't increase size by 1.");
         }
     }
--- a/test/jdk/java/util/Collections/CheckedMapBash.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/CheckedMapBash.java	Thu Nov 16 01:11:32 2017 +0100
@@ -36,7 +36,6 @@
 import org.testng.annotations.DataProvider;
 
 import static org.testng.Assert.fail;
-import static org.testng.Assert.assertTrue;
 
 public class CheckedMapBash {
     static final Random rnd = new Random();
--- a/test/jdk/java/util/Collections/CheckedSetBash.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/CheckedSetBash.java	Thu Nov 16 01:11:32 2017 +0100
@@ -122,9 +122,8 @@
     }
 
     static void AddRandoms(Set s, int n) {
-        for (int i=0; i<n; i++) {
-            int r = rnd.nextInt() % n;
-            Integer e = new Integer(r < 0 ? -r : r);
+        for (int i = 0; i < n; i++) {
+            Integer e = rnd.nextInt(n);
 
             int preSize = s.size();
             boolean prePresent = s.contains(e);
--- a/test/jdk/java/util/Collections/Disjoint.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Disjoint.java	Thu Nov 16 01:11:32 2017 +0100
@@ -34,7 +34,7 @@
 public class Disjoint {
     static final int N = 20;
 
-    public static void main(String args[]) {
+    public static void main(String[] args) {
         // Make an array of lists each of which shares a single element
         // with its "neighbors," and no elements with other lists in the array
         Random rnd = new Random();
--- a/test/jdk/java/util/Collections/EmptyNavigableMap.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/EmptyNavigableMap.java	Thu Nov 16 01:11:32 2017 +0100
@@ -48,7 +48,7 @@
 public class EmptyNavigableMap {
 
     public static <T> void assertInstance(T actual, Class<? extends T> expected) {
-        assertInstance(expected.isInstance(actual), null);
+        assertInstance(actual, expected, null);
     }
 
     public static <T> void assertInstance(T actual, Class<? extends T> expected, String message) {
--- a/test/jdk/java/util/Collections/EmptyNavigableSet.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/EmptyNavigableSet.java	Thu Nov 16 01:11:32 2017 +0100
@@ -50,7 +50,7 @@
 public class EmptyNavigableSet {
 
     public static <T> void assertInstance(T actual, Class<? extends T> expected) {
-        assertInstance(expected.isInstance(actual), null);
+        assertInstance(actual, expected, null);
     }
 
     public static <T> void assertInstance(T actual, Class<? extends T> expected, String message) {
--- a/test/jdk/java/util/Collections/Enum.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Enum.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4323074
  * @summary Basic test for new Enumeration -> List converter
--- a/test/jdk/java/util/Collections/FindSubList.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/FindSubList.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4323074
  * @summary Basic test for Collections.indexOfSubList/lastIndexOfSubList
@@ -33,8 +33,8 @@
     public static void main(String[] args) throws Exception {
         int N = 500;
         List source = new ArrayList(3 * N);
-        List target[]= new List[N+1];
-        int  index[] = new  int[N+1];
+        List[] target = new List[N+1];
+        int[] index = new int[N+1];
         for (int i=0; i<=N; i++) {
             List t = new ArrayList();
             String s = Integer.toString(i, 2);
@@ -50,8 +50,12 @@
             }
         }
 
-        List src[] = {source, new LinkedList(source), new Vector(source),
-                      Arrays.asList(source.toArray())};
+        List[] src = {
+            source,
+            new LinkedList(source),
+            new Vector(source),
+            Arrays.asList(source.toArray())
+        };
         for (int j=0; j<src.length; j++) {
             List s = src[j];
 
@@ -75,8 +79,12 @@
             if (i != N)
                 index[i] = srcSize - index[i] - target[i].size();
         }
-        List src2[] = {source, new LinkedList(source), new Vector(source),
-                       Arrays.asList(source.toArray())};
+        List[] src2 = {
+            source,
+            new LinkedList(source),
+            new Vector(source),
+            Arrays.asList(source.toArray())
+        };
         for (int j=0; j<src2.length; j++) {
             List s = src2[j];
 
--- a/test/jdk/java/util/Collections/Frequency.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Frequency.java	Thu Nov 16 01:11:32 2017 +0100
@@ -32,7 +32,7 @@
 
 public class Frequency {
     static final int N = 100;
-    public static void main(String args[]) {
+    public static void main(String[] args) {
         test(new ArrayList<Integer>());
         test(new LinkedList<Integer>());
     }
--- a/test/jdk/java/util/Collections/NullComparator.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/NullComparator.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4224271
  * @summary A null Comparator is now specified to indicate natural ordering.
@@ -37,7 +37,7 @@
         List sorted = new ArrayList(list);
         Collections.shuffle(list);
 
-        Object a[] = list.toArray();
+        Object[] a = list.toArray();
         Arrays.sort(a, null);
         if (!Arrays.asList(a).equals(sorted))
             throw new Exception("Arrays.sort");
--- a/test/jdk/java/util/Collections/ReplaceAll.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/ReplaceAll.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4323074
  * @summary Basic test for new replaceAll algorithm
@@ -33,7 +33,7 @@
     static final int SIZE = 20;
 
     public static void main(String[] args) throws Exception {
-        List a[] = {new ArrayList(), new LinkedList(), new Vector()};
+        List[] a = {new ArrayList(), new LinkedList(), new Vector()};
 
         for (int i=0; i<a.length; i++) {
             List lst = a[i];
--- a/test/jdk/java/util/Collections/Rotate.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Rotate.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4323074
  * @summary Basic test for new rotate algorithm
@@ -37,7 +37,7 @@
     static Random rnd = new Random();
 
     public static void main(String[] args) throws Exception {
-        List a[] = {new ArrayList(), new LinkedList(), new Vector()};
+        List[] a = {new ArrayList(), new LinkedList(), new Vector()};
 
         for (int i=0; i<a.length; i++) {
             List lst = a[i];
--- a/test/jdk/java/util/Collections/RotateEmpty.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/RotateEmpty.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4389747
  * @summary Collections.rotate(...) returns ArithmeticException
--- a/test/jdk/java/util/Collections/Ser.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Ser.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4190323
  * @summary EMPTY_SET, EMPTY_LIST, and the collections returned by
--- a/test/jdk/java/util/Collections/Swap.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/Swap.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug     4323074
  * @summary Basic test for newly public swap algorithm
--- a/test/jdk/java/util/Collections/ViewSynch.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/ViewSynch.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4268780
  * @summary Collection-views of submap-views of synchronized-views of
--- a/test/jdk/java/util/Collections/WrappedNull.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Collections/WrappedNull.java	Thu Nov 16 01:11:32 2017 +0100
@@ -31,152 +31,152 @@
 import java.util.*;
 
 public class WrappedNull {
-      public static void main(String argv[]) throws Exception {
-          boolean testSucceeded = false;
-          try {
-              List l = Arrays.asList(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("Arrays.asList");
+    public static void main(String[] args) throws Exception {
+        boolean testSucceeded = false;
+        try {
+            List l = Arrays.asList(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("Arrays.asList");
 
-          testSucceeded = false;
-          try {
-              Collection c = Collections.unmodifiableCollection(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableCollection");
+        testSucceeded = false;
+        try {
+            Collection c = Collections.unmodifiableCollection(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableCollection");
 
-          testSucceeded = false;
-          try {
-              Set c = Collections.unmodifiableSet(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableSet");
+        testSucceeded = false;
+        try {
+            Set c = Collections.unmodifiableSet(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableSet");
 
-          testSucceeded = false;
-          try {
-              List c = Collections.unmodifiableList(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableList");
+        testSucceeded = false;
+        try {
+            List c = Collections.unmodifiableList(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableList");
 
-          testSucceeded = false;
-          try {
-              Map c = Collections.unmodifiableMap(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableMap");
+        testSucceeded = false;
+        try {
+            Map c = Collections.unmodifiableMap(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableMap");
 
-          testSucceeded = false;
-          try {
-              SortedSet c = Collections.unmodifiableSortedSet(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableSortedSet");
+        testSucceeded = false;
+        try {
+            SortedSet c = Collections.unmodifiableSortedSet(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableSortedSet");
 
-          testSucceeded = false;
-          try {
-              SortedMap c = Collections.unmodifiableSortedMap(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("unmodifiableSortedMap");
+        testSucceeded = false;
+        try {
+            SortedMap c = Collections.unmodifiableSortedMap(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("unmodifiableSortedMap");
 
-          testSucceeded = false;
-          try {
-              Collection c = Collections.synchronizedCollection(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedCollection");
+        testSucceeded = false;
+        try {
+            Collection c = Collections.synchronizedCollection(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedCollection");
 
-          testSucceeded = false;
-          try {
-              Set c = Collections.synchronizedSet(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedSet");
+        testSucceeded = false;
+        try {
+            Set c = Collections.synchronizedSet(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedSet");
 
-          testSucceeded = false;
-          try {
-              List c = Collections.synchronizedList(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedList");
+        testSucceeded = false;
+        try {
+            List c = Collections.synchronizedList(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedList");
 
-          testSucceeded = false;
-          try {
-              Map c = Collections.synchronizedMap(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedMap");
+        testSucceeded = false;
+        try {
+            Map c = Collections.synchronizedMap(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedMap");
 
-          testSucceeded = false;
-          try {
-              SortedSet c = Collections.synchronizedSortedSet(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedSortedSet");
+        testSucceeded = false;
+        try {
+            SortedSet c = Collections.synchronizedSortedSet(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedSortedSet");
 
-          testSucceeded = false;
-          try {
-              SortedMap c = Collections.synchronizedSortedMap(null);
-          }
-          catch (NullPointerException e) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("synchronizedSortedMap");
+        testSucceeded = false;
+        try {
+            SortedMap c = Collections.synchronizedSortedMap(null);
+        }
+        catch (NullPointerException e) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("synchronizedSortedMap");
 
-          // Make sure that non-null arguments don't throw exc.
-          List l = Arrays.asList(new Object[0]);
-          Collection c = Collections.unmodifiableCollection(
-                             Collections.EMPTY_SET);
-          Set s = Collections.unmodifiableSet(Collections.EMPTY_SET);
-          l = Collections.unmodifiableList(Collections.EMPTY_LIST);
-          Map m = Collections.unmodifiableMap(Collections.EMPTY_MAP);
-          SortedSet ss = Collections.unmodifiableSortedSet(new TreeSet());
-          SortedMap sm = Collections.unmodifiableSortedMap(new TreeMap());
+        // Make sure that non-null arguments don't throw exc.
+        List l = Arrays.asList(new Object[0]);
+        Collection c = Collections.unmodifiableCollection(
+                Collections.EMPTY_SET);
+        Set s = Collections.unmodifiableSet(Collections.EMPTY_SET);
+        l = Collections.unmodifiableList(Collections.EMPTY_LIST);
+        Map m = Collections.unmodifiableMap(Collections.EMPTY_MAP);
+        SortedSet ss = Collections.unmodifiableSortedSet(new TreeSet());
+        SortedMap sm = Collections.unmodifiableSortedMap(new TreeMap());
 
-          c = Collections.synchronizedCollection(Collections.EMPTY_SET);
-          s = Collections.synchronizedSet(Collections.EMPTY_SET);
-          l = Collections.synchronizedList(Collections.EMPTY_LIST);
-          m = Collections.synchronizedMap(Collections.EMPTY_MAP);
-          ss = Collections.synchronizedSortedSet(new TreeSet());
-          sm = Collections.synchronizedSortedMap(new TreeMap());
-      }
+        c = Collections.synchronizedCollection(Collections.EMPTY_SET);
+        s = Collections.synchronizedSet(Collections.EMPTY_SET);
+        l = Collections.synchronizedList(Collections.EMPTY_LIST);
+        m = Collections.synchronizedMap(Collections.EMPTY_MAP);
+        ss = Collections.synchronizedSortedSet(new TreeSet());
+        sm = Collections.synchronizedSortedMap(new TreeMap());
+    }
 }
--- a/test/jdk/java/util/HashMap/KeySetRemove.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/HashMap/KeySetRemove.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4286765
  * @summary HashMap and TreeMap entrySet().remove(k) spuriously returned
@@ -31,8 +31,8 @@
 import java.util.*;
 
 public class KeySetRemove {
-    public static void main(String args[]) throws Exception {
-        Map m[] = {new HashMap(), new TreeMap()};
+    public static void main(String[] args) throws Exception {
+        Map[] m = {new HashMap(), new TreeMap()};
         for (int i=0; i<m.length; i++) {
             m[i].put("bananas", null);
             if (!m[i].keySet().remove("bananas"))
--- a/test/jdk/java/util/HashMap/SetValue.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/HashMap/SetValue.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4627516
  * @summary HashMap.Entry.setValue() returns new value (as opposed to old)
@@ -35,7 +35,7 @@
     static final String oldValue = "old";
     static final String newValue = "new";
 
-    public static void main(String args[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         Map m = new HashMap();
         m.put(key, oldValue);
         Map.Entry e = (Map.Entry) m.entrySet().iterator().next();
--- a/test/jdk/java/util/HashMap/ToString.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/HashMap/ToString.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4189821
  * @summary HashMap's entry.toString threw a null pointer exc if the HashMap
--- a/test/jdk/java/util/Hashtable/EqualsCast.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Hashtable/EqualsCast.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4208530
  * @summary Hashtable was less robust to extension that it could have been
--- a/test/jdk/java/util/Hashtable/HashCode.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Hashtable/HashCode.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4559052
  * @summary Hashtable's hashCode method always returns zero(!)
--- a/test/jdk/java/util/Hashtable/IllegalLoadFactor.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Hashtable/IllegalLoadFactor.java	Thu Nov 16 01:11:32 2017 +0100
@@ -34,101 +34,100 @@
  */
 public class IllegalLoadFactor {
 
-      public static void main(String argv[]) throws Exception {
-          boolean testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              Hashtable bad1 = new Hashtable(100, -3);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("Hashtable, negative load factor");
+    public static void main(String[] args) throws Exception {
+        boolean testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            Hashtable bad1 = new Hashtable(100, -3);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("Hashtable, negative load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              Hashtable bad1 = new Hashtable(100, Float.NaN);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("Hashtable, NaN load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            Hashtable bad1 = new Hashtable(100, Float.NaN);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("Hashtable, NaN load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              HashMap bad1 = new HashMap(100, -3);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("HashMap, negative load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            HashMap bad1 = new HashMap(100, -3);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("HashMap, negative load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              HashMap bad1 = new HashMap(100, Float.NaN);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("HashMap, NaN load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            HashMap bad1 = new HashMap(100, Float.NaN);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("HashMap, NaN load factor");
 
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              HashSet bad1 = new HashSet(100, -3);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("HashSet, negative load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            HashSet bad1 = new HashSet(100, -3);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("HashSet, negative load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              HashSet bad1 = new HashSet(100, Float.NaN);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("HashSet, NaN load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            HashSet bad1 = new HashSet(100, Float.NaN);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("HashSet, NaN load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              WeakHashMap bad1 = new WeakHashMap(100, -3);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("WeakHashMap, negative load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            WeakHashMap bad1 = new WeakHashMap(100, -3);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("WeakHashMap, negative load factor");
 
-          testSucceeded = false;
-          try {
-              // this should generate an IllegalArgumentException
-              WeakHashMap bad1 = new WeakHashMap(100, Float.NaN);
-          }
-          catch (IllegalArgumentException e1) {
-              testSucceeded = true;
-          }
-          if (!testSucceeded)
-              throw new Exception("WeakHashMap, NaN load factor");
+        testSucceeded = false;
+        try {
+            // this should generate an IllegalArgumentException
+            WeakHashMap bad1 = new WeakHashMap(100, Float.NaN);
+        }
+        catch (IllegalArgumentException e1) {
+            testSucceeded = true;
+        }
+        if (!testSucceeded)
+            throw new Exception("WeakHashMap, NaN load factor");
 
-          // Make sure that legal creates don't throw exceptions
-          Map goodMap = new Hashtable(100, .69f);
-          goodMap = new HashMap(100, .69f);
-          Set goodSet = new HashSet(100, .69f);
-          goodMap = new WeakHashMap(100, .69f);
-     }
-
+        // Make sure that legal creates don't throw exceptions
+        Map goodMap = new Hashtable(100, .69f);
+        goodMap = new HashMap(100, .69f);
+        Set goodSet = new HashSet(100, .69f);
+        goodMap = new WeakHashMap(100, .69f);
+    }
 }
--- a/test/jdk/java/util/Hashtable/SelfRef.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Hashtable/SelfRef.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4421469 6282555
  * @summary Hashtable's toString method should detect self-referential
--- a/test/jdk/java/util/LinkedHashMap/Basic.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/LinkedHashMap/Basic.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4245809 8029795
  * @summary Basic test for LinkedHashMap.  (Based on MapBash)
--- a/test/jdk/java/util/LinkedHashMap/Cache.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/LinkedHashMap/Cache.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4245809
  * @summary Basic test of removeEldestElement method.
--- a/test/jdk/java/util/LinkedHashMap/EmptyMapIterator.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/LinkedHashMap/EmptyMapIterator.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4473440
  * @summary iterators on collection views of empty map weren't fail-fast.
@@ -30,7 +30,7 @@
 import java.util.*;
 
 public class EmptyMapIterator {
-    public static void main(String args[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         HashMap map = new HashMap();
         Iterator iter = iter = map.entrySet().iterator();
         map.put("key", "value");
--- a/test/jdk/java/util/LinkedHashSet/Basic.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/LinkedHashSet/Basic.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4245809
  * @summary Basic test for LinkedHashSet.  (Based on SetBash)
@@ -133,9 +133,8 @@
     }
 
     static void AddRandoms(Set s, int n) throws Exception {
-        for (int i=0; i<n; i++) {
-            int r = rnd.nextInt() % n;
-            Integer e = new Integer(r < 0 ? -r : r);
+        for (int i = 0; i < n; i++) {
+            Integer e = rnd.nextInt(n);
 
             int preSize = s.size();
             boolean prePresent = s.contains(e);
--- a/test/jdk/java/util/LinkedList/AddAll.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/LinkedList/AddAll.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4163207
  * @summary AddAll was prepending instead of appending!
--- a/test/jdk/java/util/NavigableMap/LockStep.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/NavigableMap/LockStep.java	Thu Nov 16 01:11:32 2017 +0100
@@ -848,11 +848,11 @@
     }
     interface Fun {void f() throws Throwable;}
     static void THROWS(Class<? extends Throwable> k, Fun... fs) {
-          for (Fun f : fs)
-              try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
-              catch (Throwable t) {
-                  if (k.isAssignableFrom(t.getClass())) pass();
-                  else unexpected(t);}}
+        for (Fun f : fs)
+            try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
+            catch (Throwable t) {
+                if (k.isAssignableFrom(t.getClass())) pass();
+                else unexpected(t);}}
     static byte[] serializedForm(Object obj) {
         try {
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
--- a/test/jdk/java/util/Random/NextIntPowerOfTwoMod.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Random/NextIntPowerOfTwoMod.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4187412
  * @summary The FCS release of 1.2 did not special case the Random.nextInt
--- a/test/jdk/java/util/TreeMap/HeadTailTypeError.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/TreeMap/HeadTailTypeError.java	Thu Nov 16 01:11:32 2017 +0100
@@ -31,7 +31,7 @@
 import java.util.*;
 
 public class HeadTailTypeError {
-    public static void main(String argv[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         try {
             SortedMap m = new TreeMap();
             m.headMap(new Object());
--- a/test/jdk/java/util/TreeMap/SubMap.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/TreeMap/SubMap.java	Thu Nov 16 01:11:32 2017 +0100
@@ -30,7 +30,7 @@
 import java.util.*;
 
 public class SubMap {
-    public static void main(String args[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         SortedMap m = new TreeMap();
         m.put(new Integer(1), new Integer(1));
         m.put(new Integer(2), new Integer(2));
--- a/test/jdk/java/util/TreeMap/SubMapClear.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/TreeMap/SubMapClear.java	Thu Nov 16 01:11:32 2017 +0100
@@ -39,7 +39,7 @@
         Set subSet = treeSet.subSet(new Integer(4),new Integer(10));
         subSet.clear();  // Used to throw exception
 
-        int a[] = new int[] {1, 2, 3, 10};
+        int[] a = { 1, 2, 3, 10 };
         Set s = new TreeSet();
         for (int i = 0; i < a.length; i++)
             s.add(new Integer(a[i]));
--- a/test/jdk/java/util/Vector/IllegalConstructorArgs.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Vector/IllegalConstructorArgs.java	Thu Nov 16 01:11:32 2017 +0100
@@ -36,12 +36,12 @@
  */
 public class IllegalConstructorArgs {
 
-      public static void main(String argv[]) {
-          int testSucceeded=0;
+    public static void main(String[] args) {
+        int testSucceeded=0;
 
         try {
-           // this should generate an IllegalArgumentException
-           Vector bad1 = new Vector(-100, 10);
+            // this should generate an IllegalArgumentException
+            Vector bad1 = new Vector(-100, 10);
         }
         catch (IllegalArgumentException e1) {
             testSucceeded =1;
--- a/test/jdk/java/util/Vector/LastIndexOf.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Vector/LastIndexOf.java	Thu Nov 16 01:11:32 2017 +0100
@@ -31,7 +31,7 @@
 import java.util.*;
 
 public class LastIndexOf {
-    public static void main(String argv[]) throws Exception {
+    public static void main(String[] args) throws Exception {
         Vector v = new Vector(10);
 
         try {
--- a/test/jdk/java/util/Vector/SyncLastIndexOf.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/Vector/SyncLastIndexOf.java	Thu Nov 16 01:11:32 2017 +0100
@@ -46,7 +46,7 @@
         }
     }
 
-    public static void main(String args[]) {
+    public static void main(String[] args) {
         Integer x = new Integer(1);
         v.addElement(x);
         new RemovingThread().start();
--- a/test/jdk/java/util/WeakHashMap/ZeroInitCap.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/WeakHashMap/ZeroInitCap.java	Thu Nov 16 01:11:32 2017 +0100
@@ -23,7 +23,7 @@
 
 import java.util.*;
 
-/**
+/*
  * @test
  * @bug     4503146
  * @summary Zero initial capacity should be legal
@@ -31,7 +31,7 @@
  */
 
 public class ZeroInitCap {
-    public static void main(String[] argv) {
+    public static void main(String[] args) {
         Map map = new WeakHashMap(0);
         map.put("a","b");
     }
--- a/test/jdk/java/util/concurrent/ConcurrentHashMap/ToArray.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentHashMap/ToArray.java	Thu Nov 16 01:11:32 2017 +0100
@@ -43,7 +43,7 @@
     }
 
     static void executeTest() throws Throwable {
-        final Throwable throwable[] = new Throwable[1];
+        final Throwable[] throwable = new Throwable[1];
         final ConcurrentHashMap<Integer, Integer> m = new ConcurrentHashMap<>();
 
         // Number of workers equal to the number of processors
--- a/test/jdk/java/util/concurrent/CountDownLatch/Basic.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/CountDownLatch/Basic.java	Thu Nov 16 01:11:32 2017 +0100
@@ -96,7 +96,7 @@
         int count = 0;
         Basic test = new Basic();
         CountDownLatch latch = new CountDownLatch(3);
-        Awaiter a[] = new Awaiter[12];
+        Awaiter[] a = new Awaiter[12];
 
         for (int i = 0; i < 3; i++) {
             CountDownLatch gate = new CountDownLatch(4);
@@ -125,7 +125,7 @@
         int count = 0;
         Basic test = new Basic();
         CountDownLatch latch = new CountDownLatch(3);
-        Awaiter a[] = new Awaiter[12];
+        Awaiter[] a = new Awaiter[12];
 
         for (int i = 0; i < 3; i++) {
             CountDownLatch gate = new CountDownLatch(4);
@@ -156,7 +156,7 @@
         int count =0;
         Basic test = new Basic();
         CountDownLatch latch = new CountDownLatch(3);
-        Awaiter a[] = new Awaiter[12];
+        Awaiter[] a = new Awaiter[12];
 
         long[] timeout = { 0L, 5L, 10L };
 
--- a/test/jdk/java/util/concurrent/ExecutorService/Invoke.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/ExecutorService/Invoke.java	Thu Nov 16 01:11:32 2017 +0100
@@ -35,6 +35,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -140,13 +141,17 @@
         final boolean timed = rnd.nextBoolean();
         final ExecutorService pool = Executors.newSingleThreadExecutor();
         final AtomicLong count = new AtomicLong(0);
+        final CountDownLatch invokeAnyDone = new CountDownLatch(1);
         class Task implements Callable<Long> {
             public Long call() throws Exception {
                 long x = count.incrementAndGet();
                 check(x <= 2);
-                if (x == 2)
-                    // wait for main thread to interrupt us
+                if (x == 2) {
+                    // wait for main thread to interrupt us ...
                     awaitInterrupt(timeoutSeconds);
+                    // ... and then for invokeAny to return
+                    check(invokeAnyDone.await(timeoutSeconds, SECONDS));
+                }
                 return x;
             }
         }
@@ -166,6 +171,7 @@
             else
                 val = pool.invokeAny(tasks);
             check(val == 1);
+            invokeAnyDone.countDown();
 
             // inherent race between main thread interrupt and
             // start of second task
--- a/test/jdk/java/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java	Thu Nov 16 01:11:32 2017 +0100
@@ -57,12 +57,14 @@
                 }});
         test(OutOfMemoryError.class,
              new ThreadFactory() {
-                public Thread newThread(Runnable r) {
-                    new Thread(null, r, "a natural OOME", 1L << 60);
-                    // """On some platforms, the value of the stackSize
-                    // parameter may have no effect whatsoever."""
-                    throw new OutOfMemoryError("artificial OOME");
-                }});
+                 @SuppressWarnings("DeadThread")
+                 public Thread newThread(Runnable r) {
+                     // We expect this to throw OOME, but ...
+                     new Thread(null, r, "a natural OOME", 1L << 60);
+                     // """On some platforms, the value of the stackSize
+                     // parameter may have no effect whatsoever."""
+                     throw new OutOfMemoryError("artificial OOME");
+                 }});
         test(null,
              new ThreadFactory() {
                 public Thread newThread(Runnable r) {
--- a/test/jdk/java/util/concurrent/locks/Lock/FlakyMutex.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/locks/Lock/FlakyMutex.java	Thu Nov 16 01:11:32 2017 +0100
@@ -108,6 +108,7 @@
             case 0: throw new MyError();
             case 1: throw new MyRuntimeException();
             case 2: FlakyMutex.<RuntimeException>uncheckedThrow(new MyException());
+                // fall through ... NOT!
             default: return compareAndSetState(0, 1);
             }
         }
--- a/test/jdk/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -936,6 +936,14 @@
         }
     }
 
+    void runAsync(Runnable r1, Runnable r2) {
+        boolean b = ThreadLocalRandom.current().nextBoolean();
+        CompletableFuture<Void> f1 = CompletableFuture.runAsync(b ? r1 : r2);
+        CompletableFuture<Void> f2 = CompletableFuture.runAsync(b ? r2 : r1);
+        f1.join();
+        f2.join();
+    }
+
     /**
      * Non-traversing Deque operations are linearizable.
      * https://bugs.openjdk.java.net/browse/JDK-8188900
@@ -959,18 +967,9 @@
                             x, nulls.sum(), zeros.sum()));
             };
 
-            Runnable adder = () -> {
-                d.addFirst(0);
-                d.addLast(42);
-            };
+            Runnable adder = () -> { d.addFirst(0); d.addLast(42); };
 
-            boolean b = rnd.nextBoolean();
-            Runnable r1 = b ? getter : adder;
-            Runnable r2 = b ? adder : getter;
-            CompletableFuture<Void> f1 = CompletableFuture.runAsync(r1);
-            CompletableFuture<Void> f2 = CompletableFuture.runAsync(r2);
-            f1.join();
-            f2.join();
+            runAsync(getter, adder);
         }
     }
 
@@ -995,18 +994,48 @@
                             x, nulls.sum(), zeros.sum()));
             };
 
-            Runnable adder = () -> {
-                d.addLast(0);
-                d.addFirst(42);
-            };
+            Runnable adder = () -> { d.addLast(0); d.addFirst(42); };
+
+            runAsync(getter, adder);
+        }
+    }
+
+    <T> T chooseRandomly(T... choices) {
+        return choices[ThreadLocalRandom.current().nextInt(choices.length)];
+    }
 
-            boolean b = rnd.nextBoolean();
-            Runnable r1 = b ? getter : adder;
-            Runnable r2 = b ? adder : getter;
-            CompletableFuture<Void> f1 = CompletableFuture.runAsync(r1);
-            CompletableFuture<Void> f2 = CompletableFuture.runAsync(r2);
-            f1.join();
-            f2.join();
+    /**
+     * Non-traversing Deque operations (that return null) are linearizable.
+     * Don't return null when the deque is observably never empty.
+     * https://bugs.openjdk.java.net/browse/JDK-8189387
+     * ant -Djsr166.expensiveTests=true -Djsr166.tckTestClass=ConcurrentLinkedDequeTest -Djsr166.methodFilter=testBug8189387 tck
+     */
+    public void testBug8189387() {
+        final ThreadLocalRandom rnd = ThreadLocalRandom.current();
+        Object x = new Object();
+        for (int n = expensiveTests ? 100_000 : 10; n--> 0; ) {
+            ConcurrentLinkedDeque<Object> d = new ConcurrentLinkedDeque<>();
+            Runnable add = chooseRandomly(
+                () -> d.addFirst(x),
+                () -> d.offerFirst(x),
+                () -> d.addLast(x),
+                () -> d.offerLast(x));
+
+            Runnable get = chooseRandomly(
+                () -> assertFalse(d.isEmpty()),
+                () -> assertSame(x, d.peekFirst()),
+                () -> assertSame(x, d.peekLast()),
+                () -> assertSame(x, d.pollFirst()),
+                () -> assertSame(x, d.pollLast()));
+
+            Runnable addRemove = chooseRandomly(
+                () -> { d.addFirst(x); d.pollLast(); },
+                () -> { d.offerFirst(x); d.removeFirst(); },
+                () -> { d.offerLast(x); d.removeLast(); },
+                () -> { d.addLast(x); d.pollFirst(); });
+
+            add.run();
+            runAsync(get, addRemove);
         }
     }
 }
--- a/test/jdk/java/util/concurrent/tck/CountedCompleterTest.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/tck/CountedCompleterTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -758,6 +758,8 @@
                 CCF f = new LCCF(8);
                 assertSame(f, f.fork());
                 helpQuiesce();
+                while (!f.isDone()) // wait out race
+                    ;
                 assertEquals(21, f.number);
                 assertEquals(0, getQueuedTaskCount());
                 checkCompletedNormally(f);
--- a/test/jdk/java/util/concurrent/tck/NonNestmates.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/tck/NonNestmates.java	Thu Nov 16 01:11:32 2017 +0100
@@ -35,7 +35,6 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
--- a/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -593,7 +593,7 @@
 
     /**
      * estimateMinimumDemand reports 0 until request, nonzero after
-     * request, and zero again after delivery
+     * request
      */
     public void testEstimateMinimumDemand() {
         TestSubscriber s = new TestSubscriber();
@@ -604,9 +604,6 @@
         assertEquals(0, p.estimateMinimumDemand());
         s.sn.request(1);
         assertEquals(1, p.estimateMinimumDemand());
-        p.submit(1);
-        s.awaitNext(1);
-        assertEquals(0, p.estimateMinimumDemand());
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/FileHandlerPatternGeneration.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.*;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+
+/**
+ * @test
+ * @bug 8189953
+ * @summary tests the pattern generation algorithm
+ * @modules java.logging/java.util.logging:open
+ * @run main/othervm FileHandlerPatternGeneration
+ * @author danielfuchs
+ */
+public class FileHandlerPatternGeneration {
+
+    /**
+     * An array of strings where the elements at even indices are the input
+     * to give to FileHandler::generate(pattern, count, generation, unique),
+     * and the elements at the next odd index are a partially computed expected
+     * output, where %t, %h, %u, %g and file separator still need to be replaced.
+     * The final expected output is obtained by passing the partially computed
+     * output to FileHandlerPatternGeneration::generateExpected
+     * <p>
+     * The test verifies that {@code
+     *    FileHandler.generate(PATTERN[i], c, g, u).toString()
+     * }
+     * is equal to {@code
+     *    FileHandlerPatternGeneration.generateExpected(PATTERN[i],
+     *                                                  PATTERN[i+1],
+     *                                                  c, g, u)
+     * }
+     */
+    static final String[] PATTERNS = {
+            "C:/Workspace/hoge.log",         "C:/Workspace/hoge.log",
+            "C:/Workspace%g/hoge.log",       "C:/Workspace%g/hoge.log",
+            "C:/%uWorkspace/hoge.log",       "C:/%uWorkspace/hoge.log",
+            "C:/%uWorkspace%g/hoge.log",     "C:/%uWorkspace%g/hoge.log",
+            "C:/Workspace/%ghoge.log",       "C:/Workspace/%ghoge.log",
+            "C:/Workspace/%ghoge%u.log",     "C:/Workspace/%ghoge%u.log",
+            "C:/Workspace-%g/hoge.log",      "C:/Workspace-%g/hoge.log",
+            "C:/Work%hspace/hoge.log",       "%h/space/hoge.log",
+            "C:/Works%tpace%g/hoge.log",     "%t/pace%g/hoge.log",
+            "C:/%uWork%hspace/hoge.log",     "%h/space/hoge.log",
+            "C:/%uWorkspace%g/%thoge.log",   "%t/hoge.log",
+            "C:/Workspace/%g%h%%hoge.log",   "%h/%%hoge.log",
+            "C:/Work%h%%hspace/hoge.log",    "%h/%%hspace/hoge.log",
+            "C:/Works%t%%hpace%g/hoge.log",  "%t/%%hpace%g/hoge.log",
+            "C:/%uWork%h%%tspace/hoge.log",  "%h/%%tspace/hoge.log",
+            "C:/%uWorkspace%g/%t%%hoge.log", "%t/%%hoge.log",
+            "C:/Workspace/%g%h%%hoge.log",   "%h/%%hoge.log",
+            "ahaha",                         "ahaha",
+            "ahaha/ahabe",                   "ahaha/ahabe",
+            "../ahaha/ahabe",                "../ahaha/ahabe",
+            "/x%ty/w/hoge.log",              "%t/y/w/hoge.log",
+            "/x/%ty/w/hoge.log",             "%t/y/w/hoge.log",
+            "/x%t/y/w/hoge.log",             "%t/y/w/hoge.log",
+            "/x/%t/y/w/hoge.log",            "%t/y/w/hoge.log",
+            "%ty/w/hoge.log",                "%t/y/w/hoge.log",
+            "%t/y/w/hoge.log",               "%t/y/w/hoge.log",
+            "/x%hy/w/hoge.log",              "%h/y/w/hoge.log",
+            "/x/%hy/w/hoge.log",             "%h/y/w/hoge.log",
+            "/x%h/y/w/hoge.log",             "%h/y/w/hoge.log",
+            "/x/%h/y/w/hoge.log",            "%h/y/w/hoge.log",
+            "%hy/w/hoge.log",                "%h/y/w/hoge.log",
+            "%h/y/w/hoge.log",               "%h/y/w/hoge.log",
+            "ahaha-%u-%g",                   "ahaha-%u-%g",
+            "ahaha-%g/ahabe-%u",             "ahaha-%g/ahabe-%u",
+            "../ahaha-%u/ahabe",             "../ahaha-%u/ahabe",
+            "/x%ty/w/hoge-%g.log",           "%t/y/w/hoge-%g.log",
+            "/x/%ty/w/hoge-%u.log",          "%t/y/w/hoge-%u.log",
+            "%u-%g/x%t/y/w/hoge.log",        "%t/y/w/hoge.log",
+            "/x/%g%t%u/y/w/hoge.log",        "%t/%u/y/w/hoge.log",
+            "%ty/w-%g/hoge.log",             "%t/y/w-%g/hoge.log",
+            "%t/y/w-%u/hoge.log",            "%t/y/w-%u/hoge.log",
+            "/x%hy/%u-%g-w/hoge.log",        "%h/y/%u-%g-w/hoge.log",
+            "/x/%hy/w-%u-%g/hoge.log",       "%h/y/w-%u-%g/hoge.log",
+            "/x%h/y/w/%u-%ghoge.log",        "%h/y/w/%u-%ghoge.log",
+            "/x/%h/y/w/hoge-%u-%g.log",      "%h/y/w/hoge-%u-%g.log",
+            "%hy/w/%u-%g-hoge.log",          "%h/y/w/%u-%g-hoge.log",
+            "%h/y/w/hoge-%u-%g.log",         "%h/y/w/hoge-%u-%g.log",
+            "/x/y/z/hoge-%u.log",            "/x/y/z/hoge-%u.log",
+    };
+
+    // the (count, generation, unique) parameters to pass to
+    // FileHandler.generate(pattern, count, generation, unique)
+    static final int[][] GENERATIONS = {
+        {0, 0, 0},
+        {0, 1, 0},
+        {0, 1, 1},
+        {1, 1, 0},
+        {1, 1, 1},
+        {1, 1, 2},
+        {1, 2, 3},
+        {3, 4, 0},
+        {3, 4, 1},
+        {3, 4, 2},
+        {3, 0, 5},
+        {3, 1, 5},
+        {3, 2, 5},
+    };
+
+    static final Class<FileHandler> FILE_HANDLER_CLASS = FileHandler.class;
+    static final Method GENERATE;
+    static final String USER_HOME;
+    static final String TMP;
+    static {
+        Method generate;
+        try {
+           generate = FILE_HANDLER_CLASS.getDeclaredMethod("generate",
+                                                            String.class,
+                                                            int.class,
+                                                            int.class,
+                                                            int.class);
+           generate.setAccessible(true);
+        } catch (Exception e) {
+            throw new ExceptionInInitializerError(e);
+        }
+        GENERATE = generate;
+        USER_HOME = System.getProperty("user.home");
+        TMP = System.getProperty("java.io.tmpdir", USER_HOME);
+    }
+
+    public static void main(String... args) throws Throwable {
+
+        for (int i=0; i < PATTERNS.length; i+=2) {
+            String s = PATTERNS[i];
+            String partial = PATTERNS[i+1];
+            System.out.println("generate: " + s);
+            for (int[] gen : GENERATIONS) {
+                String expected = generateExpected(s, partial, gen[0], gen[1], gen[2]);
+                String output = generate(s, gen[0], gen[1], gen[2]).toString();
+                System.out.println("\t" + Arrays.toString(gen)+ ": " + output);
+                if (!expected.equals(output)) {
+                    throw new RuntimeException("test failed for \""
+                            + s +"\" " + Arrays.toString(gen) + ": "
+                            + "\n\tgenerated: \"" + output +"\""
+                            + "\n\t expected: \"" + expected +"\"");
+                }
+            }
+        }
+
+    }
+
+    // Strip the trailing separator from the string, if present
+    static String stripTrailingSeparator(String s) {
+        if (s.endsWith("/")) {
+            return s.substring(0, s.length() -1);
+        } else if (s.endsWith(File.separator)) {
+            return s.substring(0, s.length() - File.separator.length());
+        } else {
+            return s;
+        }
+    }
+
+    /**
+     * Compute the final expected output from a partially computed output found
+     * at PATTERNS[i+1]
+     * @param s           The pattern string, found at PATTERN[i]
+     *                    (with i % 2 == 0)
+     * @param partial     The partially computed output, found at PATTERN[i+1]
+     * @param count       The count parameter given to FileHandler::generate
+     * @param generation  The generation parameter given to FileHandler::generate
+     * @param unique      The unique parameter given to FileHandler::generate
+     * @return  The expected output that FileHandler.generate(s, count, gen, unique)
+     *          should produce.
+     */
+    static String generateExpected(String s, String partial,
+                                   int count, int generation, int unique)
+    {
+        boolean sawu = s.replace("%%", "$$$$").contains("%u");
+        boolean sawg = s.replace("%%", "$$$$").contains("%g");
+        String result = partial.replace("%%", "$$$$");
+        String tmp = stripTrailingSeparator(TMP);
+        String home = stripTrailingSeparator(USER_HOME);
+        result = result.replace("%h", home);
+        result = result.replace("%t", tmp);
+        result = result.replace("%g", String.valueOf(generation));
+        result = result.replace("%u", String.valueOf(unique));
+        result = result.replace("$$$$", "%");
+        result = result.replace("/", File.separator);
+        if (count > 1 && !sawg) {
+            result = result + "." + generation;
+        }
+        if (unique > 0 && !sawu) {
+            result = result + "." + unique;
+        }
+        return result;
+    }
+
+    // Calls FileHandler.generate(s, count, generation, unique) through reflection
+    static File generate(String s, int count, int generation, int unique)
+            throws Throwable
+    {
+        try {
+            return (File) GENERATE.invoke(null, s, count, generation, unique);
+        } catch (InvocationTargetException e) {
+            throw e.getCause();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/stream/CustomFJPoolTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2017, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary Tests stream execution in a custom ForkJoinPool
+ * @bug 8190974
+ * @run testng/othervm CustomFJPoolTest
+ * @run testng/othervm -Djava.util.concurrent.ForkJoinPool.common.parallelism=0 CustomFJPoolTest
+ */
+
+import org.testng.annotations.Test;
+
+import java.util.Comparator;
+import java.util.Spliterator;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Consumer;
+import java.util.stream.IntStream;
+import java.util.stream.StreamSupport;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+@Test
+public class CustomFJPoolTest {
+
+    // A Spliterator that counts the number of spliterators created
+    // including itself, thus the count starts at 1
+    static class SplitCountingSpliterator<T> implements Spliterator<T> {
+        final Spliterator<T> s;
+        final AtomicInteger nsplits;
+
+        // Top-level constructor
+        public SplitCountingSpliterator(Spliterator<T> s) {
+            this.s = s;
+            nsplits = new AtomicInteger(1);
+        }
+
+        // Splitting constructor
+        SplitCountingSpliterator(Spliterator<T> s, AtomicInteger nsplits) {
+            this.s = s;
+            this.nsplits = nsplits;
+        }
+
+        int splits() {
+            return nsplits.get();
+        }
+
+        @Override
+
+        public boolean tryAdvance(Consumer<? super T> action) {
+            return s.tryAdvance(action);
+        }
+
+        @Override
+        public void forEachRemaining(Consumer<? super T> action) {
+            s.forEachRemaining(action);
+        }
+
+        @Override
+        public Spliterator<T> trySplit() {
+            var split = s.trySplit();
+            if (split != null) {
+                nsplits.incrementAndGet();
+                return new SplitCountingSpliterator<>(split, nsplits);
+            }
+            else {
+                return null;
+            }
+        }
+
+        @Override
+        public long estimateSize() {
+            return s.estimateSize();
+        }
+
+        @Override
+        public long getExactSizeIfKnown() {
+            return s.getExactSizeIfKnown();
+        }
+
+        @Override
+        public int characteristics() {
+            return s.characteristics();
+        }
+
+        @Override
+        public boolean hasCharacteristics(int characteristics) {
+            return s.hasCharacteristics(characteristics);
+        }
+
+        @Override
+        public Comparator<? super T> getComparator() {
+            return s.getComparator();
+        }
+    }
+
+    public void testCustomPools() throws Exception {
+        int splitsForP1 = countSplits(new ForkJoinPool(1));
+        int splitsForP2 = countSplits(new ForkJoinPool(2));
+        assertEquals(splitsForP2, splitsForP1 * 2);
+
+        int commonParallelism = ForkJoinPool.getCommonPoolParallelism();
+        if (commonParallelism > 1 && commonParallelism < 128) {
+            int splitsForPHalfC = countSplits(new ForkJoinPool(commonParallelism / 2));
+            int splitsForPC = countSplits(ForkJoinPool.commonPool());
+
+            assertTrue(splitsForPHalfC < splitsForPC);
+            assertEquals(splitsForPC / splitsForPHalfC,
+                         nearestPowerOfTwo(commonParallelism) / nearestPowerOfTwo(commonParallelism / 2));
+        }
+    }
+
+    static int countSplits(ForkJoinPool fjp) throws Exception {
+        // The number of splits will be equivalent to the number of leaf nodes
+        // and will be a power of 2
+        var fInteger = fjp.submit(() -> {
+            var s = IntStream.range(0, 1024).boxed().parallel().spliterator();
+            var cs = new SplitCountingSpliterator<>(s);
+            StreamSupport.stream(cs, true).forEach(e -> {});
+            return cs.splits();
+        });
+        return fInteger.get();
+    }
+
+    static int nearestPowerOfTwo(int i) {
+        return (i & (i - 1)) == 0
+               ? i
+               : 1 << (32 - Integer.numberOfLeadingZeros(i));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/jdk/net/Sockets/QuickAckTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 8145635
+ * @summary Add TCP_QUICKACK socket option
+ * @modules jdk.net
+ * @run main QuickAckTest
+ */
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.MulticastSocket;
+import java.net.ServerSocket;
+import java.net.Socket;
+import jdk.net.ExtendedSocketOptions;
+import jdk.net.Sockets;
+
+public class QuickAckTest {
+
+    private static final String LOCAL_HOST = "127.0.0.1";
+
+    public static void main(String args[]) throws IOException {
+
+        try (ServerSocket ss = new ServerSocket(0);
+                Socket s = new Socket(LOCAL_HOST, ss.getLocalPort());
+                DatagramSocket ds = new DatagramSocket(0);
+                MulticastSocket mc = new MulticastSocket(0)) {
+
+            if (ss.supportedOptions().contains(ExtendedSocketOptions.TCP_QUICKACK)) {
+                Sockets.setOption(ss, ExtendedSocketOptions.TCP_QUICKACK, true);
+                if (!ss.getOption(ExtendedSocketOptions.TCP_QUICKACK)) {
+                    throw new RuntimeException("Test failed, TCP_QUICKACK should"
+                            + " have been set");
+                }
+            }
+            if (s.supportedOptions().contains(ExtendedSocketOptions.TCP_QUICKACK)) {
+                Sockets.setOption(s, ExtendedSocketOptions.TCP_QUICKACK, true);
+                if (!s.getOption(ExtendedSocketOptions.TCP_QUICKACK)) {
+                    throw new RuntimeException("Test failed, TCP_QUICKACK should"
+                            + " have been set");
+                }
+            }
+            if (ds.supportedOptions().contains(ExtendedSocketOptions.TCP_QUICKACK)) {
+                throw new RuntimeException("Test failed, TCP_QUICKACK is applicable"
+                        + " for TCP Sockets only.");
+            }
+            if (mc.supportedOptions().contains(ExtendedSocketOptions.TCP_QUICKACK)) {
+                throw new RuntimeException("Test failed, TCP_QUICKACK is applicable"
+                        + " for TCP Sockets only");
+            }
+        }
+    }
+}
--- a/test/jdk/sun/util/calendar/zi/tzdata/VERSION	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/VERSION	Thu Nov 16 01:11:32 2017 +0100
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2017b
+tzdata2017c
--- a/test/jdk/sun/util/calendar/zi/tzdata/africa	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/africa	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@@ -241,7 +241,7 @@
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
 # From Jesper Nørgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
-# http://www.timeanddate.com/worldclock/city.html?n=53
+# https://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
 # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
 Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	0	-
@@ -279,8 +279,8 @@
 # timeanddate[2] and another site I've found[3] also support that.
 #
 # [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
+# [2] https://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] https://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -290,10 +290,10 @@
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
+# https://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
 #
 # The Middle East News Agency
-# http://www.mena.org.eg/index.aspx
+# https://www.mena.org.eg/index.aspx
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -343,7 +343,7 @@
 # Thursday of April....  Clocks will still be turned back for Ramadan, but
 # dates not yet announced....
 # http://almogaz.com/news/weird-news/2015/04/05/1947105 ...
-# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
+# https://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
 
 # From Ahmed Nazmy (2015-04-20):
 # Egypt's ministers cabinet just announced ... that it will cancel DST at
@@ -470,11 +470,11 @@
 
 # From Even Scharning (2012-11-10):
 # Libya set their time one hour back at 02:00 on Saturday November 10.
-# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
+# https://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
 # Here is an official source [in Arabic]: http://ls.ly/fb6Yc
 #
 # Steffen Thorsen forwarded a translation (2012-11-10) in
-# http://mm.icann.org/pipermail/tz/2012-November/018451.html
+# https://mm.icann.org/pipermail/tz/2012-November/018451.html
 #
 # From Tim Parenti (2012-11-11):
 # Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1.
@@ -485,7 +485,7 @@
 # From Even Scharning (2013-10-25):
 # The scheduled end of DST in Libya on Friday, October 25, 2013 was
 # cancelled yesterday....
-# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
+# https://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
 #
 # From Paul Eggert (2013-10-25):
 # For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
@@ -538,7 +538,7 @@
 # basis....
 # It seems that Mauritius observed daylight saving time from 1982-10-10 to
 # 1983-03-20 as well, but that was not successful....
-# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
+# https://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
 
 # From Alex Krivenyshev (2008-06-25):
 # http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD
@@ -606,7 +606,7 @@
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
 #
 # Our wrap-up:
-# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
+# https://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -638,7 +638,7 @@
 # be one hour ahead of GMT between 1 June and 27 September, according to
 # Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
+# http://www.worldtimezone.com/dst_news/dst_news_morocco01.html
 # http://en.afrik.com/news11892.html
 
 # From Alex Krivenyshev (2008-05-09):
@@ -651,7 +651,7 @@
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
+# https://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
 # (and republished here: <http://www.actu.ma/heure-dete-comment_i127896_0.html>)
 # the changes occur at midnight:
 #
@@ -673,7 +673,7 @@
 # posted in English).
 #
 # The following Google query will generate many relevant hits:
-# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
+# https://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -684,7 +684,7 @@
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
 #
 # We have some further details posted here:
-# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
+# https://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
@@ -694,7 +694,7 @@
 # (French)
 #
 # Our summary:
-# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
+# https://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
@@ -717,7 +717,7 @@
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
 # (French)
 # Our page:
-# http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
+# https://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -734,7 +734,7 @@
 # They said that the decision was already taken.
 #
 # More articles in the press
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
+# https://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
 
@@ -826,7 +826,7 @@
 # 1433 (18 April 2012) and the decision of the Head of Government of
 # 16 N. 3-29-15 Chaaban 1435 (4 June 2015).
 # Source (french):
-# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
+# https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
 #
 # From Milamber (2015-06-09):
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=863
@@ -835,7 +835,7 @@
 # [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go
 # from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch....
 # I think the patch is correct and the quoted text is wrong; the text in
-# <http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
+# <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
 # with the patch.
 
 # From Paul Eggert (2015-06-08):
@@ -960,9 +960,17 @@
 Link Africa/Maputo Africa/Lubumbashi	# E Dem. Rep. of Congo
 Link Africa/Maputo Africa/Lusaka	# Zambia
 
+
 # Namibia
-# The 1994-04-03 transition is from Shanks & Pottenger.
-# Shanks & Pottenger report no DST after 1998-04; go with IATA.
+
+# From Arthur David Olson (2017-08-09):
+# The text of the "Namibia Time Act, 1994" is available online at
+# www.lac.org.na/laws/1994/811.pdf
+# and includes this nugget:
+# Notwithstanding the provisions of subsection (2) of section 1, the
+# first winter period after the commencement of this Act shall
+# commence at OOhOO on Monday 21 March 1994 and shall end at 02h00 on
+# Sunday 4 September 1994.
 
 # From Petronella Sibeene (2007-03-30):
 # http://allafrica.com/stories/200703300178.html
@@ -978,19 +986,30 @@
 # observes Botswana time, we have no details about historical practice.
 # In the meantime people there can use Africa/Gaborone.
 # See: Immanuel S. The Namibian. 2017-02-23.
-# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
+# https://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
+
+# From Steffen Thorsen (2017-08-09):
+# Namibia is going to change their time zone to what is now their DST:
+# https://www.newera.com.na/2017/02/23/namibias-winter-time-might-be-repealed/
+# This video is from the government decision:
+# https://www.nbc.na/news/na-passes-namibia-time-bill-repealing-1994-namibia-time-act.8665
+# We have made the assumption so far that they will change their time zone at
+# the same time they would normally start DST, the first Sunday in September:
+# https://www.timeanddate.com/news/time/namibia-new-time-zone.html
 
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Namibia	1994	max	-	Sep	Sun>=1	2:00	1:00	S
-Rule	Namibia	1995	max	-	Apr	Sun>=1	2:00	0	-
+Rule	Namibia	1994	only	-	Mar	21	0:00	0	-
+Rule	Namibia	1994	2016	-	Sep	Sun>=1	2:00	1:00	S
+Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Windhoek	1:08:24 -	LMT	1892 Feb 8
 			1:30	-	+0130	1903 Mar
 			2:00	-	SAST	1942 Sep 20  2:00
 			2:00	1:00	SAST	1943 Mar 21  2:00
 			2:00	-	SAST	1990 Mar 21 # independence
-			2:00	-	CAT	1994 Apr  3
-			1:00	Namibia	WA%sT
+			2:00	-	CAT	1994 Mar 21  0:00
+			1:00	Namibia	WA%sT	2017 Sep  3  2:00
+			2:00	-	CAT
 
 # Niger
 # See Africa/Lagos.
@@ -1077,14 +1096,24 @@
 # no information
 
 # Sudan
-#
+
 # From <http://www.sunanews.net/sn13jane.html>
 # Sudan News Agency (2000-01-13),
 # also reported by Michaël De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
+
+# From Ahmed Atyya, National Telecommunications Corp. (NTC), Sudan (2017-10-17):
+# ... the Republic of Sudan is going to change the time zone from (GMT+3:00)
+# to (GMT+ 2:00) starting from Wednesday 1 November 2017.
 #
+# From Paul Eggert (2017-10-18):
+# A scanned copy (in Arabic) of Cabinet Resolution No. 352 for the
+# year 2017 can be found as an attachment in email today from Yahia
+# Abdalla of NTC, archived at:
+# https://mm.icann.org/pipermail/tz/2017-October/025333.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Sudan	1970	only	-	May	 1	0:00	1:00	S
 Rule	Sudan	1970	1985	-	Oct	15	0:00	0	-
@@ -1093,10 +1122,14 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
-			3:00	-	EAT
+			3:00	-	EAT	2017 Nov  1
+			2:00	-	CAT
 
 # South Sudan
-Link Africa/Khartoum Africa/Juba
+# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+Zone	Africa/Juba	2:06:28 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
 
 # Swaziland
 # See Africa/Johannesburg.
@@ -1134,11 +1167,11 @@
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# http://www.babnet.net/kiwidetail-15295.asp
+# https://www.babnet.net/kiwidetail-15295.asp
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
+# https://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
--- a/test/jdk/sun/util/calendar/zi/tzdata/antarctica	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/antarctica	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
 #	Margaret Turner reports
-#	http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
+#	https://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
 #	(1999-09-30) that they're UT +05, with no DST;
 #	presumably this is when they have visitors.
 #
@@ -70,7 +70,7 @@
 # http://www.aad.gov.au/default.asp?casid=37079
 #
 # We have more background information here:
-# http://www.timeanddate.com/news/time/antarctica-new-times.html
+# https://www.timeanddate.com/news/time/antarctica-new-times.html
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -85,7 +85,7 @@
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# https://www.timeanddate.com/news/time/antartica-time-changes-2010.html
 
 # From Steffen Thorsen (2016-10-28):
 # Australian Antarctica Division informed us that Casey changed time
@@ -168,7 +168,7 @@
 #
 # year-round base in the main continent
 # Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11
-# <http://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
+# <https://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
--- a/test/jdk/sun/util/calendar/zi/tzdata/asia	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/asia	Thu Nov 16 01:11:32 2017 +0100
@@ -49,7 +49,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # For Russian data circa 1919, a source is:
 # Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
@@ -98,8 +98,8 @@
 Rule RussiaAsia	1981	1984	-	Apr	1	 0:00	1:00	S
 Rule RussiaAsia	1981	1983	-	Oct	1	 0:00	0	-
 Rule RussiaAsia	1984	1995	-	Sep	lastSun	 2:00s	0	-
-Rule RussiaAsia	1985	2011	-	Mar	lastSun	 2:00s	1:00	S
-Rule RussiaAsia	1996	2011	-	Oct	lastSun	 2:00s	0	-
+Rule RussiaAsia	1985	2010	-	Mar	lastSun	 2:00s	1:00	S
+Rule RussiaAsia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # Afghanistan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -132,13 +132,17 @@
 # or
 # (brief)
 # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule Armenia	2011	only	-	Mar	lastSun	 2:00s	1:00	S
+Rule Armenia	2011	only	-	Oct	lastSun	 2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May  2
 			3:00	-	+03	1957 Mar
 			4:00 RussiaAsia +04/+05	1991 Mar 31  2:00s
 			3:00 RussiaAsia	+03/+04	1995 Sep 24  2:00s
 			4:00	-	+04	1997
-			4:00 RussiaAsia	+04/+05
+			4:00 RussiaAsia	+04/+05	2011
+			4:00	Armenia	+04/+05
 
 # Azerbaijan
 
@@ -150,7 +154,7 @@
 # From Steffen Thorsen (2016-03-17):
 # ... the Azerbaijani Cabinet of Ministers has cancelled switching to
 # daylight saving time....
-# http://www.azernews.az/azerbaijan/94137.html
+# https://www.azernews.az/azerbaijan/94137.html
 # http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html
 # http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html
 
@@ -191,11 +195,11 @@
 # the 19th and 20th, and they have not set the end date yet.
 #
 # Some sources:
-# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
+# https://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
 # http://bdnews24.com/details.php?id=85889&cid=2
 #
 # Our wrap-up:
-# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
+# https://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
 
 # From A. N. M. Kamrus Saadat (2009-06-15):
 # Finally we've got the official mail regarding DST start time where DST start
@@ -281,9 +285,15 @@
 
 # Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon.
 
+# From Paul Eggert (2017-04-20):
+# Page 27 of Reed & Low (cited for Asia/Kolkata) says "Rangoon local time is
+# used upon the railways and telegraphs of Burma, and is 6h. 24m. 47s. ahead
+# of Greenwich."  This refers to the period before Burma's transition to +0630,
+# a transition for which Shanks is the only source.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Yangon	6:24:40 -	LMT	1880        # or Rangoon
-			6:24:40	-	RMT	1920        # Rangoon Mean Time?
+Zone	Asia/Yangon	6:24:47 -	LMT	1880        # or Rangoon
+			6:24:47	-	RMT	1920        # Rangoon local time
 			6:30	-	+0630	1942 May
 			9:00	-	+09	1945 May  3
 			6:30	-	+0630
@@ -340,7 +350,7 @@
 #
 # From Jesper Nørgaard Welen (2006-07-14):
 # I have investigated the timezones around 1970 on the
-# http://www.astro.com/atlas site [with provinces and county
+# https://www.astro.com/atlas site [with provinces and county
 # boundaries summarized below]....  A few other exceptions were two
 # counties on the Sichuan side of the Xizang-Sichuan border,
 # counties Dege and Baiyu which lies on the Sichuan side and are
@@ -492,7 +502,7 @@
 
 # From David Cochrane (2014-03-26):
 # Just a confirmation that Ürümqi time was implemented in Ürümqi on 1 Feb 1986:
-# http://content.time.com/time/magazine/article/0,9171,960684,00.html
+# https://content.time.com/time/magazine/article/0,9171,960684,00.html
 
 # From Luther Ma (2014-04-22):
 # I have interviewed numerous people of various nationalities and from
@@ -649,7 +659,7 @@
 # (both in Okinawa) adopt the Western Standard Time which is based on
 # 120E. The adoption began from Jan 1, 1896. The original text can be
 # found on Wikisource:
-# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
+# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
 # ... This could be the first adoption of time zone in Taiwan, because
 # during the Qing Dynasty, it seems that there was no time zone
 # declared officially.
@@ -662,7 +672,7 @@
 # territory, including later occupations, adopt Japan Central Time
 # (UTC+9). The adoption began on Oct 1, 1937. The original text can
 # be found on Wikisource:
-# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
+# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
 #
 # That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
 
@@ -798,6 +808,12 @@
 # Looks like the time zone split in Cyprus went through last night.
 # http://cyprus-mail.com/2016/10/30/cyprus-new-division-two-time-zones-now-reality/
 
+# From Paul Eggert (2017-10-18):
+# Northern Cyprus will reinstate winter time on October 29, thus
+# staying in sync with the rest of Cyprus.  See: Anastasiou A.
+# Cyprus to remain united in time.  Cyprus Mail 2017-10-17.
+# https://cyprus-mail.com/2017/10/17/cyprus-remain-united-time/
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cyprus	1975	only	-	Apr	13	0:00	1:00	S
 Rule	Cyprus	1975	only	-	Oct	12	0:00	0	-
@@ -815,7 +831,8 @@
 Zone	Asia/Famagusta	2:15:48	-	LMT	1921 Nov 14
 			2:00	Cyprus	EE%sT	1998 Sep
 			2:00	EUAsia	EE%sT	2016 Sep  8
-			3:00	-	+03
+			3:00	-	+03	2017 Oct 29 1:00u
+			2:00	EUAsia	EE%sT
 
 # Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72.
 # However, for various reasons many users expect to find it under Europe.
@@ -875,7 +892,7 @@
 
 # From João Carrascalão, brother of the former governor of East Timor, in
 # East Timor may be late for its millennium
-# <http://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
+# <https://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
 # Portugal tried to change the time forward in 1974 because the sun
 # rises too early but the suggestion raised a lot of problems with the
 # Timorese and I still don't think it would work today because it
@@ -903,21 +920,62 @@
 # India
 
 # From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic
-# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
+# https://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
 # (2015-12-22):
 # In January 1906, several thousand cotton-mill workers rioted on the
 # outskirts of Bombay....  They were protesting the proposed abolition of
 # local time in favor of Indian Standard Time....  Journalists called this
 # dispute the "Battle of the Clocks."  It lasted nearly half a century.
 
+# From Paul Eggert (2017-04-20):
+# Good luck trying to nail down old timekeeping records in India.
+# "... in the nineteenth century ... Madras Observatory took its magnetic
+# measurements on Göttingen time, its meteorological measurements on Madras
+# (local) time, dropped its time ball on Greenwich (ocean navigator's) time,
+# and distributed civil (local time)." -- Bartky IR. Selling the true time:
+# 19th-century timekeeping in america. Stanford U Press (2000), 247 note 19.
+# "A more potent cause of resistance to the general adoption of the present
+# standard time lies in the fact that it is Madras time.  The citizen of
+# Bombay, proud of being 'primus in Indis' and of Calcutta, equally proud of
+# his city being the Capital of India, and - for a part of the year - the Seat
+# of the Supreme Government, alike look down on Madras, and refuse to change
+# the time they are using, for that of what they regard as a benighted
+# Presidency; while Madras, having for long given the standard time to the
+# rest of India, would resist the adoption of any other Indian standard in its
+# place." -- Oldham RD. On Time in India: a suggestion for its improvement.
+# Proceedings of the Asiatic Society of Bengal (April 1899), 49-55.
+#
+# "In 1870 ... Madras time - 'now used by the telegraph and regulated from the
+# only government observatory' - was suggested as a standard railway time,
+# first to be adopted on the Great Indian Peninsular Railway (GIPR)....
+# Calcutta, Bombay, and Karachi, were to be allowed to continue with their
+# local time for civil purposes." - Prasad R. Tracks of Change: Railways and
+# Everyday Life in Colonial India. Cambridge University Press (2016), 145.
+#
+# Reed S, Low F. The Indian Year Book 1936-37. Bennett, Coleman, pp 27-8.
+# https://archive.org/details/in.ernet.dli.2015.282212
+# This lists +052110 as Madras local time used in railways, and says that on
+# 1906-01-01 railways and telegraphs in India switched to +0530.  Some
+# municipalities retained their former time, and the time in Calcutta
+# continued to depend on whether you were at the railway station or at
+# government offices.  Government time was at +055320 (according to Shanks) or
+# at +0554 (according to the Indian Year Book).  Railway time is more
+# appropriate for our purposes, as it was better documented, it is what we do
+# elsewhere (e.g., Europe/London before 1880), and after 1906 it was
+# consistent in the region now identified by Asia/Kolkata.  So, use railway
+# time for 1870-1941.  Shanks is our only (and dubious) source for the
+# 1941-1945 data.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Kolkata	5:53:28 -	LMT	1880        # Kolkata
-			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
-			6:30	-	+0630	1942 May 15
+Zone	Asia/Kolkata	5:53:28 -	LMT	1854 Jun 28 # Kolkata
+			5:53:20	-	HMT	1870	    # Howrah Mean Time?
+			5:21:10	-	MMT	1906 Jan  1 # Madras local time
+			5:30	-	IST	1941 Oct
+			5:30	1:00	+0630	1942 May 15
 			5:30	-	IST	1942 Sep
 			5:30	1:00	+0630	1945 Oct 15
 			5:30	-	IST
-# The following are like Asia/Kolkata:
+# Since 1970 the following are like Asia/Kolkata:
 #	Andaman Is
 #	Lakshadweep (Laccadive, Minicoy and Amindivi Is)
 #	Nicobar Is
@@ -1059,7 +1117,7 @@
 # From Reuters (2007-09-16), with a heads-up from Jesper Nørgaard Welen:
 # ... the Guardian Council ... approved a law on Sunday to re-introduce
 # daylight saving time ...
-# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
+# https://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
 #
 # From Roozbeh Pournader (2007-11-05):
 # This is quoted from Official Gazette of the Islamic Republic of
@@ -1158,7 +1216,7 @@
 # http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10
 #
 # We have published a short article in English about the change:
-# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
+# https://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iraq	1982	only	-	May	1	0:00	1:00	D
@@ -1466,12 +1524,12 @@
 # From Yu-Cheng Chuang (2013-07-12):
 # ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause
 # about standard time" ... The adoption began from Jan 1, 1896.
-# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
+# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
 #
 # ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
 # means the whole Japan territory, including later occupations, adopt Japan
 # Central Time (UTC+9). The adoption began on Oct 1, 1937.
-# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
+# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Tokyo	9:18:59	-	LMT	1887 Dec 31 15:00u
@@ -1533,7 +1591,7 @@
 # Official, in Arabic:
 # http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
 # ... Our background/permalink about it
-# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
+# https://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
 # ...
 # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
 # ... says midnight for the coming one and 1:00 for the ones in the future
@@ -1891,9 +1949,9 @@
 # between 1987 and 1988 ...
 
 # From Sanghyuk Jung (2014-10-29):
-# http://mm.icann.org/pipermail/tz/2014-October/021830.html
+# https://mm.icann.org/pipermail/tz/2014-October/021830.html
 # According to the Korean Wikipedia
-# http://ko.wikipedia.org/wiki/한국_표준시
+# https://ko.wikipedia.org/wiki/한국_표준시
 # [oldid=12896437 2014-09-04 08:03 UTC]
 # DST in Republic of Korea was as follows....  And I checked old
 # newspapers in Korean, all articles correspond with data in Wikipedia.
@@ -2115,7 +2173,7 @@
 # +08:00 instead. Different sources appear to disagree with the tz
 # database on this, e.g.:
 #
-# http://www.timeanddate.com/worldclock/city.html?n=1026
+# https://www.timeanddate.com/worldclock/city.html?n=1026
 # http://www.worldtimeserver.com/current_time_in_MN.aspx
 #
 # both say GMT+08:00.
@@ -2245,7 +2303,7 @@
 # help reduce load shedding by approving the closure of commercial centres at
 # 9pm and moving clocks forward by one hour for the next three months. ...."
 #
-# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
+# http://www.worldtimezone.com/dst_news/dst_news_pakistan01.html
 # http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4
 
 # From Arthur David Olson (2008-05-19):
@@ -2311,7 +2369,7 @@
 #
 # We have confirmed this year's end date with both with the Ministry of
 # Water and Power and the Pakistan Electric Power Company:
-# http://www.timeanddate.com/news/time/pakistan-ends-dst09.html
+# https://www.timeanddate.com/news/time/pakistan-ends-dst09.html
 
 # From Christoph Göhre (2009-10-01):
 # [T]he German Consulate General in Karachi reported me today that Pakistan
@@ -2493,7 +2551,7 @@
 #
 # We are not sure if Gaza will do the same, last year they had a different
 # end date, we will keep this page updated:
-# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
+# https://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
 
 # From Alexander Krivenyshev (2009-09-02):
 # Seems that Gaza Strip will go back to Winter Time same date as West Bank.
@@ -2531,7 +2589,7 @@
 # the clocks were set back one hour at 2010-08-11 00:00:00 local time in
 # Gaza and the West Bank.
 # Some more background info:
-# http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
+# https://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 
 # From Steffen Thorsen (2011-08-26):
 # Gaza and the West Bank did go back to standard time in the beginning of
@@ -2541,7 +2599,7 @@
 #
 # http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
 # Additional info:
-# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# https://www.timeanddate.com/news/time/palestine-dst-2011.html
 
 # From Alexander Krivenyshev (2011-08-27):
 # According to the article in The Jerusalem Post:
@@ -2551,7 +2609,7 @@
 # The Hamas government said on Saturday that it won't observe summertime after
 # the Muslim feast of Id al-Fitr, which begins on Tuesday..."
 # ...
-# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# https://www.jpost.com/MiddleEast/Article.aspx?id=235650
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
 # The rules for Egypt are stolen from the 'africa' file.
 
@@ -2572,7 +2630,7 @@
 # http://safa.ps/details/news/74352/%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-%D8%A8%D8%A7%D9%84%D8%B6%D9%81%D8%A9-%D9%88%D8%BA%D8%B2%D8%A9-%D9%84%D9%8A%D9%84%D8%A9-%D8%A7%D9%84%D8%AC%D9%85%D8%B9%D8%A9.html
 #
 # Our brief summary:
-# http://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
+# https://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
 
 # From Steffen Thorsen (2013-03-26):
 # The following news sources tells that Palestine will "start daylight saving
@@ -2592,11 +2650,11 @@
 
 # From Steffen Thorsen (2015-03-03):
 # Sources such as http://www.alquds.com/news/article/view/id/548257
-# and http://www.raya.ps/ar/news/890705.html say Palestine areas will
+# and https://www.raya.ps/ar/news/890705.html say Palestine areas will
 # start DST on 2015-03-28 00:00 which is one day later than expected.
 #
 # From Paul Eggert (2015-03-03):
-# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
+# https://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
 # says that the fall 2014 transition was Oct 23 at 24:00.
 
 # From Hannah Kreitem (2016-03-09):
@@ -2620,8 +2678,8 @@
 #
 # From Paul Eggert (2016-10-19):
 # It's also consistent with predictions in the following URLs today:
-# http://www.timeanddate.com/time/change/gaza-strip/gaza
-# http://www.timeanddate.com/time/change/west-bank/hebron
+# https://www.timeanddate.com/time/change/gaza-strip/gaza
+# https://www.timeanddate.com/time/change/west-bank/hebron
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2684,7 +2742,7 @@
 # Philippines, issued a proclamation announcing that 1844-12-30 was to
 # be immediately followed by 1845-01-01; see R.H. van Gent's
 # History of the International Date Line
-# http://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
+# https://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
 # The rest of the data entries are from Shanks & Pottenger.
 
 # From Jesper Nørgaard Welen (2006-04-26):
@@ -2948,7 +3006,7 @@
 # We have not found any sources saying anything about when DST ends this year.
 #
 # Our summary
-# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
+# https://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 
 # From Steffen Thorsen (2009-10-27):
 # The Syrian Arab News Network on 2009-09-29 reported that Syria will
@@ -2975,7 +3033,7 @@
 # http://www.sana.sy/ara/2/2012/03/26/408215.htm
 #
 # Our brief summary:
-# http://www.timeanddate.com/news/time/syria-dst-2012.html
+# https://www.timeanddate.com/news/time/syria-dst-2012.html
 
 # From Arthur David Olson (2012-03-27):
 # Assume last Friday in March going forward XXX.
@@ -3058,7 +3116,7 @@
 # is quoted verbatim in:
 # http://www.thoigian.com.vn/?mPage=P80D01
 # is translated by Brian Inglis in:
-# http://mm.icann.org/pipermail/tz/2014-October/021654.html
+# https://mm.icann.org/pipermail/tz/2014-October/021654.html
 # and is the basis for the information below.
 #
 # The 1906 transition was effective July 1 and standardized Indochina to
--- a/test/jdk/sun/util/calendar/zi/tzdata/australasia	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/australasia	Thu Nov 16 01:11:32 2017 +0100
@@ -316,7 +316,7 @@
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166
 #
 # A bit more background info here:
-# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
+# https://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
 
 # From Alexander Krivenyshev (2010-10-24):
 # According to Radio Fiji and Fiji Times online, Fiji will end DST 3
@@ -380,9 +380,12 @@
 # clocks go forward an hour at 2am to 3am....  Daylight Saving will
 # end at 3.00am on Sunday 15th January 2017."
 
-# From Paul Eggert (2016-10-03):
-# For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# From Paul Eggert (2017-08-21):
+# Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
+# Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
+# [Legal Notice No. 41] of an order of the previous day by J Usamate.
+# For now, guess DST from 02:00 the first Sunday in November to 03:00
+# the first Sunday on or after January 14.  Although ad hoc, it matches
 # transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
@@ -396,7 +399,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Fiji	2015	max	-	Jan	Sun>=15	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=14	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	+12/+13
@@ -580,7 +583,7 @@
 # The World War II entries below are instead based on Arawa-Kieta.
 # The Japanese occupied Kieta in July 1942,
 # according to the Pacific War Online Encyclopedia
-# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
+# https://pwencycl.kgbudge.com/B/o/Bougainville.htm
 # and seem to have controlled it until their 1945-08-21 surrender.
 #
 # The Autonomous Region of Bougainville switched from UT +10 to +11
@@ -602,7 +605,7 @@
 			-8:00	-	-08
 
 # American Samoa
-Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1879 Jul  5
+Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1892 Jul  5
 			-11:22:48 -	LMT	1911
 			-11:00	-	SST	            # S=Samoa
 Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
@@ -618,7 +621,7 @@
 # Sunday of April 2011."
 #
 # Background info:
-# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
+# https://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
 #
 # Samoa's Daylight Saving Time Act 2009 is available here, but does not
 # contain any dates:
@@ -682,7 +685,7 @@
 Rule	WS	2012	max	-	Apr	Sun>=1	4:00	0	S
 Rule	WS	2012	max	-	Sep	lastSun	3:00	1	D
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
+Zone Pacific/Apia	 12:33:04 -	LMT	1892 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	-1130	1950
 			-11:00	WS	-11/-10	2011 Dec 29 24:00
@@ -709,7 +712,7 @@
 # From Paul Eggert (2012-07-25)
 # A Google Books snippet of Appendix to the Journals of the House of
 # Representatives of New Zealand, Session 1948,
-# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
+# <https://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
 # was "11 hours slow on G.M.T."  Go with Thorsen and assume Shanks & Pottenger
 # are off by an hour starting in 1901.
 
@@ -724,8 +727,8 @@
 Rule	Tonga	2000	only	-	Mar	19	2:00s	0	-
 Rule	Tonga	2000	2001	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Tonga	2001	2002	-	Jan	lastSun	2:00	0	-
-Rule	Tonga	2016	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Tonga	2017	max	-	Jan	Sun>=15	3:00	0	-
+Rule	Tonga	2016	only	-	Nov	Sun>=1	2:00	1:00	S
+Rule	Tonga	2017	only	-	Jan	Sun>=15	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Pacific/Tongatapu	12:19:20 -	LMT	1901
 			12:20	-	+1220	1941
@@ -779,7 +782,7 @@
 # Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin,
 # "The United States High-Altitude Test Experience: A Review Emphasizing the
 # Impact on the Environment", Los Alamos LA-6405, Oct 1976.
-# http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
+# https://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
 # See the table on page 4 where he lists GMT and local times for the tests; a
 # footnote for the JI tests reads that local time is "JI time = Hawaii Time
 # Minus One Hour".
@@ -845,7 +848,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@@ -992,7 +995,7 @@
 #   AEST ACST AWST AEDT ACDT
 #
 #   Parliamentary Library (2008-11-10)
-#   http://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
+#   https://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
 #   EST CST WST preferred for standard time; AEST AEDT ACST ACDT also used
 #
 #   The Transport Safety Bureau has an extensive series of accident reports,
@@ -1028,13 +1031,13 @@
 #
 # NSW (including LHI and Broken Hill):
 # Standard Time Act 1987 (updated 1995-04-04)
-# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
+# https://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
 # ACT
 # Standard Time and Summer Time Act 1972
-# http://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
+# https://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
 # SA
 # Standard Time Act, 1898
-# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
+# https://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
 
 # From David Grosz (2005-06-13):
 # It was announced last week that Daylight Saving would be extended by
@@ -1329,7 +1332,7 @@
 # http://abc.net.au/news/regionals/neweng/monthly/regeng-22jul1999-1.htm
 # (1999-07-22).  For now, we'll wait to see if this really happens.
 #
-# Victoria will following NSW.  See:
+# Victoria will follow NSW.  See:
 # Vic to extend daylight saving (1999-07-28)
 # http://abc.net.au/local/news/olympics/1999/07/item19990728112314_1.htm
 #
@@ -1432,7 +1435,7 @@
 # the ACT for all 52 weeks of the year...
 #
 # We have a wrap-up here:
-# http://www.timeanddate.com/news/time/south-australia-extends-dst.html
+# https://www.timeanddate.com/news/time/south-australia-extends-dst.html
 ###############################################################################
 
 # New Zealand
@@ -1486,7 +1489,7 @@
 # From Paul Eggert (2014-07-14):
 # Chatham Island time was formally standardized on 1957-01-01 by
 # New Zealand's Standard Time Amendment Act 1956 (1956-10-26).
-# http://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
+# https://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
 # According to Google Books snippet view, a speaker in the New Zealand
 # parliamentary debates in 1956 said "Clause 78 makes provision for standard
 # time in the Chatham Islands.  The time there is 45 minutes in advance of New
@@ -1601,7 +1604,7 @@
 # the Norfolk Island Museum and the Australian Bureau of Meteorology's
 # Norfolk Island station, and found no record of Norfolk observing DST
 # other than in 1974/5.  See:
-# http://www.timeanddate.com/time/australia/norfolk-island.html
+# https://www.timeanddate.com/time/australia/norfolk-island.html
 
 # Pitcairn
 
@@ -1629,11 +1632,13 @@
 
 # (Western) Samoa and American Samoa
 
-# Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald)
-# that in 1879 the King of Samoa decided to change
+# Howse writes (p 153) that after the 1879 standardization on Antipodean
+# time by the British governor of Fiji, the King of Samoa decided to change
 # "the date in his kingdom from the Antipodean to the American system,
 # ordaining - by a masterpiece of diplomatic flattery - that
 # the Fourth of July should be celebrated twice in that year."
+# This happened in 1892, according to the Evening News (Sydney) of 1892-07-20.
+# https://www.staff.science.uu.nl/~gent0113/idl/idl.htm
 
 # Although Shanks & Pottenger says they both switched to UT -11:30
 # in 1911, and to -11 in 1950. many earlier sources give -11
@@ -1644,6 +1649,7 @@
 # day in 2011.  Assume also that the Samoas follow the US and New
 # Zealand's "ST"/"DT" style of daylight-saving abbreviations.
 
+
 # Tonga
 
 # From Paul Eggert (1996-01-22):
@@ -1738,6 +1744,15 @@
 # Assume Tonga will observe DST from the first Sunday in November at 02:00
 # through the third Sunday in January at 03:00, like Fiji, for now.
 
+# From David Wade (2017-10-18):
+# In August government was disolved by the King.  The current prime minister
+# continued in office in care taker mode.  It is easy to see that few
+# decisions will be made until elections 16th November.
+#
+# From Paul Eggert (2017-10-18):
+# For now, guess that DST is discontinued.  That's what the IATA is guessing.
+
+
 # Wake
 
 # From Vernice Anderson, Personal Secretary to Philip Jessup,
@@ -1750,7 +1765,7 @@
 # making calculation of time in Washington difficult if not almost
 # impossible.
 #
-# http://www.trumanlibrary.org/wake/meeting.htm
+# https://www.trumanlibrary.org/oralhist/andrsonv.htm
 
 # From Paul Eggert (2003-03-23):
 # We have no other report of DST in Wake Island, so omit this info for now.
@@ -1778,7 +1793,7 @@
 # an international standard, there are some places on the high seas where the
 # correct date is ambiguous.
 
-# From Wikipedia <http://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
+# From Wikipedia <https://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
 # Before 1920, all ships kept local apparent time on the high seas by setting
 # their clocks at night or at the morning sight so that, given the ship's
 # speed and direction, it would be 12 o'clock when the Sun crossed the ship's
--- a/test/jdk/sun/util/calendar/zi/tzdata/backward	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/backward	Thu Nov 16 01:11:32 2017 +0100
@@ -84,7 +84,9 @@
 Link	America/Manaus		Brazil/West
 Link	America/Halifax		Canada/Atlantic
 Link	America/Winnipeg	Canada/Central
-Link	America/Regina		Canada/East-Saskatchewan
+# This line is commented out, as the name exceeded the 14-character limit
+# and was an unused misnomer.
+#Link	America/Regina		Canada/East-Saskatchewan
 Link	America/Toronto		Canada/Eastern
 Link	America/Edmonton	Canada/Mountain
 Link	America/St_Johns	Canada/Newfoundland
--- a/test/jdk/sun/util/calendar/zi/tzdata/europe	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/europe	Thu Nov 16 01:11:32 2017 +0100
@@ -60,14 +60,14 @@
 #	[PDF] (1914-03)
 #
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
-#	<http://www.jstor.org/stable/1774359>.  He writes:
+#	<https://www.jstor.org/stable/1774359>.  He writes:
 #	"It is requested that corrections and additions to these tables
 #	may be sent to Mr. John Milne, Royal Geographical Society,
 #	Savile Row, London."  Nowadays please email them to tz@iana.org.
 #
 #	Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
 #	This Russian-language source was consulted by Vladimir Karpinsky; see
-#	http://mm.icann.org/pipermail/tz/2014-August/021320.html
+#	https://mm.icann.org/pipermail/tz/2014-August/021320.html
 #	The full Russian citation is:
 #	Бялокоз, Евгений Людвигович. Новый счет времени в течении суток
 #	введенный декретом Совета народных комиссаров для всей России с 1-го
@@ -210,7 +210,7 @@
 # foundations of civilization throughout the world.
 #	-- "A Silent Toast to William Willett", Pictorial Weekly;
 #	republished in Finest Hour (Spring 2002) 1(114):26
-#	http://www.winstonchurchill.org/images/finesthour/Vol.01%20No.114.pdf
+#	https://www.winstonchurchill.org/publications/finest-hour/finest-hour-114/a-silent-toast-to-william-willett-by-winston-s-churchill
 
 # From Paul Eggert (2015-08-08):
 # The OED Supplement says that the English originally said "Daylight Saving"
@@ -248,8 +248,8 @@
 # official designation; the reply of the 21st was that there wasn't
 # but he couldn't think of anything better than the "Double British
 # Summer Time" that the BBC had been using informally.
-# http://www.polyomino.org.uk/british-time/bbc-19410418.png
-# http://www.polyomino.org.uk/british-time/ho-19410421.png
+# https://www.polyomino.org.uk/british-time/bbc-19410418.png
+# https://www.polyomino.org.uk/british-time/ho-19410421.png
 
 # From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21):
 # [N]o official designation has as far as I know been adopted for the time
@@ -266,13 +266,13 @@
 # the history of summer time legislation in the United Kingdom.
 # Since 1998 Joseph S. Myers has been updating
 # and extending this list, which can be found in
-# http://www.polyomino.org.uk/british-time/
+# https://www.polyomino.org.uk/british-time/
 
 # From Joseph S. Myers (1998-01-06):
 #
 # The legal time in the UK outside of summer time is definitely GMT, not UTC;
 # see Lord Tanlaw's speech
-# http://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
+# https://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
 # (Lords Hansard 11 June 1997 columns 964 to 976).
 
 # From Paul Eggert (2006-03-22):
@@ -318,7 +318,7 @@
 # Irish 'public feeling (was) outraged by forcing of English time on us'."
 # -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising.
 # Irish Times 2014-10-27.
-# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
+# https://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
 
 # From Joseph S. Myers (2005-01-26):
 # Irish laws are available online at <http://www.irishstatutebook.ie>.
@@ -371,6 +371,12 @@
 # Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
 # "Irish Summer Time", abbreviated to "IST".
 
+# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
+# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
+# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
+# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
+# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Summer Time Act, 1916
 Rule	GB-Eire	1916	only	-	May	21	2:00s	1:00	BST
@@ -495,14 +501,14 @@
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Dublin	-0:25:00 -	LMT	1880 Aug  2
-			-0:25:21 -	DMT	1916 May 21  2:00 # Dublin MT
+			-0:25:21 -	DMT	1916 May 21  2:00s # Dublin MT
 			-0:25:21 1:00	IST	1916 Oct  1  2:00s
 			 0:00	GB-Eire	%s	1921 Dec  6 # independence
-			 0:00	GB-Eire	GMT/IST	1940 Feb 25  2:00
-			 0:00	1:00	IST	1946 Oct  6  2:00
-			 0:00	-	GMT	1947 Mar 16  2:00
-			 0:00	1:00	IST	1947 Nov  2  2:00
-			 0:00	-	GMT	1948 Apr 18  2:00
+			 0:00	GB-Eire	GMT/IST	1940 Feb 25  2:00s
+			 0:00	1:00	IST	1946 Oct  6  2:00s
+			 0:00	-	GMT	1947 Mar 16  2:00s
+			 0:00	1:00	IST	1947 Nov  2  2:00s
+			 0:00	-	GMT	1948 Apr 18  2:00s
 			 0:00	GB-Eire	GMT/IST	1968 Oct 27
 			 1:00	-	IST	1971 Oct 31  2:00u
 			 0:00	GB-Eire	GMT/IST	1996
@@ -648,7 +654,7 @@
 # Council of Ministers of the USSR from 1989-03-14 No. 227.
 #
 # I did not find full texts of these acts.  For the 1989 one we have
-# title at http://base.garant.ru/70754136/ :
+# title at https://base.garant.ru/70754136/ :
 # "About change in calculation of time on the territories of
 # Lithuanian SSR, Latvian SSR and Estonian SSR, Astrakhan,
 # Kaliningrad, Kirov, Kuybyshev, Ulyanovsk and Uralsk oblasts".
@@ -679,7 +685,7 @@
 # http://bmockbe.ru/events/?ID=7583
 #
 # Medvedev signed a law on the calculation of the time (in russian):
-# http://www.regnum.ru/news/polit/1413906.html
+# https://www.regnum.ru/news/polit/1413906.html
 
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
@@ -806,7 +812,7 @@
 # Sources (Russian language):
 # http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
 # http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
-# http://news.tut.by/society/250578.html
+# https://news.tut.by/society/250578.html
 #
 # From Alexander Bokovoy (2014-10-09):
 # Belarussian government decided against changing to winter time....
@@ -1127,7 +1133,7 @@
 # for their standard and summer times. He says no, they use "suveaeg"
 # (summer time) and "talveaeg" (winter time).
 
-# From The Baltic Times <http://www.baltictimes.com/> (1999-09-09)
+# From The Baltic Times <https://www.baltictimes.com/> (1999-09-09)
 # via Steffen Thorsen:
 # This year will mark the last time Estonia shifts to summer time,
 # a council of the ruling coalition announced Sept. 6....
@@ -1179,7 +1185,7 @@
 # This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
 # Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
 # Finnish) at
-# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# https://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
 #
 # Page 105 (56 in PDF version) has a handy table of all past daylight savings
 # transitions. It is easy enough to interpret without Finnish skills.
@@ -1192,7 +1198,7 @@
 
 # From Konstantin Hyppönen (2014-06-13):
 # [Heikki Oja's book Aikakirja 2013]
-# http://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
+# https://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
 # pages 104-105, including a scan from a newspaper published on Apr 2 1942
 # say that ... [o]n Apr 2 1942, 24 o'clock (which means Apr 3 1942,
 # 00:00), clocks were moved one hour forward. The newspaper
@@ -1322,7 +1328,7 @@
 
 # From Jörg Schilling (2002-10-23):
 # In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
-# http://www.dhm.de/lemo/html/biografien/BersarinNikolai/
+# https://www.dhm.de/lemo/html/biografien/BersarinNikolai/
 # General [Nikolai] Bersarin.
 
 # From Paul Eggert (2003-03-08):
@@ -1547,7 +1553,7 @@
 # From Paul Eggert (2016-10-27):
 # Go with INRiM for DST rules, except as corrected by Inglis for 1944
 # for the Kingdom of Italy.  This is consistent with Renzo Baldini.
-# Model Rome's occupation by using using C-Eur rules from 1943-09-10
+# Model Rome's occupation by using C-Eur rules from 1943-09-10
 # to 1944-06-04; although Rome was an open city during this period, it
 # was effectively controlled by Germany.
 #
@@ -1862,14 +1868,14 @@
 # Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)-
 # Tiraspol will go back to winter time on October 30, 2011.
 # News from Moldova (in russian):
-# http://ru.publika.md/link_317061.html
+# https://ru.publika.md/link_317061.html
 
 # From Roman Tudos (2015-07-02):
 # http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077
 # From Paul Eggert (2015-07-01):
 # The abovementioned official link to IGO1445-868/2014 states that
 # 2014-10-26's fallback transition occurred at 03:00 local time.  Also,
-# http://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
+# https://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
 # says the 2014-03-30 spring-forward transition was at 02:00 local time.
 # Guess that since 1997 Moldova has switched one hour before the EU.
 
@@ -1941,7 +1947,7 @@
 # Amsterdam mean time.
 
 # The data entries before 1945 are taken from
-# http://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
+# https://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Neth	1916	only	-	May	 1	0:00	1:00	NST	# Netherlands Summer Time
@@ -2022,7 +2028,7 @@
 # so it must have diverged from Oslo time during the war, as Oslo was
 # keeping Berlin time.
 #
-# <http://home.no.net/janmayen/history.htm> says that the meteorologists
+# <https://www.jan-mayen.no/history.htm> says that the meteorologists
 # burned down their station in 1940 and left the island, but returned in
 # 1941 with a small Norwegian garrison and continued operations despite
 # frequent air attacks from Germans.  In 1943 the Americans established a
@@ -2060,7 +2066,7 @@
 Rule	Poland	1945	only	-	Nov	 1	0:00	0	-
 # For 1946 on the source is Kazimierz Borkowski,
 # Toruń Center for Astronomy, Dept. of Radio Astronomy, Nicolaus Copernicus U.,
-# http://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
+# https://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
 # Thanks to Przemysław Augustyniak (2005-05-28) for this reference.
 # He also gives these further references:
 # Mon Pol nr 13, poz 162 (1995) <http://www.abc.com.pl/serwis/mp/1995/0162.htm>
@@ -2094,7 +2100,7 @@
 #
 # From Paul Eggert (2014-08-11), after a heads-up from Stephen Colebourne:
 # According to a Portuguese decree (1911-05-26)
-# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
+# https://dre.pt/application/dir/pdf1sdip/1911/05/12500/23132313.pdf
 # Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00.
 # Round the old offset to -0:36:45.  This agrees with Willett but disagrees
 # with Shanks, who says the transition occurred on 1911-05-24 at 00:00 for
@@ -2276,7 +2282,7 @@
 # 2011 No. 725" and contains no other dates or "effective date" information.
 #
 # Another source is
-# http://www.rg.ru/2011/09/06/chas-zona-dok.html
+# https://rg.ru/2011/09/06/chas-zona-dok.html
 # which, according to translate.google.com, begins "Resolution of the
 # Government of the Russian Federation on August 31, 2011 N 725" and also
 # contains "Date first official publication: September 6, 2011 Posted on:
@@ -2284,7 +2290,7 @@
 # does not contain any "effective date" information.
 #
 # Another source is
-# http://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
+# https://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
 # which, in note 8, contains "Resolution No. 725 of August 31, 2011...
 # Effective as of after 7 days following the day of the official publication"
 # but which does not contain any reference to September 6, 2011.
@@ -2320,7 +2326,7 @@
 # http://itar-tass.com/obschestvo/1333711
 # http://www.pravo.gov.ru:8080/page.aspx?111660
 # http://www.kremlin.ru/acts/46279
-# From October 26, 2014 the new Russian time zone map will looks like this:
+# From October 26, 2014 the new Russian time zone map will look like this:
 # http://www.worldtimezone.com/dst_news/dst_news_russia-map-2014-07.html
 
 # From Paul Eggert (2006-03-22):
@@ -2367,7 +2373,7 @@
 # with maintenance only and represent our best guesses as to which regions
 # are covered by each zone.  They are not meant to be taken as an authoritative
 # listing.  The region codes listed come from
-# http://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
+# https://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
 # and are used for convenience only; no guarantees are made regarding their
 # future stability.  ISO 3166-2:RU codes are also listed for first-level
 # divisions where available.
@@ -2532,7 +2538,7 @@
 # http://www.kaliningradka.ru/site_pc/cherez/index.php?ELEMENT_ID=40091
 # says that Kaliningrad decided not to be an exception 2 days before the
 # 1991-03-31 switch and one person at
-# http://izhevsk.ru/forum_light_message/50/682597-m8369040.html
+# https://izhevsk.ru/forum_light_message/50/682597-m8369040.html
 # says he remembers that Samara opted out of the 1992-01-19 exception
 # 2 days before the switch.
 #
@@ -2604,7 +2610,7 @@
 			 3:00	-	MSK	1997 Mar lastSun  1:00u
 # From Alexander Krivenyshev (2014-03-17):
 # time change at 2:00 (2am) on March 30, 2014
-# http://vz.ru/news/2014/3/17/677464.html
+# https://vz.ru/news/2014/3/17/677464.html
 # From Paul Eggert (2014-03-30):
 # Simferopol and Sevastopol reportedly changed their central town clocks
 # late the previous day, but this appears to have been ceremonial
@@ -2787,7 +2793,7 @@
 # suggests that Altai Republic transitioned to Moscow+3 on
 # 1995-05-28.
 #
-# http://regnum.ru/news/society/1957270.html
+# https://regnum.ru/news/society/1957270.html
 # has some historical data for Altai Krai:
 # before 1957: west part on UTC+6, east on UTC+7
 # after 1957: UTC+7
@@ -3161,8 +3167,8 @@
 # districts, but have very similar populations.  In fact, Wikipedia currently
 # lists them both as having 3528 people, exactly 1668 males and 1860 females
 # each!  (Yikes!)
-# http://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
-# http://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
+# https://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
+# https://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
 # Assume this is a mistake, albeit an amusing one.
 #
 # Looking at censuses, the populations of the two municipalities seem to have
@@ -3483,7 +3489,7 @@
 #
 # From Alois Treindl (2013-09-11):
 # The Federal regulations say
-# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
+# https://www.admin.ch/opc/de/classified-compilation/20071096/index.html
 # ... the meridian for Bern mean time ... is 7 degrees 26' 22.50".
 # Expressed in time, it is 0h29m45.5s.
 
@@ -3560,9 +3566,9 @@
 # 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.
-# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
+# https://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # Turkish:
-# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
+# https://www.hurriyet.com.tr/yaz-saati-uygulamasi-bir-gun-ileri-alindi-17230464
 
 # From Faruk Pasin (2014-02-14):
 # The DST for Turkey has been changed for this year because of the
@@ -3698,7 +3704,7 @@
 # http://www.segodnya.ua/news/14290482.html
 #
 # Deputies cancelled the winter time (in Russian)
-# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# https://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 #
 # From Philip Pizzey (2011-10-18):
 # Today my Ukrainian colleagues have informed me that the
--- a/test/jdk/sun/util/calendar/zi/tzdata/leapseconds	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/leapseconds	Thu Nov 16 01:11:32 2017 +0100
@@ -26,19 +26,18 @@
 # This file is in the public domain.
 
 # This file is generated automatically from the data in the public-domain
-# leap-seconds.list file available from most NIST time servers.
-# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
-# you should be able to pick up leap-seconds.list from a secondary NIST server.
-# See <http://tf.nist.gov/tf-cgi/servers.cgi> for a list of secondary servers.
+# leap-seconds.list file, which is copied from:
+# ftp://ftp.nist.gov/pub/time/leap-seconds.list
 # For more about leap-seconds.list, please see
 # The NTP Timescale and Leap Seconds
-# http://www.eecis.udel.edu/~mills/leap.html
+# https://www.eecis.udel.edu/~mills/leap.html
 
 # The International Earth Rotation and Reference Systems Service
 # periodically uses leap seconds to keep UTC to within 0.9 s of UT1
 # (which measures the true angular orientation of the earth in space); see
-# Terry J Quinn, The BIPM and the accurate measure of time,
-# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
+# Levine J. Coordinated Universal Time and the leap second.
+# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
+# http://ieeexplore.ieee.org/document/7909995/
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
 # did not exist until the early 1970s.
@@ -81,5 +80,5 @@
 Leap	2015	Jun	30	23:59:60	+	S
 Leap	2016	Dec	31	23:59:60	+	S
 
-#	Updated through IERS Bulletin C53
-#	File expires on:  28 December 2017
+#	Updated through IERS Bulletin C54
+#	File expires on:  28 June 2018
--- a/test/jdk/sun/util/calendar/zi/tzdata/northamerica	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/northamerica	Thu Nov 16 01:11:32 2017 +0100
@@ -128,10 +128,13 @@
 # Last night I heard part of a rebroadcast of a 1945 Arch Oboler radio drama.
 # In the introduction, Oboler spoke of "Eastern Peace Time."
 # An AltaVista search turned up:
-# http://rowayton.org/rhs/hstaug45.html
+# https://web.archive.org/web/20000926032210/http://rowayton.org/rhs/hstaug45.html
 # "When the time is announced over the radio now, it is 'Eastern Peace
 # Time' instead of the old familiar 'Eastern War Time.'  Peace is wonderful."
 # (August 1945) by way of confirmation.
+#
+# From Paul Eggert (2017-09-23):
+# This was the V-J Day issue of the Clamdigger, a Rowayton, CT newsletter.
 
 # From Joseph Gallant citing
 # George H. Douglas, _The Early Days of Radio Broadcasting_ (1987):
@@ -280,7 +283,7 @@
 # HST and HDT are standardized abbreviations for Hawaii-Aleutian
 # standard and daylight times.  See section 9.47 (p 234) of the
 # U.S. Government Printing Office Style Manual (2008)
-# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
+# https://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
 
 # From Arthur David Olson, 2005-08-09
 # The following was signed into law on 2005-08-08.
@@ -369,7 +372,7 @@
 # western Tennessee, most of Texas, Wisconsin
 
 # From Larry M. Smith (2006-04-26) re Wisconsin:
-# http://www.legis.state.wi.us/statutes/Stat0175.pdf ...
+# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
 # is currently enforced at the 01:00 time of change.  Because the local
 # "bar time" in the state corresponds to 02:00, a number of citations
 # are issued for the "sale of class 'B' alcohol after prohibited
@@ -378,7 +381,7 @@
 # From Douglas R. Bomberg (2007-03-12):
 # Wisconsin has enacted (nearly eleventh-hour) legislation to get WI
 # Statue 175 closer in synch with the US Congress' intent....
-# http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf
+# https://docs.legis.wisconsin.gov/2007/related/acts/3
 
 # From an email administrator of the City of Fort Pierre, SD (2015-12-21):
 # Fort Pierre is technically located in the Mountain time zone as is
@@ -425,7 +428,7 @@
 # ...it appears that Mercer County, North Dakota, changed from the
 # mountain time zone to the central time zone at the last transition from
 # daylight-saving to standard time (on Nov. 7, 2010):
-# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
+# https://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
 # http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html
 
 # From Andy Lipscomb (2011-01-24):
@@ -476,7 +479,7 @@
 # legal time, and is not part of the data here.)  See:
 # Ross SA. An energy crisis from the past: Northern California in 1948.
 # Working Paper No. 8, Institute of Governmental Studies, UC Berkeley,
-# 1973-11.  http://escholarship.org/uc/item/8x22k30c
+# 1973-11.  https://escholarship.org/uc/item/8x22k30c
 #
 # In another measure to save electricity, DST was instituted from 1948-03-14
 # at 02:01 to 1949-01-16 at 02:00, with the governor having the option to move
@@ -497,8 +500,8 @@
 # which established DST from April's last Sunday at 01:00 until September's
 # last Sunday at 02:00. This was amended by 1962's Proposition 6, which changed
 # the fall-back date to October's last Sunday. See:
-# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
-# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
+# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
+# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	CA	1948	only	-	Mar	14	2:01	1:00	D
@@ -515,20 +518,31 @@
 # Alaska
 # AK%sT is the modern abbreviation for -09 per USNO.
 #
-# From Paul Eggert (2001-05-30):
+# From Paul Eggert (2017-06-15):
 # Howse writes that Alaska switched from the Julian to the Gregorian calendar,
 # and from east-of-GMT to west-of-GMT days, when the US bought it from Russia.
-# This was on 1867-10-18, a Friday; the previous day was 1867-10-06 Julian,
-# also a Friday.  Include only the time zone part of this transition,
-# ignoring the switch from Julian to Gregorian, since we can't represent
-# the Julian calendar.
+# On Friday, 1867-10-18 (Gregorian), at precisely 15:30 local time, the
+# Russian forts and fleet at Sitka fired salutes to mark the ceremony of
+# formal transfer.  See the Sacramento Daily Union (1867-11-14), p 3, col 2.
+# https://cdnc.ucr.edu/cgi-bin/cdnc?a=d&d=SDU18671114.2.12.1
+# Sitka workers did not change their calendars until Sunday, 1867-10-20,
+# and so celebrated two Sundays that week.  See: Ahllund T (tr Hallamaa P).
+# From the memoirs of a Finnish workman. Alaska History. 2006 Fall;21(2):1-25.
+# http://alaskahistoricalsociety.org/wp-content/uploads/2016/12/Ahllund-2006-Memoirs-of-a-Finnish-Workman.pdf
+# Include only the time zone part of this transition, ignoring the switch
+# from Julian to Gregorian, since we can't represent the Julian calendar.
 #
-# As far as we know, none of the exact locations mentioned below were
+# As far as we know, of the locations mentioned below only Sitka was
 # permanently inhabited in 1867 by anyone using either calendar.
-# (Yakutat was colonized by the Russians in 1799, but the settlement
-# was destroyed in 1805 by a Yakutat-kon war party.)  However, there
-# were nearby inhabitants in some cases and for our purposes perhaps
-# it's best to simply use the official transition.
+# (Yakutat was colonized by the Russians in 1799, but the settlement was
+# destroyed in 1805 by a Yakutat-kon war party.)  Many of Alaska's inhabitants
+# were unaware of the US acquisition of Alaska, much less of any calendar or
+# time change.  However, the Russian-influenced part of Alaska did observe
+# Russian time, and it is more accurate to model this than to ignore it.
+# The database format requires an exact transition time; use the Russian
+# salute as a somewhat-arbitrary time for the formal transfer of control for
+# all of Alaska.  Sitka's UTC offset is -9:01:13; adjust its 15:30 to the
+# local times of other Alaskan locations so that they change simultaneously.
 
 # From Paul Eggert (2014-07-18):
 # One opinion of the early-1980s turmoil in Alaska over time zones and
@@ -581,10 +595,10 @@
 # It seems Metlakatla did go off PST on Sunday, November 1, changing
 # their time to AKST and are going to follow Alaska's DST, switching
 # between AKST and AKDT from now on....
-# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
+# https://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
+Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 19 15:33:32
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -594,7 +608,7 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 19 15:30
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -602,7 +616,7 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18
+Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 19 15:44:55
 			 -8:46:18 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -610,14 +624,14 @@
 			 -8:00	US	P%sT	1983 Oct 30  2:00
 			 -8:00	-	PST	2015 Nov  1  2:00
 			 -9:00	US	AK%sT
-Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
+Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 19 15:12:18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
 			 -9:00	US	Y%sT	1946
 			 -9:00	-	YST	1969
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Anchorage	 14:00:24 -	LMT	1867 Oct 18
+Zone America/Anchorage	 14:00:24 -	LMT	1867 Oct 19 14:31:37
 			 -9:59:36 -	LMT	1900 Aug 20 12:00
 			-10:00	-	AST	1942
 			-10:00	US	A%sT	1967 Apr
@@ -625,7 +639,7 @@
 			-10:00	US	AH%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Nome	 12:58:21 -	LMT	1867 Oct 18
+Zone America/Nome	 12:58:22 -	LMT	1867 Oct 19 13:29:35
 			-11:01:38 -	LMT	1900 Aug 20 12:00
 			-11:00	-	NST	1942
 			-11:00	US	N%sT	1946
@@ -634,7 +648,7 @@
 			-11:00	US	B%sT	1983 Oct 30  2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Adak	 12:13:21 -	LMT	1867 Oct 18
+Zone America/Adak	 12:13:22 -	LMT	1867 Oct 19 12:44:35
 			-11:46:38 -	LMT	1900 Aug 20 12:00
 			-11:00	-	NST	1942
 			-11:00	US	N%sT	1946
@@ -670,7 +684,7 @@
 # "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225
 # of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09,
 # the article is available at
-# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
+# https://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
 # and indicates that standard time was adopted effective noon, January
 # 13, 1896 (page 218), that in "1933, the Legislature decreed daylight
 # saving for the period between the last Sunday of each April and the
@@ -769,7 +783,7 @@
 # Indiana
 #
 # For a map of Indiana's time zone regions, see:
-# http://en.wikipedia.org/wiki/Time_in_Indiana
+# https://en.wikipedia.org/wiki/Time_in_Indiana
 #
 # From Paul Eggert (2007-08-17):
 # Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
@@ -996,7 +1010,7 @@
 # From Paul Eggert (2001-07-16):
 # The final rule was published in the
 # Federal Register 65, 160 (2000-08-17), pp 50154-50158.
-# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=2000_register&docid=fr17au00-22
+# https://www.gpo.gov/fdsys/pkg/FR-2000-08-17/html/00-20854.htm
 #
 Zone America/Kentucky/Monticello -5:39:24 - LMT	1883 Nov 18 12:20:36
 			-6:00	US	C%sT	1946
@@ -1022,7 +1036,7 @@
 # West Wendover, NV officially switched from Pacific to mountain time on
 # 1999-10-31.  See the
 # Federal Register 64, 203 (1999-10-21), pp 56705-56707.
-# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=fr21oc99-15
+# https://www.gpo.gov/fdsys/pkg/FR-1999-10-21/html/99-27240.htm
 # However, the Federal Register says that West Wendover already operated
 # on mountain time, and the rule merely made this official;
 # hence a separate tz entry is not needed.
@@ -1052,12 +1066,23 @@
 # one hour in 1914."  This change is not in Shanks.  We have no more
 # info, so omit this for now.
 #
+# From Paul Eggert (2017-07-26):
+# Although Shanks says Detroit observed DST in 1967 from 06-14 00:01
+# until 10-29 00:01, I now see multiple reports that this is incorrect.
+# For example, according to a 50-year anniversary report about the 1967
+# Detroit riots and a major-league doubleheader on 1967-07-23, "By the time
+# the last fly ball of the doubleheader settled into the glove of leftfielder
+# Lenny Green, it was after 7 p.m.  Detroit did not observe daylight saving
+# time, so light was already starting to fail.  Twilight was made even deeper
+# by billowing columns of smoke that ascended in an unbroken wall north of the
+# ballpark."  See: Dow B. Detroit '67: As violence unfolded, Tigers played two
+# at home vs. Yankees. Detroit Free Press 2017-07-23.
+# https://www.freep.com/story/sports/mlb/tigers/2017/07/23/detroit-tigers-1967-riot-new-york-yankees/499951001/
+#
 # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	Detroit	1948	only	-	Apr	lastSun	2:00	1:00	D
 Rule	Detroit	1948	only	-	Sep	lastSun	2:00	0	S
-Rule	Detroit	1967	only	-	Jun	14	2:00	1:00	D
-Rule	Detroit	1967	only	-	Oct	lastSun	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Detroit	-5:32:11 -	LMT	1905
 			-6:00	-	CST	1915 May 15  2:00
@@ -1121,7 +1146,7 @@
 #	[PDF] (1914-03)
 #
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
-#	<http://www.jstor.org/stable/1774359>.
+#	<https://www.jstor.org/stable/1774359>.
 #
 # See the 'europe' file for Greenland.
 
@@ -1167,19 +1192,19 @@
 # The British Columbia government announced yesterday that it will
 # adjust daylight savings next year to align with changes in the
 # U.S. and the rest of Canada....
-# http://www2.news.gov.bc.ca/news_releases_2005-2009/2006AG0014-000330.htm
+# https://archive.news.gov.bc.ca/releases/news_releases_2005-2009/2006AG0014-000330.htm
 # ...
 # Nova Scotia
 # Daylight saving time will be extended by four weeks starting in 2007....
-# http://www.gov.ns.ca/just/regulations/rg2/2006/ma1206.pdf
+# https://www.novascotia.ca/just/regulations/rg2/2006/ma1206.pdf
 #
 # [For New Brunswick] the new legislation dictates that the time change is to
 # be done at 02:00 instead of 00:01.
-# http://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
+# https://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
 # ...
 # Manitoba has traditionally changed the clock every fall at 03:00.
 # As of 2006, the transition is to take place one hour earlier at 02:00.
-# http://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
+# https://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
 # ...
 # [Alberta, Ontario, Quebec] will follow US rules.
 # http://www.qp.gov.ab.ca/documents/spring/CH03_06.CFM
@@ -1193,7 +1218,7 @@
 # http://www.hoa.gov.nl.ca/hoa/bills/Bill0634.htm
 # ...
 # Yukon
-# http://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
+# https://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
 # ...
 # N.W.T. will follow US rules.  Whoever maintains the government web site
 # does not seem to believe in bookmarks.  To see the news release, click the
@@ -1214,8 +1239,8 @@
 # time and daylight saving time arrangements in Canada circa 1998.
 #
 # National Research Council Canada maintains info about time zones and DST.
-# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
-# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
+# https://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
+# https://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
 # Its unofficial information is often taken from Matthews and Vincent.
 
 # From Paul Eggert (2006-06-27):
@@ -1252,11 +1277,13 @@
 
 # Newfoundland and Labrador
 
-# From Paul Eggert (2000-10-02):
-# Matthews and Vincent (1998) write that Labrador should use NST/NDT,
-# but the only part of Labrador that follows the rules is the
-# southeast corner, including Port Hope Simpson and Mary's Harbour,
-# but excluding, say, Black Tickle.
+# From Paul Eggert (2017-10-14):
+# Legally Labrador should observe Newfoundland time; see:
+# McLeod J. Labrador time - legal or not? St. John's Telegram, 2017-10-07
+# http://www.thetelegram.com/news/local/labrador-time--legal-or-not-154860/
+# Matthews and Vincent (1998) write that the only part of Labrador
+# that follows the rules is the southeast corner, including Port Hope
+# Simpson and Mary's Harbour, but excluding, say, Black Tickle.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	StJohns	1917	only	-	Apr	 8	2:00	1:00	D
@@ -1456,7 +1483,7 @@
 # http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
 # that the coastal strip from just east of Natashquan to Blanc-Sablon
 # observes Atlantic standard time all year round.
-# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
+# https://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
 # says this common practice was codified into law as of 2007.
 # For lack of better info, guess this practice began around 1970, contra to
 # Shanks & Pottenger who have this region observing AST/ADT.
@@ -1488,6 +1515,11 @@
 # earlier in June).
 #
 # Kenora, Ontario, was to abandon DST on 1914-06-01 (-05-21).
+#
+# From Paul Eggert (2017-07-08):
+# For more on Orillia, see: Daubs K. Bold attempt at daylight saving
+# time became a comic failure in Orillia. Toronto Star 2017-07-08.
+# https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html
 
 # From Paul Eggert (1997-10-17):
 # Mark Brader writes that an article in the 1997-10-14 Toronto Star
@@ -1979,7 +2011,7 @@
 #	* 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
 #	c. 7 defines Yukon standard time as UTC-9....
 #	see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
-#	[http://canlii.ca/t/7vhg]
+#	[https://www.canlii.org/en/ca/laws/stat/rsc-1985-c-i-21/latest/rsc-1985-c-i-21.html]
 #	* C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
 #	* O.I.C. 1980/02 established DST.
 #	* O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00.
@@ -2044,7 +2076,7 @@
 #     hours behind Greenwich Time.
 #
 # * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214
-#   http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
+#   https://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
 #   C.O. 1973/214 INTERPRETATION ACT ...
 #
 #     1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby
@@ -2059,7 +2091,7 @@
 #   http://? - no online source found
 #
 # * Yukon Daylight Saving Time, YOIC 1987/56
-#   http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
+#   https://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
 #   O.I.C. 1987/056 INTERPRETATION ACT ...
 #
 #   In every year between
@@ -2071,7 +2103,7 @@
 #   Dated ... 9th day of March, A.D., 1987.
 #
 # * Yukon Daylight Saving Time 2006, YOIC 2006/127
-#   http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
+#   https://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
 #   O.I.C. 2006/127 INTERPRETATION ACT ...
 #
 #     1. In Yukon each year the time for general purposes shall be 7 hours
@@ -2085,7 +2117,7 @@
 #     3. This order comes into force January 1, 2007.
 #
 # * Interpretation Act, RSY 2002, c 125
-# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
+# https://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
 
 # From Rives McDow (1999-09-04):
 # Nunavut ... moved ... to incorporate the whole territory into one time zone.
@@ -2128,7 +2160,7 @@
 
 # From Michaela Rodrigue, writing in the
 # Nunatsiaq News (1999-11-19):
-# http://www.nunatsiaq.com/archives/nunavut991130/nvt91119_17.html
+# http://www.nunatsiaqonline.ca/archives/nunavut991130/nvt91119_17.html
 # Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones,
 # central - or Nunavut time - for government offices, and eastern time
 # for municipal offices and schools....  Igloolik [was similar but then]
@@ -2146,7 +2178,7 @@
 # Central Time and Southampton Island [in the Central zone] is not
 # required to use daylight savings.
 
-# From <http://www.nunatsiaq.com/archives/nunavut001130/nvt21110_02.html>
+# From <http://www.nunatsiaqonline.ca/archives/nunavut001130/nvt21110_02.html>
 # Nunavut now has two time zones (2000-11-10):
 # The Nunavut government would allow its employees in Kugluktuk and
 # Cambridge Bay to operate on central time year-round, putting them
@@ -2477,7 +2509,7 @@
 # http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
 #
 # Our page:
-# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# https://www.timeanddate.com/news/time/north-mexico-dst-change.html
 
 # From Arthur David Olson (2010-01-20):
 # The page
@@ -2896,7 +2928,7 @@
 # http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm
 #
 # Some more background information is posted here:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
 #
 # The article also says that Cuba has been observing DST since 1963,
 # while Shanks (and tzdata) has 1965 as the first date (except in the
@@ -2943,7 +2975,7 @@
 # http://granma.co.cu/2011/03/08/nacional/artic01.html
 #
 # Our info:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
 #
 # From Steffen Thorsen (2011-10-30)
 # Cuba will end DST two weeks later this year. Instead of going back
@@ -2953,7 +2985,7 @@
 # http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html
 #
 # Our page:
-# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html
+# https://www.timeanddate.com/news/time/cuba-time-changes-2011.html
 #
 # From Steffen Thorsen (2012-03-01)
 # According to Radio Reloj, Cuba will start DST on Midnight between March
@@ -2963,7 +2995,7 @@
 # http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril
 #
 # Our info on it:
-# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
+# https://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
 
 # From Steffen Thorsen (2012-11-03):
 # Radio Reloj and many other sources report that Cuba is changing back
@@ -3158,8 +3190,8 @@
 # From Steffen Thorsen (2016-03-12):
 # Jean Antoine, editor of www.haiti-reference.com informed us that Haiti
 # are not going on DST this year.  Several other resources confirm this: ...
-# http://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
-# http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
+# https://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
+# https://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
 # http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/
 
 # From Steffen Thorsen (2017-03-12):
@@ -3358,7 +3390,7 @@
 # Turks and Caicos
 #
 # From Chris Dunn in
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415007
+# https://bugs.debian.org/415007
 # (2007-03-15): In the Turks & Caicos Islands (America/Grand_Turk) the
 # daylight saving dates for time changes have been adjusted to match
 # the recent U.S. change of dates.
@@ -3380,12 +3412,25 @@
 # "permanent daylight saving time" by one year....
 # http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm
 #
+# From the Turks & Caicos Cabinet (2017-07-20), heads-up from Steffen Thorsen:
+# ... agreed to the reintroduction in TCI of Daylight Saving Time (DST)
+# during the summer months and Standard Time, also known as Local
+# Time, during the winter months with effect from April 2018 ...
+# https://www.gov.uk/government/news/turks-and-caicos-post-cabinet-meeting-statement--3
+#
+# From Paul Eggert (2017-08-26):
+# The date of effect of the spring 2018 change appears to be March 11,
+# which makes more sense.  See: Hamilton D. Time change back
+# by March 2018 for TCI. Magnetic Media. 2017-08-25.
+# http://magneticmediatv.com/2017/08/time-change-back-by-march-2018-for-tci/
+#
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Grand_Turk	-4:44:32 -	LMT	1890
 			-5:07:11 -	KMT	1912 Feb # Kingston Mean Time
 			-5:00	-	EST	1979
 			-5:00	US	E%sT	2015 Nov Sun>=1 2:00
-			-4:00	-	AST
+			-4:00	-	AST	2018 Mar 11 3:00
+			-5:00	US	E%sT
 
 # British Virgin Is
 # Virgin Is
--- a/test/jdk/sun/util/calendar/zi/tzdata/southamerica	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/southamerica	Thu Nov 16 01:11:32 2017 +0100
@@ -45,7 +45,7 @@
 #
 # For data circa 1899, a common source is:
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
-# http://www.jstor.org/stable/1774359
+# https://www.jstor.org/stable/1774359
 #
 # These tables use numeric abbreviations like -03 and -0330 for
 # integer hour and minute UTC offsets.  Although earlier editions used
@@ -288,8 +288,8 @@
 #
 # Es inminente que en San Luis atrasen una hora los relojes
 # (It is imminent in San Luis clocks one hour delay)
-# http://www.lagaceta.com.ar/nota/253414/Economia/Es-inminente-que-en-San-Luis-atrasen-una-hora-los-relojes.html
-# http://www.worldtimezone.net/dst_news/dst_news_argentina02.html
+# https://www.lagaceta.com.ar/nota/253414/Economia/Es-inminente-que-en-San-Luis-atrasen-una-hora-los-relojes.html
+# http://www.worldtimezone.com/dst_news/dst_news_argentina02.html
 
 # From Jesper Nørgaard Welen (2008-01-18):
 # The page of the San Luis provincial government
@@ -408,7 +408,7 @@
 # Perhaps San Luis operates on the legal fiction that it is at -04
 # with perpetual summer time, but ordinary usage typically seems to
 # just say it's at -03; see, for example,
-# http://es.wikipedia.org/wiki/Hora_oficial_argentina
+# https://es.wikipedia.org/wiki/Hora_oficial_argentina
 # We've documented similar situations as being plain changes to
 # standard time, so let's do that here too.  This does not change UTC
 # offsets, only tm_isdst and the time zone abbreviations.  One minor
@@ -739,7 +739,7 @@
 # (Portuguese)
 #
 # We have a written a short article about it as well:
-# http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
+# https://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 #
 # From Alexander Krivenyshev (2011-10-04):
 # State Bahia will return to Daylight savings time this year after 8 years off.
@@ -748,7 +748,7 @@
 
 # In Portuguese:
 # http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
-# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# https://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
 
 # From Guilherme Bernardes Rodrigues (2011-10-07):
 # There is news in the media, however there is still no decree about it.
@@ -774,16 +774,16 @@
 
 # From Rodrigo Severo (2012-10-16):
 # Tocantins state will have DST.
-# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
+# https://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
 
 # From Steffen Thorsen (2013-09-20):
 # Tocantins in Brazil is very likely not to observe DST from October....
 # http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
 # We will keep this article updated when this is confirmed:
-# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
+# https://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
 
 # From Steffen Thorsen (2013-10-17):
-# http://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
+# https://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
 # Senator Jorge Viana announced that Acre will change time zone on November 10.
 # He did not specify the time of the change, nor if western parts of Amazonas
 # will change as well.
@@ -1099,18 +1099,18 @@
 # the following source, cited by Oscar van Vlijmen (2006-10-08):
 # [1] Chile Law
 # http://www.webexhibits.org/daylightsaving/chile.html
-# This contains a copy of a this official table:
+# This contains a copy of this official table:
 # Cambios en la hora oficial de Chile desde 1900 (retrieved 2008-03-30)
-# http://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm
+# https://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm
 # [1] needs several corrections, though.
 #
 # The first set of corrections is from:
 # [2] History of the Official Time of Chile
 # http://www.horaoficial.cl/ing/horaof_ing.html (retrieved 2012-03-06).  See:
-# http://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html
+# https://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html
 # This is an English translation of:
 # Historia de la hora oficial de Chile (retrieved 2012-10-24).  See:
-# http://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm
+# https://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm
 # A fancier Spanish version (requiring mouse-clicking) is at:
 # http://www.horaoficial.cl/historia_hora.html
 # Conflicts between [1] and [2] were resolved as follows:
@@ -1386,10 +1386,10 @@
 # Milne says the Central and South American Telegraph Company used -5:24:15.
 #
 # From Alois Treindl (2016-12-15):
-# http://www.elcomercio.com/actualidad/hora-sixto-1993.html
+# https://www.elcomercio.com/actualidad/hora-sixto-1993.html
 # ... Whether the law applied also to Galápagos, I do not know.
 # From Paul Eggert (2016-12-15):
-# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html
+# https://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html
 # This says President Sixto Durán Ballén signed decree No. 285, which
 # established DST from 1992-11-28 to 1993-02-05; it does not give transition
 # times.  The people called it "hora de Sixto" ("Sixto hour").  The change did
@@ -1801,7 +1801,7 @@
 # hours of presidential broadcasts, hours of lines,' quipped comedian
 # Jean Mary Curró ...". See: Cawthorne A, Kai D. Venezuela scraps
 # half-hour time difference set by Chavez. Reuters 2016-04-15 14:50 -0400
-# http://www.reuters.com/article/us-venezuela-timezone-idUSKCN0XC2BE
+# https://www.reuters.com/article/us-venezuela-timezone-idUSKCN0XC2BE
 #
 # From Matt Johnson (2016-04-20):
 # ... published in the official Gazette [2016-04-18], here:
--- a/test/jdk/sun/util/calendar/zi/tzdata/zone.tab	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/sun/util/calendar/zi/tzdata/zone.tab	Thu Nov 16 01:11:32 2017 +0100
@@ -209,7 +209,7 @@
 GD	+1203-06145	America/Grenada
 GE	+4143+04449	Asia/Tbilisi
 GF	+0456-05220	America/Cayenne
-GG	+4927-00232	Europe/Guernsey
+GG	+492717-0023210	Europe/Guernsey
 GH	+0533-00013	Africa/Accra
 GI	+3608-00521	Europe/Gibraltar
 GL	+6411-05144	America/Godthab	Greenland (most areas)
@@ -244,7 +244,7 @@
 IR	+3540+05126	Asia/Tehran
 IS	+6409-02151	Atlantic/Reykjavik
 IT	+4154+01229	Europe/Rome
-JE	+4912-00207	Europe/Jersey
+JE	+491101-0020624	Europe/Jersey
 JM	+175805-0764736	America/Jamaica
 JO	+3157+03556	Asia/Amman
 JP	+353916+1394441	Asia/Tokyo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/jlink/multireleasejar/CheckRuntimeVersion.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.module.ModuleDescriptor;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class CheckRuntimeVersion {
+    public static void main(String... args) {
+        int version = Integer.parseInt(args[0]);
+        if (Runtime.version().major() != version) {
+            throw new RuntimeException(version + " != current runtime version "
+                + Runtime.version());
+        }
+
+        Set<String> expected = Arrays.stream(args, 1, args.length)
+                                     .collect(Collectors.toSet());
+        Set<String> modules = ModuleFinder.ofSystem().findAll().stream()
+            .map(ModuleReference::descriptor)
+            .map(ModuleDescriptor::name)
+            .collect(Collectors.toSet());
+
+        if (!modules.equals(expected)) {
+            throw new RuntimeException("Expected: " + expected +
+                " observable modules: " + modules);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/jlink/multireleasejar/JLinkMRJavaBaseVersionTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2017, 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 8177471
+ * @summary  jlink should use the version from java.base.jmod to find modules
+ * @modules java.base/jdk.internal.module
+ * @library /test/lib
+ * @build jdk.test.lib.process.* CheckRuntimeVersion
+ * @run testng/othervm JLinkMRJavaBaseVersionTest
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.jar.JarFile;
+import java.util.spi.ToolProvider;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import jdk.internal.module.ModulePath;
+import jdk.test.lib.process.ProcessTools;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class JLinkMRJavaBaseVersionTest {
+    private static final ToolProvider JAR_TOOL = ToolProvider.findFirst("jar")
+            .orElseThrow(() -> new RuntimeException("jar tool not found"));
+    private static final ToolProvider JAVAC_TOOL = ToolProvider.findFirst("javac")
+            .orElseThrow(() -> new RuntimeException("javac tool not found"));
+    private static final ToolProvider JLINK_TOOL = ToolProvider.findFirst("jlink")
+            .orElseThrow(() -> new RuntimeException("jlink tool not found"));
+
+    private static final Path javaHome = Paths.get(System.getProperty("java.home"));
+
+    // resource text for version 9
+    private byte[] resource9 = ("9 resource file").getBytes();
+    // resource text for current version
+    private byte[] resource = (Runtime.version().major() + " resource file").getBytes();
+
+    static Path getJmods() {
+        Path jmods = Paths.get(System.getProperty("java9.home", javaHome.toString())).resolve("jmods");
+        if (Files.notExists(jmods)) {
+            throw new RuntimeException(jmods + " not found");
+        }
+        return jmods;
+    }
+
+    @BeforeClass
+    public void initialize() throws IOException {
+        Path srcdir = Paths.get(System.getProperty("test.src"));
+
+        // create class files from source
+        Path base = srcdir.resolve("base");
+        Path mr9 = Paths.get("mr9");
+        javac(base, mr9, base.toString());
+
+        // current version
+        Path rt = srcdir.resolve("rt");
+        Path rtmods = Paths.get("rtmods");
+        javac(rt, rtmods, rt.toString());
+
+        // build multi-release jar file with different module-info.class
+        String[] args = {
+                "-cf", "m1.jar",
+                "-C", rtmods.resolve("m1").toString(), ".",
+                "--release ", "9",
+                "-C", mr9.resolve("m1").toString(), "."
+
+        };
+        JAR_TOOL.run(System.out, System.err, args);
+    }
+
+    private void javac(Path source, Path destination, String srcpath) throws IOException {
+        String[] args = Stream.concat(
+                Stream.of("-d", destination.toString(), "--release", "9",
+                          "--module-source-path", srcpath),
+                Files.walk(source)
+                     .map(Path::toString)
+                     .filter(s -> s.endsWith(".java"))
+        ).toArray(String[]::new);
+        int rc = JAVAC_TOOL.run(System.out, System.err, args);
+        Assert.assertEquals(rc, 0);
+    }
+
+    @Test
+    public void basicTest() throws Throwable {
+        if (Files.notExists(javaHome.resolve("lib").resolve("modules"))) {
+            // exploded image
+            return;
+        }
+
+        Runtime.Version version = targetRuntimeVersion();
+        System.out.println("Testing jlink with " + getJmods() + " of target version " + version);
+
+        // use jlink to build image from multi-release jar
+        jlink("m1.jar", "myimage");
+
+        // validate runtime image
+        Path java = Paths.get("myimage", "bin", "java");
+        ProcessTools.executeProcess(java.toString(), "-m", "m1/p.Main");
+
+        // validate the image linked with the proper MR version
+
+        if (version.equalsIgnoreOptional(Runtime.version())) {
+            ProcessTools.executeProcess(java.toString(), "-cp", System.getProperty("test.classes"),
+                                        "CheckRuntimeVersion", String.valueOf(version.major()),
+                                        "java.base", "java.logging", "m1")
+                .shouldHaveExitValue(0);
+        } else {
+            ProcessTools.executeProcess(java.toString(), "-cp", System.getProperty("test.classes"),
+                                        "CheckRuntimeVersion", String.valueOf(version.major()),
+                                        "java.base", "m1")
+                .shouldHaveExitValue(0);
+        }
+    }
+
+    private Runtime.Version targetRuntimeVersion() {
+        ModuleReference mref = ModulePath.of(Runtime.version(), true, getJmods())
+            .find("java.base")
+            .orElseThrow(() -> new RuntimeException("java.base not found from " + getJmods()));
+
+        return Runtime.Version.parse(mref.descriptor().version().get().toString());
+    }
+
+    private void jlink(String jar, String image) {
+        List<String> args = List.of("--output", image,
+                                    "--add-modules", "m1",
+                                    "--module-path",
+                                    getJmods().toString() + File.pathSeparator + jar);
+        System.out.println("jlink " + args.stream().collect(Collectors.joining(" ")));
+        int exitCode = JLINK_TOOL.run(System.out, System.err, args.toArray(new String[0]));
+        Assert.assertEquals(exitCode, 0);
+    }
+}
--- a/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Thu Nov 16 01:11:32 2017 +0100
@@ -21,6 +21,8 @@
  * questions.
  */
 
+import java.nio.charset.Charset;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Collection;
 import java.util.List;
@@ -74,11 +76,30 @@
                     classFilesForSpecies(GenerateJLIClassesPlugin.defaultSpecies()),
                     List.of());
 
+        // Check that --generate-jli-classes=@file works as intended
+        Path baseFile = Files.createTempFile("base", "trace");
+        String species = "LLLLLLLLLLLLLLLLLLL";
+        String fileString = "[SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_" + species + " (salvaged)\n";
+        Files.write(baseFile, fileString.getBytes(Charset.defaultCharset()));
+        result = JImageGenerator.getJLinkTask()
+                .modulePath(helper.defaultModulePath())
+                .output(helper.createNewImageDir("generate-jli-file"))
+                .option("--generate-jli-classes=@" + baseFile.toString())
+                .addMods("java.base")
+                .call();
+
+        image = result.assertSuccess();
+
+        JImageValidator.validate(
+            image.resolve("lib").resolve("modules"),
+                    classFilesForSpecies(List.of(species)), // species should be in the image
+                    classFilesForSpecies(List.of(species.substring(1)))); // but not it's immediate parent
     }
 
     private static List<String> classFilesForSpecies(Collection<String> species) {
         return species.stream()
-                .map(s -> "/java.base/java/lang/invoke/BoundMethodHandle$Species_" + s + ".class")
+                .map(s -> "/java.base/java/lang/invoke/BoundMethodHandle$Species_"
+                        + GenerateJLIClassesPlugin.expandSignature(s) + ".class")
                 .collect(Collectors.toList());
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java	Thu Nov 16 01:11:32 2017 +0100
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4934778 4777599 6553182 8146427 8146475 8175055
+ * @bug      4934778 4777599 6553182 8146427 8146475 8175055 8185371
  * @summary  Make sure that -help, -helpfile and -nohelp options work correctly.
  * @author   jamieh
  * @library ../lib
@@ -161,6 +161,7 @@
                 "-sourcetab ",
                 "-keywords ",
                 "-stylesheetfile ",
+                "--add-stylesheet ",
                 "-docencoding ",
                 "-html4 ",
                 "-html5 ",
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Thu Nov 16 01:11:32 2017 +0100
@@ -23,8 +23,9 @@
 
 /*
  * @test
- * @bug      4749567 8071982 8175200 8186332
- * @summary  Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree, -stylesheetfile options.
+ * @bug      4749567 8071982 8175200 8186332 8185371
+ * @summary  Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree,
+ *           -stylesheetfile, --main-stylesheet, --add-stylesheet options.
  * @author   Bhavesh Patel
  * @library  ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -118,6 +119,64 @@
     }
 
     @Test
+    void testStylesheetFileAltOption() {
+        javadoc("-d", "out-stylesheet-file",
+                "--main-stylesheet", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(),
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet");
+        checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" "
+                + "href=\"../custom-stylesheet.css\" title=\"Style\">");
+    }
+
+    @Test
+    void testAdditionalStylesheetFile() {
+        javadoc("-d", "out-additional-css",
+                "--add-stylesheet", new File(testSrc, "additional-stylesheet-1.css").getAbsolutePath(),
+                "--add-stylesheet", new File(testSrc, "additional-stylesheet-2.css").getAbsolutePath(),
+                "--add-stylesheet", new File(testSrc, "additional-stylesheet-3.css").getAbsolutePath(),
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("additional-stylesheet-1.css", true, "Additional javadoc style sheet 1");
+        checkOutput("additional-stylesheet-2.css", true, "Additional javadoc style sheet 2");
+        checkOutput("additional-stylesheet-3.css", true, "Additional javadoc style sheet 3");
+        checkOutput("pkg/Foo.html", true,
+                "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-1.css\" title=\"Style\">\n"
+                + "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-2.css\" title=\"Style\">\n"
+                + "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-3.css\" title=\"Style\">");
+    }
+
+    @Test
+    void testInvalidStylesheetFile() {
+        javadoc("-d", "out-invalid-css",
+                "--main-stylesheet", new File(testSrc, "custom-stylesheet-1.css").getAbsolutePath(),
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.ERROR);
+
+        checkOutput(Output.OUT, true,
+                "javadoc: error - File not found:",
+                "custom-stylesheet-1.css");
+    }
+
+    @Test
+    void testInvalidAdditionalStylesheetFiles() {
+        javadoc("-d", "out-invalid-additional-css",
+                "--add-stylesheet", new File(testSrc, "additional-stylesheet-4.css").getAbsolutePath(),
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.ERROR);
+
+        checkOutput(Output.OUT, true,
+                "javadoc: error - File not found:",
+                "additional-stylesheet-4.css");
+    }
+
+    @Test
     void testLinkSource() {
         javadoc("-d", "out-9",
                 "-linksource",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/additional-stylesheet-1.css	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,5 @@
+/* Additional javadoc style sheet 1 */
+
+body {
+    background-color:#f8f8ff;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/additional-stylesheet-2.css	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,5 @@
+/* Additional javadoc style sheet 2 */
+
+.subNav {
+    background-color:#fafad2;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/additional-stylesheet-3.css	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,5 @@
+/* Additional javadoc style sheet 3 */
+
+a:link, a:visited {
+    color:#8b0000;
+}
--- a/test/make/TestCopyFiles.gmk	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/make/TestCopyFiles.gmk	Thu Nov 16 01:11:32 2017 +0100
@@ -44,6 +44,7 @@
 DEST_DIR := $(OUTPUT_DIR)/dest
 
 $(OUTPUT_DIR)/_src_created: $(DEPS)
+	$(RM) -r $(DEST_DIR)
 	$(RM) -r $(SRC_DIR)
 	$(MKDIR) -p $(SRC_DIR)
 	$(MKDIR) -p $(SRC_DIR)/foo
@@ -51,7 +52,7 @@
 	$(TOUCH) $(SRC_DIR)/foo/foofile
 	$(TOUCH) "$(SRC_DIR)/foo/foo file"
         # Spaces in directories only works with gnu make 4.0 or later
-        ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
+        ifeq (4.0dfd, $(firstword $(sort 4.0 $(MAKE_VERSION))))
 	  $(MKDIR) -p "$(SRC_DIR)/foo bar"
 	  $(TOUCH) "$(SRC_DIR)/foo bar/foobarfile"
 	  $(TOUCH) "$(SRC_DIR)/foo bar/foo bar file"
@@ -65,15 +66,32 @@
     FILES := $(call CacheFind, $(SRC_DIR)), \
 ))
 
+# Optionally define a rule that deletes all the target files after the makefile
+# has been parsed. GNU make has specific problems with this in combination with
+# spaces in directory names.
+ifeq ($(DELETE_FIRST), true)
+  delete-targets:
+	$(RM) -r $(DEST_DIR)
+	$(ECHO) '$(DEST_DIR)/foo' '$(wildcard $(DEST_DIR)/foo)'
+
+  $(COPY_1): delete-targets
+endif
+
 do-copy1: $(COPY_1)
 
 run-test1: $(OUTPUT_DIR)/_src_created
+	$(ECHO) "Copy 1 first time"
 	+$(MAKE) -f $(THIS_FILE) do-copy1
 	$(DIFF) -r $(SRC_DIR) $(DEST_DIR)
+        # Rerun the copy a second time, with the targets present at make parse
+        # time, but then deleted by a prerequisite rule.
+	$(ECHO) "Copy 1 second time"
+	+$(MAKE) -f $(THIS_FILE) do-copy1 DELETE_FIRST=true
+	$(DIFF) -r $(SRC_DIR) $(DEST_DIR)
 
 TEST_TARGETS += run-test1
 
-.PHONY: do-copy1 run-test1
+.PHONY: do-copy1 run-test1 delete-targets
 
 ################################################################################
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8190391.js	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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.
+ */
+
+/**
+ * JDK-8190391 : nashorn: "!!" of nonzero even integer var becomes false when returned
+ *
+ * @test
+ * @run
+ */
+
+
+function func(x){
+    return !!x;
+}
+print(func(0));
+print(func(2));
+print(func(3));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8190391.js.EXPECTED	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,3 @@
+false
+true
+true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8191306.js	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017, 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.
+ */
+
+/**
+ * JDK-8191306 Math.abs corner case with optimistic typing
+ *
+ * @test
+ * @run
+ */
+
+print(Math.abs(-2147483648))
+print(Math.abs(java.lang.Integer.MIN_VALUE))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8191306.js.EXPECTED	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,2 @@
+2147483648
+2147483648
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/nosecurity/es6/JDK-8185119.js	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017, 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.
+ */
+
+/**
+ * JDK-8185119: Uninitialized const when using multiple threads
+ *
+ * @test
+ * @option --language=es6
+ * @run
+ */
+
+function f() {
+    let a;
+    const b = {};
+    b.crash; // b is sometimes undefined
+
+    function c() {
+        a; b;
+    }
+}
+
+let count = new java.util.concurrent.atomic.AtomicInteger();
+
+let T = Java.extend(Java.type('java.lang.Thread'), {
+    run: function() {
+        for (let j = 0; j < 100; j++) {
+            f();
+        }
+        count.getAndIncrement();
+    }
+});
+
+const threads = [new T(), new T(), new T(), new T()];
+threads.forEach(t => t.start());
+threads.forEach(t => t.join());
+
+Assert.assertEquals(count.intValue(), 4);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/src/jdk/nashorn/api/scripting/test/JDK_8068741_Test.java	Thu Nov 16 01:11:32 2017 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+package jdk.nashorn.api.scripting.test;
+
+import javax.script.ScriptEngineFactory;
+import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @run testng jdk.nashorn.api.scripting.test.JDK_8068741_Test
+ * @bug 8068741
+ * @summary javax.script.ScriptEngineFactory.getMethodCallSyntax() spec allows null passed as an object
+ */
+public class JDK_8068741_Test {
+    @Test
+    public void testGetMethodCallSyntax() {
+        ScriptEngineFactory fac = new NashornScriptEngineFactory();
+        checkThrowsNPE(() -> fac.getMethodCallSyntax(null, "foo"));
+        checkThrowsNPE(() -> fac.getMethodCallSyntax("obj", null));
+        checkThrowsNPE(() -> fac.getMethodCallSyntax("obj", "foo", (String[])null));
+        checkThrowsNPE(() -> fac.getMethodCallSyntax("obj", "foo", null, "xyz"));
+        checkThrowsNPE(() -> fac.getMethodCallSyntax("obj", "foo", "xyz", null));
+    }
+
+    private void checkThrowsNPE(Runnable r) {
+        boolean gotNPE = false;
+        try {
+            r.run();
+        } catch (NullPointerException npe) {
+            gotNPE = true;
+            System.err.println("Got NPE as expected: " + npe);
+        }
+        Assert.assertTrue(gotNPE);
+    }
+}
--- a/test/nashorn/src/jdk/nashorn/internal/test/framework/TestReorderInterceptor.java	Sat Nov 11 01:21:09 2017 +0100
+++ b/test/nashorn/src/jdk/nashorn/internal/test/framework/TestReorderInterceptor.java	Thu Nov 16 01:11:32 2017 +0100
@@ -47,6 +47,10 @@
                 final Object o2 = mi2.getInstance();
                 if (o1 instanceof ITest && o2 instanceof ITest) {
                     return ((ITest)o1).getTestName().compareTo(((ITest)o2).getTestName());
+                } else if (o1 instanceof ITest) {
+                    return 1;
+                } else if (o2 instanceof ITest) {
+                    return -1;
                 }
                 // something else, don't care about the order
                 return 0;