Merge
authorduke
Wed, 05 Jul 2017 16:42:37 +0200
changeset 1367 11d2418bf7c1
parent 1366 62c548002ecb (current diff)
parent 1353 b91d80edba0f (diff)
child 1368 a2879b2837f5
Merge
jdk/make/tools/auto_multi/Makefile
jdk/make/tools/src/build/tools/automulti/AutoMulti.java
jdk/make/tools/src/build/tools/automulti/README.txt
jdk/make/tools/src/build/tools/automulti/TestALFGenerator.java
jdk/make/tools/src/build/tools/automulti/TestALFLookAndFeel.java
jdk/src/share/classes/javax/swing/colorchooser/DefaultHSBChooserPanel.java
jdk/src/share/classes/javax/swing/colorchooser/DefaultRGBChooserPanel.java
jdk/src/share/classes/javax/swing/colorchooser/SyntheticImage.java
jdk/src/share/classes/org/jcp/xml/dsig/internal/package.html
jdk/src/share/classes/sun/launcher/LauncherHelp.java
jdk/test/javax/swing/JFileChooser/4252173/bug4252173.java
jdk/test/javax/swing/JFileChooser/6524424/bug6524424.html
jdk/test/javax/swing/JFileChooser/6524424/bug6524424.java
jdk/test/sun/net/www/http/ChunkedInputStream/test.txt
jdk/test/tools/launcher/Arrrghs.sh
--- a/.hgtags-top-repo	Fri Oct 10 13:29:11 2008 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 46a989ab932992b2084b946eeb322fa99b9fee6c jdk7-b34
 143c1abedb7d3095eff0f9ee5fec9bf48e3490fc jdk7-b35
 4b4f5fea8d7d0743f0c30d91fcd9bf9d96e5d2ad jdk7-b36
+744554f5a3290e11c71cd2ddb1aff49e431f9ed0 jdk7-b37
--- a/corba/.hgtags	Fri Oct 10 13:29:11 2008 -0700
+++ b/corba/.hgtags	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 0a812b9824e5d17b073765d1505594b49ff88a10 jdk7-b34
 3867c4d14a5bfdbb37c97b4874ccb0ee5343111c jdk7-b35
 0723891eb8d1c27e67c54163af0b4cea05a4e036 jdk7-b36
+59d5848bdedebe91cc2753acce78911bcb4a66db jdk7-b37
--- a/corba/make/common/Defs-windows.gmk	Fri Oct 10 13:29:11 2008 -0700
+++ b/corba/make/common/Defs-windows.gmk	Wed Jul 05 16:42:37 2017 +0200
@@ -58,11 +58,24 @@
 
 # The following DLL's are considered MS runtime libraries and should
 #     not to be REBASEd, see deploy/make/common/Release.gmk.
-#     msvcrt.dll, msvcr71.dll: Microsoft runtimes
+#     msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
 MS_RUNTIME_LIBRARIES = msvcrt.dll
+MSVCRNN_DLL =
 ifeq ($(ARCH_DATA_MODEL), 32)
   ifeq ($(COMPILER_VERSION), VS2003)
-    MS_RUNTIME_LIBRARIES += msvcr71.dll
+    MSVCRNN_DLL = msvcr71.dll
+    MSVCPNN_DLL = msvcp71.dll
+    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+  endif
+  ifeq ($(COMPILER_VERSION), VS2005)
+    MSVCRNN_DLL = msvcr80.dll
+    MSVCPNN_DLL = msvcp80.dll
+    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+  endif
+  ifeq ($(COMPILER_VERSION), VS2008)
+    MSVCRNN_DLL = msvcr90.dll
+    MSVCPNN_DLL = msvcp90.dll
+    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
   endif
 endif
 
@@ -148,6 +161,20 @@
       CC_LOWER_OPT   = -O1
     endif
   endif
+  ifeq ($(COMPILER_VERSION), VS2008)
+    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+    AUTOMATIC_PCH_OPTION =
+    GX_OPTION = -EHsc
+    ifeq ($(ARCH_DATA_MODEL), 32)
+      CC_HIGHEST_OPT = -O2
+      CC_HIGHER_OPT  = -O1
+      CC_LOWER_OPT   = -O1
+    else
+      CC_HIGHEST_OPT = -O2
+      CC_HIGHER_OPT  = -O1
+      CC_LOWER_OPT   = -O1
+    endif
+  endif
   CC_NO_OPT      = -Od
 else # CC_VERSION
   # GCC not supported, but left for historical reference...
@@ -179,7 +206,7 @@
 #   -MTd       Use static debug version (better than -MDd, no runtime issues)
 #   -D_DEBUG   Change use of malloc/free/etc to use special debug ones (-MTd)
 #
-#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcp71.dll
+#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcpnn.dll
 #
 ifeq ($(MS_RUNTIME_STATIC),true)
   MS_RUNTIME_OPTION=-MT
@@ -217,7 +244,7 @@
   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
   #   -nologo  Don't print out startup message
   #   /D _STATIC_CPPLIB  
-  #            Use static link for the C++ runtime (so msvcp71.dll not needed)
+  #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
   #   
   CFLAGS_COMMON  += -Zi -nologo
   CFLAGS_OPT      = $(POPT)
--- a/corba/make/common/shared/Compiler-msvc.gmk	Fri Oct 10 13:29:11 2008 -0700
+++ b/corba/make/common/shared/Compiler-msvc.gmk	Wed Jul 05 16:42:37 2017 +0200
@@ -47,24 +47,17 @@
   # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
   NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
 
+  # Compiler version and type (Always get word after "Version")
+  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
+  
   # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
   ifeq ($(ARCH_DATA_MODEL), 32)
-    CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-    REQUIRED_CCTYPE = Optimizing
-    REQUIRED_CC_VER = 13.10.3077
-    REQUIRED_LINK_VER = 7.10.3077
-    ifeq ($(CC_MAJORVER), 12)
-      # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
-      COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
-      COMPILER_VERSION=VC6
-      REBASE     = $(COMPILER_PATH)rebase
-      MTL        = $(COMPILER_PATH)midl
-    endif
     ifeq ($(CC_MAJORVER), 13)
       # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
+      REQUIRED_CC_VER = 13.10.3077
+      REQUIRED_LINK_VER = 7.10.3077
       COMPILER_NAME=Visual Studio .NET 2003 Professional C++
       COMPILER_VERSION=VS2003
       REBASE     = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
@@ -74,9 +67,10 @@
       endif
     endif
     ifeq ($(CC_MAJORVER), 14)
-      # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
-      # NOTE: This compiler has not been tried yet on 32bit systems
-      COMPILER_NAME=Visual Studio .NET 2005
+      # This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
+      REQUIRED_CC_VER = 14.00.50727.42
+      REQUIRED_LINK_VER = 8.00.50727.42
+      COMPILER_NAME=Visual Studio 8
       COMPILER_VERSION=VS2005
       REBASE     = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
       MTL        = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
@@ -84,10 +78,22 @@
 	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
       endif
     endif
+    ifeq ($(CC_MAJORVER), 15)
+      # This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
+      REQUIRED_CC_VER = 15.00.21022.08
+      REQUIRED_LINK_VER = 9.00.21022.08
+      COMPILER_NAME=Visual Studio 9
+      COMPILER_VERSION=VS2008
+      #rebase and midl moved out of Visual Studio into the SDK:
+      REBASE     = $(MSDEVTOOLS_PATH)/rebase
+      MTL        = $(MSDEVTOOLS_PATH)/midl.exe
+      ifndef COMPILER_PATH
+	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
+      endif
+    endif
   else
-    CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
+    # else ARCH_DATA_MODEL is 64
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
     CC_MINORVER :=$(call MinorVersion,$(CC_VER))
     CC_MICROVER :=$(call MicroVersion,$(CC_VER))
--- a/hotspot/.hgtags	Fri Oct 10 13:29:11 2008 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 5251a9cd8eb8743eee647365bee1c8afdc131556 jdk7-b34
 5fa96a5a7e76da7c8dad12486293a0456c2c116c jdk7-b35
 e91159f921a58af3698e6479ea1fc5818da66d09 jdk7-b36
+9ee9cf798b59e7d51f8c0a686959f313867a55d6 jdk7-b37
--- a/jaxp/.hgtags	Fri Oct 10 13:29:11 2008 -0700
+++ b/jaxp/.hgtags	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 01facdf8cabdeaaf68cca037aef56cc5f074897f jdk7-b34
 eac46d1eb7f0935ba04f1c7929ec15423fd0309e jdk7-b35
 c84ca638db42a8b6b227b4e3b63bca192c5ca634 jdk7-b36
+af49591bc486d82aa04b832257de0d18adc9af52 jdk7-b37
--- a/jaxws/.hgtags	Fri Oct 10 13:29:11 2008 -0700
+++ b/jaxws/.hgtags	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 7a9f629cd957e3169a1a769f763fe060d078785c jdk7-b34
 b0f01c2508b690dd225298edfec70b5e8b8dc367 jdk7-b35
 f60187f44a0d62906a5e2f6bd0989b5b24c1ca1e jdk7-b36
+a2a6f9edf761934faf59ea60d7fe7178371302cd jdk7-b37
--- a/jdk/.hgtags	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/.hgtags	Wed Jul 05 16:42:37 2017 +0200
@@ -11,3 +11,4 @@
 434055a0716ee44bca712ebca02fc04b20e6e288 jdk7-b34
 cf4894b78ceb966326e93bf221db0c2d14d59218 jdk7-b35
 134fd1a656ea85acd1f97f6700f75029b9b472a0 jdk7-b36
+14f50aee4989b75934d385c56a83da0c23d2f68b jdk7-b37
--- a/jdk/make/com/sun/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/com/sun/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -41,7 +41,7 @@
 # Omit mirror since it's built with the apt tool.
 SUBDIRS = $(SCRIPT_SUBDIR) image security crypto/provider jndi jmx \
     java inputmethods org xml rowset net/httpserver net/ssl demo \
-    tools jarsigner tracing
+    tools jarsigner tracing servicetag
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/com/sun/servicetag/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,80 @@
+# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+
+BUILDDIR = ../../..
+PACKAGE = com.sun.servicetag
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files to compile
+#
+AUTO_FILES_JAVA_DIRS = com/sun/servicetag
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
+
+SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
+SERVICETAG_RESOURCES_DIR = $(CLASSDESTDIR)/com/sun/servicetag/resources
+FILES_copy = $(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
+             $(SERVICETAG_RESOURCES_DIR)/register.html \
+             $(SERVICETAG_RESOURCES_DIR)/register_ja.html \
+             $(SERVICETAG_RESOURCES_DIR)/register_zh_CN.html \
+             $(SERVICETAG_LIBDIR)/jdk_header.png
+
+# Add all properties files to the FILES_copy list
+SWORDFISH_properties := $(shell \
+       $(CD) $(SHARE_SRC)/classes/com/sun/servicetag/resources; \
+       $(FIND) . -name 'javase_*_swordfish.properties' -print ; \
+    )
+FILES_copy += $(shell \
+   for f in $(SWORDFISH_properties) ; do \
+       echo $(SERVICETAG_RESOURCES_DIR)/$$f ; \
+   done \
+)
+
+
+#
+#OTHER_JAVACFLAGS += -Xlint:unchecked
+
+build: install-servicetag-lib copy-files
+
+copy-files: $(FILES_copy)
+
+$(CLASSBINDIR)/%: $(SHARE_SRC)/classes/%
+	$(install-file)
+
+$(SERVICETAG_LIBDIR)/jdk_header.png: $(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
+	$(install-file)
+	$(CHMOD) 444 $@
+
+install-servicetag-lib:
+	@$(RM) -rf $(SERVICETAG_LIBDIR)
+	$(MKDIR) $(SERVICETAG_LIBDIR)
+
+clean clobber::
+	@$(RM) $(FILES_copy)
+
+.PHONY: copy-files
--- a/jdk/make/java/java/FILES_java.gmk	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/java/java/FILES_java.gmk	Wed Jul 05 16:42:37 2017 +0200
@@ -209,6 +209,7 @@
         sun/util/TimeZoneNameUtility.java \
         sun/util/calendar/ZoneInfo.java \
         sun/util/calendar/ZoneInfoFile.java \
+        sun/util/calendar/TzIDOldMapping.java \
     java/util/TooManyListenersException.java \
     java/util/Comparator.java \
     java/util/Collections.java \
--- a/jdk/make/javax/swing/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/javax/swing/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -33,7 +33,7 @@
 # Files
 #
 include FILES.gmk
-AUTO_FILES_JAVA_DIRS = javax/swing sun/swing
+AUTO_FILES_JAVA_DIRS = javax/swing sun/swing com/sun/java/swing
 AUTO_JAVA_PRUNE = plaf
 
 SUBDIRS = html32dtd plaf
--- a/jdk/make/sun/javazic/tzdata/VERSION	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/VERSION	Wed Jul 05 16:42:37 2017 +0200
@@ -21,4 +21,4 @@
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
 #
-tzdata2007h
+tzdata2008e
--- a/jdk/make/sun/javazic/tzdata/africa	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/africa	Wed Jul 05 16:42:37 2017 +0200
@@ -409,9 +409,63 @@
 			 0:00	-	GMT
 
 # Mauritius
+
+# From Steffen Thorsen (2008-06-25):
+# Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial
+# 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
+
+# From Alex Krivenyshev (2008-06-25):
+# http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD
+
+# From Arthur David Olson (2008-06-30):
+# The www.timeanddate.com article cited by Steffen Thorsen notes that "A
+# final decision has yet to be made on the times that daylight saving
+# would begin and end on these dates." As a place holder, use midnight.
+
+# From Paul Eggert (2008-06-30):
+# Follow Thorsen on DST in 1982/1983, instead of Shanks & Pottenger.
+
+# From Steffen Thorsen (2008-07-10):
+# According to
+# <a href="http://www.lexpress.mu/display_article.php?news_id=111216">
+# http://www.lexpress.mu/display_article.php?news_id=111216
+# </a>
+# (in French), Mauritius will start and end their DST a few days earlier
+# than previously announced (2008-11-01 to 2009-03-31).  The new start
+# date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
+# given, but it is probably at either 2 or 3 wall clock time).
+# 
+# A little strange though, since the article says that they moved the date 
+# to align itself with Europe and USA which also change time on that date, 
+# but that means they have not paid attention to what happened in 
+# USA/Canada last year (DST ends first Sunday in November). I also wonder 
+# why that they end on a Friday, instead of aligning with Europe which 
+# changes two days later.
+
+# From Alex Krivenyshev (2008-07-11):
+# Seems that English language article "The revival of daylight saving
+# time:  Energy conservation?"-# No. 16578 (07/11/2008) was originally
+# published on Monday, June 30, 2008...
+#
+# I guess that article in French "Le gouvernement avance l'introduction
+# de l'heure d'ete" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one.
+# ...
+# <a href="http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html">
+# http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
+# </a>
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule Mauritius	1982	only	-	Oct	10	0:00	1:00	S
+Rule Mauritius	1983	only	-	Mar	21	0:00	0	-
+Rule Mauritius	2008	only	-	Oct	26	2:00s	1:00	S
+Rule Mauritius	2009	only	-	Mar	27	2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Mauritius	3:50:00 -	LMT	1907		# Port Louis
-			4:00	-	MUT	# Mauritius Time
+			4:00 Mauritius	MU%sT	# Mauritius Time
 # Agalega Is, Rodriguez
 # no information; probably like Indian/Mauritius
 
@@ -422,6 +476,77 @@
 
 # Morocco
 # See the `europe' file for Spanish Morocco (Africa/Ceuta).
+
+# From Alex Krivenyshev (2008-05-09):
+# Here is an article that Morocco plan to introduce Daylight Saving Time between
+# 1 June, 2008 and 27 September, 2008.
+#
+# "... Morocco is to save energy by adjusting its clock during summer so it will
+# be one hour ahead of GMT between 1 June and 27 September, according to
+# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+#
+# <a href="http://www.worldtimezone.net/dst_news/dst_news_morocco01.html">
+# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
+# </a>
+# OR
+# <a href="http://en.afrik.com/news11892.html">
+# http://en.afrik.com/news11892.html
+# </a>
+
+# From Alex Krivenyshev (2008-05-09):
+# The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
+# <a href="http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view">
+# http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
+# </a>
+#
+# Morocco shifts to daylight time on June 1st through September 27, Govt.
+# spokesman.
+
+# From Patrice Scattolin (2008-05-09):
+# According to this article:
+# <a href="http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html">
+# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
+# </a>
+# (and republished here:
+# <a href="http://www.actu.ma/heure-dete-comment_i127896_0.html">
+# http://www.actu.ma/heure-dete-comment_i127896_0.html
+# </a>
+# )
+# the changes occurs at midnight:
+#
+# saturday night may 31st at midnight (which in french is to be
+# intrepreted as the night between saturday and sunday)
+# sunday night the 28th  at midnight
+#
+# Seeing that the 28th is monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between sunday and
+# monday, which jives with other sources that say that it's inclusive
+# june1st to sept 27th.
+#
+# The decision was taken by decree *2-08-224 *but I can't find the decree
+# published on the web.
+#
+# It's also confirmed here:
+# <a href="http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm">
+# http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
+# </a>
+# on a government portal as being  between june 1st and sept 27th (not yet
+# posted in english).
+#
+# The following google query will generate many relevant hits:
+# <a href="http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search">
+# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
+# </a>
+
+# From Alex Krivenyshev (2008-05-09):
+# Is Western Sahara (part which administrated by Morocco) going to follow
+# Morocco DST changes?  Any information?  What about other part of
+# Western Sahara - under administration of POLISARIO Front (also named
+# SADR Saharawi Arab Democratic Republic)?
+
+# From Arthur David Olson (2008-05-09):
+# XXX--guess that it is only Morocco for now; guess only 2008 for now.
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	S
 Rule	Morocco	1939	only	-	Nov	19	 0:00	0	-
@@ -438,11 +563,13 @@
 Rule	Morocco	1977	only	-	Sep	28	 0:00	0	-
 Rule	Morocco	1978	only	-	Jun	 1	 0:00	1:00	S
 Rule	Morocco	1978	only	-	Aug	 4	 0:00	0	-
+Rule	Morocco	2008	only	-	Jun	 1	 0:00	1:00	S
+Rule	Morocco	2008	only	-	Sep	28	 0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
 			 0:00	Morocco	WE%sT	1984 Mar 16
 			 1:00	-	CET	1986
-			 0:00	-	WET
+			 0:00	Morocco	WE%sT
 # Western Sahara
 Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
 			-1:00	-	WAT	1976 Apr 14
--- a/jdk/make/sun/javazic/tzdata/asia	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/asia	Wed Jul 05 16:42:37 2017 +0200
@@ -251,6 +251,28 @@
 # (could be true), for the moment I am assuming that those two
 # counties are mistakes in the astro.com data.
 
+# From Paul Eggert (2008-02-11):
+# I just now checked Google News for western news sources that talk
+# about China's single time zone, and couldn't find anything before 1986
+# talking about China being in one time zone.  (That article was: Jim
+# Mann, "A clumsy embrace for another western custom: China on daylight
+# time--sort of", Los Angeles Times, 1986-05-05.  By the way, this
+# article confirms the tz database's data claiming that China began
+# observing daylight saving time in 1986.
+#
+# From Thomas S. Mullaney (2008-02-11):
+# I think you're combining two subjects that need to treated 
+# separately: daylight savings (which, you're correct, wasn't 
+# implemented until the 1980s) and the unified time zone centered near 
+# Beijing (which was implemented in 1949). Briefly, there was also a 
+# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was 
+# ceased, and the second eventually recognized (again, in the 1980s).
+#
+# From Paul Eggert (2008-06-30):
+# There seems to be a good chance China switched to a single time zone in 1949
+# rather than in 1980 as Shanks & Pottenger have it, but we don't have a
+# reliable documentary source saying so yet, so for now we still go with
+# Shanks & Pottenger.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Changbai Time ("Long-white Time", Long-white = Heilongjiang area)
@@ -468,13 +490,13 @@
 
 # India
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Calcutta	5:53:28 -	LMT	1880	# Kolkata
+Zone	Asia/Kolkata	5:53:28 -	LMT	1880	# Kolkata
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
 			6:30	-	BURT	1942 May 15 # Burma Time
 			5:30	-	IST	1942 Sep
 			5:30	1:00	IST	1945 Oct 15
 			5:30	-	IST
-# The following are like Asia/Calcutta:
+# The following are like Asia/Kolkata:
 #	Andaman Is
 #	Lakshadweep (Laccadive, Minicoy and Amindivi Is)
 #	Nicobar Is
@@ -599,6 +621,15 @@
 # daylight saving time ...
 # http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
 #
+# From Roozbeh Pournader (2007-11-05):
+# This is quoted from Official Gazette of the Islamic Republic of
+# Iran, Volume 63, Number 18242, dated Tuesday 1386/6/24
+# [2007-10-16]. I am doing the best translation I can:...
+# The official time of the country will be moved forward for one hour
+# on the 24 hours of the first day of the month of Farvardin and will
+# be changed back to its previous state on the 24 hours of the
+# thirtieth day of Shahrivar.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iran	1978	1980	-	Mar	21	0:00	1:00	D
 Rule	Iran	1978	only	-	Oct	21	0:00	0	S
@@ -673,6 +704,21 @@
 #
 # So we'll ignore the Economist's claim.
 
+# From Steffen Thorsen (2008-03-10):
+# The cabinet in Iraq abolished DST last week, according to the following
+# news sources (in Arabic):
+# <a href="http://www.aljeeran.net/wesima_articles/news-20080305-98602.html">
+# http://www.aljeeran.net/wesima_articles/news-20080305-98602.html
+# </a>
+# <a href="http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10">
+# http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10
+# </a>
+#
+# We have published a short article in English about the change:
+# <a href="http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html">
+# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
+# </a>
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iraq	1982	only	-	May	1	0:00	1:00	D
 Rule	Iraq	1982	1984	-	Oct	1	0:00	0	S
@@ -683,8 +729,8 @@
 # IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the `:01' is a typo.
 # Shanks & Pottenger say Iraq did not observe DST 1992/1997; ignore this.
 #
-Rule	Iraq	1991	max	-	Apr	 1	3:00s	1:00	D
-Rule	Iraq	1991	max	-	Oct	 1	3:00s	0	S
+Rule	Iraq	1991	2007	-	Apr	 1	3:00s	1:00	D
+Rule	Iraq	1991	2007	-	Oct	 1	3:00s	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Baghdad	2:57:40	-	LMT	1890
 			2:57:36	-	BMT	1918	    # Baghdad Mean Time?
@@ -1374,6 +1420,42 @@
 # They decided not to adopt daylight-saving time....
 # http://www.mongolnews.mn/index.php?module=unuudur&sec=view&id=15742
 
+# From Deborah Goldsmith (2008-03-30):
+# We received a bug report claiming that the tz database UTC offset for
+# Asia/Choibalsan (GMT+09:00) is incorrect, and that it should be GMT
+# +08:00 instead. Different sources appear to disagree with the tz
+# database on this, e.g.:
+#
+# <a href="http://www.timeanddate.com/worldclock/city.html?n=1026">
+# http://www.timeanddate.com/worldclock/city.html?n=1026
+# </a>
+# <a href="http://www.worldtimeserver.com/current_time_in_MN.aspx">
+# http://www.worldtimeserver.com/current_time_in_MN.aspx
+# </a>
+#
+# both say GMT+08:00.
+
+# From Steffen Thorsen (2008-03-31):
+# eznis airways, which operates several domestic flights, has a flight
+# schedule here:
+# <a href="http://www.eznis.com/Container.jsp?id=112">
+# http://www.eznis.com/Container.jsp?id=112
+# </a>
+# (click the English flag for English)
+#
+# There it appears that flights between Choibalsan and Ulaanbatar arrive
+# about 1:35 - 1:50 hours later in local clock time, no matter the
+# direction, while Ulaanbaatar-Khvod takes 2 hours in the Eastern
+# direction and 3:35 back, which indicates that Ulaanbatar and Khvod are
+# in different time zones (like we know about), while Choibalsan and
+# Ulaanbatar are in the same time zone (correction needed).
+
+# From Arthur David Olson (2008-05-19):
+# Assume that Choibalsan is indeed offset by 8:00.
+# XXX--in the absence of better information, assume that transition
+# was at the start of 2008-03-31 (the day of Steffen Thorsen's report);
+# this is almost surely wrong.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mongol	1983	1984	-	Apr	1	0:00	1:00	S
 Rule	Mongol	1983	only	-	Oct	1	0:00	0	-
@@ -1409,7 +1491,8 @@
 Zone	Asia/Choibalsan	7:38:00 -	LMT	1905 Aug
 			7:00	-	ULAT	1978
 			8:00	-	ULAT	1983 Apr
-			9:00	Mongol	CHO%sT	# Choibalsan Time
+			9:00	Mongol	CHO%sT	2008 Mar 31 # Choibalsan Time
+			8:00	Mongol	CHO%sT
 
 # Nepal
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1459,10 +1542,32 @@
 # The minister told a news conference that the experiment had rather
 # shown 8 per cent higher consumption of electricity.
 
+# From Alex Krivenyshev (2008-05-15):
+# 
+# Here is an article that Pakistan plan to introduce Daylight Saving Time 
+# on June 1, 2008 for 3 months.
+# 
+# "... The federal cabinet on Wednesday announced a new conservation plan to 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. 
+# ...."
+# 
+# <a href="http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html">
+# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
+# </a>
+# OR
+# <a href="http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4">
+# http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4
+# </a>
+
+# From Arthur David Olson (2008-05-19):
+# XXX--midnight transitions is a guess; 2008 only is a guess.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
 Rule Pakistan	2002	only	-	Oct	Sun>=2	0:01	0	-
+Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
+Rule Pakistan	2008	only	-	Sep	1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Karachi	4:28:12 -	LMT	1907
 			5:30	-	IST	1942 Sep
@@ -1700,7 +1805,7 @@
 # kept their clocks set five and a half hours ahead of Greenwich Mean
 # Time (GMT), in line with neighbor India.
 # From Paul Eggert (2006-04-18):
-# People who live in regions under Tamil control can use TZ='Asia/Calcutta',
+# People who live in regions under Tamil control can use [TZ='Asia/Kolkata'],
 # as that zone has agreed with the Tamil areas since our cutoff date of 1970.
 
 # From K Sethu (2006-04-25):
@@ -1790,10 +1895,62 @@
 # From Paul Eggert (2007-03-29):
 # Today the AP reported "Syria will switch to summertime at midnight Thursday."
 # http://www.iht.com/articles/ap/2007/03/29/africa/ME-GEN-Syria-Time-Change.php
-# For lack of better info, assume the rule changed to "last Friday in March"
-# this year.
-Rule	Syria	2007	max	-	Mar	lastFri	0:00	1:00	S
-Rule	Syria	2007	max	-	Oct	 1	0:00	0	-
+Rule	Syria	2007	only	-	Mar	lastFri	0:00	1:00	S
+# From Jesper Norgard (2007-10-27):
+# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
+# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
+# rather Midnight between Thursday and Friday. This does make more sence than
+# having it between Wednesday and Thursday (two workdays in Syria) since the
+# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
+# it is implemented at midnight of the last workday before weekend...
+# 
+# From Steffen Thorsen (2007-10-27):
+# Jesper Norgaard Welen wrote:
+# 
+# > "Winter local time in Syria will be observed at midnight of Thursday 1
+# > November 2007, and the clock will be put back 1 hour."
+# 
+# I found confirmation on this in this gov.sy-article (Arabic):
+# http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247
+# 
+# which using Google's translate tools says:
+# Council of Ministers also approved the commencement of work on 
+# identifying the winter time as of Friday, 2/11/2007 where the 60th 
+# minute delay at midnight Thursday 1/11/2007.
+Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	0	-
+
+# From Stephen Colebourne (2008-03-17):
+# For everyone's info, I saw an IATA time zone change for [Syria] for
+# this month (March 2008) in the last day or so...This is the data IATA
+# are now using:
+# Country     Time Standard   --- DST Start ---   --- DST End ---  DST
+# Name        Zone Variation   Time    Date        Time    Date
+# Variation
+# Syrian Arab
+# Republic    SY    +0200      2200  03APR08       2100  30SEP08   +0300
+#                              2200  02APR09       2100  30SEP09   +0300
+#                              2200  01APR10       2100  30SEP10   +0300
+
+# From Arthur David Olson (2008-03-17):
+# Here's a link to English-language coverage by the Syrian Arab News
+# Agency (SANA)...
+# <a href="http://www.sana.sy/eng/21/2008/03/11/165173.htm">
+# http://www.sana.sy/eng/21/2008/03/11/165173.htm
+# </a>...which reads (in part) "The Cabinet approved the suggestion of the
+# Ministry of Electricity to begin daylight savings time on Friday April
+# 4th, advancing clocks one hour ahead on midnight of Thursday April 3rd."
+# Since Syria is two hours east of UTC, the 2200 and 2100 transition times
+# shown above match up with midnight in Syria.
+
+# From Arthur David Olson (2008-03-18):
+# My buest guess at a Syrian rule is "the Friday nearest April 1";
+# coding that involves either using a "Mar Fri>=29" construct that old time zone
+# compilers can't handle  or having multiple Rules (a la Israel).
+# For now, use "Apr Fri>=1", and go with IATA on a uniform Sep 30 end.
+
+Rule	Syria	2008	max	-	Apr	Fri>=1	0:00	1:00	S
+Rule	Syria	2008	max	-	Oct	1	0:00	0	-
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq
 			2:00	Syria	EE%sT
@@ -1847,13 +2004,13 @@
 
 # Vietnam
 
-# From Paul Eggert (1993-11-18):
-# Saigon's official name is Thanh-Pho Ho Chi Minh, but it's too long.
-# We'll stick with the traditional name for now.
+# From Arthur David Olson (2008-03-18):
+# The English-language name of Vietnam's most populous city is "Ho Chi Min City";
+# we use Ho_Chi_Minh below to avoid a name of more than 14 characters.
 
 # From Shanks & Pottenger:
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Saigon	7:06:40 -	LMT	1906 Jun  9
+Zone	Asia/Ho_Chi_Minh	7:06:40 -	LMT	1906 Jun  9
 			7:06:20	-	SMT	1911 Mar 11 0:01 # Saigon MT?
 			7:00	-	ICT	1912 May
 			8:00	-	ICT	1931 May
--- a/jdk/make/sun/javazic/tzdata/australasia	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/australasia	Wed Jul 05 16:42:37 2017 +0200
@@ -1368,7 +1368,7 @@
 # * Tonga will introduce DST in November
 #
 # I was given this link by John Letts:
-# <a hef="http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm">
+# <a href="http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm">
 # http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm
 # </a>
 #
@@ -1378,7 +1378,7 @@
 # (12 + 1 hour DST).
 
 # From Arthur David Olson (1999-09-20):
-# According to <a href="http://www.tongaonline.com/news/sept1799.html>
+# According to <a href="http://www.tongaonline.com/news/sept1799.html">
 # http://www.tongaonline.com/news/sept1799.html
 # </a>:
 # "Daylight Savings Time will take effect on Oct. 2 through April 15, 2000
--- a/jdk/make/sun/javazic/tzdata/backward	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/backward	Wed Jul 05 16:42:37 2017 +0200
@@ -46,12 +46,15 @@
 Link	Asia/Ashgabat		Asia/Ashkhabad
 Link	Asia/Chongqing		Asia/Chungking
 Link	Asia/Dhaka		Asia/Dacca
+Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Macau		Asia/Macao
 Link	Asia/Jerusalem		Asia/Tel_Aviv
+Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Thimphu		Asia/Thimbu
 Link	Asia/Makassar		Asia/Ujung_Pandang
 Link	Asia/Ulaanbaatar	Asia/Ulan_Bator
 Link	Atlantic/Faroe		Atlantic/Faeroe
+Link	Europe/Oslo		Atlantic/Jan_Mayen
 Link	Australia/Sydney	Australia/ACT
 Link	Australia/Sydney	Australia/Canberra
 Link	Australia/Lord_Howe	Australia/LHI
--- a/jdk/make/sun/javazic/tzdata/europe	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/europe	Wed Jul 05 16:42:37 2017 +0200
@@ -479,7 +479,7 @@
 Rule	EU	1981	max	-	Mar	lastSun	 1:00u	1:00	S
 Rule	EU	1996	max	-	Oct	lastSun	 1:00u	0	-
 # The most recent directive covers the years starting in 2002.  See:
-# <a href="http://europa.eu.int/eur-lex/en/lif/dat/2000/en_300L0084.html"
+# <a href="http://europa.eu.int/eur-lex/en/lif/dat/2000/en_300L0084.html">
 # Directive 2000/84/EC of the European Parliament and of the Council
 # of 19 January 2001 on summer-time arrangements.
 # </a>
@@ -502,9 +502,48 @@
 Rule	C-Eur	1942	only	-	Nov	 2	 2:00s	0	-
 Rule	C-Eur	1943	only	-	Mar	29	 2:00s	1:00	S
 Rule	C-Eur	1943	only	-	Oct	 4	 2:00s	0	-
-Rule	C-Eur	1944	only	-	Apr	 3	 2:00s	1:00	S
+Rule	C-Eur	1944	1945	-	Apr	Mon>=1	 2:00s	1:00	S
 # Whitman gives 1944 Oct 7; go with Shanks & Pottenger.
 Rule	C-Eur	1944	only	-	Oct	 2	 2:00s	0	-
+# From Jesper Norgaard Welen (2008-07-13):
+#
+# I found what is probably a typo of 2:00 which should perhaps be 2:00s
+# in the C-Eur rule from tz database version 2008d (this part was
+# corrected in version 2008d). The circumstancial evidence is simply the
+# tz database itself, as seen below:
+#
+# Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15  0:01
+#    0:00 France WE%sT 1945 Sep 16  3:00
+#
+# Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
+#    0:00 France WE%sT 1945 Sep 16 3:00
+#
+# Zone Europe/Belgrade 1:22:00 - LMT 1884
+#    1:00 1:00 CEST 1945 Sep 16  2:00s
+#
+# Rule France 1945 only - Sep 16  3:00 0 -
+# Rule Belgium 1945 only - Sep 16  2:00s 0 -
+# Rule Neth 1945 only - Sep 16 2:00s 0 -
+#
+# The rule line to be changed is:
+#
+# Rule C-Eur 1945 only - Sep 16  2:00 0 -
+#
+# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
+# 2:00 standard time, e.g. 3:00 local time.  However there are no
+# countries that use C-Eur rules in September 1945, so the only items
+# affected are apparently these ficticious zones that translates acronyms
+# CET and MET:
+#
+# Zone CET  1:00 C-Eur CE%sT
+# Zone MET  1:00 C-Eur ME%sT
+#
+# It this is right then the corrected version would look like:
+#
+# Rule C-Eur 1945 only - Sep 16  2:00s 0 -
+#
+# A small step for mankind though 8-)
+Rule	C-Eur	1945	only	-	Sep	16	 2:00s	0	-
 Rule	C-Eur	1977	1980	-	Apr	Sun>=1	 2:00s	1:00	S
 Rule	C-Eur	1977	only	-	Sep	lastSun	 2:00s	0	-
 Rule	C-Eur	1978	only	-	Oct	 1	 2:00s	0	-
@@ -747,7 +786,8 @@
 Zone	Europe/Sofia	1:33:16 -	LMT	1880
 			1:56:56	-	IMT	1894 Nov 30 # Istanbul MT?
 			2:00	-	EET	1942 Nov  2  3:00
-			1:00	C-Eur	CE%sT	1945 Apr  2  3:00
+			1:00	C-Eur	CE%sT	1945
+			1:00	-	CET	1945 Apr 2 3:00
 			2:00	-	EET	1979 Mar 31 23:00
 			2:00	Bulg	EE%sT	1982 Sep 26  2:00
 			2:00	C-Eur	EE%sT	1991
@@ -1115,33 +1155,40 @@
 # [See tz-link.htm for the URL.]
 
 # From Joerg Schilling (2002-10-23):
-# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by <a
-# href="http://www.dhm.de/lemo/html/biografien/BersarinNikolai/">
+# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
+# <a href="http://www.dhm.de/lemo/html/biografien/BersarinNikolai/">
 # General [Nikolai] Bersarin</a>.
 
 # From Paul Eggert (2003-03-08):
 # <a href="http://www.parlament-berlin.de/pds-fraktion.nsf/727459127c8b66ee8525662300459099/defc77cb784f180ac1256c2b0030274b/$FILE/bersarint.pdf">
+# http://www.parlament-berlin.de/pds-fraktion.nsf/727459127c8b66ee8525662300459099/defc77cb784f180ac1256c2b0030274b/$FILE/bersarint.pdf
+# </a>
 # says that Bersarin issued an order to use Moscow time on May 20.
 # However, Moscow did not observe daylight saving in 1945, so
 # this was equivalent to CEMT (GMT+3), not GMT+4.
 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Germany	1945	only	-	Apr	 2	2:00s	1:00	S
-Rule	Germany	1945	only	-	May	24	2:00	2:00	M # Midsummer
-Rule	Germany	1945	only	-	Sep	24	3:00	1:00	S
-Rule	Germany	1945	only	-	Nov	18	2:00s	0	-
 Rule	Germany	1946	only	-	Apr	14	2:00s	1:00	S
 Rule	Germany	1946	only	-	Oct	 7	2:00s	0	-
 Rule	Germany	1947	1949	-	Oct	Sun>=1	2:00s	0	-
-Rule	Germany	1947	only	-	Apr	 6	2:00s	1:00	S
+# http://www.ptb.de/de/org/4/44/441/salt.htm says the following transition
+# occurred at 3:00 MEZ, not the 2:00 MEZ given in Shanks & Pottenger.
+# Go with the PTB.
+Rule	Germany	1947	only	-	Apr	 6	3:00s	1:00	S
 Rule	Germany	1947	only	-	May	11	2:00s	2:00	M
 Rule	Germany	1947	only	-	Jun	29	3:00	1:00	S
 Rule	Germany	1948	only	-	Apr	18	2:00s	1:00	S
 Rule	Germany	1949	only	-	Apr	10	2:00s	1:00	S
+
+Rule SovietZone	1945	only	-	May	24	2:00	2:00	M # Midsummer
+Rule SovietZone	1945	only	-	Sep	24	3:00	1:00	S
+Rule SovietZone	1945	only	-	Nov	18	2:00s	0	-
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Berlin	0:53:28 -	LMT	1893 Apr
-			1:00	C-Eur	CE%sT	1945 Apr 2 2:00
+			1:00	C-Eur	CE%sT	1945 May 24 2:00
+			1:00 SovietZone	CE%sT	1946
 			1:00	Germany	CE%sT	1980
 			1:00	EU	CE%sT
 
@@ -1218,7 +1265,7 @@
 Zone	Europe/Budapest	1:16:20 -	LMT	1890 Oct
 			1:00	C-Eur	CE%sT	1918
 			1:00	Hungary	CE%sT	1941 Apr  6  2:00
-			1:00	C-Eur	CE%sT	1945 May  1 23:00
+			1:00	C-Eur	CE%sT	1945
 			1:00	Hungary	CE%sT	1980 Sep 28  2:00s
 			1:00	EU	CE%sT
 
@@ -1736,7 +1783,6 @@
 # come up with more definitive info about the timekeeping during the
 # war years it's probably best just do do the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
-Link	Europe/Oslo	Atlantic/Jan_Mayen
 
 # Poland
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2136,7 +2182,8 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Belgrade	1:22:00	-	LMT	1884
 			1:00	-	CET	1941 Apr 18 23:00
-			1:00	C-Eur	CE%sT	1945 May  8  2:00s
+			1:00	C-Eur	CE%sT	1945
+			1:00	-	CET	1945 May 8 2:00s
 			1:00	1:00	CEST	1945 Sep 16  2:00s
 # Metod Kozelj reports that the legal date of
 # transition to EU rules was 1982-11-27, for all of Yugoslavia at the time.
--- a/jdk/make/sun/javazic/tzdata/iso3166.tab	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/iso3166.tab	Wed Jul 05 16:42:37 2017 +0200
@@ -28,7 +28,7 @@
 #
 # This file contains a table with the following columns:
 # 1.  ISO 3166-1 alpha-2 country code, current as of
-#     ISO 3166-1 Newsletter No. V-12 (2006-09-26).  See:
+#     ISO 3166-1 Newsletter VI-1 (2007-09-21).  See:
 #     <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
 #     ISO 3166 Maintenance agency (ISO 3166/MA)
 #     </a>.
@@ -69,6 +69,7 @@
 BH	Bahrain
 BI	Burundi
 BJ	Benin
+BL	St Barthelemy
 BM	Bermuda
 BN	Brunei
 BO	Bolivia
@@ -181,6 +182,7 @@
 MC	Monaco
 MD	Moldova
 ME	Montenegro
+MF	St Martin (French part)
 MG	Madagascar
 MH	Marshall Islands
 MK	Macedonia
--- a/jdk/make/sun/javazic/tzdata/leapseconds	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/leapseconds	Wed Jul 05 16:42:37 2017 +0200
@@ -66,8 +66,10 @@
 Leap	1997	Jun	30	23:59:60	+	S
 Leap	1998	Dec	31	23:59:60	+	S
 Leap	2005	Dec	31	23:59:60	+	S
+Leap	2008	Dec	31	23:59:60	+	S
 
 # INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
+#
 # SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
 #
 # SERVICE DE LA ROTATION TERRESTRE
@@ -75,30 +77,38 @@
 # 61, Av. de l'Observatoire 75014 PARIS (France)
 # Tel.      : 33 (0) 1 40 51 22 26
 # FAX       : 33 (0) 1 40 51 22 91
-# Internet  : services.iers@obspm.fr
+# e-mail    : services.iers@obspm.fr
+# http://hpiers.obspm.fr/eop-pc
 #
-# Paris, 28 June 2007
+# Paris, 4 July 2008
 #
-# Bulletin C 34
+# Bulletin C 36
 #
 # To authorities responsible
 # for the measurement and
 # distribution of time
 #
-# INFORMATION ON UTC - TAI
+# UTC TIME STEP
+# on the 1st of January 2009
+#
+# A positive leap second will be introduced at the end of December 2008.
+# The sequence of dates of the UTC second markers will be:		
 #
-# NO positive leap second will be introduced at the end of December 2007.
-# The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# 2008 December 31,     23h 59m 59s
+# 2008 December 31,     23h 59m 60s
+# 2009 January   1,      0h  0m  0s
 #
-# from 2006 January 1, 0h UTC, until further notice : UTC-TAI = -33 s
+# The difference between UTC and the International Atomic Time TAI is:
+#
+# from 2006 January 1, 0h UTC, to 2009 January 1  0h UTC  : UTC-TAI = - 33s
+# from 2009 January 1, 0h UTC, until further notice       : UTC-TAI = - 34s
 #
 # Leap seconds can be introduced in UTC at the end of the months of December
-# or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC, or to confirm that there
+# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
+# six months, either to announce a time step in UTC or to confirm that there
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Head		
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France
--- a/jdk/make/sun/javazic/tzdata/northamerica	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/northamerica	Wed Jul 05 16:42:37 2017 +0200
@@ -2098,8 +2098,8 @@
 # http://www.jonesbahamas.com/?c=45&a=10412
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Bahamas	1964	2006	-	Oct	lastSun	2:00	0	S
-Rule	Bahamas	1964	1986	-	Apr	lastSun	2:00	1:00	D
+Rule	Bahamas	1964	1975	-	Oct	lastSun	2:00	0	S
+Rule	Bahamas	1964	1975	-	Apr	lastSun	2:00	1:00	D
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Nassau	-5:09:24 -	LMT	1912 Mar 2
 			-5:00	Bahamas	E%sT	1976
@@ -2209,6 +2209,69 @@
 # says Cuban clocks will advance at midnight on March 10.
 # For lack of better information, assume Cuba will use US rules,
 # except that it switches at midnight standard time as usual.
+#
+# From Steffen Thorsen (2007-10-25):
+# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week 
+# earlier - on the last Sunday of October, just like in 2006.
+# 
+# He supplied these references:
+# 
+# http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES
+# http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm
+# 
+# From Alex Kryvenishev (2007-10-25):
+# Here is also article from Granma (Cuba):
+# 
+# [Regira] el Horario Normal desde el [proximo] domingo 28 de octubre
+# http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_cuba03.html
+
+# From Arthur David Olson (2008-03-09):
+# I'm in Maryland which is now observing United States Eastern Daylight
+# Time. At 9:44 local time I used RealPlayer to listen to
+# <a href="http://media.enet.cu/radioreloj">
+# http://media.enet.cu/radioreloj
+# </a>, a Cuban information station, and heard
+# the time announced as "ocho cuarenta y cuatro" ("eight forty-four"),
+# indicating that Cuba is still on standard time.
+
+# From Steffen Thorsen (2008-03-12):
+# It seems that Cuba will start DST on Sunday, 2007-03-16...
+# It was announced yesterday, according to this source (in Spanish):
+# <a href="http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm">
+# http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm
+# </a>
+#
+# Some more background information is posted here:
+# <a href="http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html">
+# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
+# </a>
+#
+# 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
+# 1940's). Many other web pages in Cuba also claim that it has been
+# observed since 1963, but with the exception of 1970 - an exception
+# which is not present in tzdata/Shanks. So there is a chance we need to
+# change some historic records as well.
+#
+# One example:
+# <a href="http://www.radiohc.cu/espanol/noticias/mar07/11mar/hor.htm">
+# http://www.radiohc.cu/espanol/noticias/mar07/11mar/hor.htm
+# </a>
+
+# From Jesper Norgaard Welen (2008-03-13):
+# The Cuban time change has just been confirmed on the most authoritative
+# web site, the Granma.  Please check out
+# <a href="http://www.granma.cubaweb.cu/2008/03/13/nacional/artic10.html">
+# http://www.granma.cubaweb.cu/2008/03/13/nacional/artic10.html
+# </a>
+#
+# Basically as expected after Steffen Thorsens information, the change
+# will take place midnight between Saturday and Sunday.
+
+# From Arthur David Olson (2008-03-12):
+# Assume Sun>=15 (third Sunday) going forward.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
@@ -2240,9 +2303,9 @@
 Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2000	2006	-	Apr	Sun>=1	0:00s	1:00	D
-Rule	Cuba	2006	only	-	Oct	lastSun	0:00s	0	S
-Rule	Cuba	2007	max	-	Mar	Sun>=8	0:00s	1:00	D
-Rule	Cuba	2007	max	-	Nov	Sun>=1	0:00s	0	S
+Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
+Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2008	max	-	Mar	Sun>=15	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890
@@ -2309,6 +2372,10 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Guadeloupe	-4:06:08 -	LMT	1911 Jun 8	# Pointe a Pitre
 			-4:00	-	AST
+# St Barthelemy
+Link America/Guadeloupe	America/St_Barthelemy
+# St Martin (French part)
+Link America/Guadeloupe	America/Marigot
 
 # Guatemala
 #
--- a/jdk/make/sun/javazic/tzdata/southamerica	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/southamerica	Wed Jul 05 16:42:37 2017 +0200
@@ -127,7 +127,11 @@
 # which did not result in the switch of a time zone, as they stayed 9 hours
 # from the International Date Line.
 Rule	Arg	1999	only	-	Oct	Sun>=1	0:00	1:00	S
-Rule	Arg	2000	only	-	Mar	Sun>=1	0:00	0	-
+# From Paul Eggert (2007-12-28):
+# DST was set to expire on March 5, not March 3, but since it was converted
+# to standard time on March 3 it's more convenient for us to pretend that
+# it ended on March 3.
+Rule	Arg	2000	only	-	Mar	3	0:00	0	-
 #
 # From Peter Gradelski via Steffen Thorsen (2000-03-01):
 # We just checked with our Sao Paulo office and they say the government of
@@ -162,6 +166,30 @@
 # This kind of things had always been done this way in Argentina.
 # We are still -03:00 all year round in all of the country.
 #
+# From Steffen Thorsen (2007-12-21):
+# A user (Leonardo Chaim) reported that Argentina will adopt DST....
+# all of the country (all Zone-entries) are affected.  News reports like
+# http://www.lanacion.com.ar/opinion/nota.asp?nota_id=973037 indicate
+# that Argentina will use DST next year as well, from October to
+# March, although exact rules are not given.
+#
+# From Jesper Norgaard Welen (2007-12-26)
+# The last hurdle of Argentina DST is over, the proposal was approved in
+# the lower chamber too (Deputados) with a vote 192 for and 2 against.
+# By the way thanks to Mariano Absatz and Daniel Mario Vega for the link to
+# the original scanned proposal, where the dates and the zero hours are
+# clear and unambiguous...This is the article about final approval:
+# <a href="http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996">
+# http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996
+# </a>
+#
+# From Paul Eggert (2007-12-22):
+# For dates after mid-2008, the following rules are my guesses and
+# are quite possibly wrong, but are more likely than no DST at all.
+Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
+Rule	Arg	2008	max	-	Mar	Sun>=15	0:00	0	-
+Rule	Arg	2008	max	-	Oct	Sun>=1	0:00	1:00	S
+ 
 # From Mariano Absatz (2004-05-21):
 # Today it was officially published that the Province of Mendoza is changing
 # its timezone this winter... starting tomorrow night....
@@ -222,10 +250,80 @@
 # http://www.sanjuan.gov.ar/prensa/archivo/000426.html
 # http://www.sanjuan.gov.ar/prensa/archivo/000441.html
 
+# From Alex Krivenyshev (2008-01-17):
+# Here are articles that Argentina Province San Luis is planning to end DST
+# as earlier as upcoming Monday January 21, 2008 or February 2008:
+#
+# Provincia argentina retrasa reloj y marca diferencia con resto del pais
+# (Argentine Province delayed clock and mark difference with the rest of the
+# country)
+# <a href="http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel">
+# http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel
+# </a>
+#
+# Es inminente que en San Luis atrasen una hora los relojes
+# (It is imminent in San Luis clocks one hour delay)
+# <a href="http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414">
+# http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414
+# </a>
+#
+# <a href="http://www.worldtimezone.net/dst_news/dst_news_argentina02.html">
+# http://www.worldtimezone.net/dst_news/dst_news_argentina02.html
+# </a>
+
+# From Jesper Norgaard Welen (2008-01-18):
+# The page of the San Luis provincial government
+# <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812">
+# http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812
+# </a>
+# confirms what Alex Krivenyshev has earlier sent to the tz
+# emailing list about that San Luis plans to return to standard
+# time much earlier than the rest of the country. It also
+# confirms that upon request the provinces San Juan and Mendoza 
+# refused to follow San Luis in this change. 
+# 
+# The change is supposed to take place Monday the 21.st at 0:00
+# hours. As far as I understand it if this goes ahead, we need
+# a new timezone for San Luis (although there are also documented
+# independent changes in the southamerica file of San Luis in
+# 1990 and 1991 which has not been confirmed).
+
+# From Jesper Norgaard Welen (2008-01-25):
+# Unfortunately the below page has become defunct, about the San Luis
+# time change. Perhaps because it now is part of a group of pages "Most
+# important pages of 2008."
+#
+# You can use
+# <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834">
+# http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834
+# </a>
+# instead it seems. Or use "Buscador" from the main page of the San Luis
+# government, and fill in "huso" and click OK, and you will get 3 pages
+# from which the first one is identical to the above.
+
+# From Mariano Absatz (2008-01-28):
+# I can confirm that the Province of San Luis (and so far only that
+# province) decided to go back to UTC-3 effective midnight Jan 20th 2008
+# (that is, Monday 21st at 0:00 is the time the clocks were delayed back
+# 1 hour), and they intend to keep UTC-3 as their timezone all year round
+# (that is, unless they change their mind any minute now).
+#
+# So we'll have to add yet another city to 'southamerica' (I think San
+# Luis city is the mos populated city in the Province, so it'd be
+# America/Argentina/San_Luis... of course I can't remember if San Luis's
+# history of particular changes goes along with Mendoza or San Juan :-(
+# (I only remember not being able to collect hard facts about San Luis
+# back in 2004, when these provinces changed to UTC-4 for a few days, I
+# mailed them personally and never got an answer).
+
+# From Paul Eggert (2008-06-30):
 # Unless otherwise specified, data are from Shanks & Pottenger through 1992,
 # from the IATA otherwise.  As noted below, Shanks & Pottenger say that
-# America/Cordoba split into 6 subregions during 1991/1992, but we
-# haven't verified this yet so for now we'll keep it a single region.
+# America/Cordoba split into 6 subregions during 1991/1992, one of which
+# was America/San_Luis, but we haven't verified this yet so for now we'll
+# keep America/Cordoba a single region rather than splitting it into the
+# other 5 subregions.
+
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
@@ -236,18 +334,16 @@
 			-4:00	Arg	AR%sT	1969 Oct  5
 			-3:00	Arg	AR%sT	1999 Oct  3
 			-4:00	Arg	AR%sT	2000 Mar  3
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
 # Formosa (FM), Salta (SA), Santiago del Estero (SE), Cordoba (CB),
-# San Luis (SL), La Pampa (LP), Neuquen (NQ), Rio Negro (RN)
+# La Pampa (LP), Neuquen (NQ), Rio Negro (RN)
 #
 # Shanks & Pottenger also make the following claims, which we haven't verified:
 # - Formosa switched to -3:00 on 1991-01-07.
 # - Misiones switched to -3:00 on 1990-12-29.
 # - Chaco switched to -3:00 on 1991-01-04.
-# - San Luis switched to -4:00 on 1990-03-14, then to -3:00 on 1990-10-15,
-#   then to -4:00 on 1991-03-01, then to -3:00 on 1991-06-01.
 # - Santiago del Estero switched to -4:00 on 1991-04-01,
 #   then to -3:00 on 1991-04-26.
 #
@@ -259,7 +355,7 @@
 			-4:00	-	WART	1991 Oct 20
 			-3:00	Arg	AR%sT	1999 Oct  3
 			-4:00	Arg	AR%sT	2000 Mar  3
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Tucuman (TM)
 Zone America/Argentina/Tucuman -4:20:52 - LMT	1894 Oct 31
@@ -272,7 +368,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 13
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # La Rioja (LR)
 Zone America/Argentina/La_Rioja -4:27:24 - LMT	1894 Oct 31
@@ -285,7 +381,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # San Juan (SJ)
 Zone America/Argentina/San_Juan -4:34:04 - LMT	1894 Oct 31
@@ -298,7 +394,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Jujuy (JY)
 Zone America/Argentina/Jujuy -4:21:12 -	LMT	1894 Oct 31
@@ -312,7 +408,7 @@
 			-3:00	1:00	ARST	1992
 			-3:00	Arg	AR%sT	1999 Oct  3
 			-4:00	Arg	AR%sT	2000 Mar  3
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Catamarca (CT), Chubut (CH)
 Zone America/Argentina/Catamarca -4:23:08 - LMT	1894 Oct 31
@@ -325,7 +421,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Mendoza (MZ)
 Zone America/Argentina/Mendoza -4:35:16 - LMT	1894 Oct 31
@@ -342,6 +438,23 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 23
 			-4:00	-	WART	2004 Sep 26
+			-3:00	Arg	AR%sT
+#
+# San Luis (SL)
+Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
+			-4:16:48 -	CMT	1920 May
+			-4:00	-	ART	1930 Dec
+			-4:00	Arg	AR%sT	1969 Oct  5
+			-3:00	Arg	AR%sT	1990
+			-3:00	1:00	ARST	1990 Mar 14
+			-4:00	-	WART	1990 Oct 15
+			-4:00	1:00	WARST	1991 Mar  1
+			-4:00	-	WART	1991 Jun  1
+			-3:00	-	ART	1999 Oct  3
+			-4:00	1:00	WARST	2000 Mar  3
+			-3:00	-	ART	2004 May 31
+			-4:00	-	WART	2004 Jul 25
+			-3:00	Arg	AR%sT	2008 Jan 21
 			-3:00	-	ART
 #
 # Santa Cruz (SC)
@@ -353,7 +466,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 #
 # Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF)
 Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
@@ -364,7 +477,7 @@
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 30
 			-4:00	-	WART	2004 Jun 20
-			-3:00	-	ART
+			-3:00	Arg	AR%sT
 
 # Aruba
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -450,6 +563,50 @@
 # Brazil will start DST on 2007-10-14 00:00 and end on 2008-02-17 00:00:
 # http://www.mme.gov.br/site/news/detail.do;jsessionid=BBA06811AFCAAC28F0285210913513DA?newsId=13975
 
+# From Paul Schulze (2008-06-24):
+# ...by law number 11.662 of April 24, 2008 (published in the "Diario
+# Oficial da Uniao"...) in Brazil there are changes in the timezones,
+# effective today (00:00am at June 24, 2008) as follows:
+#
+# a) The timezone UTC+5 is e[x]tinguished, with all the Acre state and the
+# part of the Amazonas state that had this timezone now being put to the
+# timezone UTC+4
+# b) The whole Para state now is put at timezone UTC+3, instead of just
+# part of it, as was before.
+#
+# This change follows a proposal of senator Tiao Viana of Acre state, that
+# proposed it due to concerns about open television channels displaying
+# programs inappropriate to youths in the states that had the timezone
+# UTC+5 too early in the night. In the occasion, some more corrections
+# were proposed, trying to unify the timezones of any given state. This
+# change modifies timezone rules defined in decree 2.784 of 18 June,
+# 1913.
+
+# From Rodrigo Severo (2008-06-24):
+# Just correcting the URL:
+# <a href="https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=3Ddo&secao=3D1&pagina=3D1&data=3D25/04/2008">
+# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=3Ddo&secao=3D1&pagina=3D1&data=3D25/04/2008
+# </a>
+#
+# As a result of the above Decree I believe the America/Rio_Branco
+# timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
+# be created to represent the the west side of the Para State. I
+# suggest this new timezone be called Santarem as the most
+# important/populated city in the affected area.
+#
+# This new timezone would be the same as the Rio_Branco timezone up to
+# the 2008/06/24 change which would be to UTC-3 instead of UTC-4.
+
+# From Alex Krivenyshev (2008-06-24):
+# This is a quick reference page for New and Old Brazil Time Zones map.
+# <a href="http://www.worldtimezone.com/brazil-time-new-old.php">
+# http://www.worldtimezone.com/brazil-time-new-old.php
+# </a>
+#
+# - 4 time zones replaced by 3 time zones-eliminating time zone UTC- 05
+# (state Acre and the part of the Amazonas will be UTC/GMT- 04) - western
+# part of Par state is moving to one timezone UTC- 03 (from UTC -04).
+
 # From Paul Eggert (2002-10-10):
 # The official decrees referenced below are mostly taken from
 # <a href="http://pcdsh01.on.br/DecHV.html">
@@ -572,13 +729,13 @@
 Rule	Brazil	2000	2001	-	Oct	Sun>=8	 0:00	1:00	S
 Rule	Brazil	2001	2006	-	Feb	Sun>=15	 0:00	0	-
 # Decree 4,399 (2002-10-01) repeals DST in AL, CE, MA, PB, PE, PI, RN, SE.
-# <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2002/D4399.htm"></a>
+# <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2002/D4399.htm">4,399</a>
 Rule	Brazil	2002	only	-	Nov	 3	 0:00	1:00	S
 # Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO.
-# <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2003/D4844.htm"></a>
+# <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2003/D4844.htm">4,844</a>
 Rule	Brazil	2003	only	-	Oct	19	 0:00	1:00	S
 # Decree 5,223 (2004-10-01) reestablishes DST in MT.
-# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm"></a>
+# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm">5,223</a>
 Rule	Brazil	2004	only	-	Nov	 2	 0:00	1:00	S
 # Decree <a href="http://pcdsh01.on.br/DecHV5539.gif">5,539</a> (2005-09-19),
 # adopted by the same states as before.
@@ -587,9 +744,8 @@
 # adopted by the same states as before.
 Rule	Brazil	2006	only	-	Nov	 5	 0:00	1:00	S
 Rule	Brazil	2007	only	-	Feb	25	 0:00	0	-
-# (Decree number not yet known)
-# http://www.brasil.gov.br/noticias/ultimas_noticias/horario_verao070920/
-# (2007-09-20) after a heads-up from Steffen Thorsen:
+# Decree <a href="http://pcdsh01.on.br/DecHV6212.gif">6,212</a> (2007-09-26),
+# adopted by the same states as before.
 Rule	Brazil	2007	max	-	Oct	Sun>=8	 0:00	1:00	S
 Rule	Brazil	2008	max	-	Feb	Sun>=15	 0:00	0	-
 # The latest ruleset listed above says that the following states observe DST:
@@ -597,7 +753,6 @@
 # For dates after mid-2008, the above rules with TO="max" are guesses
 # and are quite possibly wrong, but are more likely than no DST at all.
 
-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
 # Fernando de Noronha (administratively part of PE)
@@ -623,6 +778,13 @@
 			-3:00	Brazil	BR%sT	1988 Sep 12
 			-3:00	-	BRT
 #
+# west Para (PA)
+# West Para includes Altamira, Oribidos, Prainha, Oriximina, and Santarem.
+Zone America/Santarem	-3:38:48 -	LMT	1914
+			-4:00	Brazil	AM%sT	1988 Sep 12
+			-4:00	-	AMT	2008 Jun 24 00:00
+			-3:00	-	BRT
+#
 # Maranhao (MA), Piaui (PI), Ceara (CE), Rio Grande do Norte (RN),
 # Paraiba (PB)
 Zone America/Fortaleza	-2:34:00 -	LMT	1914
@@ -685,8 +847,7 @@
 			-4:00	-	AMT	2004 Oct  1
 			-4:00	Brazil	AM%sT
 #
-# west Para (PA), Rondonia (RO)
-# West Para includes Altamira, Oribidos, Prainha, Oriximina, and Santarem.
+# Rondonia (RO)
 Zone America/Porto_Velho -4:15:36 -	LMT	1914
 			-4:00	Brazil	AM%sT	1988 Sep 12
 			-4:00	-	AMT
@@ -713,13 +874,14 @@
 			-5:00	Brazil	AC%sT	1988 Sep 12
 			-5:00	-	ACT	1993 Sep 28
 			-5:00	Brazil	AC%sT	1994 Sep 22
-			-5:00	-	ACT
+			-5:00	-	ACT	2008 Jun 24 00:00
+			-4:00	-	AMT
 #
 # Acre (AC)
 Zone America/Rio_Branco	-4:31:12 -	LMT	1914
 			-5:00	Brazil	AC%sT	1988 Sep 12
-			-5:00	-	ACT
-
+			-5:00	-	ACT	2008 Jun 24 00:00
+			-4:00	-	AMT
 
 # Chile
 
@@ -753,6 +915,26 @@
 # America/Santiago.  The pre-1980 Pacific/Easter data are dubious,
 # but we have no other source.
 
+# From German Poo-Caaman~o (2008-03-03):
+# Due to drought, Chile extends Daylight Time in three weeks.  This
+# is one-time change (Saturday 3/29 at 24:00 for America/Santiago
+# and Saturday 3/29 at 22:00 for Pacific/Easter)
+# The Supreme Decree is located at 
+# <a href="http://www.shoa.cl/servicios/supremo316.pdf">
+# http://www.shoa.cl/servicios/supremo316.pdf
+# </a>
+# and the instructions for 2008 are located in:
+# <a href="http://www.horaoficial.cl/cambio.htm">
+# http://www.horaoficial.cl/cambio.htm
+# </a>.
+
+# From Jose Miguel Garrido (2008-03-05):
+# ...
+# You could see the announces of the change on 
+# <a href="http://www.shoa.cl/noticias/2008/04hora/hora.htm">
+# http://www.shoa.cl/noticias/2008/04hora/hora.htm
+# </a>.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -783,7 +965,11 @@
 Rule	Chile	1998	only	-	Sep	27	4:00u	1:00	S
 Rule	Chile	1999	only	-	Apr	 4	3:00u	0	-
 Rule	Chile	1999	max	-	Oct	Sun>=9	4:00u	1:00	S
-Rule	Chile	2000	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2000	2007	-	Mar	Sun>=9	3:00u	0	-
+# N.B.: the end of March 29 in Chile is March 30 in Universal time,
+# which is used below in specifying the transition.
+Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
+Rule	Chile	2009	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1129,19 +1315,17 @@
 
 # Venezuela
 #
-# From Kiraz Janicke (2007-09-25), in
-# http://www.venezuelanalysis.com/analysis/2645:
-# The proposal ... involves turning the clock back half an hour from
-# +4.00 Greenwich Mean Time (GMT), to +4.30GMT, the time zone
-# Venezuela had until December 31, 1964, when the current time zone
-# was adopted. The change was due to take place on September 17 and
-# then on September 24, but has since been postponed until December
-# 31, to allow for compliance with international organizations, such
-# as the International Office of Weights and Measures.
+# From John Stainforth (2007-11-28):
+# ... the change for Venezuela originally expected for 2007-12-31 has
+# been brought forward to 2007-12-09.  The official announcement was
+# published today in the "Gaceta Oficial de la Republica Bolivariana
+# de Venezuela, numero 38.819" (official document for all laws or
+# resolution publication)
+# http://www.globovision.com/news.php?nid=72208
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Caracas	-4:27:44 -	LMT	1890
 			-4:27:40 -	CMT	1912 Feb 12 # Caracas Mean Time?
 			-4:30	-	VET	1965	     # Venezuela Time
-			-4:00	-	VET	2008
+			-4:00	-	VET	2007 Dec  9 03:00
 			-4:30	-	VET
--- a/jdk/make/sun/javazic/tzdata/zone.tab	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/javazic/tzdata/zone.tab	Wed Jul 05 16:42:37 2017 +0200
@@ -64,7 +64,8 @@
 AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
 AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
 AR	-3436-05827	America/Argentina/Buenos_Aires	Buenos Aires (BA, CF)
-AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF, SL)
+AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF)
+AR	-3319-06621	America/Argentina/San_Luis	San Luis (SL)
 AR	-2411-06518	America/Argentina/Jujuy	Jujuy (JY)
 AR	-2649-06513	America/Argentina/Tucuman	Tucuman (TM)
 AR	-2828-06547	America/Argentina/Catamarca	Catamarca (CT), Chubut (CH)
@@ -99,6 +100,7 @@
 BH	+2623+05035	Asia/Bahrain
 BI	-0323+02922	Africa/Bujumbura
 BJ	+0629+00237	Africa/Porto-Novo
+BL	+1753-06251	America/St_Barthelemy
 BM	+3217-06446	Atlantic/Bermuda
 BN	+0456+11455	Asia/Brunei
 BO	-1630-06809	America/La_Paz
@@ -112,7 +114,8 @@
 BR	-2332-04637	America/Sao_Paulo	S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)
 BR	-2027-05437	America/Campo_Grande	Mato Grosso do Sul
 BR	-1535-05605	America/Cuiaba	Mato Grosso
-BR	-0846-06354	America/Porto_Velho	W Para, Rondonia
+BR	-0226-05452	America/Santarem	W Para
+BR	-0846-06354	America/Porto_Velho	Rondonia
 BR	+0249-06040	America/Boa_Vista	Roraima
 BR	-0308-06001	America/Manaus	E Amazonas
 BR	-0640-06952	America/Eirunepe	W Amazonas
@@ -230,7 +233,7 @@
 IE	+5320-00615	Europe/Dublin
 IL	+3146+03514	Asia/Jerusalem
 IM	+5409-00428	Europe/Isle_of_Man
-IN	+2232+08822	Asia/Calcutta
+IN	+2232+08822	Asia/Kolkata
 IO	-0720+07225	Indian/Chagos
 IQ	+3321+04425	Asia/Baghdad
 IR	+3540+05126	Asia/Tehran
@@ -272,6 +275,7 @@
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
 ME	+4226+01916	Europe/Podgorica
+MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo
 MH	+0709+17112	Pacific/Majuro	most locations
 MH	+0905+16720	Pacific/Kwajalein	Kwajalein
@@ -361,8 +365,7 @@
 SG	+0117+10351	Asia/Singapore
 SH	-1555-00542	Atlantic/St_Helena
 SI	+4603+01431	Europe/Ljubljana
-SJ	+7800+01600	Arctic/Longyearbyen	Svalbard
-SJ	+7059-00805	Atlantic/Jan_Mayen	Jan Mayen
+SJ	+7800+01600	Arctic/Longyearbyen
 SK	+4809+01707	Europe/Bratislava
 SL	+0830-01315	Africa/Freetown
 SM	+4355+01228	Europe/San_Marino
@@ -432,7 +435,7 @@
 VE	+1030-06656	America/Caracas
 VG	+1827-06437	America/Tortola
 VI	+1821-06456	America/St_Thomas
-VN	+1045+10640	Asia/Saigon
+VN	+1045+10640	Asia/Ho_Chi_Minh
 VU	-1740+16825	Pacific/Efate
 WF	-1318-17610	Pacific/Wallis
 WS	-1350-17144	Pacific/Apia
--- a/jdk/make/sun/net/spi/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/net/spi/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -23,10 +23,6 @@
 # have any questions.
 #
 
-#
-# Makefile for building com/sun
-#
-
 BUILDDIR = ../../..
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/jdk/make/sun/net/spi/nameservice/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/net/spi/nameservice/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -23,10 +23,6 @@
 # have any questions.
 #
 
-#
-# Makefile for building com/sun
-#
-
 BUILDDIR = ../../../..
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/jdk/make/sun/net/spi/nameservice/dns/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/sun/net/spi/nameservice/dns/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -24,7 +24,7 @@
 #
 
 #
-# Makefile for building JNDI service provider toolkit
+# Makefile for building JNDI DNS name service provider
 #
 
 BUILDDIR = ../../../../..
--- a/jdk/make/tools/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/make/tools/Makefile	Wed Jul 05 16:42:37 2017 +0200
@@ -32,7 +32,6 @@
 
 SUBDIRS =                   \
   addjsum                   \
-  auto_multi                \
   buildmetaindex            \
   commentchecker            \
   compile_font_config       \
--- a/jdk/make/tools/auto_multi/Makefile	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-#
-# Makefile for building the automulti tool
-#
-
-BUILDDIR = ../..
-PACKAGE = build.tools.automulti
-PRODUCT = tools
-PROGRAM = automulti
-include $(BUILDDIR)/common/Defs.gmk
-
-BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
-BUILDTOOL_MAIN        = $(PKGDIR)/AutoMulti.java
-
-#
-# Build tool jar rules.
-#
-include $(BUILDDIR)/common/BuildToolJar.gmk
-
--- a/jdk/make/tools/src/build/tools/automulti/AutoMulti.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,458 +0,0 @@
-/*
- * Copyright 1998-2001 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package build.tools.automulti;
-
-import java.lang.reflect.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * Automatically generates the Multiplexing UI classes
- * for Swing.
- * <p>
- * To use, type 'java AutoMulti <plafdir> <prefix>' where <plafdir>
- * is the directory containing the source for Swing's UI classes and
- * <prefix> is the package prefix to use before ".swing.plaf.multi".
- * For example:
- *
- * <pre>
- * cd TEST
- * ../../../../build/solaris-sparc/bin/java AutoMulti ../../../../src/share/classes/javax/swing/plaf javax
- * </pre>
- *
- * AutoMulti will scour the plaf directory for *UI.java files and
- * generate Multi*UI.java files that do the multiplexing thing.
- * <p>
- * NOTE:  This tool depends upon the existence of <plafdir> and on the
- * compiled classes from <plafdir> being somewhere in the class path.
- *
- * @author Willie Walker
- */
-public class AutoMulti {
-    static String importLines;
-
-    /**
-     * A silly list of parameter names to use.  Skips "i" because we use
-     * it as a 'for' loop counter.  If you want to get fancy, please feel
-     * to change how parameter names are obtained.  This will break if
-     * someone decides to create a UI method that takes more than 8
-     * parameters.  Which one is a bug (this breaking or having a method
-     * with more than eight parameters) is a subjective thing.
-     */
-    public static String[] paramNames = {"a","b","c","d","e","f","g","h"};
-
-    /**
-     * Removes the package names (e.g., javax.swing) from the name.
-     */
-    public static String unqualifyName(String name) {
-        StringTokenizer parser = new StringTokenizer(name,".");
-        String unqualifiedName = null;
-        while (parser.hasMoreTokens()) {
-            unqualifiedName = parser.nextToken();
-        }
-        return removeDollars(unqualifiedName);
-    }
-
-    /**
-     * Strips the extension from the filename.
-     */
-    public static String stripExtension(String name) {
-        StringTokenizer parser = new StringTokenizer(name,".");
-        return parser.nextToken();
-    }
-
-    /**
-     * Adds some spaces.
-     */
-    public static void indent(StringBuffer s, int i) {
-        while (i > 0) {
-            s.append(" ");
-            i--;
-        }
-    }
-
-    /**
-     * Spits out all the beginning stuff.
-     */
-    public static StringBuffer createPreamble(String prefixName) {
-        StringBuffer s = new StringBuffer();
-        s.append("/*\n");
-        s.append(" *\n");
-        s.append(" * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.\n");
-        s.append(" * \n");
-        s.append(" * This software is the proprietary information of Sun Microsystems, Inc.  \n");
-        s.append(" * Use is subject to license terms.\n");
-        s.append(" * \n");
-        s.append(" */\n");
-        s.append("package " + prefixName + ".swing.plaf.multi;\n");
-        s.append("\n");
-        return s;
-    }
-
-    /**
-     * Replaces 'Xxx$Yyy' with "Xxx'.  Used by addImport because you
-     * can't import nested classes directly.
-     */
-    public static String removeNestedClassName(String s) {
-        int dollarPosition = s.indexOf('$');
-
-        if (dollarPosition >= 0) {    // s contains '$'
-            StringBuffer sb = new StringBuffer(s);
-            sb.setLength(dollarPosition);
-            return sb.toString();
-        } else {                      // no '$'
-            return s;
-        }
-    }
-
-    /**
-     * Replaces '$' with ".'.  Needed for printing inner class names
-     * for argument and return types.
-     */
-    public static String removeDollars(String s) {
-        int dollarPosition = s.indexOf('$');
-
-        if (dollarPosition >= 0) {    // s contains '$'
-            StringBuffer sb = new StringBuffer(s);
-            while (dollarPosition >= 0) {
-                //XXX: will there ever be more than one '$'?
-                sb.replace(dollarPosition, dollarPosition+1, ".");
-                dollarPosition = sb.indexOf("$", dollarPosition);
-            }
-            return sb.toString();
-        } else {                     // no $
-            return s;
-        }
-    }
-
-    /**
-     * Adds an import line to the String.
-     */
-    public static void addImport(String s, Class theClass) {
-        if (!theClass.isPrimitive() && (theClass != Object.class)) {
-            String className = removeNestedClassName(theClass.getName());
-            String importLine = new String("import " + className + ";\n");
-            if (importLines.indexOf(importLine) == -1) {
-                importLines += importLine;
-            }
-        }
-    }
-
-    /**
-     * Spits out the class header information.
-     */
-    public static void addHeader(StringBuffer s, String className) {
-        s.append("/**\n");
-        s.append(" * A multiplexing UI used to combine <code>" + className + "</code>s.\n");
-        s.append(" * \n");
-        s.append(" * <p>This file was automatically generated by AutoMulti.\n");
-        s.append(" *\n");
-        s.append(" * @author  Otto Multey\n");                  // Get it?  I crack myself up.
-        s.append(" */\n");
-        s.append("public class Multi" + className + " extends " + className + " {\n");
-        s.append("\n");
-        s.append("    /**\n");
-        s.append("     * The vector containing the real UIs.  This is populated \n");
-        s.append("     * in the call to <code>createUI</code>, and can be obtained by calling\n");
-        s.append("     * the <code>getUIs</code> method.  The first element is guaranteed to be the real UI \n");
-        s.append("     * obtained from the default look and feel.\n");
-        s.append("     */\n");
-        s.append("    protected Vector uis = new Vector();\n");
-        s.append("\n");
-        s.append("////////////////////\n");
-        s.append("// Common UI methods\n");
-        s.append("////////////////////\n");
-        s.append("\n");
-        s.append("    /**\n");
-        s.append("     * Returns the list of UIs associated with this multiplexing UI.  This \n");
-        s.append("     * allows processing of the UIs by an application aware of multiplexing \n");
-        s.append("     * UIs on components.\n");
-        s.append("     */\n");
-        s.append("    public ComponentUI[] getUIs() {\n");
-        s.append("        return MultiLookAndFeel.uisToArray(uis);\n");
-        s.append("    }\n");
-    }
-
-    /**
-     * Prints out the code for a method.  This is pretty specific to the
-     * Multiplexing UI code, so don't get any fancy ideas.
-     */
-    public static void addMethod(StringBuffer s, Method m, String origName, String className) {
-
-        // Get the method name and the return type.  Be a little careful about arrays.
-        //
-        String methodName = unqualifyName(m.getName());
-        String returnType;
-        if (!m.getReturnType().isArray()) {
-            returnType = unqualifyName(m.getReturnType().toString());
-            addImport(importLines,m.getReturnType());
-        } else {
-            returnType = unqualifyName(m.getReturnType().getComponentType().toString())
-                         + "[]";
-            addImport(importLines,m.getReturnType().getComponentType());
-        }
-
-        // Print the javadoc
-        //
-        s.append("\n");
-        if (methodName.equals("createUI")) {
-            s.append("    /**\n");
-            s.append("     * Returns a multiplexing UI instance if any of the auxiliary\n");
-            s.append("     * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the \n");
-            s.append("     * UI object obtained from the default <code>LookAndFeel</code>.\n");
-            s.append("     */\n");
-        } else if (!returnType.equals("void")) {
-            s.append("    /**\n");
-            s.append("     * Invokes the <code>" + methodName + "</code> method on each UI handled by this object.\n");
-            s.append("     * \n");
-            s.append("     * @return the value obtained from the first UI, which is\n");
-            s.append("     * the UI obtained from the default <code>LookAndFeel</code>\n");
-            s.append("     */\n");
-        } else {
-            s.append("    /**\n");
-            s.append("     * Invokes the <code>" + methodName
-                     + "</code> method on each UI handled by this object.\n");
-            s.append("     */\n");
-        }
-
-        // Print the method signature
-        //
-        s.append("    public");
-        if (Modifier.isStatic(m.getModifiers())) {
-            s.append(" static");
-        }
-        s.append(" " + returnType);
-        s.append(" " + methodName);
-        s.append("(");
-
-        Class[] params = m.getParameterTypes();
-        Class temp;
-        String braces;
-        for (int i = 0; i < params.length; i++) {
-            if (i > 0) {
-                s.append(", ");
-            }
-            temp = params[i];
-            braces = new String("");
-            while (temp.isArray()) {
-                braces += "[]";
-                temp = temp.getComponentType();
-            }
-            s.append(unqualifyName(temp.getName()) + braces + " " + paramNames[i]);
-            addImport(importLines,temp);
-        }
-        s.append(")");
-
-        // Don't forget about exceptions
-        //
-        Class exceptions[] = m.getExceptionTypes();
-        String throwsString = new String("");
-
-        if (exceptions.length > 0) {
-            s.append("\n");
-            indent(s,12);
-            s.append("throws ");
-            for (int i = 0; i < exceptions.length; i++) {
-                if (i > 0) {
-                    s.append(", ");
-                }
-                s.append(unqualifyName(exceptions[i].getName()));
-                addImport(importLines,exceptions[i]);
-            }
-        }
-        s.append(throwsString + " {\n");
-
-        // Now print out the contents of the method.  We do a special thing
-        // for the createUI method, another thing if the method returns 'void'
-        // and a third thing if we don't do either of the first two.  If
-        // you want to squash this down, feel free.
-        //
-        if (methodName.equals("createUI")) {
-            indent(s,8);
-            s.append("ComponentUI mui = new Multi" + origName + "();\n");
-            indent(s,8);
-            s.append("return MultiLookAndFeel.createUIs(mui,\n");
-            indent(s,42);
-            s.append("((Multi" + origName +") mui).uis,\n");
-            indent(s,42);
-            for (int i = 0; i < params.length; i++) {
-                if (i > 0) {
-                    s.append(",");
-                }
-                s.append(paramNames[i]);
-            }
-            s.append(");\n");
-        } else if (!returnType.equals("void")) {
-            indent(s,8);
-            s.append(returnType + " returnValue = \n");
-            indent(s,12);
-            s.append("((" + className + ") (uis.elementAt(0)))."
-                     + methodName + "(");
-            for (int i = 0; i < params.length; i++) {
-                if (i > 0) {
-                    s.append(",");
-                }
-                s.append(paramNames[i]);
-            }
-            s.append(");\n");
-            indent(s,8);
-            s.append("for (int i = 1; i < uis.size(); i++) {\n");
-            indent(s,12);
-            s.append("((" + className + ") (uis.elementAt(i)))."
-                     + methodName + "(");
-            for (int i = 0; i < params.length; i++) {
-                if (i > 0) {
-                    s.append(",");
-                }
-                s.append(paramNames[i]);
-            }
-            s.append(");\n");
-            indent(s,8);
-            s.append("}\n");
-            indent(s,8);
-            s.append("return returnValue;\n");
-        } else {
-            indent(s,8);
-            s.append("for (int i = 0; i < uis.size(); i++) {\n");
-            indent(s,12);
-            s.append("((" + className + ") (uis.elementAt(i)))."
-                     + methodName + "(");
-            for (int i = 0; i < params.length; i++) {
-                if (i > 0) {
-                    s.append(",");
-                }
-                s.append(paramNames[i]);
-            }
-            s.append(");\n");
-            indent(s,8);
-            s.append("}\n");
-        }
-        indent(s,4);
-        s.append("}\n");
-    }
-
-    /**
-     * Takes a plaf class name (e.g., "MenuUI") and generates the corresponding
-     * Multiplexing UI Java source code (e.g., "MultiMenuUI.java").
-     */
-    public static void generateFile(String prefixName, String className) {
-        try {
-            FileOutputStream fos;
-            PrintWriter outFile;
-
-            importLines = new String();
-            importLines += new String("import java.util.Vector;\n");
-
-            StringBuffer body = new StringBuffer();
-            Class wee = Class.forName(prefixName + ".swing.plaf." + className);
-            String weeName = unqualifyName(wee.getName());
-            addImport(importLines,wee);
-            while (!weeName.equals("Object")) {
-                body.append("\n");
-                body.append("////////////////////\n");
-                body.append("// " + weeName + " methods\n");
-                body.append("////////////////////\n");
-                Method[] methods = wee.getDeclaredMethods();
-                for (int i=0; i < methods.length; i++) {
-                    if (Modifier.isPublic(methods[i].getModifiers())) {
-                        addMethod(body,methods[i],className,weeName);
-                    }
-                }
-                wee = wee.getSuperclass();
-                weeName = unqualifyName(wee.getName());
-                addImport(importLines,wee);
-            }
-
-            fos = new FileOutputStream("Multi" + className + ".java");
-            outFile = new PrintWriter(fos);
-            StringBuffer outText = createPreamble(prefixName);
-            outText.append(importLines.toString() + "\n");
-            addHeader(outText,className);
-            outText.append(body.toString());
-            outText.append("}\n");
-            outFile.write(outText.toString());
-            outFile.flush();
-            outFile.close();
-        } catch (Exception e) {
-            System.err.println(e);
-        }
-    }
-
-    /**
-     * D'Oh!  Something bad happened.
-     */
-    public static void usage(String s) throws IOException {
-        System.err.println("Usage:  AutoMulti <plafdir> [com.sun]");
-        throw new IllegalArgumentException(s);
-    }
-
-    /**
-     * Takes the plaf directory name and generates the multiplexing UI
-     * source code.
-     */
-    public static void main(String[] args) throws IOException {
-
-        if (args.length < 1) {
-            usage("");
-        }
-
-        String dirName = args[0];
-        File dir = new File(dirName);
-        if (!dir.isDirectory()) {
-            System.err.println("No such directory:  " + dirName);
-            usage("");
-        }
-
-        String prefixName;
-        if (args.length > 1) {
-            prefixName = args[1];
-        } else {
-            prefixName = "com.sun.java";
-        }
-
-        String plafUIs[] = dir.list(new UIJavaFilter());
-        for (int i = 0; i < plafUIs.length; i++) {
-            generateFile(prefixName,stripExtension(plafUIs[i]));
-        }
-    }
-}
-
-/**
- * Only accepts file names of the form *UI.java.  The one exception
- * is not accepting ComponentUI.java because we don't need to generate
- * a multiplexing class for it.
- */
-class UIJavaFilter implements FilenameFilter {
-    public boolean accept(File dir, String name) {
-        if (name.equals("ComponentUI.java")) {
-            return false;
-        } else if (name.endsWith("UI.java")) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-}
--- a/jdk/make/tools/src/build/tools/automulti/README.txt	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-AutoMulti is the tool that automatically generates the
-Multi*UI classes for the Multiplexing look and feel. 
-Instructions for using it are in AutoMulti.java.
-
-TestALFGenerator is a tool (a variation of AutoMulti)
-that automatically generates an auxiliary look and
-feel that you can use to test the Multiplexing look
-and feel.  The TestALF look and feel implements every
-method by printing the message "In the xxx method of
-the TextALFYyyUI class." and, except in the case of
-createUI, returning something meaningless (since,
-except in the case of createUI, the return value is
-ignored).  
-
-TestALFLookAndFeel.java is the only non-auto-generated
-file for the TestALF L&F.  If you specify a package
-argument to TestALFGenerator, you'll have to change
-the code in TestALFLookAndFeel.java to reflect the
-package name.
-
-To test any application with the TestALF, make sure the
-compiled TestALF classes are in the class path.  Then add
-this to the <JDK_HOME>/lib/swing.properties file (which
-you'll probably have to create):
-
-swing.auxiliarylaf=TestALFLookAndFeel
-
-E.g., if you're running SwingSet2 against your solaris
-build, then you'd create/edit the swing.properties file
-in <wsdir>/build/solaris-sparc/lib.
-
-Then run any app.  You'll see lots of thrilling "In the
-Xxxx method of the Yyy class" messages.  If you get anything
-else (especially an exception), then you've found a bug.
-Probably in the default look and feel.
-
--- a/jdk/make/tools/src/build/tools/automulti/TestALFGenerator.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,401 +0,0 @@
-/*
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package build.tools.automulti;
-
-import java.lang.reflect.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * Automatically generates an auxiliary look and feel to be
- * used for testing the Multiplexing look and feel.
- * <p>
- * To use, type 'java TestALFGenerator <plafdir> [<package>]' where <plafdir>
- * is the directory containing the source for Swing's UI classes.
- * <package> is an optional argument that specifies the package
- * of the TestALF classes.  If it's omitted, the classes are in
- * the default package.
- * For example:
- *
- * <pre>
- * ../../../../build/solaris-sparc/bin/java TestALFGenerator ../../../../src/share/classes/javax/swing/plaf com.myco.myalaf
- * </pre>
- *
- * TestALFGenerator will scour the plaf directory for *UI.java files and
- * generate TestALF*UI.java files.
- * <p>
- * NOTE:  This tool depends upon the existence of <plafdir> and on the
- * compiled classes from <plafdir> being somewhere in the class path.
- *
- * @author Willie Walker
- */
-public class TestALFGenerator {
-    static String importLines;
-    static String packageName;
-    static String classPrefix = "TestALF";
-
-    /**
-     * A silly list of parameter names to use.  Skips "i" because we use
-     * it as a 'for' loop counter.  If you want to get fancy, please feel
-     * to change how parameter names are obtained.  This will break if
-     * someone decides to create a UI method that takes more than 8
-     * parameters.  Which one is a bug (this breaking or having a method
-     * with more than eight parameters) is a subjective thing.
-     */
-    public static String[] paramNames = {"a","b","c","d","e","f","g","h"};
-
-    /**
-     * Removes the package names (e.g., javax.swing) from the name.
-     */
-    public static String unqualifyName(String name) {
-        StringTokenizer parser = new StringTokenizer(name,".");
-        String unqualifiedName = null;
-        while (parser.hasMoreTokens()) {
-            unqualifiedName = parser.nextToken();
-        }
-        return removeDollars(unqualifiedName);
-    }
-
-    /**
-     * Strips the extension from the filename.
-     */
-    public static String stripExtension(String name) {
-        StringTokenizer parser = new StringTokenizer(name,".");
-        return parser.nextToken();
-    }
-
-    /**
-     * Adds some spaces.
-     */
-    public static void indent(StringBuffer s, int i) {
-        while (i > 0) {
-            s.append(" ");
-            i--;
-        }
-    }
-
-    /**
-     * Spits out all the beginning stuff.
-     */
-    public static StringBuffer createPreamble(String prefixName) {
-        StringBuffer s = new StringBuffer();
-        s.append("/*\n");
-        s.append(" *\n");
-        s.append(" * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.\n");
-        s.append(" * \n");
-        s.append(" * This software is the proprietary information of Sun Microsystems, Inc.  \n");
-        s.append(" * Use is subject to license terms.\n");
-        s.append(" * \n");
-        s.append(" */\n");
-        if (packageName != null) {
-            s.append("package " + packageName + ";\n");
-            s.append("\n");
-        }
-        return s;
-    }
-
-    /**
-     * Replaces 'Xxx$Yyy' with "Xxx'.  Used by addImport because you
-     * can't import nested classes directly.
-     */
-    public static String removeNestedClassName(String s) {
-        int dollarPosition = s.indexOf('$');
-
-        if (dollarPosition >= 0) {    // s contains '$'
-            StringBuffer sb = new StringBuffer(s);
-            sb.setLength(dollarPosition);
-            return sb.toString();
-        } else {                      // no '$'
-            return s;
-        }
-    }
-
-    /**
-     * Replaces '$' with ".'.  Needed for printing inner class names
-     * for argument and return types.
-     */
-    public static String removeDollars(String s) {
-        int dollarPosition = s.indexOf('$');
-
-        if (dollarPosition >= 0) {    // s contains '$'
-            StringBuffer sb = new StringBuffer(s);
-            while (dollarPosition >= 0) {
-                //XXX: will there ever be more than one '$'?
-                sb.replace(dollarPosition, dollarPosition+1, ".");
-                dollarPosition = sb.indexOf("$", dollarPosition);
-            }
-            return sb.toString();
-        } else {                     // no $
-            return s;
-        }
-    }
-
-    /**
-     * Adds an import line to the String.
-     */
-    public static void addImport(String s, Class theClass) {
-        if (!theClass.isPrimitive() && (theClass != Object.class)) {
-            String className = removeNestedClassName(theClass.getName());
-            String importLine = new String("import " + className + ";\n");
-            if (importLines.indexOf(importLine) == -1) {
-                importLines += importLine;
-            }
-        }
-    }
-
-    /**
-     * Spits out the class header information.
-     */
-    public static void addHeader(StringBuffer s, String className) {
-        s.append("/**\n");
-        s.append(" * An auxiliary UI for <code>" + className + "</code>s.\n");
-        s.append(" * \n");
-        s.append(" * <p>This file was automatically generated by TestALFGenerator.\n");
-        s.append(" *\n");
-        s.append(" * @author  Otto Multey\n");                  // Get it?  I crack myself up.
-        s.append(" */\n");
-        s.append("public class " + classPrefix + className + " extends " + className + " {\n");
-        s.append("\n");
-    }
-
-    /**
-     * Prints out the code for a method.
-     */
-    public static void addMethod(StringBuffer s, Method m, String origName, String className) {
-
-        // Get the method name and the return type.  Be a little careful about arrays.
-        //
-        String methodName = unqualifyName(m.getName());
-        String returnType;
-
-        if (!m.getReturnType().isArray()) {
-            returnType = unqualifyName(m.getReturnType().toString());
-            addImport(importLines,m.getReturnType());
-        } else {
-            returnType = unqualifyName(m.getReturnType().getComponentType().toString())
-                         + "[]";
-            addImport(importLines,m.getReturnType().getComponentType());
-        }
-
-        // Print the javadoc
-        //
-        s.append("\n");
-
-        if (methodName.equals("createUI")) {
-            s.append("    /**\n");
-            s.append("     * Returns a UI object for this component.\n");
-            s.append("     */\n");
-        } else {
-            s.append("    /**\n");
-            s.append("     * Prints a message saying this method has been invoked.\n");
-            s.append("     */\n");
-        }
-
-        // Print the method signature
-        //
-        s.append("    public");
-        if (Modifier.isStatic(m.getModifiers())) {
-            s.append(" static");
-        }
-        s.append(" " + returnType);
-        s.append(" " + methodName);
-        s.append("(");
-
-        Class[] params = m.getParameterTypes();
-        Class temp;
-        String braces;
-        for (int i = 0; i < params.length; i++) {
-            if (i > 0) {
-                s.append(", ");
-            }
-            temp = params[i];
-            braces = new String("");
-            while (temp.isArray()) {
-                braces += "[]";
-                temp = temp.getComponentType();
-            }
-            s.append(unqualifyName(temp.getName()) + braces + " " + paramNames[i]);
-            addImport(importLines,temp);
-        }
-        s.append(")");
-
-        // Don't forget about exceptions
-        //
-        Class exceptions[] = m.getExceptionTypes();
-        String throwsString = new String("");
-
-        if (exceptions.length > 0) {
-            s.append("\n");
-            indent(s,12);
-            s.append("throws ");
-            for (int i = 0; i < exceptions.length; i++) {
-                if (i > 0) {
-                    s.append(", ");
-                }
-                s.append(unqualifyName(exceptions[i].getName()));
-                addImport(importLines,exceptions[i]);
-            }
-        }
-        s.append(throwsString + " {\n");
-
-        // Now print out the contents of the method.
-        indent(s,8);
-        s.append("System.out.println(\"In the " + methodName
-                                    + " method of the "
-                                    + classPrefix + origName + " class.\");\n");
-        if (methodName.equals("createUI")) {
-            indent(s,8);
-            s.append("return ui;\n");
-        } else {
-            // If we have to return something, do so.
-            if (!returnType.equals("void")) {
-                Class rType = m.getReturnType();
-                indent(s,8);
-                if (!rType.isPrimitive()) {
-                    s.append("return null;\n");
-                } else if (rType == Boolean.TYPE) {
-                    s.append("return false;\n");
-                } else if (rType == Character.TYPE) {
-                    s.append("return '0';\n");
-                } else {  // byte, short, int, long, float, or double
-                    s.append("return 0;\n");
-                }
-            }
-        }
-
-        indent(s,4);
-        s.append("}\n");
-    }
-
-    /**
-     * Takes a plaf class name (e.g., "MenuUI") and generates the corresponding
-     * TestALF UI Java source code (e.g., "TestALFMenuUI.java").
-     */
-    public static void generateFile(String prefixName, String className) {
-        try {
-            FileOutputStream fos;
-            PrintWriter outFile;
-
-            importLines = new String();
-            importLines += new String("import java.util.Vector;\n");
-
-            StringBuffer body = new StringBuffer();
-            Class wee = Class.forName(prefixName + ".swing.plaf." + className);
-            String weeName = unqualifyName(wee.getName());
-            String thisClassName = classPrefix + className;
-            addImport(importLines,wee);
-
-            // Declare and initialize the shared UI object.
-            body.append("\n");
-            body.append("////////////////////\n");
-            body.append("// Shared UI object\n");
-            body.append("////////////////////\n");
-            body.append("private final static " + thisClassName
-                        + " ui = new " + thisClassName + "();\n");
-
-            while (!weeName.equals("Object")) {
-                body.append("\n");
-                body.append("////////////////////\n");
-                body.append("// " + weeName + " methods\n");
-                body.append("////////////////////\n");
-                Method[] methods = wee.getDeclaredMethods();
-                for (int i=0; i < methods.length; i++) {
-                    if (Modifier.isPublic(methods[i].getModifiers())) {
-                        addMethod(body,methods[i],className,weeName);
-                    }
-                }
-                wee = wee.getSuperclass();
-                weeName = unqualifyName(wee.getName());
-                addImport(importLines,wee);
-            }
-
-            fos = new FileOutputStream(classPrefix + className + ".java");
-            outFile = new PrintWriter(fos);
-            StringBuffer outText = createPreamble(prefixName);
-            outText.append(importLines.toString() + "\n");
-            addHeader(outText,className);
-            outText.append(body.toString());
-            outText.append("}\n");
-            outFile.write(outText.toString());
-            outFile.flush();
-            outFile.close();
-        } catch (Exception e) {
-            System.err.println(e);
-        }
-    }
-
-    /**
-     * D'Oh!  Something bad happened.
-     */
-    public static void usage(String s) throws IOException {
-        System.err.println("Usage:  java TestALFGenerator <plafdir> [<packageName>]");
-        throw new IllegalArgumentException(s);
-    }
-
-    /**
-     * Takes the plaf directory name and generates the TestALF UI
-     * source code.
-     */
-    public static void main(String[] args) throws IOException {
-
-        if (args.length < 1) {
-            usage("");
-        }
-
-        String dirName = args[0];
-        File dir = new File(dirName);
-        if (!dir.isDirectory()) {
-            System.err.println("No such directory:  " + dirName);
-            usage("");
-        }
-
-        if (args.length > 1) {
-            packageName = args[1];
-        }
-
-        String plafUIs[] = dir.list(new UIJavaFilter());
-        for (int i = 0; i < plafUIs.length; i++) {
-            generateFile("javax",stripExtension(plafUIs[i]));
-        }
-    }
-}
-
-/**
- * Only accepts file names of the form *UI.java.  The one exception
- * is not accepting ComponentUI.java because we don't need to generate
- * a TestALF class for it.
- */
-class UIJavaFilter implements FilenameFilter {
-    public boolean accept(File dir, String name) {
-        if (name.equals("ComponentUI.java")) {
-            return false;
-        } else if (name.endsWith("UI.java")) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-}
--- a/jdk/make/tools/src/build/tools/automulti/TestALFLookAndFeel.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-//package com.myco.myalaf;  //search for myalaf for other refs to package name
-
-
-package build.tools.automulti;
-
-import java.util.Vector;
-import java.lang.reflect.Method;
-import javax.swing.*;
-import javax.swing.plaf.*;
-
-/**
- * <p>An auxiliary look and feel used for testing the Multiplexing
- * look and feel.
- * <p>
- *
- * @see UIManager#addAuxiliaryLookAndFeel
- * @see javax.swing.plaf.multi
- *
- * @author Kathy Walrath
- * @author Will Walker
- */
-public class TestALFLookAndFeel extends LookAndFeel {
-
-//////////////////////////////
-// LookAndFeel methods
-//////////////////////////////
-
-    /**
-     * Returns a string, suitable for use in menus,
-     * that identifies this look and feel.
-     *
-     * @return a string such as "Test Auxiliary Look and Feel"
-     */
-    public String getName() {
-        return "Test Auxiliary Look and Feel";
-    }
-
-    /**
-     * Returns a string, suitable for use by applications/services,
-     * that identifies this look and feel.
-     *
-     * @return "TestALF"
-     */
-    public String getID() {
-        return "TestALF";
-    }
-
-    /**
-     * Returns a one-line description of this look and feel.
-     *
-     * @return a descriptive string such as "Allows multiple UI instances per component instance"
-     */
-    public String getDescription() {
-        return "Allows multiple UI instances per component instance";
-    }
-
-    /**
-     * Returns <code>false</code>;
-     * this look and feel is not native to any platform.
-     *
-     * @return <code>false</code>
-     */
-    public boolean isNativeLookAndFeel() {
-        return false;
-    }
-
-    /**
-     * Returns <code>true</code>;
-     * every platform permits this look and feel.
-     *
-     * @return <code>true</code>
-     */
-    public boolean isSupportedLookAndFeel() {
-        return true;
-    }
-
-    /**
-     * Creates, initializes, and returns
-     * the look and feel specific defaults.
-     * For this look and feel,
-     * the defaults consist solely of
-     * mappings of UI class IDs
-     * (such as "ButtonUI")
-     * to <code>ComponentUI</code> class names
-     * (such as "com.myco.myalaf.MultiButtonUI").
-     *
-     * @return an initialized <code>UIDefaults</code> object
-     * @see javax.swing.JComponent#getUIClassID
-     */
-    public UIDefaults getDefaults() {
-        System.out.println("In the TestALFLookAndFeel getDefaults method.");
-        UIDefaults table = new TestALFUIDefaults();
-        //String prefix = "com.myco.myalaf.TestALF";
-        String prefix = "TestALF";
-        Object[] uiDefaults = {
-                   "ButtonUI", prefix + "ButtonUI",
-         "CheckBoxMenuItemUI", prefix + "MenuItemUI",
-                 "CheckBoxUI", prefix + "ButtonUI",
-             "ColorChooserUI", prefix + "ColorChooserUI",
-                 "ComboBoxUI", prefix + "ComboBoxUI",
-              "DesktopIconUI", prefix + "DesktopIconUI",
-              "DesktopPaneUI", prefix + "DesktopPaneUI",
-               "EditorPaneUI", prefix + "TextUI",
-              "FileChooserUI", prefix + "FileChooserUI",
-       "FormattedTextFieldUI", prefix + "TextUI",
-            "InternalFrameUI", prefix + "InternalFrameUI",
-                    "LabelUI", prefix + "LabelUI",
-                     "ListUI", prefix + "ListUI",
-                  "MenuBarUI", prefix + "MenuBarUI",
-                 "MenuItemUI", prefix + "MenuItemUI",
-                     "MenuUI", prefix + "MenuItemUI",
-               "OptionPaneUI", prefix + "OptionPaneUI",
-                    "PanelUI", prefix + "PanelUI",
-            "PasswordFieldUI", prefix + "TextUI",
-       "PopupMenuSeparatorUI", prefix + "SeparatorUI",
-                "PopupMenuUI", prefix + "PopupMenuUI",
-              "ProgressBarUI", prefix + "ProgressBarUI",
-      "RadioButtonMenuItemUI", prefix + "MenuItemUI",
-              "RadioButtonUI", prefix + "ButtonUI",
-                 "RootPaneUI", prefix + "RootPaneUI",
-                "ScrollBarUI", prefix + "ScrollBarUI",
-               "ScrollPaneUI", prefix + "ScrollPaneUI",
-                "SeparatorUI", prefix + "SeparatorUI",
-                   "SliderUI", prefix + "SliderUI",
-                  "SpinnerUI", prefix + "SpinnerUI",
-                "SplitPaneUI", prefix + "SplitPaneUI",
-               "TabbedPaneUI", prefix + "TabbedPaneUI",
-              "TableHeaderUI", prefix + "TableHeaderUI",
-                    "TableUI", prefix + "TableUI",
-                 "TextAreaUI", prefix + "TextUI",
-                "TextFieldUI", prefix + "TextUI",
-                 "TextPaneUI", prefix + "TextUI",
-             "ToggleButtonUI", prefix + "ButtonUI",
-         "ToolBarSeparatorUI", prefix + "SeparatorUI",
-                  "ToolBarUI", prefix + "ToolBarUI",
-                  "ToolTipUI", prefix + "ToolTipUI",
-                     "TreeUI", prefix + "TreeUI",
-                 "ViewportUI", prefix + "ViewportUI",
-        };
-
-        table.putDefaults(uiDefaults);
-        return table;
-    }
-
-}
-
-/**
- * We want the Test auxiliary look and feel to be quiet and fallback
- * gracefully if it cannot find a UI.  This class overrides the
- * getUIError method of UIDefaults, which is the method that
- * emits error messages when it cannot find a UI class in the
- * LAF.
- */
-class TestALFUIDefaults extends UIDefaults {
-    protected void getUIError(String msg) {
-        System.err.println("Test auxiliary L&F:  " + msg);
-    }
-}
--- a/jdk/src/share/bin/emessages.h	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/bin/emessages.h	Wed Jul 05 16:42:37 2017 +0200
@@ -50,11 +50,6 @@
 #define JAR_ERROR2      "Error: Unable to access jarfile %s"
 #define JAR_ERROR3      "Error: Invalid or corrupt jarfile %s"
 
-#define CLS_ERROR1      "Error: Could not find the main class %s.\n" JNI_ERROR
-#define CLS_ERROR2      "Error: Failed to load Main Class: %s\n%s"
-#define CLS_ERROR3      "Error: No main method found in specified class.\n" GEN_ERROR
-#define CLS_ERROR4      "Error: Main method not public\n" GEN_ERROR
-
 #define CFG_WARN1       "Warning: %s VM not supported; %s VM will be used"
 #define CFG_WARN2       "Warning: No leading - on line %d of `%s'"
 #define CFG_WARN3       "Warning: Missing VM type on line %d of `%s'"
--- a/jdk/src/share/bin/java.c	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/bin/java.c	Wed Jul 05 16:42:37 2017 +0200
@@ -102,8 +102,7 @@
                               InvocationFunctions *ifn);
 static jstring NewPlatformString(JNIEnv *env, char *s);
 static jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
-static jclass LoadClass(JNIEnv *env, char *name);
-static jstring GetMainClassName(JNIEnv *env, char *jarname);
+static jclass LoadMainClass(JNIEnv *env, jboolean isJar, char *name);
 
 static void TranslateApplicationArgs(int jargc, const char **jargv, int *pargc, char ***pargv);
 static jboolean AddApplicationOptions(int cpathc, const char **cpathv);
@@ -301,6 +300,22 @@
 
 }
 
+#define CHECK_EXCEPTION_NULL_LEAVE(e) \
+    if ((*env)->ExceptionOccurred(env)) { \
+        JLI_ReportExceptionDescription(env); \
+        goto leave; \
+    } \
+    if ((e) == NULL) { \
+        JLI_ReportErrorMessage(JNI_ERROR); \
+        goto leave; \
+    }
+
+#define CHECK_EXCEPTION_LEAVE(rv) \
+    if ((*env)->ExceptionOccurred(env)) { \
+        JLI_ReportExceptionDescription(env); \
+        ret = (rv); \
+        goto leave; \
+    }
 
 int JNICALL
 JavaMain(void * _args)
@@ -321,9 +336,7 @@
     int ret = 0;
     jlong start, end;
 
-
     /* Initialize the virtual machine */
-
     start = CounterGet();
     if (!InitializeJVM(&vm, &env, &ifn)) {
         JLI_ReportErrorMessage(JVM_ERROR1);
@@ -332,11 +345,7 @@
 
     if (printVersion || showVersion) {
         PrintJavaVersion(env, showVersion);
-        if ((*env)->ExceptionOccurred(env)) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            goto leave;
-        }
+        CHECK_EXCEPTION_LEAVE(0);
         if (printVersion) {
             ret = 0;
             goto leave;
@@ -346,11 +355,7 @@
     /* If the user specified neither a class name nor a JAR file */
     if (printXUsage || printUsage || (jarfile == 0 && classname == 0)) {
         PrintUsage(env, printXUsage);
-        if ((*env)->ExceptionOccurred(env)) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            ret=1;
-        }
+        CHECK_EXCEPTION_LEAVE(1);
         goto leave;
     }
 
@@ -395,99 +400,25 @@
      *          the environment (and remove these comments).
      */
     if (jarfile != 0) {
-        mainClassName = GetMainClassName(env, jarfile);
-        if ((*env)->ExceptionOccurred(env)) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            goto leave;
-        }
-        if (mainClassName == NULL) {
-          JLI_ReportErrorMessage(JAR_ERROR1,jarfile, GEN_ERROR);
-          goto leave;
-        }
-        classname = (char *)(*env)->GetStringUTFChars(env, mainClassName, 0);
-        if (classname == NULL) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            goto leave;
-        }
-        mainClass = LoadClass(env, classname);
-        if(mainClass == NULL) { /* exception occured */
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(CLS_ERROR1, classname);
-            goto leave;
-        }
-        (*env)->ReleaseStringUTFChars(env, mainClassName, classname);
+        mainClass = LoadMainClass(env, JNI_TRUE, jarfile);
     } else {
-      mainClassName = NewPlatformString(env, classname);
-      if (mainClassName == NULL) {
-        JLI_ReportErrorMessage(CLS_ERROR2, classname, GEN_ERROR);
-        goto leave;
-      }
-      classname = (char *)(*env)->GetStringUTFChars(env, mainClassName, 0);
-      if (classname == NULL) {
-        JLI_ReportExceptionDescription(env);
-        JLI_ReportErrorMessage(JNI_ERROR);
-        goto leave;
-      }
-      mainClass = LoadClass(env, classname);
-      if(mainClass == NULL) { /* exception occured */
-        JLI_ReportExceptionDescription(env);
-        JLI_ReportErrorMessage(CLS_ERROR1, classname);
-        goto leave;
-      }
-      (*env)->ReleaseStringUTFChars(env, mainClassName, classname);
+        mainClass = LoadMainClass(env, JNI_FALSE, classname);
     }
+    CHECK_EXCEPTION_NULL_LEAVE(mainClass);
 
-    /* Get the application's main method */
+    /*
+     * The LoadMainClass not only loads the main class, it will also ensure
+     * that the main method's signature is correct, therefore further checking
+     * is not required. The main method is invoked here so that extraneous java
+     * stacks are not in the application stack trace.
+     */
     mainID = (*env)->GetStaticMethodID(env, mainClass, "main",
                                        "([Ljava/lang/String;)V");
-    if (mainID == NULL) {
-        if ((*env)->ExceptionOccurred(env)) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-        } else {
-          JLI_ReportErrorMessage(CLS_ERROR3);
-        }
-        goto leave;
-    }
-
-    {    /* Make sure the main method is public */
-        jint mods;
-        jmethodID mid;
-        jobject obj = (*env)->ToReflectedMethod(env, mainClass,
-                                                mainID, JNI_TRUE);
-
-        if( obj == NULL) { /* exception occurred */
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            goto leave;
-        }
-
-        mid =
-          (*env)->GetMethodID(env,
-                              (*env)->GetObjectClass(env, obj),
-                              "getModifiers", "()I");
-        if ((*env)->ExceptionOccurred(env)) {
-            JLI_ReportExceptionDescription(env);
-            JLI_ReportErrorMessage(JNI_ERROR);
-            goto leave;
-        }
-
-        mods = (*env)->CallIntMethod(env, obj, mid);
-        if ((mods & 1) == 0) { /* if (!Modifier.isPublic(mods)) ... */
-            JLI_ReportErrorMessage(CLS_ERROR4);
-            goto leave;
-        }
-    }
+    CHECK_EXCEPTION_NULL_LEAVE(mainID);
 
     /* Build argument array */
     mainArgs = NewPlatformStringArray(env, argv, argc);
-    if (mainArgs == NULL) {
-        JLI_ReportExceptionDescription(env);
-        JLI_ReportErrorMessage(JNI_ERROR);
-        goto leave;
-    }
+    CHECK_EXCEPTION_NULL_LEAVE(mainArgs);
 
     /* Invoke main method. */
     (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
@@ -498,8 +429,9 @@
      */
     ret = (*env)->ExceptionOccurred(env) == NULL ? 0 : 1;
 
+leave:
     /*
-     * Detach the main thread so that it appears to have ended when
+     * Always detach the main thread so that it appears to have ended when
      * the application's main method exits.  This will invoke the
      * uncaught exception handler machinery if main threw an
      * exception.  An uncaught exception handler cannot change the
@@ -508,10 +440,7 @@
     if ((*vm)->DetachCurrentThread(vm) != 0) {
         JLI_ReportErrorMessage(JVM_ERROR2);
         ret = 1;
-        goto leave;
     }
-
- leave:
     /*
      * Wait for all non-daemon threads to end, then destroy the VM.
      * This will actually create a trivial new Java waiter thread
@@ -525,7 +454,6 @@
     return ret;
 }
 
-
 /*
  * Checks the command line options to find which JVM type was
  * specified.  If no command line option was given for the JVM type,
@@ -1159,7 +1087,7 @@
         if (propname) {
             jclass cls;
             jmethodID mid;
-            NULL_CHECK0 (cls = (*env)->FindClass(env, "java/lang/System"));
+            NULL_CHECK0 (cls = FindBootStrapClass(env, "java/lang/System"));
             NULL_CHECK0 (mid = (*env)->GetStaticMethodID(
                                    env, cls,
                                    "getProperty",
@@ -1174,7 +1102,7 @@
 static jboolean isEncodingSupported(JNIEnv *env, jstring enc) {
     jclass cls;
     jmethodID mid;
-    NULL_CHECK0 (cls = (*env)->FindClass(env, "java/nio/charset/Charset"));
+    NULL_CHECK0 (cls = FindBootStrapClass(env, "java/nio/charset/Charset"));
     NULL_CHECK0 (mid = (*env)->GetStaticMethodID(
                            env, cls,
                            "isSupported",
@@ -1203,8 +1131,8 @@
         jstring str = 0;
         (*env)->SetByteArrayRegion(env, ary, 0, len, (jbyte *)s);
         if (!(*env)->ExceptionOccurred(env)) {
+            NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
             if (isEncodingSupported(env, enc) == JNI_TRUE) {
-                NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String"));
                 NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>",
                                           "([BLjava/lang/String;)V"));
                 str = (*env)->NewObject(env, cls, mid, ary, enc);
@@ -1215,7 +1143,6 @@
                   the encoding name, in which the StringCoding class will
                   pickup the iso-8859-1 as the fallback converter for us.
                 */
-                NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String"));
                 NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>",
                                           "([B)V"));
                 str = (*env)->NewObject(env, cls, mid, ary);
@@ -1238,7 +1165,7 @@
     jarray ary;
     int i;
 
-    NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String"));
+    NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
     NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
     for (i = 0; i < strc; i++) {
         jstring str = NewPlatformString(env, *strv++);
@@ -1250,25 +1177,26 @@
 }
 
 /*
- * Loads a class, convert the '.' to '/'.
+ * Loads a class and verifies that the main class is present and it is ok to
+ * call it for more details refer to the java implementation.
  */
 static jclass
-LoadClass(JNIEnv *env, char *name)
+LoadMainClass(JNIEnv *env, jboolean isJar, char *name)
 {
-    char *buf = JLI_MemAlloc(JLI_StrLen(name) + 1);
-    char *s = buf, *t = name, c;
     jclass cls;
+    jmethodID mid;
+    jstring str;
+    jobject result;
     jlong start, end;
 
-    if (JLI_IsTraceLauncher())
+    if (JLI_IsTraceLauncher()) {
         start = CounterGet();
-
-    do {
-        c = *t++;
-        *s++ = (c == '.') ? '/' : c;
-    } while (c != '\0');
-    cls = (*env)->FindClass(env, buf);
-    JLI_MemFree(buf);
+    }
+    NULL_CHECK0(cls = FindBootStrapClass(env, "sun/launcher/LauncherHelper"));
+    NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls, "checkAndLoadMain",
+                                          "(ZZLjava/lang/String;)Ljava/lang/Object;"));
+    str = (*env)->NewStringUTF(env, name);
+    result = (*env)->CallStaticObjectMethod(env, cls, mid, JNI_TRUE, isJar, str);
 
     if (JLI_IsTraceLauncher()) {
         end   = CounterGet();
@@ -1277,49 +1205,9 @@
         printf("----_JAVA_LAUNCHER_DEBUG----\n");
     }
 
-    return cls;
+    return (jclass)result;
 }
 
-
-/*
- * Returns the main class name for the specified jar file.
- */
-static jstring
-GetMainClassName(JNIEnv *env, char *jarname)
-{
-#define MAIN_CLASS "Main-Class"
-    jclass cls;
-    jmethodID mid;
-    jobject jar, man, attr;
-    jstring str, result = 0;
-
-    NULL_CHECK0(cls = (*env)->FindClass(env, "java/util/jar/JarFile"));
-    NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>",
-                                          "(Ljava/lang/String;)V"));
-    NULL_CHECK0(str = NewPlatformString(env, jarname));
-    NULL_CHECK0(jar = (*env)->NewObject(env, cls, mid, str));
-    NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "getManifest",
-                                          "()Ljava/util/jar/Manifest;"));
-    man = (*env)->CallObjectMethod(env, jar, mid);
-    if (man != 0) {
-        NULL_CHECK0(mid = (*env)->GetMethodID(env,
-                                    (*env)->GetObjectClass(env, man),
-                                    "getMainAttributes",
-                                    "()Ljava/util/jar/Attributes;"));
-        attr = (*env)->CallObjectMethod(env, man, mid);
-        if (attr != 0) {
-            NULL_CHECK0(mid = (*env)->GetMethodID(env,
-                                    (*env)->GetObjectClass(env, attr),
-                                    "getValue",
-                                    "(Ljava/lang/String;)Ljava/lang/String;"));
-            NULL_CHECK0(str = NewPlatformString(env, MAIN_CLASS));
-            result = (*env)->CallObjectMethod(env, attr, mid, str);
-        }
-    }
-    return result;
-}
-
-
 /*
  * For tools, convert command line args thus:
  *   javac -cp foo:foo/"*" -J-ms32m ...
@@ -1522,7 +1410,7 @@
     jclass ver;
     jmethodID print;
 
-    NULL_CHECK(ver = (*env)->FindClass(env, "sun/misc/Version"));
+    NULL_CHECK(ver = FindBootStrapClass(env, "sun/misc/Version"));
     NULL_CHECK(print = (*env)->GetStaticMethodID(env,
                                                  ver,
                                                  (extraLF == JNI_TRUE) ? "println" : "print",
@@ -1534,7 +1422,7 @@
 }
 
 /*
- * Prints default usage or the Xusage message, see sun.launcher.LauncherHelp.java
+ * Prints default usage or the Xusage message, see sun.launcher.LauncherHelper.java
  */
 static void
 PrintUsage(JNIEnv* env, jboolean doXUsage)
@@ -1544,7 +1432,7 @@
   jstring jprogname, vm1, vm2;
   int i;
 
-  NULL_CHECK(cls = (*env)->FindClass(env, "sun/launcher/LauncherHelp"));
+  NULL_CHECK(cls = FindBootStrapClass(env, "sun/launcher/LauncherHelper"));
 
 
   if (doXUsage) {
--- a/jdk/src/share/bin/java.h	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/bin/java.h	Wed Jul 05 16:42:37 2017 +0200
@@ -180,4 +180,16 @@
  */
 void InitLauncher(jboolean javaw);
 
+/*
+ * This allows for finding classes from the VM's bootstrap class loader directly,
+ * FindClass uses the application class loader internally, this will cause
+ * unnecessary searching of the classpath for the required classes.
+ *
+ */
+typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
+                                                const char *name,
+                                                jboolean init,
+                                                jobject loader,
+                                                jboolean throwError));
+jclass FindBootStrapClass(JNIEnv *env, const char *classname);
 #endif /* _JAVA_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/beans/WeakCache.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.beans;
+
+import java.lang.ref.Reference;
+import java.lang.ref.WeakReference;
+
+import java.util.Map;
+import java.util.WeakHashMap;
+
+/**
+ * A hashtable-based cache with weak keys and weak values.
+ * An entry in the map will be automatically removed
+ * when its key is no longer in the ordinary use.
+ * A value will be automatically removed as well
+ * when it is no longer in the ordinary use.
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public final class WeakCache<K, V> {
+    private final Map<K, Reference<V>> map = new WeakHashMap<K, Reference<V>>();
+
+    /**
+     * Returns a value to which the specified {@code key} is mapped,
+     * or {@code null} if this map contains no mapping for the {@code key}.
+     *
+     * @param key  the key whose associated value is returned
+     * @return a value to which the specified {@code key} is mapped
+     */
+    public V get(K key) {
+        Reference<V> reference = this.map.get(key);
+        if (reference == null) {
+            return null;
+        }
+        V value = reference.get();
+        if (value == null) {
+            this.map.remove(key);
+        }
+        return value;
+    }
+
+    /**
+     * Associates the specified {@code value} with the specified {@code key}.
+     * Removes the mapping for the specified {@code key} from this cache
+     * if it is present and the specified {@code value} is {@code null}.
+     * If the cache previously contained a mapping for the {@code key},
+     * the old value is replaced by the specified {@code value}.
+     *
+     * @param key    the key with which the specified value is associated
+     * @param value  the value to be associated with the specified key
+     */
+    public void put(K key, V value) {
+        if (value != null) {
+            this.map.put(key, new WeakReference<V>(value));
+        }
+        else {
+            this.map.remove(key);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/java/swing/SwingUtilities3.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2002-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.java.swing;
+
+import sun.awt.EventQueueDelegate;
+import sun.awt.AppContext;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.awt.AWTEvent;
+import java.awt.EventQueue;
+import java.awt.Component;
+import javax.swing.JComponent;
+import javax.swing.RepaintManager;
+
+/**
+ * A collection of utility methods for Swing.
+ * <p>
+ * <b>WARNING:</b> While this class is public, it should not be treated as
+ * public API and its API may change in incompatable ways between dot dot
+ * releases and even patch releases. You should not rely on this class even
+ * existing.
+ *
+ * This is a second part of sun.swing.SwingUtilities2. It is required
+ * to provide services for JavaFX applets.
+ *
+ */
+public class SwingUtilities3 {
+    /**
+     * The {@code clientProperty} key for delegate {@code RepaintManager}
+     */
+    private static final Object DELEGATE_REPAINT_MANAGER_KEY =
+        new StringBuilder("DelegateRepaintManagerKey");
+
+    /**
+      * Registers delegate RepaintManager for {@code JComponent}.
+      */
+    public static void setDelegateRepaintManager(JComponent component,
+                                                RepaintManager repaintManager) {
+        /* setting up flag in AppContext to speed up lookups in case
+         * there are no delegate RepaintManagers used.
+         */
+        AppContext.getAppContext().put(DELEGATE_REPAINT_MANAGER_KEY,
+                                       Boolean.TRUE);
+
+        component.putClientProperty(DELEGATE_REPAINT_MANAGER_KEY,
+                                    repaintManager);
+    }
+
+    /**
+     * Returns delegate {@code RepaintManager} for {@code component} hierarchy.
+     */
+    public static RepaintManager getDelegateRepaintManager(Component
+                                                            component) {
+        RepaintManager delegate = null;
+        if (Boolean.TRUE == AppContext.getAppContext().get(
+                                               DELEGATE_REPAINT_MANAGER_KEY)) {
+            while (delegate == null && component != null) {
+                while (component != null
+                         && ! (component instanceof JComponent)) {
+                    component = component.getParent();
+                }
+                if (component != null) {
+                    delegate = (RepaintManager)
+                        ((JComponent) component)
+                          .getClientProperty(DELEGATE_REPAINT_MANAGER_KEY);
+                    component = component.getParent();
+                }
+
+            }
+        }
+        return delegate;
+    }
+
+    /*
+     * We use maps to avoid reflection. Hopefully it should perform better
+     * this way.
+     */
+    public static void setEventQueueDelegate(
+            Map<String, Map<String, Object>> map) {
+        EventQueueDelegate.setDelegate(new EventQueueDelegateFromMap(map));
+    }
+
+    private static class EventQueueDelegateFromMap
+    implements EventQueueDelegate.Delegate {
+        private final AWTEvent[] afterDispatchEventArgument;
+        private final Object[] afterDispatchHandleArgument;
+        private final Callable<Void> afterDispatchCallable;
+
+        private final AWTEvent[] beforeDispatchEventArgument;
+        private final Callable<Object> beforeDispatchCallable;
+
+        private final EventQueue[] getNextEventEventQueueArgument;
+        private final Callable<AWTEvent> getNextEventCallable;
+
+        @SuppressWarnings("unchecked")
+        public EventQueueDelegateFromMap(Map<String, Map<String, Object>> objectMap) {
+            Map<String, Object> methodMap = objectMap.get("afterDispatch");
+            afterDispatchEventArgument = (AWTEvent[]) methodMap.get("event");
+            afterDispatchHandleArgument = (Object[]) methodMap.get("handle");
+            afterDispatchCallable = (Callable<Void>) methodMap.get("method");
+
+            methodMap = objectMap.get("beforeDispatch");
+            beforeDispatchEventArgument = (AWTEvent[]) methodMap.get("event");
+            beforeDispatchCallable = (Callable<Object>) methodMap.get("method");
+
+            methodMap = objectMap.get("getNextEvent");
+            getNextEventEventQueueArgument =
+                (EventQueue[]) methodMap.get("eventQueue");
+            getNextEventCallable = (Callable<AWTEvent>) methodMap.get("method");
+        }
+
+        @Override
+        public void afterDispatch(AWTEvent event, Object handle) throws InterruptedException {
+            afterDispatchEventArgument[0] = event;
+            afterDispatchHandleArgument[0] = handle;
+            try {
+                afterDispatchCallable.call();
+            } catch (InterruptedException e) {
+                throw e;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        @Override
+        public Object beforeDispatch(AWTEvent event) throws InterruptedException {
+            beforeDispatchEventArgument[0] = event;
+            try {
+                return beforeDispatchCallable.call();
+            } catch (InterruptedException e) {
+                throw e;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        @Override
+        public AWTEvent getNextEvent(EventQueue eventQueue) throws InterruptedException {
+            getNextEventEventQueueArgument[0] = eventQueue;
+            try {
+                return getNextEventCallable.call();
+            } catch (InterruptedException e) {
+                throw e;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
+}
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -442,7 +442,10 @@
         }
 
         if (updateModel) {
-            getColorSelectionModel().setSelectedColor(color);
+            ColorSelectionModel model = getColorSelectionModel();
+            if (model != null) {
+                model.setSelectedColor(color);
+            }
         }
 
         triangle.setColor(hue, saturation, brightness);
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java	Wed Jul 05 16:42:37 2017 +0200
@@ -770,33 +770,56 @@
             JComponent maximizeButton = findChild(titlePane, "InternalFrameTitlePane.maximizeButton");
             JComponent closeButton    = findChild(titlePane, "InternalFrameTitlePane.closeButton");
 
-            int buttonGap = 0;
-
             Insets button_border = (Insets)gm.get("button_border");
             Dimension buttonDim = calculateButtonSize(titlePane);
 
-            int x = getInt("left_titlebar_edge");
             int y = (button_border != null) ? button_border.top : 0;
+            if (titlePaneParent.getComponentOrientation().isLeftToRight()) {
+                int x = getInt("left_titlebar_edge");
 
-            menuButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                menuButton.setBounds(x, y, buttonDim.width, buttonDim.height);
 
-            x = w - buttonDim.width - getInt("right_titlebar_edge");
-            if (button_border != null) {
-                x -= button_border.right;
-            }
+                x = w - buttonDim.width - getInt("right_titlebar_edge");
+                if (button_border != null) {
+                    x -= button_border.right;
+                }
+
+                if (frame.isClosable()) {
+                    closeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                    x -= buttonDim.width;
+                }
+
+                if (frame.isMaximizable()) {
+                    maximizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                    x -= buttonDim.width;
+                }
 
-            if (frame.isClosable()) {
-                closeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
-                x -= (buttonDim.width + buttonGap);
-            }
+                if (frame.isIconifiable()) {
+                    minimizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                }
+            } else {
+                int x = w - buttonDim.width - getInt("right_titlebar_edge");
+
+                menuButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+
+                x = getInt("left_titlebar_edge");
+                if (button_border != null) {
+                    x += button_border.left;
+                }
 
-            if (frame.isMaximizable()) {
-                maximizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
-                x -= (buttonDim.width + buttonGap);
-            }
+                if (frame.isClosable()) {
+                    closeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                    x += buttonDim.width;
+                }
 
-            if (frame.isIconifiable()) {
-                minimizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                if (frame.isMaximizable()) {
+                    maximizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                    x += buttonDim.width;
+                }
+
+                if (frame.isIconifiable()) {
+                    minimizeButton.setBounds(x, y, buttonDim.width, buttonDim.height);
+                }
             }
         }
     } // end TitlePaneLayout
@@ -973,10 +996,8 @@
         String title = jif.getTitle();
         if (title != null) {
             FontMetrics fm = SwingUtilities2.getFontMetrics(jif, g);
-            if (jif.getComponentOrientation().isLeftToRight()) {
-                title = SwingUtilities2.clipStringIfNecessary(jif, fm, title,
-                             calculateTitleTextWidth(g, jif));
-            }
+            title = SwingUtilities2.clipStringIfNecessary(jif, fm, title,
+                         calculateTitleArea(jif).width);
             g.setColor(color);
             SwingUtilities2.drawString(jif, g, title, x, y + fm.getAscent());
         }
@@ -1010,9 +1031,10 @@
         JComponent titlePane = findChild(jif, "InternalFrame.northPane");
         Dimension buttonDim = calculateButtonSize(titlePane);
         Insets title_border = (Insets)frameGeometry.get("title_border");
-        Rectangle r = new Rectangle();
+        Insets button_border = (Insets)getFrameGeometry().get("button_border");
 
-        r.x = getInt("left_titlebar_edge") + buttonDim.width;
+        Rectangle r = new Rectangle();
+        r.x = getInt("left_titlebar_edge");
         r.y = 0;
         r.height = titlePane.getHeight();
         if (title_border != null) {
@@ -1021,15 +1043,36 @@
             r.height -= (title_border.top + title_border.bottom);
         }
 
-        r.width = titlePane.getWidth() - r.x - getInt("right_titlebar_edge");
-        if (jif.isClosable()) {
-            r.width -= buttonDim.width;
-        }
-        if (jif.isMaximizable()) {
-            r.width -= buttonDim.width;
-        }
-        if (jif.isIconifiable()) {
-            r.width -= buttonDim.width;
+        if (titlePane.getParent().getComponentOrientation().isLeftToRight()) {
+            r.x += buttonDim.width;
+            if (button_border != null) {
+                r.x += button_border.left;
+            }
+            r.width = titlePane.getWidth() - r.x - getInt("right_titlebar_edge");
+            if (jif.isClosable()) {
+                r.width -= buttonDim.width;
+            }
+            if (jif.isMaximizable()) {
+                r.width -= buttonDim.width;
+            }
+            if (jif.isIconifiable()) {
+                r.width -= buttonDim.width;
+            }
+        } else {
+            if (jif.isClosable()) {
+                r.x += buttonDim.width;
+            }
+            if (jif.isMaximizable()) {
+                r.x += buttonDim.width;
+            }
+            if (jif.isIconifiable()) {
+                r.x += buttonDim.width;
+            }
+            r.width = titlePane.getWidth() - r.x - getInt("right_titlebar_edge")
+                    - buttonDim.width;
+            if (button_border != null) {
+                r.x -= button_border.right;
+            }
         }
         if (title_border != null) {
             r.width -= title_border.right;
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/DesktopProperty.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/DesktopProperty.java	Wed Jul 05 16:42:37 2017 +0200
@@ -49,8 +49,7 @@
     /**
      * ReferenceQueue of unreferenced WeakPCLs.
      */
-    private static ReferenceQueue queue;
-
+    private static ReferenceQueue<DesktopProperty> queue;
 
     /**
      * PropertyChangeListener attached to the Toolkit.
@@ -76,7 +75,7 @@
 
 
     static {
-        queue = new ReferenceQueue();
+        queue = new ReferenceQueue<DesktopProperty>();
     }
 
     /**
@@ -117,8 +116,8 @@
             XPStyle.invalidateStyle();
         }
         Frame appFrames[] = Frame.getFrames();
-        for (int j=0; j < appFrames.length; j++) {
-            updateWindowUI(appFrames[j]);
+        for (Frame appFrame : appFrames) {
+            updateWindowUI(appFrame);
         }
     }
 
@@ -128,8 +127,8 @@
     private static void updateWindowUI(Window window) {
         SwingUtilities.updateComponentTreeUI(window);
         Window ownedWins[] = window.getOwnedWindows();
-        for (int i=0; i < ownedWins.length; i++) {
-            updateWindowUI(ownedWins[i]);
+        for (Window ownedWin : ownedWins) {
+            updateWindowUI(ownedWin);
         }
     }
 
@@ -270,13 +269,13 @@
      * is handled via a WeakReference so as not to pin down the
      * DesktopProperty.
      */
-    private static class WeakPCL extends WeakReference
+    private static class WeakPCL extends WeakReference<DesktopProperty>
                                implements PropertyChangeListener {
         private Toolkit kit;
         private String key;
         private LookAndFeel laf;
 
-        WeakPCL(Object target, Toolkit kit, String key, LookAndFeel laf) {
+        WeakPCL(DesktopProperty target, Toolkit kit, String key, LookAndFeel laf) {
             super(target, queue);
             this.kit = kit;
             this.key = key;
@@ -284,7 +283,7 @@
         }
 
         public void propertyChange(PropertyChangeEvent pce) {
-            DesktopProperty property = (DesktopProperty)get();
+            DesktopProperty property = get();
 
             if (property == null || laf != UIManager.getLookAndFeel()) {
                 // The property was GC'ed, we're no longer interested in
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -96,7 +96,7 @@
             }
         } catch (PropertyVetoException e) {}
         if (f != currentFrame) {
-            currentFrameRef = new WeakReference(f);
+            currentFrameRef = new WeakReference<JInternalFrame>(f);
         }
     }
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -983,7 +983,7 @@
                 } else if (s.equals("componentOrientation")) {
                     ComponentOrientation o = (ComponentOrientation)e.getNewValue();
                     JFileChooser cc = (JFileChooser)e.getSource();
-                    if (o != (ComponentOrientation)e.getOldValue()) {
+                    if (o != e.getOldValue()) {
                         cc.applyComponentOrientation(o);
                     }
                 } else if (s.equals("ancestor")) {
@@ -1123,7 +1123,7 @@
      * Data model for a type-face selection combo-box.
      */
     protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
-        Vector directories = new Vector();
+        Vector<File> directories = new Vector<File>();
         int[] depths = null;
         File selectedDirectory = null;
         JFileChooser chooser = getFileChooser();
@@ -1162,7 +1162,7 @@
             // Get the canonical (full) path. This has the side
             // benefit of removing extraneous chars from the path,
             // for example /foo/bar/ becomes /foo/bar
-            File canonical = null;
+            File canonical;
             try {
                 canonical = directory.getCanonicalFile();
             } catch (IOException e) {
@@ -1175,7 +1175,7 @@
                 File sf = useShellFolder ? ShellFolder.getShellFolder(canonical)
                                          : canonical;
                 File f = sf;
-                Vector path = new Vector(10);
+                Vector<File> path = new Vector<File>(10);
                 do {
                     path.addElement(f);
                 } while ((f = f.getParentFile()) != null);
@@ -1183,7 +1183,7 @@
                 int pathCount = path.size();
                 // Insert chain at appropriate place in vector
                 for (int i = 0; i < pathCount; i++) {
-                    f = (File)path.get(i);
+                    f = path.get(i);
                     if (directories.contains(f)) {
                         int topIndex = directories.indexOf(f);
                         for (int j = i-1; j >= 0; j--) {
@@ -1202,12 +1202,12 @@
         private void calculateDepths() {
             depths = new int[directories.size()];
             for (int i = 0; i < depths.length; i++) {
-                File dir = (File)directories.get(i);
+                File dir = directories.get(i);
                 File parent = dir.getParentFile();
                 depths[i] = 0;
                 if (parent != null) {
                     for (int j = i-1; j >= 0; j--) {
-                        if (parent.equals((File)directories.get(j))) {
+                        if (parent.equals(directories.get(j))) {
                             depths[i] = depths[j] + 1;
                             break;
                         }
@@ -1306,8 +1306,8 @@
             FileFilter currentFilter = getFileChooser().getFileFilter();
             boolean found = false;
             if(currentFilter != null) {
-                for(int i=0; i < filters.length; i++) {
-                    if(filters[i] == currentFilter) {
+                for (FileFilter filter : filters) {
+                    if (filter == currentFilter) {
                         found = true;
                     }
                 }
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -137,25 +137,46 @@
             int baseline = (getHeight() + fm.getAscent() - fm.getLeading() -
                     fm.getDescent()) / 2;
 
-            int titleX;
-            Rectangle r = new Rectangle(0, 0, 0, 0);
-            if (frame.isIconifiable())  r = iconButton.getBounds();
-            else if (frame.isMaximizable())  r = maxButton.getBounds();
-            else if (frame.isClosable())  r = closeButton.getBounds();
-            int titleW;
+            Rectangle lastIconBounds = new Rectangle(0, 0, 0, 0);
+            if (frame.isIconifiable()) {
+                lastIconBounds = iconButton.getBounds();
+            } else if (frame.isMaximizable()) {
+                lastIconBounds = maxButton.getBounds();
+            } else if (frame.isClosable()) {
+                lastIconBounds = closeButton.getBounds();
+            }
 
-            if(WindowsGraphicsUtils.isLeftToRight(frame) ) {
-                if (r.x == 0)  r.x = frame.getWidth()-frame.getInsets().right;
-                    titleX = systemLabel.getX() + systemLabel.getWidth() + 2;
-                    if (xp != null) {
-                        titleX += 2;
-                    }
-                    titleW = r.x - titleX - 3;
-                    title = getTitle(frame.getTitle(), fm, titleW);
+            int titleX;
+            int titleW;
+            int gap = 2;
+            if (WindowsGraphicsUtils.isLeftToRight(frame)) {
+                if (lastIconBounds.x == 0) { // There are no icons
+                    lastIconBounds.x = frame.getWidth() - frame.getInsets().right;
+                }
+                titleX = systemLabel.getX() + systemLabel.getWidth() + gap;
+                if (xp != null) {
+                    titleX += 2;
+                }
+                titleW = lastIconBounds.x - titleX - gap;
             } else {
-                titleX = systemLabel.getX() - 2
-                         - SwingUtilities2.stringWidth(frame,fm,title);
+                if (lastIconBounds.x == 0) { // There are no icons
+                    lastIconBounds.x = frame.getInsets().left;
+                }
+                titleW = SwingUtilities2.stringWidth(frame, fm, title);
+                int minTitleX = lastIconBounds.x + lastIconBounds.width + gap;
+                if (xp != null) {
+                    minTitleX += 2;
+                }
+                int availableWidth = systemLabel.getX() - gap - minTitleX;
+                if (availableWidth > titleW) {
+                    titleX = systemLabel.getX() - gap - titleW;
+                } else {
+                    titleX = minTitleX;
+                    titleW = availableWidth;
+                }
             }
+            title = getTitle(frame.getTitle(), fm, titleW);
+
             if (xp != null) {
                 String shadowType = null;
                 if (isSelected) {
@@ -258,8 +279,8 @@
                     g.fillRect(0, 0, w, h);
                 }
                 Icon icon = getIcon();
-                int iconWidth = 0;
-                int iconHeight = 0;
+                int iconWidth;
+                int iconHeight;
                 if (icon != null &&
                     (iconWidth = icon.getIconWidth()) > 0 &&
                     (iconHeight = icon.getIconHeight()) > 0) {
@@ -304,18 +325,18 @@
     }
 
     protected void addSystemMenuItems(JPopupMenu menu) {
-        JMenuItem mi = (JMenuItem)menu.add(restoreAction);
+        JMenuItem mi = menu.add(restoreAction);
         mi.setMnemonic('R');
-        mi = (JMenuItem)menu.add(moveAction);
+        mi = menu.add(moveAction);
         mi.setMnemonic('M');
-        mi = (JMenuItem)menu.add(sizeAction);
+        mi = menu.add(sizeAction);
         mi.setMnemonic('S');
-        mi = (JMenuItem)menu.add(iconifyAction);
+        mi = menu.add(iconifyAction);
         mi.setMnemonic('n');
-        mi = (JMenuItem)menu.add(maximizeAction);
+        mi = menu.add(maximizeAction);
         mi.setMnemonic('x');
         systemPopupMenu.add(new JSeparator());
-        mi = (JMenuItem)menu.add(closeAction);
+        mi = menu.add(closeAction);
         mi.setMnemonic('C');
     }
 
@@ -441,7 +462,7 @@
 
     public class WindowsPropertyChangeHandler extends PropertyChangeHandler {
         public void propertyChange(PropertyChangeEvent evt) {
-            String prop = (String)evt.getPropertyName();
+            String prop = evt.getPropertyName();
 
             // Update the internal frame icon for the system menu.
             if (JInternalFrame.FRAME_ICON_PROPERTY.equals(prop) &&
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -369,21 +369,21 @@
      */
     private static class Grid {
         private static final int BUFFER_SIZE = 64;
-        private static HashMap map;
+        private static HashMap<String, WeakReference<Grid>> map;
 
         private BufferedImage image;
 
         static {
-            map = new HashMap();
+            map = new HashMap<String, WeakReference<Grid>>();
         }
 
         public static Grid getGrid(Color fg, Color bg) {
             String key = fg.getRGB() + " " + bg.getRGB();
-            WeakReference ref = (WeakReference)map.get(key);
-            Grid grid = (ref == null) ? null : (Grid)ref.get();
+            WeakReference<Grid> ref = map.get(key);
+            Grid grid = (ref == null) ? null : ref.get();
             if (grid == null) {
                 grid = new Grid(fg, bg);
-                map.put(key, new WeakReference(grid));
+                map.put(key, new WeakReference<Grid>(grid));
             }
             return grid;
         }
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -53,13 +53,13 @@
      * Keys to use for forward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusForwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusForwardTraversalKeys;
 
     /**
      * Keys to use for backward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusBackwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusBackwardTraversalKeys;
 
     private boolean contentOpaque = true;
 
@@ -69,13 +69,13 @@
 
         // focus forward traversal key
         if (managingFocusForwardTraversalKeys==null) {
-            managingFocusForwardTraversalKeys = new HashSet();
+            managingFocusForwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusForwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
         }
         tabPane.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, managingFocusForwardTraversalKeys);
         // focus backward traversal key
         if (managingFocusBackwardTraversalKeys==null) {
-            managingFocusBackwardTraversalKeys = new HashSet();
+            managingFocusBackwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusBackwardTraversalKeys.add( KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
         }
         tabPane.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, managingFocusBackwardTraversalKeys);
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -124,7 +124,7 @@
                 setIcon(null);
                 sortIcon = null;
                 SortOrder sortOrder =
-                    getColumnSortOrder(header.getTable(), column);
+                    getColumnSortOrder(table, column);
                 if (sortOrder != null) {
                     switch (sortOrder) {
                     case ASCENDING:
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Wed Jul 05 16:42:37 2017 +0200
@@ -228,7 +228,15 @@
             // to generate the appropriate exception.
         }
         if (c != null) {
-            MXBeanMappingFactory factory = MXBeanMappingFactory.forInterface(c);
+            MXBeanMappingFactory factory;
+            try {
+                factory = MXBeanMappingFactory.forInterface(c);
+            } catch (IllegalArgumentException e) {
+                NotCompliantMBeanException ncmbe =
+                        new NotCompliantMBeanException(e.getMessage());
+                ncmbe.initCause(e);
+                throw ncmbe;
+            }
             return new MXBeanSupport(mbean, c, factory);
         }
         checkCompliance(mbeanClass);
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MXBeanSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MXBeanSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -36,7 +36,6 @@
 import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
 import javax.management.openmbean.MXBeanMappingFactory;
-import javax.management.openmbean.MXBeanMappingFactoryClass;
 
 /**
  * Base class for MXBeans.
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,12 +20,9 @@
  */
 package com.sun.org.apache.xml.internal.security;
 
-
-
 import java.io.InputStream;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
@@ -51,7 +48,7 @@
  * done by calling {@link Init#init} which should be done in any static block
  * of the files of this library. We ensure that this call is only executed once.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public final class Init {
 
@@ -113,20 +110,19 @@
             dbf.setValidating(false);
 
             DocumentBuilder db = dbf.newDocumentBuilder();
-
             // We don't allow users to override the Apache XML Security
             // configuration in the JRE. Users should use the standard security
             // provider mechanism instead if implementing their own
             // transform or canonicalization algorithms.
-            // String cfile = System.getProperty("com.sun.org.apache.xml.internal.security.resource.config");
-            // InputStream is =
-            //     Class.forName("com.sun.org.apache.xml.internal.security.Init")
-            //     .getResourceAsStream(cfile != null ? cfile : "resource/config.xml");
+            // InputStream is = Class.forName("com.sun.org.apache.xml.internal.security.Init").getResourceAsStream("resource/config.xml");
             InputStream is = (InputStream) AccessController.doPrivileged(
                 new PrivilegedAction() {
                     public Object run() {
+//                        String cfile = System.getProperty
+//                            ("com.sun.org.apache.xml.internal.security.resource.config");
                         return getClass().getResourceAsStream
-                                ("resource/config.xml");
+//                            (cfile != null ? cfile : "resource/config.xml");
+                            ("resource/config.xml");
                     }
                 });
 
@@ -167,7 +163,7 @@
 //
 //            if (tag.equals("ResourceBundles")){
 //                XX_configure_i18n_start = System.currentTimeMillis();
-//              Element resource=(Element)el;
+//                Element resource=(Element)el;
 //               /* configure internationalization */
 //               Attr langAttr = resource.getAttributeNode("defaultLanguageCode");
 //               Attr countryAttr = resource.getAttributeNode("defaultCountryCode");
@@ -202,11 +198,11 @@
 
                         if (currMeth.getDeclaringClass().getName()
                                 .equals(JAVACLASS)) {
-                           log.log(java.util.logging.Level.FINE, currMeth.getDeclaringClass().toString());
+                           log.log(java.util.logging.Level.FINE, currMeth.getDe claringClass().toString());
                         }
                      }*/
-                      if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Canonicalizer.register(" + URI + ", "
+                      if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Canonicalizer.register(" + URI + ", "
                             + JAVACLASS + ")");
                      Canonicalizer.register(URI, JAVACLASS);
                   } catch (ClassNotFoundException e) {
@@ -233,9 +229,8 @@
                         "JAVACLASS");
                   try {
                      Class.forName(JAVACLASS);
-                     if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Transform.register(" + URI + ", " + JAVACLASS
-                            + ")");
+                     if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Transform.register(" + URI + ", " + JAVACLASS + ")");
                      Transform.register(URI, JAVACLASS);
                   } catch (ClassNotFoundException e) {
                      Object exArgs[] = { URI, JAVACLASS };
@@ -284,12 +279,11 @@
 //
 //                        if (currMeth.getDeclaringClass().getName()
 //                                .equals(JAVACLASS)) {
-//                           log.log(java.util.logging.Level.FINE, currMeth.getDeclaringClass().toString());
+//                           log.log(java.util.logging.Level.FINE, currMeth.getDe claringClass().toString());
 //                        }
 //                     }
-                      if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "SignatureAlgorithm.register(" + URI + ", "
-                            + JAVACLASS + ")");
+                      if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "SignatureAlgorithm.register(" + URI + ", " + JAVACLASS + ")");
                      SignatureAlgorithm.register(URI, JAVACLASS);
                   } catch (ClassNotFoundException e) {
                      Object exArgs[] = { URI, JAVACLASS };
@@ -320,13 +314,11 @@
                         "DESCRIPTION");
 
                   if ((Description != null) && (Description.length() > 0)) {
-                    if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": "
-                               + Description);
+                    if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": " + Description);
                   } else {
-                    if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS
-                               + ": For unknown purposes");
+                    if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": For unknown purposes");
                   }
                                   try {
                                           ResourceResolver.register(JAVACLASS);
@@ -359,13 +351,11 @@
                         "DESCRIPTION");
 
                   if ((Description != null) && (Description.length() > 0)) {
-                    if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": "
-                               + Description);
+                    if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": " + Description);
                   } else {
-                    if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS
-                               + ": For unknown purposes");
+                    if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Register Resolver: " + JAVACLASS + ": For unknown purposes");
                   }
 
                   KeyResolver.register(JAVACLASS);
@@ -376,8 +366,8 @@
 
             if (tag.equals("PrefixMappings")){
                 XX_configure_reg_prefixes_start = System.currentTimeMillis();
-                if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Now I try to bind prefixes:");
+                if (log.isLoggable(java.util.logging.Level.FINE))
+                    log.log(java.util.logging.Level.FINE, "Now I try to bind prefixes:");
 
                Element[] nl = XMLUtils.selectNodes(el.getFirstChild(), CONF_NS,"PrefixMapping");
 
@@ -386,8 +376,8 @@
                                         "namespace");
                   String prefix = nl[i].getAttributeNS(null,
                                      "prefix");
-                  if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Now I try to bind " + prefix + " to " + namespace);
+                  if (log.isLoggable(java.util.logging.Level.FINE))
+                      log.log(java.util.logging.Level.FINE, "Now I try to bind " + prefix + " to " + namespace);
                   com.sun.org.apache.xml.internal.security.utils.ElementProxy
                      .setDefaultPrefix(namespace, prefix);
                }
@@ -398,19 +388,19 @@
             long XX_init_end = System.currentTimeMillis();
 
             //J-
-            if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XX_init                             " + ((int)(XX_init_end - XX_init_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_prng                           " + ((int)(XX_prng_end - XX_prng_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_parsing                        " + ((int)(XX_parsing_end - XX_parsing_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_i18n                 " + ((int)(XX_configure_i18n_end- XX_configure_i18n_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_c14n             " + ((int)(XX_configure_reg_c14n_end- XX_configure_reg_c14n_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_jcemapper        " + ((int)(XX_configure_reg_jcemapper_end- XX_configure_reg_jcemapper_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_keyInfo          " + ((int)(XX_configure_reg_keyInfo_end- XX_configure_reg_keyInfo_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_keyResolver      " + ((int)(XX_configure_reg_keyResolver_end- XX_configure_reg_keyResolver_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_prefixes         " + ((int)(XX_configure_reg_prefixes_end- XX_configure_reg_prefixes_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_resourceresolver " + ((int)(XX_configure_reg_resourceresolver_end- XX_configure_reg_resourceresolver_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_sigalgos         " + ((int)(XX_configure_reg_sigalgos_end- XX_configure_reg_sigalgos_start)) + " ms");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "  XX_configure_reg_transforms       " + ((int)(XX_configure_reg_transforms_end- XX_configure_reg_transforms_start)) + " ms");
+            if (log.isLoggable(java.util.logging.Level.FINE)) {
+                log.log(java.util.logging.Level.FINE, "XX_init                             " + ((int)(XX_init_end - XX_init_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_prng                           " + ((int)(XX_prng_end - XX_prng_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_parsing                        " + ((int)(XX_parsing_end - XX_parsing_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_i18n                 " + ((int)(XX_configure_i18n_end- XX_configure_i18n_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_c14n             " + ((int)(XX_configure_reg_c14n_end- XX_configure_reg_c14n_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_jcemapper        " + ((int)(XX_configure_reg_jcemapper_end- XX_configure_reg_jcemapper_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_keyInfo          " + ((int)(XX_configure_reg_keyInfo_end- XX_configure_reg_keyInfo_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_keyResolver      " + ((int)(XX_configure_reg_keyResolver_end- XX_configure_reg_keyResolver_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_prefixes         " + ((int)(XX_configure_reg_prefixes_end- XX_configure_reg_prefixes_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_resourceresolver " + ((int)(XX_configure_reg_resourceresolver_end- XX_configure_reg_resourceresolver_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_sigalgos         " + ((int)(XX_configure_reg_sigalgos_end- XX_configure_reg_sigalgos_start)) + " ms");
+                log.log(java.util.logging.Level.FINE, "  XX_configure_reg_transforms       " + ((int)(XX_configure_reg_transforms_end- XX_configure_reg_transforms_start)) + " ms");
             }
          } catch (Exception e) {
             log.log(java.util.logging.Level.SEVERE, "Bad: ", e);
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/Algorithm.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/Algorithm.java	Wed Jul 05 16:42:37 2017 +0200
@@ -24,7 +24,7 @@
 
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
-import com.sun.org.apache.xml.internal.security.utils.ElementProxy;
+import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -33,11 +33,7 @@
  * The Algorithm class which stores the Algorithm URI as a string.
  *
  */
-public abstract class Algorithm extends ElementProxy {
-
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(Algorithm.class.getName());
+public abstract class Algorithm extends SignatureElementProxy {
 
    /**
     *
@@ -79,7 +75,7 @@
     */
    protected void setAlgorithmURI(String algorithmURI) {
 
-      if ((this._state == MODE_CREATE) && (algorithmURI != null)) {
+      if ( (algorithmURI != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM,
                                                 algorithmURI);
       }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -35,7 +35,7 @@
 /**
  * This class maps algorithm identifier URIs to JAVA JCE class names.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class JCEMapper {
 
@@ -45,9 +45,9 @@
 
 
 
-   private static Map uriToJCEName = new HashMap();
+   private static Map uriToJCEName;
 
-   private static Map algorithmsMap = new HashMap();
+   private static Map algorithmsMap;
 
    private static String providerName = null;
    /**
@@ -63,6 +63,8 @@
 
    static void loadAlgorithms( Element algorithmsEl) {
        Element[] algorithms = XMLUtils.selectNodes(algorithmsEl.getFirstChild(),Init.CONF_NS,"Algorithm");
+       uriToJCEName = new HashMap( algorithms.length * 2);
+       algorithmsMap = new HashMap( algorithms.length * 2);
        for (int i = 0 ;i < algorithms.length ;i ++) {
            Element el = algorithms[i];
            String id = el.getAttribute("URI");
@@ -70,6 +72,7 @@
            uriToJCEName.put(id, jceName);
            algorithmsMap.put(id, new Algorithm(el));
        }
+
    }
 
    static Algorithm getAlgorithmMapping(String algoURI) {
@@ -84,8 +87,8 @@
     *
     */
    public static String translateURItoJCEID(String AlgorithmURI) {
-      if (true)
-          if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
+      if (log.isLoggable(java.util.logging.Level.FINE))
+          log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
 
       String jceName = (String) uriToJCEName.get(AlgorithmURI);
       return jceName;
@@ -100,8 +103,8 @@
     *
     */
    public static String getAlgorithmClassFromURI(String AlgorithmURI) {
-       if (true)
-           if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
+       if (log.isLoggable(java.util.logging.Level.FINE))
+           log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
 
        return ((Algorithm) algorithmsMap.get(AlgorithmURI)).algorithmClass;
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,10 +20,10 @@
  */
 package com.sun.org.apache.xml.internal.security.algorithms;
 
-
-
 import java.security.MessageDigest;
 import java.security.NoSuchProviderException;
+import java.util.HashMap;
+import java.util.Map;
 
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
@@ -41,11 +41,6 @@
  */
 public class MessageDigestAlgorithm extends Algorithm {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(
-                    MessageDigestAlgorithm.class.getName());
-
     /** Message Digest - NOT RECOMMENDED MD5*/
    public static final String ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5 = Constants.MoreAlgorithmsSpecNS + "md5";
    /** Digest - Required SHA1*/
@@ -76,6 +71,12 @@
       this.algorithm = messageDigest;
    }
 
+   static ThreadLocal instances=new ThreadLocal() {
+           protected Object initialValue() {
+                   return new HashMap();
+           };
+   };
+
    /**
     * Factory method for constructing a message digest algorithm by name.
     *
@@ -86,8 +87,15 @@
     */
    public static MessageDigestAlgorithm getInstance(
            Document doc, String algorithmURI) throws XMLSignatureException {
+          MessageDigest md = getDigestInstance(algorithmURI);
+      return new MessageDigestAlgorithm(doc, md, algorithmURI);
+   }
 
-      String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI);
+private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException {
+        MessageDigest result=(MessageDigest) ((Map)instances.get()).get(algorithmURI);
+        if (result!=null)
+                return result;
+    String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI);
 
           if (algorithmID == null) {
                   Object[] exArgs = { algorithmURI };
@@ -113,8 +121,9 @@
 
         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
         }
-      return new MessageDigestAlgorithm(doc, md, algorithmURI);
-   }
+      ((Map)instances.get()).put(algorithmURI, md);
+        return md;
+}
 
    /**
     * Returns the actual {@link java.security.MessageDigest} algorithm object
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java	Wed Jul 05 16:42:37 2017 +0200
@@ -25,6 +25,7 @@
 import java.security.SecureRandom;
 import java.security.spec.AlgorithmParameterSpec;
 import java.util.HashMap;
+import java.util.Map;
 
 import com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac;
 import com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException;
@@ -52,9 +53,35 @@
    /** All available algorithm classes are registered here */
    static HashMap _algorithmHash = null;
 
+   static ThreadLocal instancesSigning=new ThreadLocal() {
+           protected Object initialValue() {
+                   return new HashMap();
+           };
+   };
+
+   static ThreadLocal instancesVerify=new ThreadLocal() {
+           protected Object initialValue() {
+                   return new HashMap();
+           };
+   };
+
+   static ThreadLocal keysSigning=new ThreadLocal() {
+           protected Object initialValue() {
+                   return new HashMap();
+           };
+   };
+   static ThreadLocal keysVerify=new ThreadLocal() {
+           protected Object initialValue() {
+                   return new HashMap();
+           };
+   };
+//   boolean isForSigning=false;
+
    /** Field _signatureAlgorithm */
    protected SignatureAlgorithmSpi _signatureAlgorithm = null;
 
+   private String algorithmURI;
+
    /**
     * Constructor SignatureAlgorithm
     *
@@ -64,18 +91,49 @@
     */
    public SignatureAlgorithm(Document doc, String algorithmURI)
            throws XMLSecurityException {
+      super(doc, algorithmURI);
+      this.algorithmURI = algorithmURI;
+   }
 
-      super(doc, algorithmURI);
 
-      try {
+   private void initializeAlgorithm(boolean isForSigning) throws XMLSignatureException {
+           if (_signatureAlgorithm!=null) {
+                   return;
+           }
+           _signatureAlgorithm=isForSigning ? getInstanceForSigning(algorithmURI) : getInstanceForVerify(algorithmURI);
+                this._signatureAlgorithm
+                      .engineGetContextFromElement(this._constructionElement);
+   }
+   private static SignatureAlgorithmSpi getInstanceForSigning(String algorithmURI) throws XMLSignatureException {
+           SignatureAlgorithmSpi result=(SignatureAlgorithmSpi) ((Map)instancesSigning.get()).get(algorithmURI);
+           if (result!=null) {
+                   result.reset();
+                   return result;
+           }
+           result=buildSigner(algorithmURI, result);
+           ((Map)instancesSigning.get()).put(algorithmURI,result);
+           return result;
+   }
+   private static SignatureAlgorithmSpi getInstanceForVerify(String algorithmURI) throws XMLSignatureException {
+           SignatureAlgorithmSpi result=(SignatureAlgorithmSpi) ((Map)instancesVerify.get()).get(algorithmURI);
+           if (result!=null) {
+                   result.reset();
+                   return result;
+           }
+           result=buildSigner(algorithmURI, result);
+           ((Map)instancesVerify.get()).put(algorithmURI,result);
+           return result;
+   }
+
+   private static SignatureAlgorithmSpi buildSigner(String algorithmURI, SignatureAlgorithmSpi result) throws XMLSignatureException {
+        try {
          Class implementingClass =
             SignatureAlgorithm.getImplementingClass(algorithmURI);
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
                    + implementingClass + "\"");
-
-         this._signatureAlgorithm =
-            (SignatureAlgorithmSpi) implementingClass.newInstance();
+         result=(SignatureAlgorithmSpi) implementingClass.newInstance();
+         return   result;
       }  catch (IllegalAccessException ex) {
          Object exArgs[] = { algorithmURI, ex.getMessage() };
 
@@ -92,7 +150,7 @@
          throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs,
                                          ex);
       }
-   }
+}
 
    /**
     * Constructor SignatureAlgorithm
@@ -107,7 +165,8 @@
               throws XMLSecurityException {
 
       this(doc, algorithmURI);
-
+      this.algorithmURI=algorithmURI;
+      initializeAlgorithm(true);
       this._signatureAlgorithm.engineSetHMACOutputLength(HMACOutputLength);
       ((IntegrityHmac)this._signatureAlgorithm)
          .engineAddContextToElement(this._constructionElement);
@@ -124,37 +183,7 @@
            throws XMLSecurityException {
 
       super(element, BaseURI);
-
-      String algorithmURI = this.getURI();
-
-      try {
-         Class implementingClass =
-            SignatureAlgorithm.getImplementingClass(algorithmURI);
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
-                   + implementingClass + "\"");
-
-         this._signatureAlgorithm =
-            (SignatureAlgorithmSpi) implementingClass.newInstance();
-
-         this._signatureAlgorithm
-            .engineGetContextFromElement(this._constructionElement);
-      }  catch (IllegalAccessException ex) {
-         Object exArgs[] = { algorithmURI, ex.getMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs,
-                                         ex);
-      } catch (InstantiationException ex) {
-         Object exArgs[] = { algorithmURI, ex.getMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs,
-                                         ex);
-      } catch (NullPointerException ex) {
-         Object exArgs[] = { algorithmURI, ex.getMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs,
-                                         ex);
-      }
+      algorithmURI = this.getURI();
    }
 
    /**
@@ -175,7 +204,12 @@
     * @return the result of the {@link java.security.Signature#getAlgorithm} method
     */
    public String getJCEAlgorithmString() {
-      return this._signatureAlgorithm.engineGetJCEAlgorithmString();
+      try {
+                return getInstanceForVerify(algorithmURI).engineGetJCEAlgorithmString();
+        } catch (XMLSignatureException e) {
+                //Ignore.
+                return null;
+        }
    }
 
    /**
@@ -184,7 +218,11 @@
     * @return The Provider of this Signature Alogrithm
     */
    public String getJCEProviderName() {
-      return this._signatureAlgorithm.engineGetJCEProviderName();
+      try {
+                return getInstanceForVerify(algorithmURI).engineGetJCEProviderName();
+        } catch (XMLSignatureException e) {
+                return null;
+        }
    }
 
    /**
@@ -231,7 +269,13 @@
     * @throws XMLSignatureException
     */
    public void initSign(Key signingKey) throws XMLSignatureException {
-      this._signatureAlgorithm.engineInitSign(signingKey);
+           initializeAlgorithm(true);
+           Map map=(Map)keysSigning.get();
+       if (map.get(this.algorithmURI)==signingKey) {
+           return;
+       }
+       map.put(this.algorithmURI,signingKey);
+           this._signatureAlgorithm.engineInitSign(signingKey);
    }
 
    /**
@@ -244,6 +288,7 @@
     */
    public void initSign(Key signingKey, SecureRandom secureRandom)
            throws XMLSignatureException {
+           initializeAlgorithm(true);
       this._signatureAlgorithm.engineInitSign(signingKey, secureRandom);
    }
 
@@ -258,6 +303,7 @@
    public void initSign(
            Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
               throws XMLSignatureException {
+           initializeAlgorithm(true);
       this._signatureAlgorithm.engineInitSign(signingKey,
                                               algorithmParameterSpec);
    }
@@ -282,7 +328,13 @@
     * @throws XMLSignatureException
     */
    public void initVerify(Key verificationKey) throws XMLSignatureException {
-      this._signatureAlgorithm.engineInitVerify(verificationKey);
+           initializeAlgorithm(false);
+           Map map=(Map)keysVerify.get();
+           if (map.get(this.algorithmURI)==verificationKey) {
+           return;
+       }
+           map.put(this.algorithmURI,verificationKey);
+           this._signatureAlgorithm.engineInitVerify(verificationKey);
    }
 
    /**
@@ -320,7 +372,7 @@
                .getLogger(SignatureAlgorithm.class.getName());
       }
 
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Init() called");
+      log.log(java.util.logging.Level.FINE, "Init() called");
 
       if (!SignatureAlgorithm._alreadyInitialized) {
          SignatureAlgorithm._algorithmHash = new HashMap(10);
@@ -340,8 +392,8 @@
            throws AlgorithmAlreadyRegisteredException,XMLSignatureException {
 
       {
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Try to register " + algorithmURI + " " + implementingClass);
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Try to register " + algorithmURI + " " + implementingClass);
 
          // are we already registered?
          Class registeredClassClass =
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,27 +20,20 @@
  */
 package com.sun.org.apache.xml.internal.security.algorithms;
 
-
-
 import java.security.Key;
 import java.security.SecureRandom;
 import java.security.spec.AlgorithmParameterSpec;
 
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
-import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class SignatureAlgorithmSpi {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(SignatureAlgorithmSpi.class.getName());
-
    /**
     * Returns the URI representation of <code>Transformation algorithm</code>
     *
@@ -167,20 +160,6 @@
    protected abstract void engineSetParameter(AlgorithmParameterSpec params)
       throws XMLSignatureException;
 
-   /** Field _doc */
-   Document _doc = null;
-
-   /**
-    * Method engineSetDocument
-    *
-    * @param doc
-    */
-   protected void engineSetDocument(Document doc) {
-      this._doc = doc;
-   }
-
-   /** Field _constructionElement */
-   Element _constructionElement = null;
 
    /**
     * Method engineGetContextFromElement
@@ -188,7 +167,6 @@
     * @param element
     */
    protected void engineGetContextFromElement(Element element) {
-      this._constructionElement = element;
    }
 
    /**
@@ -199,4 +177,7 @@
     */
    protected abstract void engineSetHMACOutputLength(int HMACOutputLength)
       throws XMLSignatureException;
+
+    public void reset() {
+        }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java	Wed Jul 05 16:42:37 2017 +0200
@@ -45,7 +45,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class IntegrityHmac extends SignatureAlgorithmSpi {
 
@@ -74,8 +74,8 @@
    public IntegrityHmac() throws XMLSignatureException {
 
       String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Created IntegrityHmacSHA1 using " + algorithmID);
+      if (log.isLoggable(java.util.logging.Level.FINE))
+        log.log(java.util.logging.Level.FINE, "Created IntegrityHmacSHA1 using " + algorithmID);
 
       try {
          this._macAlgorithm = Mac.getInstance(algorithmID);
@@ -99,6 +99,10 @@
       throw new XMLSignatureException("empty");
    }
 
+   public void reset() {
+           _HMACOutputLength=0;
+   }
+
    /**
     * Proxy method for {@link java.security.Signature#verify(byte[])}
     * which is executed on the internal {@link java.security.Signature} object.
@@ -145,7 +149,20 @@
       try {
          this._macAlgorithm.init(secretKey);
       } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
+            // reinstantiate Mac object to work around bug in JDK
+            // see: http://bugs.sun.com/view_bug.do?bug_id=4953555
+            Mac mac = this._macAlgorithm;
+            try {
+                this._macAlgorithm = Mac.getInstance
+                    (_macAlgorithm.getAlgorithm());
+            } catch (Exception e) {
+                // this shouldn't occur, but if it does, restore previous Mac
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Exception when reinstantiating Mac:" + e);
+                }
+                this._macAlgorithm = mac;
+            }
+            throw new XMLSignatureException("empty", ex);
       }
    }
 
@@ -323,7 +340,7 @@
     */
    protected String engineGetJCEAlgorithmString() {
 
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "engineGetJCEAlgorithmString()");
+      log.log(java.util.logging.Level.FINE, "engineGetJCEAlgorithmString()");
 
       return this._macAlgorithm.getAlgorithm();
    }
@@ -397,7 +414,8 @@
    /**
     * Class IntegrityHmacSHA1
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacSHA1 extends IntegrityHmac {
 
@@ -423,7 +441,8 @@
    /**
     * Class IntegrityHmacSHA256
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacSHA256 extends IntegrityHmac {
 
@@ -449,7 +468,8 @@
    /**
     * Class IntegrityHmacSHA384
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacSHA384 extends IntegrityHmac {
 
@@ -475,7 +495,8 @@
    /**
     * Class IntegrityHmacSHA512
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacSHA512 extends IntegrityHmac {
 
@@ -501,7 +522,8 @@
    /**
     * Class IntegrityHmacRIPEMD160
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacRIPEMD160 extends IntegrityHmac {
 
@@ -527,7 +549,8 @@
    /**
     * Class IntegrityHmacMD5
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
    public static class IntegrityHmacMD5 extends IntegrityHmac {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright  1999-2007 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.algorithms.implementations;
 
-
-
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
 import java.security.Key;
@@ -38,329 +36,344 @@
 import com.sun.org.apache.xml.internal.security.signature.XMLSignature;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class SignatureBaseRSA extends SignatureAlgorithmSpi {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(SignatureBaseRSA.class.getName());
+        java.util.logging.Logger.getLogger
+        (SignatureBaseRSA.class.getName());
+
+    /** @inheritDoc */
+    public abstract String engineGetURI();
+
+    /** Field algorithm */
+    private java.security.Signature _signatureAlgorithm = null;
+
+    /**
+     * Constructor SignatureRSA
+     *
+     * @throws XMLSignatureException
+     */
+    public SignatureBaseRSA() throws XMLSignatureException {
+
+        String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "Created SignatureRSA using " + algorithmID);
+        String provider=JCEMapper.getProviderId();
+        try {
+            if (provider==null) {
+                this._signatureAlgorithm = Signature.getInstance(algorithmID);
+            } else {
+                this._signatureAlgorithm = Signature.getInstance(algorithmID,provider);
+            }
+        } catch (java.security.NoSuchAlgorithmException ex) {
+            Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
+
+            throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+        } catch (NoSuchProviderException ex) {
+            Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
+
+            throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineSetParameter(AlgorithmParameterSpec params)
+        throws XMLSignatureException {
+
+        try {
+            this._signatureAlgorithm.setParameter(params);
+        } catch (InvalidAlgorithmParameterException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected boolean engineVerify(byte[] signature)
+        throws XMLSignatureException {
+
+        try {
+            return this._signatureAlgorithm.verify(signature);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
+
+        if (!(publicKey instanceof PublicKey)) {
+            String supplied = publicKey.getClass().getName();
+            String needed = PublicKey.class.getName();
+            Object exArgs[] = { supplied, needed };
+
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
+
+        try {
+            this._signatureAlgorithm.initVerify((PublicKey) publicKey);
+        } catch (InvalidKeyException ex) {
+            // reinstantiate Signature object to work around bug in JDK
+            // see: http://bugs.sun.com/view_bug.do?bug_id=4953555
+            Signature sig = this._signatureAlgorithm;
+            try {
+                this._signatureAlgorithm = Signature.getInstance
+                    (_signatureAlgorithm.getAlgorithm());
+            } catch (Exception e) {
+                // this shouldn't occur, but if it does, restore previous
+                // Signature
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Exception when reinstantiating Signature:" + e);
+                }
+                this._signatureAlgorithm = sig;
+            }
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected byte[] engineSign() throws XMLSignatureException {
+        try {
+            return this._signatureAlgorithm.sign();
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
+        throws XMLSignatureException {
+
+        if (!(privateKey instanceof PrivateKey)) {
+            String supplied = privateKey.getClass().getName();
+            String needed = PrivateKey.class.getName();
+            Object exArgs[] = { supplied, needed };
+
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
+
+        try {
+            this._signatureAlgorithm.initSign
+                ((PrivateKey) privateKey, secureRandom);
+        } catch (InvalidKeyException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineInitSign(Key privateKey) throws XMLSignatureException {
+
+        if (!(privateKey instanceof PrivateKey)) {
+            String supplied = privateKey.getClass().getName();
+            String needed = PrivateKey.class.getName();
+            Object exArgs[] = { supplied, needed };
+
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
+
+        try {
+            this._signatureAlgorithm.initSign((PrivateKey) privateKey);
+        } catch (InvalidKeyException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineUpdate(byte[] input) throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(input);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
+
+    /** @inheritDoc */
+    protected void engineUpdate(byte input) throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(input);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
     /** @inheritDoc */
-   public abstract String engineGetURI();
-
-   /** Field algorithm */
-   private java.security.Signature _signatureAlgorithm = null;
-
-   /**
-    * Constructor SignatureRSA
-    *
-    * @throws XMLSignatureException
-    */
-   public SignatureBaseRSA() throws XMLSignatureException {
-
-      String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
-
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Created SignatureDSA using " + algorithmID);
-      String provider=JCEMapper.getProviderId();
-      try {
-         if (provider==null) {
-                this._signatureAlgorithm = Signature.getInstance(algorithmID);
-         } else {
-                this._signatureAlgorithm = Signature.getInstance(algorithmID,provider);
-         }
-      } catch (java.security.NoSuchAlgorithmException ex) {
-         Object[] exArgs = { algorithmID,
-                             ex.getLocalizedMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
-      } catch (NoSuchProviderException ex) {
-         Object[] exArgs = { algorithmID,
-                                                 ex.getLocalizedMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+    protected void engineUpdate(byte buf[], int offset, int len)
+        throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(buf, offset, len);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
         }
-   }
-
-   /** @inheritDoc */
-   protected void engineSetParameter(AlgorithmParameterSpec params)
-           throws XMLSignatureException {
+    }
 
-      try {
-         this._signatureAlgorithm.setParameter(params);
-      } catch (InvalidAlgorithmParameterException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /** @inheritDoc */
+    protected String engineGetJCEAlgorithmString() {
+        return this._signatureAlgorithm.getAlgorithm();
+    }
 
-   /** @inheritDoc */
-   protected boolean engineVerify(byte[] signature)
-           throws XMLSignatureException {
+    /** @inheritDoc */
+    protected String engineGetJCEProviderName() {
+        return this._signatureAlgorithm.getProvider().getName();
+    }
 
-      try {
-         return this._signatureAlgorithm.verify(signature);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /** @inheritDoc */
+    protected void engineSetHMACOutputLength(int HMACOutputLength)
+        throws XMLSignatureException {
+        throw new XMLSignatureException
+            ("algorithms.HMACOutputLengthOnlyForHMAC");
+    }
 
-   /** @inheritDoc */
-   protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
-
-      if (!(publicKey instanceof PublicKey)) {
-         String supplied = publicKey.getClass().getName();
-         String needed = PublicKey.class.getName();
-         Object exArgs[] = { supplied, needed };
-
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
+    /** @inheritDoc */
+    protected void engineInitSign(
+        Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
+        throws XMLSignatureException {
+        throw new XMLSignatureException(
+            "algorithms.CannotUseAlgorithmParameterSpecOnRSA");
+    }
 
-      try {
-         this._signatureAlgorithm.initVerify((PublicKey) publicKey);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
-
-   /** @inheritDoc */
-   protected byte[] engineSign() throws XMLSignatureException {
-
-      try {
-         return this._signatureAlgorithm.sign();
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /**
+     * Class SignatureRSASHA1
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSASHA1 extends SignatureBaseRSA {
 
-   /** @inheritDoc */
-   protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
-           throws XMLSignatureException {
-
-      if (!(privateKey instanceof PrivateKey)) {
-         String supplied = privateKey.getClass().getName();
-         String needed = PrivateKey.class.getName();
-         Object exArgs[] = { supplied, needed };
+        /**
+         * Constructor SignatureRSASHA1
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSASHA1() throws XMLSignatureException {
+            super();
+        }
 
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
-
-      try {
-         this._signatureAlgorithm.initSign((PrivateKey) privateKey,
-                                           secureRandom);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1;
+        }
+    }
 
-   /** @inheritDoc */
-   protected void engineInitSign(Key privateKey) throws XMLSignatureException {
-
-      if (!(privateKey instanceof PrivateKey)) {
-         String supplied = privateKey.getClass().getName();
-         String needed = PrivateKey.class.getName();
-         Object exArgs[] = { supplied, needed };
-
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
-
-      try {
-         this._signatureAlgorithm.initSign((PrivateKey) privateKey);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /**
+     * Class SignatureRSASHA256
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSASHA256 extends SignatureBaseRSA {
 
-   /** @inheritDoc */
-   protected void engineUpdate(byte[] input) throws XMLSignatureException {
-
-      try {
-         this._signatureAlgorithm.update(input);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+        /**
+         * Constructor SignatureRSASHA256
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSASHA256() throws XMLSignatureException {
+            super();
+        }
 
-   /** @inheritDoc */
-   protected void engineUpdate(byte input) throws XMLSignatureException {
-
-      try {
-         this._signatureAlgorithm.update(input);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
-
-   /** @inheritDoc */
-   protected void engineUpdate(byte buf[], int offset, int len)
-           throws XMLSignatureException {
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256;
+        }
+    }
 
-      try {
-         this._signatureAlgorithm.update(buf, offset, len);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
-
-   /** @inheritDoc */
-   protected String engineGetJCEAlgorithmString() {
-      return this._signatureAlgorithm.getAlgorithm();
-   }
-
-   /** @inheritDoc */
-   protected String engineGetJCEProviderName() {
-      return this._signatureAlgorithm.getProvider().getName();
-   }
+    /**
+     * Class SignatureRSASHA384
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSASHA384 extends SignatureBaseRSA {
 
-   /** @inheritDoc */
-   protected void engineSetHMACOutputLength(int HMACOutputLength)
-           throws XMLSignatureException {
-      throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
-   }
+        /**
+         * Constructor SignatureRSASHA384
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSASHA384() throws XMLSignatureException {
+            super();
+        }
 
-   /** @inheritDoc */
-   protected void engineInitSign(
-           Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
-              throws XMLSignatureException {
-      throw new XMLSignatureException(
-         "algorithms.CannotUseAlgorithmParameterSpecOnRSA");
-   }
-
-   /**
-    * Class SignatureRSASHA1
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSASHA1 extends SignatureBaseRSA {
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384;
+        }
+    }
 
-      /**
-       * Constructor SignatureRSASHA1
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSASHA1() throws XMLSignatureException {
-         super();
-      }
-
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1;
-      }
-   }
-
-   /**
-    * Class SignatureRSASHA256
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSASHA256 extends SignatureBaseRSA {
+    /**
+     * Class SignatureRSASHA512
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSASHA512 extends SignatureBaseRSA {
 
-      /**
-       * Constructor SignatureRSASHA256
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSASHA256() throws XMLSignatureException {
-         super();
-      }
+        /**
+         * Constructor SignatureRSASHA512
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSASHA512() throws XMLSignatureException {
+            super();
+        }
 
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256;
-      }
-   }
-
-   /**
-    * Class SignatureRSASHA384
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSASHA384 extends SignatureBaseRSA {
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512;
+        }
+    }
 
-      /**
-       * Constructor SignatureRSASHA384
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSASHA384() throws XMLSignatureException {
-         super();
-      }
-
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384;
-      }
-   }
+    /**
+     * Class SignatureRSARIPEMD160
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSARIPEMD160 extends SignatureBaseRSA {
 
-   /**
-    * Class SignatureRSASHA512
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSASHA512 extends SignatureBaseRSA {
+        /**
+         * Constructor SignatureRSARIPEMD160
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSARIPEMD160() throws XMLSignatureException {
+            super();
+        }
 
-      /**
-       * Constructor SignatureRSASHA512
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSASHA512() throws XMLSignatureException {
-         super();
-      }
-
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512;
-      }
-   }
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160;
+        }
+    }
 
-   /**
-    * Class SignatureRSARIPEMD160
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSARIPEMD160 extends SignatureBaseRSA {
-
-      /**
-       * Constructor SignatureRSARIPEMD160
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSARIPEMD160() throws XMLSignatureException {
-         super();
-      }
-
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160;
-      }
-   }
+    /**
+     * Class SignatureRSAMD5
+     *
+     * @author $Author: mullan $
+     * @version $Revision: 1.5 $
+     */
+    public static class SignatureRSAMD5 extends SignatureBaseRSA {
 
-   /**
-    * Class SignatureRSAMD5
-    *
-    * @author $Author: raul $
-    */
-   public static class SignatureRSAMD5 extends SignatureBaseRSA {
+        /**
+         * Constructor SignatureRSAMD5
+         *
+         * @throws XMLSignatureException
+         */
+        public SignatureRSAMD5() throws XMLSignatureException {
+            super();
+        }
 
-      /**
-       * Constructor SignatureRSAMD5
-       *
-       * @throws XMLSignatureException
-       */
-      public SignatureRSAMD5() throws XMLSignatureException {
-         super();
-      }
-
-      /** @inheritDoc */
-      public String engineGetURI() {
-         return XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5;
-      }
-   }
+        /** @inheritDoc */
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5;
+        }
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.algorithms.implementations;
 
-
-
 import java.io.IOException;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
@@ -39,342 +37,359 @@
 import com.sun.org.apache.xml.internal.security.utils.Base64;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 
-
 /**
  *
- * @author $Author: vishal $
+ * @author $Author: mullan $
  */
 public class SignatureDSA extends SignatureAlgorithmSpi {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(SignatureDSA.class.getName());
 
-   /** Field _URI */
-   public static final String _URI = Constants.SignatureSpecNS + "dsa-sha1";
+    /** Field _URI */
+    public static final String _URI = Constants.SignatureSpecNS + "dsa-sha1";
 
-   /** Field algorithm */
-   private java.security.Signature _signatureAlgorithm = null;
+    /** Field algorithm */
+    private java.security.Signature _signatureAlgorithm = null;
 
-   /**
-    * Method engineGetURI
-    *
-    * @inheritDoc
-    */
-   protected String engineGetURI() {
-      return SignatureDSA._URI;
-   }
+    /**
+     * Method engineGetURI
+     *
+     * @inheritDoc
+     */
+    protected String engineGetURI() {
+        return SignatureDSA._URI;
+    }
 
-   /**
-    * Constructor SignatureDSA
-    *
-    * @throws XMLSignatureException
-    */
-   public SignatureDSA() throws XMLSignatureException {
+    /**
+     * Constructor SignatureDSA
+     *
+     * @throws XMLSignatureException
+     */
+    public SignatureDSA() throws XMLSignatureException {
 
-      String algorithmID = JCEMapper.translateURItoJCEID(SignatureDSA._URI);
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Created SignatureDSA using " + algorithmID);
+        String algorithmID = JCEMapper.translateURItoJCEID(SignatureDSA._URI);
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "Created SignatureDSA using " + algorithmID);
 
-      try {
-         this._signatureAlgorithm = Signature.getInstance(algorithmID);
-      } catch (java.security.NoSuchAlgorithmException ex) {
-         Object[] exArgs = { algorithmID,
-                             ex.getLocalizedMessage() };
-
-         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
-      }
-   }
+        String provider = JCEMapper.getProviderId();
+        try {
+            if (provider == null) {
+                this._signatureAlgorithm = Signature.getInstance(algorithmID);
+            } else {
+                this._signatureAlgorithm =
+                    Signature.getInstance(algorithmID, provider);
+            }
+        } catch (java.security.NoSuchAlgorithmException ex) {
+            Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
+            throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+        } catch (java.security.NoSuchProviderException ex) {
+            Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
+            throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineSetParameter(AlgorithmParameterSpec params)
-           throws XMLSignatureException {
+    /**
+     * @inheritDoc
+     */
+    protected void engineSetParameter(AlgorithmParameterSpec params)
+        throws XMLSignatureException {
 
-      try {
-         this._signatureAlgorithm.setParameter(params);
-      } catch (InvalidAlgorithmParameterException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+        try {
+            this._signatureAlgorithm.setParameter(params);
+        } catch (InvalidAlgorithmParameterException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected boolean engineVerify(byte[] signature)
+    /**
+     * @inheritDoc
+     */
+    protected boolean engineVerify(byte[] signature)
            throws XMLSignatureException {
 
-      try {
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Called DSA.verify() on " + Base64.encode(signature));
+        try {
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Called DSA.verify() on " + Base64.encode(signature));
 
-         byte[] jcebytes = SignatureDSA.convertXMLDSIGtoASN1(signature);
+            byte[] jcebytes = SignatureDSA.convertXMLDSIGtoASN1(signature);
 
-         return this._signatureAlgorithm.verify(jcebytes);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      } catch (IOException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+            return this._signatureAlgorithm.verify(jcebytes);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        } catch (IOException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
+    /**
+     * @inheritDoc
+     */
+    protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
 
-      if (!(publicKey instanceof PublicKey)) {
-         String supplied = publicKey.getClass().getName();
-         String needed = PublicKey.class.getName();
-         Object exArgs[] = { supplied, needed };
+        if (!(publicKey instanceof PublicKey)) {
+            String supplied = publicKey.getClass().getName();
+            String needed = PublicKey.class.getName();
+            Object exArgs[] = { supplied, needed };
 
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
 
-      try {
-         this._signatureAlgorithm.initVerify((PublicKey) publicKey);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
-
-   /**
-    * @inheritDoc
-    */
-   protected byte[] engineSign() throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.initVerify((PublicKey) publicKey);
+        } catch (InvalidKeyException ex) {
+            // reinstantiate Signature object to work around bug in JDK
+            // see: http://bugs.sun.com/view_bug.do?bug_id=4953555
+            Signature sig = this._signatureAlgorithm;
+            try {
+                this._signatureAlgorithm = Signature.getInstance
+                    (_signatureAlgorithm.getAlgorithm());
+            } catch (Exception e) {
+                // this shouldn't occur, but if it does, restore previous
+                // Signature
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Exception when reinstantiating Signature:" + e);
+                }
+                this._signatureAlgorithm = sig;
+            }
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-      try {
-         byte jcebytes[] = this._signatureAlgorithm.sign();
+    /**
+     * @inheritDoc
+     */
+    protected byte[] engineSign() throws XMLSignatureException {
+
+        try {
+            byte jcebytes[] = this._signatureAlgorithm.sign();
 
-         return SignatureDSA.convertASN1toXMLDSIG(jcebytes);
-      } catch (IOException ex) {
-         throw new XMLSignatureException("empty", ex);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+            return SignatureDSA.convertASN1toXMLDSIG(jcebytes);
+        } catch (IOException ex) {
+            throw new XMLSignatureException("empty", ex);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
+    /**
+     * @inheritDoc
+     */
+    protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
            throws XMLSignatureException {
 
-      if (!(privateKey instanceof PrivateKey)) {
-         String supplied = privateKey.getClass().getName();
-         String needed = PrivateKey.class.getName();
-         Object exArgs[] = { supplied, needed };
+        if (!(privateKey instanceof PrivateKey)) {
+            String supplied = privateKey.getClass().getName();
+            String needed = PrivateKey.class.getName();
+            Object exArgs[] = { supplied, needed };
 
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
 
-      try {
-         this._signatureAlgorithm.initSign((PrivateKey) privateKey,
+        try {
+            this._signatureAlgorithm.initSign((PrivateKey) privateKey,
                                            secureRandom);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+        } catch (InvalidKeyException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineInitSign(Key privateKey) throws XMLSignatureException {
+    /**
+     * @inheritDoc
+     */
+    protected void engineInitSign(Key privateKey) throws XMLSignatureException {
 
-      if (!(privateKey instanceof PrivateKey)) {
-         String supplied = privateKey.getClass().getName();
-         String needed = PrivateKey.class.getName();
-         Object exArgs[] = { supplied, needed };
+        if (!(privateKey instanceof PrivateKey)) {
+            String supplied = privateKey.getClass().getName();
+            String needed = PrivateKey.class.getName();
+            Object exArgs[] = { supplied, needed };
 
-         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
-                                         exArgs);
-      }
+            throw new XMLSignatureException
+                ("algorithms.WrongKeyForThisOperation", exArgs);
+        }
 
-      try {
-         this._signatureAlgorithm.initSign((PrivateKey) privateKey);
-      } catch (InvalidKeyException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+        try {
+            this._signatureAlgorithm.initSign((PrivateKey) privateKey);
+        } catch (InvalidKeyException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineUpdate(byte[] input) throws XMLSignatureException {
-
-      try {
-         this._signatureAlgorithm.update(input);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /**
+     * @inheritDoc
+     */
+    protected void engineUpdate(byte[] input) throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(input);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineUpdate(byte input) throws XMLSignatureException {
-
-      try {
-         this._signatureAlgorithm.update(input);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /**
+     * @inheritDoc
+     */
+    protected void engineUpdate(byte input) throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(input);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * @inheritDoc
-    */
-   protected void engineUpdate(byte buf[], int offset, int len)
-           throws XMLSignatureException {
-
-      try {
-         this._signatureAlgorithm.update(buf, offset, len);
-      } catch (SignatureException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
-   }
+    /**
+     * @inheritDoc
+     */
+    protected void engineUpdate(byte buf[], int offset, int len)
+        throws XMLSignatureException {
+        try {
+            this._signatureAlgorithm.update(buf, offset, len);
+        } catch (SignatureException ex) {
+            throw new XMLSignatureException("empty", ex);
+        }
+    }
 
-   /**
-    * Method engineGetJCEAlgorithmString
-    *
-    * @inheritDoc
-    */
-   protected String engineGetJCEAlgorithmString() {
-      return this._signatureAlgorithm.getAlgorithm();
-   }
+    /**
+     * Method engineGetJCEAlgorithmString
+     *
+     * @inheritDoc
+     */
+    protected String engineGetJCEAlgorithmString() {
+        return this._signatureAlgorithm.getAlgorithm();
+    }
 
-   /**
-    * Method engineGetJCEProviderName
-    *
-    * @inheritDoc
-    */
-   protected String engineGetJCEProviderName() {
-      return this._signatureAlgorithm.getProvider().getName();
-   }
-
+    /**
+     * Method engineGetJCEProviderName
+     *
+     * @inheritDoc
+     */
+    protected String engineGetJCEProviderName() {
+        return this._signatureAlgorithm.getProvider().getName();
+    }
 
-   /**
-    * Converts an ASN.1 DSA value to a XML Signature DSA Value.
-    *
-    * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-    * pairs; the XML Signature requires the core BigInteger values.
-    *
-    * @param asn1Bytes
-    * @return the decode bytes
-    *
-    * @throws IOException
-    * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-    */
-   private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[])
+    /**
+     * Converts an ASN.1 DSA value to a XML Signature DSA Value.
+     *
+     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
+     * pairs; the XML Signature requires the core BigInteger values.
+     *
+     * @param asn1Bytes
+     * @return the decode bytes
+     *
+     * @throws IOException
+     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
+     */
+    private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[])
            throws IOException {
 
-      byte rLength = asn1Bytes[3];
-      int i;
+        byte rLength = asn1Bytes[3];
+        int i;
 
-      for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--);
+        for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--);
 
-      byte sLength = asn1Bytes[5 + rLength];
-      int j;
+        byte sLength = asn1Bytes[5 + rLength];
+        int j;
 
-      for (j = sLength;
+        for (j = sLength;
               (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--);
 
-      if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2)
+        if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2)
               || (asn1Bytes[2] != 2) || (i > 20)
               || (asn1Bytes[4 + rLength] != 2) || (j > 20)) {
-         throw new IOException("Invalid ASN.1 format of DSA signature");
-      }
-      byte xmldsigBytes[] = new byte[40];
+            throw new IOException("Invalid ASN.1 format of DSA signature");
+        }
+        byte xmldsigBytes[] = new byte[40];
 
-      System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 20 - i,
+        System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 20 - i,
                           i);
-      System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes,
+        System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes,
                           40 - j, j);
 
-       return xmldsigBytes;
-   }
+        return xmldsigBytes;
+    }
 
-   /**
-    * Converts a XML Signature DSA Value to an ASN.1 DSA value.
-    *
-    * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-    * pairs; the XML Signature requires the core BigInteger values.
-    *
-    * @param xmldsigBytes
-    * @return the encoded ASN.1 bytes
-    *
-    * @throws IOException
-    * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-    */
-   private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[])
+    /**
+     * Converts a XML Signature DSA Value to an ASN.1 DSA value.
+     *
+     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
+     * pairs; the XML Signature requires the core BigInteger values.
+     *
+     * @param xmldsigBytes
+     * @return the encoded ASN.1 bytes
+     *
+     * @throws IOException
+     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
+     */
+    private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[])
            throws IOException {
 
-      if (xmldsigBytes.length != 40) {
-         throw new IOException("Invalid XMLDSIG format of DSA signature");
-      }
+        if (xmldsigBytes.length != 40) {
+            throw new IOException("Invalid XMLDSIG format of DSA signature");
+        }
 
-      int i;
+        int i;
 
-      for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--);
+        for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--);
 
-      int j = i;
+        int j = i;
 
-      if (xmldsigBytes[20 - i] < 0) {
+        if (xmldsigBytes[20 - i] < 0) {
          j += 1;
-      }
+        }
 
-      int k;
+        int k;
 
-      for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--);
+        for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--);
 
-      int l = k;
+        int l = k;
 
-      if (xmldsigBytes[40 - k] < 0) {
-         l += 1;
-      }
+        if (xmldsigBytes[40 - k] < 0) {
+            l += 1;
+        }
 
-      byte asn1Bytes[] = new byte[6 + j + l];
+        byte asn1Bytes[] = new byte[6 + j + l];
 
-      asn1Bytes[0] = 48;
-      asn1Bytes[1] = (byte) (4 + j + l);
-      asn1Bytes[2] = 2;
-      asn1Bytes[3] = (byte) j;
+        asn1Bytes[0] = 48;
+        asn1Bytes[1] = (byte) (4 + j + l);
+        asn1Bytes[2] = 2;
+        asn1Bytes[3] = (byte) j;
 
-      System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i);
+        System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i);
 
-      asn1Bytes[4 + j] = 2;
-      asn1Bytes[5 + j] = (byte) l;
+        asn1Bytes[4 + j] = 2;
+        asn1Bytes[5 + j] = (byte) l;
 
-      System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k);
+        System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k);
 
-      return asn1Bytes;
-   }
+        return asn1Bytes;
+    }
 
-   /**
-    * Method engineSetHMACOutputLength
-    *
-    * @param HMACOutputLength
-    * @throws XMLSignatureException
-    */
-   protected void engineSetHMACOutputLength(int HMACOutputLength)
-           throws XMLSignatureException {
-      throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
-   }
+    /**
+     * Method engineSetHMACOutputLength
+     *
+     * @param HMACOutputLength
+     * @throws XMLSignatureException
+     */
+    protected void engineSetHMACOutputLength(int HMACOutputLength)
+            throws XMLSignatureException {
+        throw new XMLSignatureException(
+            "algorithms.HMACOutputLengthOnlyForHMAC");
+    }
 
-   /**
-    * Method engineInitSign
-    *
-    * @param signingKey
-    * @param algorithmParameterSpec
-    * @throws XMLSignatureException
-    */
-   protected void engineInitSign(
-           Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
-              throws XMLSignatureException {
-      throw new XMLSignatureException(
-         "algorithms.CannotUseAlgorithmParameterSpecOnDSA");
-   }
+    /**
+     * Method engineInitSign
+     *
+     * @param signingKey
+     * @param algorithmParameterSpec
+     * @throws XMLSignatureException
+     */
+    protected void engineInitSign(
+        Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
+            throws XMLSignatureException {
+        throw new XMLSignatureException(
+            "algorithms.CannotUseAlgorithmParameterSpecOnDSA");
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,384 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright  1999-2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.algorithms.implementations;
+
+
+
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchProviderException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper;
+import com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithmSpi;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignature;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
+import com.sun.org.apache.xml.internal.security.utils.Base64;
+
+
+/**
+ *
+ * @author $Author: mullan $
+ */
+public abstract class SignatureECDSA extends SignatureAlgorithmSpi {
+
+   /** {@link java.util.logging} logging facility */
+    static java.util.logging.Logger log =
+        java.util.logging.Logger.getLogger(SignatureECDSA.class.getName());
+
+    /** @inheritDoc */
+   public abstract String engineGetURI();
+
+   /** Field algorithm */
+   private java.security.Signature _signatureAlgorithm = null;
+
+   /**
+    * Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.
+    *
+    * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value
+    * pairs; the XML Signature requires the core BigInteger values.
+    *
+    * @param asn1Bytes
+    * @return the decode bytes
+    *
+    * @throws IOException
+    * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
+    * @see <A HREF="ftp://ftp.rfc-editor.org/in-notes/rfc4050.txt">3.3. ECDSA Signatures</A>
+    */
+   private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[])
+           throws IOException {
+
+      byte rLength = asn1Bytes[3];
+      int i;
+
+      for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--);
+
+      byte sLength = asn1Bytes[5 + rLength];
+      int j;
+
+      for (j = sLength;
+              (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--);
+
+      if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2)
+              || (asn1Bytes[2] != 2) || (i > 24)
+              || (asn1Bytes[4 + rLength] != 2) || (j > 24)) {
+         throw new IOException("Invalid ASN.1 format of ECDSA signature");
+      }
+      byte xmldsigBytes[] = new byte[48];
+
+      System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 24 - i,
+                          i);
+      System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes,
+                          48 - j, j);
+
+       return xmldsigBytes;
+   }
+
+   /**
+    * Converts a XML Signature ECDSA Value to an ASN.1 DSA value.
+    *
+    * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value
+    * pairs; the XML Signature requires the core BigInteger values.
+    *
+    * @param xmldsigBytes
+    * @return the encoded ASN.1 bytes
+    *
+    * @throws IOException
+    * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
+    * @see <A HREF="ftp://ftp.rfc-editor.org/in-notes/rfc4050.txt">3.3. ECDSA Signatures</A>
+    */
+   private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[])
+           throws IOException {
+
+      if (xmldsigBytes.length != 48) {
+         throw new IOException("Invalid XMLDSIG format of ECDSA signature");
+      }
+
+      int i;
+
+      for (i = 24; (i > 0) && (xmldsigBytes[24 - i] == 0); i--);
+
+      int j = i;
+
+      if (xmldsigBytes[24 - i] < 0) {
+         j += 1;
+      }
+
+      int k;
+
+      for (k = 24; (k > 0) && (xmldsigBytes[48 - k] == 0); k--);
+
+      int l = k;
+
+      if (xmldsigBytes[48 - k] < 0) {
+         l += 1;
+      }
+
+      byte asn1Bytes[] = new byte[6 + j + l];
+
+      asn1Bytes[0] = 48;
+      asn1Bytes[1] = (byte) (4 + j + l);
+      asn1Bytes[2] = 2;
+      asn1Bytes[3] = (byte) j;
+
+      System.arraycopy(xmldsigBytes, 24 - i, asn1Bytes, (4 + j) - i, i);
+
+      asn1Bytes[4 + j] = 2;
+      asn1Bytes[5 + j] = (byte) l;
+
+      System.arraycopy(xmldsigBytes, 48 - k, asn1Bytes, (6 + j + l) - k, k);
+
+      return asn1Bytes;
+   }
+
+   /**
+    * Constructor SignatureRSA
+    *
+    * @throws XMLSignatureException
+    */
+   public SignatureECDSA() throws XMLSignatureException {
+
+      String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+
+      if (log.isLoggable(java.util.logging.Level.FINE))
+        log.log(java.util.logging.Level.FINE, "Created SignatureECDSA using " + algorithmID);
+      String provider=JCEMapper.getProviderId();
+      try {
+         if (provider==null) {
+                this._signatureAlgorithm = Signature.getInstance(algorithmID);
+         } else {
+                this._signatureAlgorithm = Signature.getInstance(algorithmID,provider);
+         }
+      } catch (java.security.NoSuchAlgorithmException ex) {
+         Object[] exArgs = { algorithmID,
+                             ex.getLocalizedMessage() };
+
+         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+      } catch (NoSuchProviderException ex) {
+         Object[] exArgs = { algorithmID,
+                                                 ex.getLocalizedMessage() };
+
+         throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
+        }
+   }
+
+   /** @inheritDoc */
+   protected void engineSetParameter(AlgorithmParameterSpec params)
+           throws XMLSignatureException {
+
+      try {
+         this._signatureAlgorithm.setParameter(params);
+      } catch (InvalidAlgorithmParameterException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected boolean engineVerify(byte[] signature)
+           throws XMLSignatureException {
+
+      try {
+         byte[] jcebytes = SignatureECDSA.convertXMLDSIGtoASN1(signature);
+
+         if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "Called ECDSA.verify() on " + Base64.encode(signature));
+
+         return this._signatureAlgorithm.verify(jcebytes);
+      } catch (SignatureException ex) {
+         throw new XMLSignatureException("empty", ex);
+      } catch (IOException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
+
+      if (!(publicKey instanceof PublicKey)) {
+         String supplied = publicKey.getClass().getName();
+         String needed = PublicKey.class.getName();
+         Object exArgs[] = { supplied, needed };
+
+         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
+                                         exArgs);
+      }
+
+      try {
+         this._signatureAlgorithm.initVerify((PublicKey) publicKey);
+      } catch (InvalidKeyException ex) {
+            // reinstantiate Signature object to work around bug in JDK
+            // see: http://bugs.sun.com/view_bug.do?bug_id=4953555
+            Signature sig = this._signatureAlgorithm;
+            try {
+                this._signatureAlgorithm = Signature.getInstance
+                    (_signatureAlgorithm.getAlgorithm());
+            } catch (Exception e) {
+                // this shouldn't occur, but if it does, restore previous
+                // Signature
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Exception when reinstantiating Signature:" + e);
+                }
+                this._signatureAlgorithm = sig;
+            }
+            throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected byte[] engineSign() throws XMLSignatureException {
+
+      try {
+         byte jcebytes[] = this._signatureAlgorithm.sign();
+
+         return SignatureECDSA.convertASN1toXMLDSIG(jcebytes);
+      } catch (SignatureException ex) {
+         throw new XMLSignatureException("empty", ex);
+      } catch (IOException ex) {
+          throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
+           throws XMLSignatureException {
+
+      if (!(privateKey instanceof PrivateKey)) {
+         String supplied = privateKey.getClass().getName();
+         String needed = PrivateKey.class.getName();
+         Object exArgs[] = { supplied, needed };
+
+         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
+                                         exArgs);
+      }
+
+      try {
+         this._signatureAlgorithm.initSign((PrivateKey) privateKey,
+                                           secureRandom);
+      } catch (InvalidKeyException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineInitSign(Key privateKey) throws XMLSignatureException {
+
+      if (!(privateKey instanceof PrivateKey)) {
+         String supplied = privateKey.getClass().getName();
+         String needed = PrivateKey.class.getName();
+         Object exArgs[] = { supplied, needed };
+
+         throw new XMLSignatureException("algorithms.WrongKeyForThisOperation",
+                                         exArgs);
+      }
+
+      try {
+         this._signatureAlgorithm.initSign((PrivateKey) privateKey);
+      } catch (InvalidKeyException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineUpdate(byte[] input) throws XMLSignatureException {
+
+      try {
+         this._signatureAlgorithm.update(input);
+      } catch (SignatureException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineUpdate(byte input) throws XMLSignatureException {
+
+      try {
+         this._signatureAlgorithm.update(input);
+      } catch (SignatureException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected void engineUpdate(byte buf[], int offset, int len)
+           throws XMLSignatureException {
+
+      try {
+         this._signatureAlgorithm.update(buf, offset, len);
+      } catch (SignatureException ex) {
+         throw new XMLSignatureException("empty", ex);
+      }
+   }
+
+   /** @inheritDoc */
+   protected String engineGetJCEAlgorithmString() {
+      return this._signatureAlgorithm.getAlgorithm();
+   }
+
+   /** @inheritDoc */
+   protected String engineGetJCEProviderName() {
+      return this._signatureAlgorithm.getProvider().getName();
+   }
+
+   /** @inheritDoc */
+   protected void engineSetHMACOutputLength(int HMACOutputLength)
+           throws XMLSignatureException {
+      throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
+   }
+
+   /** @inheritDoc */
+   protected void engineInitSign(
+           Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
+              throws XMLSignatureException {
+      throw new XMLSignatureException(
+         "algorithms.CannotUseAlgorithmParameterSpecOnRSA");
+   }
+
+   /**
+    * Class SignatureRSASHA1
+    *
+    * @author $Author: mullan $
+    * @version $Revision: 1.2 $
+    */
+   public static class SignatureECDSASHA1 extends SignatureECDSA {
+
+      /**
+       * Constructor SignatureRSASHA1
+       *
+       * @throws XMLSignatureException
+       */
+      public SignatureECDSASHA1() throws XMLSignatureException {
+         super();
+      }
+
+      /** @inheritDoc */
+      public String engineGetURI() {
+         return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1;
+      }
+   }
+
+}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/CanonicalizationException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/CanonicalizationException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright  1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.c14n;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.io.OutputStream;
 import java.util.HashMap;
@@ -37,318 +35,326 @@
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
-
 /**
  *
- *
  * @author Christian Geuer-Pollmann
  */
 public class Canonicalizer {
 
-   //J-
-   /** The output encoding of canonicalized data */
-   public static final String ENCODING = "UTF8";
-
+    /** The output encoding of canonicalized data */
+    public static final String ENCODING = "UTF8";
 
-   /**
-     * XPath Expresion for selecting every node and continuos comments joined in only one node
+    /**
+     * XPath Expresion for selecting every node and continuous comments joined
+     * in only one node
      */
-    public static final String XPATH_C14N_WITH_COMMENTS_SINGLE_NODE = "(.//. | .//@* | .//namespace::*)";
+    public static final String XPATH_C14N_WITH_COMMENTS_SINGLE_NODE =
+        "(.//. | .//@* | .//namespace::*)";
 
-
-   /**
+    /**
      * The URL defined in XML-SEC Rec for inclusive c14n <b>without</b> comments.
      */
-   public static final String ALGO_ID_C14N_OMIT_COMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
-   /**
-    * The URL defined in XML-SEC Rec for inclusive c14n <b>with</b> comments.
-    */
-   public static final String ALGO_ID_C14N_WITH_COMMENTS = ALGO_ID_C14N_OMIT_COMMENTS + "#WithComments";
-   /**
-    * The URL defined in XML-SEC Rec for exclusive c14n <b>without</b> comments.
-    */
-   public static final String ALGO_ID_C14N_EXCL_OMIT_COMMENTS = "http://www.w3.org/2001/10/xml-exc-c14n#";
-   /**
-    * The URL defined in XML-SEC Rec for exclusive c14n <b>with</b> comments.
-    */
-   public static final String ALGO_ID_C14N_EXCL_WITH_COMMENTS = ALGO_ID_C14N_EXCL_OMIT_COMMENTS + "WithComments";
-
-   static boolean _alreadyInitialized = false;
-   static Map _canonicalizerHash = null;
-
-   protected CanonicalizerSpi canonicalizerSpi = null;
-   //J+
+    public static final String ALGO_ID_C14N_OMIT_COMMENTS =
+        "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
+    /**
+     * The URL defined in XML-SEC Rec for inclusive c14n <b>with</b> comments.
+     */
+    public static final String ALGO_ID_C14N_WITH_COMMENTS =
+        ALGO_ID_C14N_OMIT_COMMENTS + "#WithComments";
+    /**
+     * The URL defined in XML-SEC Rec for exclusive c14n <b>without</b> comments.
+     */
+    public static final String ALGO_ID_C14N_EXCL_OMIT_COMMENTS =
+        "http://www.w3.org/2001/10/xml-exc-c14n#";
+    /**
+     * The URL defined in XML-SEC Rec for exclusive c14n <b>with</b> comments.
+     */
+    public static final String ALGO_ID_C14N_EXCL_WITH_COMMENTS =
+        ALGO_ID_C14N_EXCL_OMIT_COMMENTS + "WithComments";
+    /**
+     * The URI for inclusive c14n 1.1 <b>without</b> comments.
+     */
+    public static final String ALGO_ID_C14N11_OMIT_COMMENTS =
+        "http://www.w3.org/2006/12/xml-c14n11";
+    /**
+     * The URI for inclusive c14n 1.1 <b>with</b> comments.
+     */
+    public static final String ALGO_ID_C14N11_WITH_COMMENTS =
+        ALGO_ID_C14N11_OMIT_COMMENTS + "#WithComments";
 
-   /**
-    * Method init
-    *
-    */
-   public static void init() {
+    static boolean _alreadyInitialized = false;
+    static Map _canonicalizerHash = null;
+
+    protected CanonicalizerSpi canonicalizerSpi = null;
+
+    /**
+     * Method init
+     *
+     */
+    public static void init() {
 
-      if (!Canonicalizer._alreadyInitialized) {
-         Canonicalizer._canonicalizerHash = new HashMap(10);
-         Canonicalizer._alreadyInitialized = true;
-      }
-   }
+        if (!Canonicalizer._alreadyInitialized) {
+            Canonicalizer._canonicalizerHash = new HashMap(10);
+            Canonicalizer._alreadyInitialized = true;
+        }
+    }
 
-   /**
-    * Constructor Canonicalizer
-    *
-    * @param algorithmURI
-    * @throws InvalidCanonicalizerException
-    */
-   private Canonicalizer(String algorithmURI)
+    /**
+     * Constructor Canonicalizer
+     *
+     * @param algorithmURI
+     * @throws InvalidCanonicalizerException
+     */
+    private Canonicalizer(String algorithmURI)
            throws InvalidCanonicalizerException {
 
-      try {
-         Class implementingClass = getImplementingClass(algorithmURI);
+        try {
+            Class implementingClass = getImplementingClass(algorithmURI);
 
-         this.canonicalizerSpi =
-            (CanonicalizerSpi) implementingClass.newInstance();
-         this.canonicalizerSpi.reset=true;
-      } catch (Exception e) {
-         Object exArgs[] = { algorithmURI };
+            this.canonicalizerSpi =
+                (CanonicalizerSpi) implementingClass.newInstance();
+            this.canonicalizerSpi.reset=true;
+        } catch (Exception e) {
+            Object exArgs[] = { algorithmURI };
 
-         throw new InvalidCanonicalizerException(
-            "signature.Canonicalizer.UnknownCanonicalizer", exArgs);
-      }
-   }
+            throw new InvalidCanonicalizerException(
+               "signature.Canonicalizer.UnknownCanonicalizer", exArgs);
+        }
+    }
 
-   /**
-    * Method getInstance
-    *
-    * @param algorithmURI
-    * @return a Conicicalizer instance ready for the job
-    * @throws InvalidCanonicalizerException
-    */
-   public static final Canonicalizer getInstance(String algorithmURI)
+    /**
+     * Method getInstance
+     *
+     * @param algorithmURI
+     * @return a Conicicalizer instance ready for the job
+     * @throws InvalidCanonicalizerException
+     */
+    public static final Canonicalizer getInstance(String algorithmURI)
            throws InvalidCanonicalizerException {
 
-      Canonicalizer c14nizer = new Canonicalizer(algorithmURI);
+        Canonicalizer c14nizer = new Canonicalizer(algorithmURI);
 
-      return c14nizer;
-   }
+        return c14nizer;
+    }
 
-   /**
-    * Method register
-    *
-    * @param algorithmURI
-    * @param implementingClass
-    * @throws AlgorithmAlreadyRegisteredException
-    */
-   public static void register(String algorithmURI, String implementingClass)
+    /**
+     * Method register
+     *
+     * @param algorithmURI
+     * @param implementingClass
+     * @throws AlgorithmAlreadyRegisteredException
+     */
+    public static void register(String algorithmURI, String implementingClass)
            throws AlgorithmAlreadyRegisteredException {
 
-      // check whether URI is already registered
-      Class registeredClass = getImplementingClass(algorithmURI);
+        // check whether URI is already registered
+        Class registeredClass = getImplementingClass(algorithmURI);
 
-      if (registeredClass != null)  {
-         Object exArgs[] = { algorithmURI, registeredClass };
+        if (registeredClass != null)  {
+            Object exArgs[] = { algorithmURI, registeredClass };
 
-         throw new AlgorithmAlreadyRegisteredException(
-            "algorithm.alreadyRegistered", exArgs);
-      }
+            throw new AlgorithmAlreadyRegisteredException(
+                "algorithm.alreadyRegistered", exArgs);
+        }
 
-      try {
-                _canonicalizerHash.put(algorithmURI, Class.forName(implementingClass));
+        try {
+            _canonicalizerHash.put(algorithmURI, Class.forName(implementingClass));
         } catch (ClassNotFoundException e) {
-                throw new RuntimeException("c14n class not found");
+            throw new RuntimeException("c14n class not found");
         }
-   }
+    }
 
-   /**
-    * Method getURI
-    *
-    * @return the URI defined for this c14n instance.
-    */
-   public final String getURI() {
-      return this.canonicalizerSpi.engineGetURI();
-   }
+    /**
+     * Method getURI
+     *
+     * @return the URI defined for this c14n instance.
+     */
+    public final String getURI() {
+        return this.canonicalizerSpi.engineGetURI();
+    }
 
-   /**
-    * Method getIncludeComments
-    *
-    * @return true if the c14n respect the comments.
-    */
-   public boolean getIncludeComments() {
-      return this.canonicalizerSpi.engineGetIncludeComments();
-   }
+    /**
+     * Method getIncludeComments
+     *
+     * @return true if the c14n respect the comments.
+     */
+    public boolean getIncludeComments() {
+        return this.canonicalizerSpi.engineGetIncludeComments();
+    }
 
-   /**
-    * This method tries to canonicalize the given bytes. It's possible to even
-    * canonicalize non-wellformed sequences if they are well-formed after being
-    * wrapped with a <CODE>&gt;a&lt;...&gt;/a&lt;</CODE>.
-    *
-    * @param inputBytes
-    * @return the result of the conicalization.
-    * @throws CanonicalizationException
-    * @throws java.io.IOException
-    * @throws javax.xml.parsers.ParserConfigurationException
-    * @throws org.xml.sax.SAXException
-    */
-   public byte[] canonicalize(byte[] inputBytes)
+    /**
+     * This method tries to canonicalize the given bytes. It's possible to even
+     * canonicalize non-wellformed sequences if they are well-formed after being
+     * wrapped with a <CODE>&gt;a&lt;...&gt;/a&lt;</CODE>.
+     *
+     * @param inputBytes
+     * @return the result of the conicalization.
+     * @throws CanonicalizationException
+     * @throws java.io.IOException
+     * @throws javax.xml.parsers.ParserConfigurationException
+     * @throws org.xml.sax.SAXException
+     */
+    public byte[] canonicalize(byte[] inputBytes)
            throws javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException, org.xml.sax.SAXException,
                   CanonicalizationException {
 
-      ByteArrayInputStream bais = new ByteArrayInputStream(inputBytes);
-      InputSource in = new InputSource(bais);
-      DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        ByteArrayInputStream bais = new ByteArrayInputStream(inputBytes);
+        InputSource in = new InputSource(bais);
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
 
-      dfactory.setNamespaceAware(true);
+        dfactory.setNamespaceAware(true);
 
-      // needs to validate for ID attribute nomalization
-      dfactory.setValidating(true);
+        // needs to validate for ID attribute nomalization
+        dfactory.setValidating(true);
 
-      DocumentBuilder db = dfactory.newDocumentBuilder();
+        DocumentBuilder db = dfactory.newDocumentBuilder();
 
-      /*
-       * for some of the test vectors from the specification,
-       * there has to be a validatin parser for ID attributes, default
-       * attribute values, NMTOKENS, etc.
-       * Unfortunaltely, the test vectors do use different DTDs or
-       * even no DTD. So Xerces 1.3.1 fires many warnings about using
-       * ErrorHandlers.
-       *
-       * Text from the spec:
-       *
-       * The input octet stream MUST contain a well-formed XML document,
-       * but the input need not be validated. However, the attribute
-       * value normalization and entity reference resolution MUST be
-       * performed in accordance with the behaviors of a validating
-       * XML processor. As well, nodes for default attributes (declared
-       * in the ATTLIST with an AttValue but not specified) are created
-       * in each element. Thus, the declarations in the document type
-       * declaration are used to help create the canonical form, even
-       * though the document type declaration is not retained in the
-       * canonical form.
-       *
-       */
-      db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils
-         .IgnoreAllErrorHandler());
+        /*
+         * for some of the test vectors from the specification,
+         * there has to be a validatin parser for ID attributes, default
+         * attribute values, NMTOKENS, etc.
+         * Unfortunaltely, the test vectors do use different DTDs or
+         * even no DTD. So Xerces 1.3.1 fires many warnings about using
+         * ErrorHandlers.
+         *
+         * Text from the spec:
+         *
+         * The input octet stream MUST contain a well-formed XML document,
+         * but the input need not be validated. However, the attribute
+         * value normalization and entity reference resolution MUST be
+         * performed in accordance with the behaviors of a validating
+         * XML processor. As well, nodes for default attributes (declared
+         * in the ATTLIST with an AttValue but not specified) are created
+         * in each element. Thus, the declarations in the document type
+         * declaration are used to help create the canonical form, even
+         * though the document type declaration is not retained in the
+         * canonical form.
+         *
+         */
+        db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils
+            .IgnoreAllErrorHandler());
 
-      Document document = db.parse(in);
-      byte result[] = this.canonicalizeSubtree(document);
+        Document document = db.parse(in);
+        byte result[] = this.canonicalizeSubtree(document);
 
-      return result;
-   }
+        return result;
+    }
 
-   /**
-    * Canonicalizes the subtree rooted by <CODE>node</CODE>.
-    *
-    * @param node The node to canicalize
-    * @return the result of the c14n.
-    *
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeSubtree(Node node)
+    /**
+     * Canonicalizes the subtree rooted by <CODE>node</CODE>.
+     *
+     * @param node The node to canicalize
+     * @return the result of the c14n.
+     *
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeSubtree(Node node)
            throws CanonicalizationException {
-      return this.canonicalizerSpi.engineCanonicalizeSubTree(node);
-   }
+        return this.canonicalizerSpi.engineCanonicalizeSubTree(node);
+    }
 
-   /**
-    * Canonicalizes the subtree rooted by <CODE>node</CODE>.
-    *
-    * @param node
-    * @param inclusiveNamespaces
-    * @return the result of the c14n.
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeSubtree(Node node, String inclusiveNamespaces)
+    /**
+     * Canonicalizes the subtree rooted by <CODE>node</CODE>.
+     *
+     * @param node
+     * @param inclusiveNamespaces
+     * @return the result of the c14n.
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeSubtree(Node node, String inclusiveNamespaces)
            throws CanonicalizationException {
-      return this.canonicalizerSpi.engineCanonicalizeSubTree(node,
+        return this.canonicalizerSpi.engineCanonicalizeSubTree(node,
               inclusiveNamespaces);
-   }
+    }
 
-   /**
-    * Canonicalizes an XPath node set. The <CODE>xpathNodeSet</CODE> is treated
-    * as a list of XPath nodes, not as a list of subtrees.
-    *
-    * @param xpathNodeSet
-    * @return the result of the c14n.
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeXPathNodeSet(NodeList xpathNodeSet)
+    /**
+     * Canonicalizes an XPath node set. The <CODE>xpathNodeSet</CODE> is treated
+     * as a list of XPath nodes, not as a list of subtrees.
+     *
+     * @param xpathNodeSet
+     * @return the result of the c14n.
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeXPathNodeSet(NodeList xpathNodeSet)
            throws CanonicalizationException {
-      return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet);
-   }
+        return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet);
+    }
 
-   /**
-    * Canonicalizes an XPath node set. The <CODE>xpathNodeSet</CODE> is treated
-    * as a list of XPath nodes, not as a list of subtrees.
-    *
-    * @param xpathNodeSet
-    * @param inclusiveNamespaces
-    * @return the result of the c14n.
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeXPathNodeSet(
+    /**
+     * Canonicalizes an XPath node set. The <CODE>xpathNodeSet</CODE> is treated
+     * as a list of XPath nodes, not as a list of subtrees.
+     *
+     * @param xpathNodeSet
+     * @param inclusiveNamespaces
+     * @return the result of the c14n.
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeXPathNodeSet(
            NodeList xpathNodeSet, String inclusiveNamespaces)
               throws CanonicalizationException {
-      return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet,
+        return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet,
               inclusiveNamespaces);
-   }
+    }
 
-   /**
-    * Canonicalizes an XPath node set.
-    *
-    * @param xpathNodeSet
-    * @return the result of the c14n.
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet)
+    /**
+     * Canonicalizes an XPath node set.
+     *
+     * @param xpathNodeSet
+     * @return the result of the c14n.
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet)
            throws CanonicalizationException {
-       return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet);
-   }
+        return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet);
+    }
 
-   /**
-    * Canonicalizes an XPath node set.
-    *
-    * @param xpathNodeSet
-    * @param inclusiveNamespaces
-    * @return the result of the c14n.
-    * @throws CanonicalizationException
-    */
-   public byte[] canonicalizeXPathNodeSet(
-           Set xpathNodeSet, String inclusiveNamespaces)
-              throws CanonicalizationException {
-       return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet,
-              inclusiveNamespaces);
-   }
+    /**
+     * Canonicalizes an XPath node set.
+     *
+     * @param xpathNodeSet
+     * @param inclusiveNamespaces
+     * @return the result of the c14n.
+     * @throws CanonicalizationException
+     */
+    public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet,
+        String inclusiveNamespaces) throws CanonicalizationException {
+        return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet,
+            inclusiveNamespaces);
+    }
 
-   /**
-    * Sets the writter where the cannocalization ends. ByteArrayOutputStream if
-    * none is setted.
-    * @param os
-    */
-   public void setWriter(OutputStream os) {
-            this.canonicalizerSpi.setWriter(os);
-   }
+    /**
+     * Sets the writer where the canonicalization ends.  ByteArrayOutputStream
+     * if none is set.
+     * @param os
+     */
+    public void setWriter(OutputStream os) {
+        this.canonicalizerSpi.setWriter(os);
+    }
 
-   /**
-    * Returns the name of the implementing {@link CanonicalizerSpi} class
-    *
-    * @return the name of the implementing {@link CanonicalizerSpi} class
-    */
-   public String getImplementingCanonicalizerClass() {
-      return this.canonicalizerSpi.getClass().getName();
-   }
+    /**
+     * Returns the name of the implementing {@link CanonicalizerSpi} class
+     *
+     * @return the name of the implementing {@link CanonicalizerSpi} class
+     */
+    public String getImplementingCanonicalizerClass() {
+        return this.canonicalizerSpi.getClass().getName();
+    }
 
-   /**
-    * Method getImplementingClass
-    *
-    * @param URI
-    * @return the name of the class that implements the give URI
-    */
-   private static Class getImplementingClass(String URI) {
-      return (Class) _canonicalizerHash.get(URI);
-   }
+    /**
+     * Method getImplementingClass
+     *
+     * @param URI
+     * @return the name of the class that implements the given URI
+     */
+    private static Class getImplementingClass(String URI) {
+        return (Class) _canonicalizerHash.get(URI);
+    }
 
-   /**
-    * Set the canonicalizator behaviour to not reset.
-    *
-    */
-   public void notReset() {
-            this.canonicalizerSpi.reset=false;
-   }
+    /**
+     * Set the canonicalizer behaviour to not reset.
+     */
+    public void notReset() {
+        this.canonicalizerSpi.reset = false;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,17 +20,17 @@
  */
 package com.sun.org.apache.xml.internal.security.c14n.helper;
 
-
-
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import org.w3c.dom.Attr;
-
+import java.io.Serializable;
+import java.util.Comparator;
 
 /**
  * Compares two attributes based on the C14n specification.
  *
  * <UL>
- * <LI>Namespace nodes have a lesser document order position than attribute nodes.
+ * <LI>Namespace nodes have a lesser document order position than attribute
+ *   nodes.
  * <LI> An element's namespace nodes are sorted lexicographically by
  *   local name (the default namespace node, if one exists, has no
  *   local name and is therefore lexicographically least).
@@ -40,104 +39,89 @@
  *   key (an empty namespace URI is lexicographically least).
  * </UL>
  *
- * $todo$ Should we implement java.util.Comparator and import java.util.Arrays to use Arrays.sort(intarray);
  * @author Christian Geuer-Pollmann
  */
-public class AttrCompare implements java.util.Comparator {
+public class AttrCompare implements Comparator, Serializable {
 
-   private final int ATTR0_BEFORE_ATTR1 = -1;
-   private final int ATTR1_BEFORE_ATTR0 = 1;
+    private final static long serialVersionUID = -7113259629930576230L;
+    private final static int ATTR0_BEFORE_ATTR1 = -1;
+    private final static int ATTR1_BEFORE_ATTR0 = 1;
+    private final static String XMLNS=Constants.NamespaceSpecNS;
 
-   private final static String XMLNS=Constants.NamespaceSpecNS;
-   /**
-    * Compares two attributes based on the C14n specification.
-    *
-    * <UL>
-    * <LI>Namespace nodes have a lesser document order position than attribute nodes.
-    * <LI> An element's namespace nodes are sorted lexicographically by
-    *   local name (the default namespace node, if one exists, has no
-    *   local name and is therefore lexicographically least).
-    * <LI> An element's attribute nodes are sorted lexicographically with
-    *   namespace URI as the primary key and local name as the secondary
-    *   key (an empty namespace URI is lexicographically least).
-    * </UL>
-    *
-    * @param obj0 casted Attr
-    * @param obj1 casted Attr
-    * @return returns a negative integer, zero, or a positive integer as obj0 is less than, equal to, or greater than obj1
-    *
-    */
-   public int compare(Object obj0, Object obj1) {
+    /**
+     * Compares two attributes based on the C14n specification.
+     *
+     * <UL>
+     * <LI>Namespace nodes have a lesser document order position than
+     *   attribute nodes.
+     * <LI> An element's namespace nodes are sorted lexicographically by
+     *   local name (the default namespace node, if one exists, has no
+     *   local name and is therefore lexicographically least).
+     * <LI> An element's attribute nodes are sorted lexicographically with
+     *   namespace URI as the primary key and local name as the secondary
+     *   key (an empty namespace URI is lexicographically least).
+     * </UL>
+     *
+     * @param obj0 casted Attr
+     * @param obj1 casted Attr
+     * @return returns a negative integer, zero, or a positive integer as
+     *   obj0 is less than, equal to, or greater than obj1
+     *
+     */
+    public int compare(Object obj0, Object obj1) {
 
-      Attr attr0 = (Attr) obj0;
-      Attr attr1 = (Attr) obj1;
-      String namespaceURI0 = attr0.getNamespaceURI();
-      String namespaceURI1 = attr1.getNamespaceURI();
+        Attr attr0 = (Attr) obj0;
+        Attr attr1 = (Attr) obj1;
+        String namespaceURI0 = attr0.getNamespaceURI();
+        String namespaceURI1 = attr1.getNamespaceURI();
 
-      boolean isNamespaceAttr0 =
-        XMLNS.equals(namespaceURI0);
-      boolean isNamespaceAttr1 =
-        XMLNS.equals(namespaceURI1);
+        boolean isNamespaceAttr0 = XMLNS==namespaceURI0;
+        boolean isNamespaceAttr1 = XMLNS==namespaceURI1;
 
-      if (isNamespaceAttr0) {
-         if (isNamespaceAttr1) {
-
-            // both are namespaces
-            String localname0 = attr0.getLocalName();
-            String localname1 = attr1.getLocalName();
+        if (isNamespaceAttr0) {
+            if (isNamespaceAttr1) {
+                // both are namespaces
+                String localname0 = attr0.getLocalName();
+                String localname1 = attr1.getLocalName();
 
-            if (localname0.equals("xmlns")) {
-               localname0 = "";
-            }
+                if (localname0.equals("xmlns")) {
+                    localname0 = "";
+                }
 
-            if (localname1.equals("xmlns")) {
-               localname1 = "";
-            }
+                if (localname1.equals("xmlns")) {
+                    localname1 = "";
+                }
 
-            return localname0.compareTo(localname1);
-         }
-         // attr0 is a namespace, attr1 is not
-         return ATTR0_BEFORE_ATTR1;
+                return localname0.compareTo(localname1);
+            }
+            // attr0 is a namespace, attr1 is not
+            return ATTR0_BEFORE_ATTR1;
+        }
 
-      }
-      if (isNamespaceAttr1) {
-
+        if (isNamespaceAttr1) {
             // attr1 is a namespace, attr0 is not
             return ATTR1_BEFORE_ATTR0;
-      }
-
-      // none is a namespae
+        }
 
-      if (namespaceURI0 == null) {
-        if (namespaceURI1 == null) {
-                /*
-                 String localName0 = attr0.getLocalName();
-                 String localName1 = attr1.getLocalName();
-                 return localName0.compareTo(localName1);
-                 */
-
+        // none is a namespace
+        if (namespaceURI0 == null) {
+            if (namespaceURI1 == null) {
                 String name0 = attr0.getName();
                 String name1 = attr1.getName();
                 return name0.compareTo(name1);
+            }
+            return ATTR0_BEFORE_ATTR1;
         }
-        return ATTR0_BEFORE_ATTR1;
 
-      }
-      if (namespaceURI1 == null) {
-                return ATTR1_BEFORE_ATTR0;
-      }
-      int a = namespaceURI0.compareTo(namespaceURI1);
+        if (namespaceURI1 == null) {
+            return ATTR1_BEFORE_ATTR0;
+        }
 
-      if (a != 0) {
-        return a;
-      }
-      /*
-      String localName0 = ;
-      String localName1 =;*/
+        int a = namespaceURI0.compareTo(namespaceURI1);
+        if (a != 0) {
+            return a;
+        }
 
-      return (attr0.getLocalName())
-                                .compareTo( attr1.getLocalName());
-
-   }
-
+        return (attr0.getLocalName()).compareTo(attr1.getLocalName());
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,684 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.c14n.implementations;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import javax.xml.parsers.ParserConfigurationException;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+import java.util.logging.Logger;
+import java.util.logging.Logger;
+import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
+import com.sun.org.apache.xml.internal.security.c14n.helper.C14nHelper;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.utils.Constants;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+
+/**
+ * Implements <A HREF="http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/">
+ * Canonical XML Version 1.1</A>, a W3C Proposed Recommendation from 29
+ * January 2008.
+ *
+ * @author Sean Mullan
+ * @author Raul Benito
+ * @version $Revision: 1.2 $
+ */
+public abstract class Canonicalizer11 extends CanonicalizerBase {
+    boolean firstCall = true;
+    final SortedSet result = new TreeSet(COMPARE);
+    static final String XMLNS_URI = Constants.NamespaceSpecNS;
+    static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS;
+
+    static Logger log = Logger.getLogger(Canonicalizer11.class.getName());
+
+    static class XmlAttrStack {
+        int currentLevel = 0;
+        int lastlevel = 0;
+        XmlsStackElement cur;
+        static class XmlsStackElement {
+            int level;
+            boolean rendered = false;
+            List nodes = new ArrayList();
+        };
+        List levels = new ArrayList();
+        void push(int level) {
+            currentLevel = level;
+            if (currentLevel == -1)
+                return;
+            cur = null;
+            while (lastlevel >= currentLevel) {
+                levels.remove(levels.size() - 1);
+                if (levels.size() == 0) {
+                    lastlevel = 0;
+                    return;
+                }
+                lastlevel=((XmlsStackElement)levels.get(levels.size()-1)).level;
+            }
+        }
+        void addXmlnsAttr(Attr n) {
+            if (cur == null) {
+                cur = new XmlsStackElement();
+                cur.level = currentLevel;
+                levels.add(cur);
+                lastlevel = currentLevel;
+            }
+            cur.nodes.add(n);
+        }
+        void getXmlnsAttr(Collection col) {
+            if (cur == null) {
+                cur = new XmlsStackElement();
+                cur.level = currentLevel;
+                lastlevel = currentLevel;
+                levels.add(cur);
+            }
+            int size = levels.size() - 2;
+            boolean parentRendered = false;
+            XmlsStackElement e = null;
+            if (size == -1) {
+                parentRendered = true;
+            } else {
+                e = (XmlsStackElement) levels.get(size);
+                if (e.rendered && e.level+1 == currentLevel)
+                    parentRendered = true;
+            }
+            if (parentRendered) {
+                col.addAll(cur.nodes);
+                cur.rendered = true;
+                return;
+            }
+
+            Map loa = new HashMap();
+            List baseAttrs = new ArrayList();
+            boolean successiveOmitted = true;
+            for (;size>=0;size--) {
+                e = (XmlsStackElement) levels.get(size);
+                if (e.rendered) {
+                    successiveOmitted = false;
+                }
+                Iterator it = e.nodes.iterator();
+                while (it.hasNext() && successiveOmitted) {
+                    Attr n = (Attr) it.next();
+                    if (n.getLocalName().equals("base")) {
+                        if (!e.rendered) {
+                            baseAttrs.add(n);
+                        }
+                    } else if (!loa.containsKey(n.getName()))
+                        loa.put(n.getName(), n);
+                }
+            }
+            if (!baseAttrs.isEmpty()) {
+                Iterator it = cur.nodes.iterator();
+                String base = null;
+                Attr baseAttr = null;
+                while (it.hasNext()) {
+                    Attr n = (Attr) it.next();
+                    if (n.getLocalName().equals("base")) {
+                        base = n.getValue();
+                        baseAttr = n;
+                        break;
+                    }
+                }
+                it = baseAttrs.iterator();
+                while (it.hasNext()) {
+                    Attr n = (Attr) it.next();
+                    if (base == null) {
+                        base = n.getValue();
+                        baseAttr = n;
+                    } else {
+                        try {
+                            base = joinURI(n.getValue(), base);
+                        } catch (URISyntaxException ue) {
+                            ue.printStackTrace();
+                        }
+                    }
+                }
+                if (base != null && base.length() != 0) {
+                    baseAttr.setValue(base);
+                    col.add(baseAttr);
+                }
+            }
+
+            cur.rendered = true;
+            col.addAll(loa.values());
+        }
+    };
+    XmlAttrStack xmlattrStack = new XmlAttrStack();
+
+    /**
+     * Constructor Canonicalizer11
+     *
+     * @param includeComments
+     */
+    public Canonicalizer11(boolean includeComments) {
+        super(includeComments);
+    }
+
+    /**
+     * Returns the Attr[]s to be outputted for the given element.
+     * <br>
+     * The code of this method is a copy of {@link #handleAttributes(Element,
+     * NameSpaceSymbTable)},
+     * whereas it takes into account that subtree-c14n is -- well --
+     * subtree-based.
+     * So if the element in question isRoot of c14n, it's parent is not in the
+     * node set, as well as all other ancestors.
+     *
+     * @param E
+     * @param ns
+     * @return the Attr[]s to be outputted
+     * @throws CanonicalizationException
+     */
+    Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns)
+        throws CanonicalizationException {
+        if (!E.hasAttributes() && !firstCall) {
+            return null;
+        }
+        // result will contain the attrs which have to be outputted
+        final SortedSet result = this.result;
+        result.clear();
+        NamedNodeMap attrs = E.getAttributes();
+        int attrsLength = attrs.getLength();
+
+        for (int i = 0; i < attrsLength; i++) {
+            Attr N = (Attr) attrs.item(i);
+            String NUri = N.getNamespaceURI();
+
+            if (XMLNS_URI != NUri) {
+                // It's not a namespace attr node. Add to the result and
+                // continue.
+                result.add(N);
+                continue;
+            }
+
+            String NName = N.getLocalName();
+            String NValue = N.getValue();
+            if (XML.equals(NName)
+                && XML_LANG_URI.equals(NValue)) {
+                // The default mapping for xml must not be output.
+                continue;
+            }
+
+            Node n = ns.addMappingAndRender(NName, NValue, N);
+
+            if (n != null) {
+                // Render the ns definition
+                result.add(n);
+                if (C14nHelper.namespaceIsRelative(N)) {
+                    Object exArgs[] = {E.getTagName(), NName, N.getNodeValue()};
+                    throw new CanonicalizationException(
+                        "c14n.Canonicalizer.RelativeNamespace", exArgs);
+                }
+            }
+        }
+
+        if (firstCall) {
+            // It is the first node of the subtree
+            // Obtain all the namespaces defined in the parents, and added
+            // to the output.
+            ns.getUnrenderedNodes(result);
+            // output the attributes in the xml namespace.
+            xmlattrStack.getXmlnsAttr(result);
+            firstCall = false;
+        }
+
+        return result.iterator();
+    }
+
+    /**
+     * Returns the Attr[]s to be outputted for the given element.
+     * <br>
+     * IMPORTANT: This method expects to work on a modified DOM tree, i.e. a
+     * DOM which has been prepared using
+     * {@link com.sun.org.apache.xml.internal.security.utils.XMLUtils#circumventBug2650(
+     * org.w3c.dom.Document)}.
+     *
+     * @param E
+     * @param ns
+     * @return the Attr[]s to be outputted
+     * @throws CanonicalizationException
+     */
+    Iterator handleAttributes(Element E, NameSpaceSymbTable ns)
+        throws CanonicalizationException {
+        // result will contain the attrs which have to be output
+        xmlattrStack.push(ns.getLevel());
+        boolean isRealVisible = isVisibleDO(E, ns.getLevel()) == 1;
+        NamedNodeMap attrs = null;
+        int attrsLength = 0;
+        if (E.hasAttributes()) {
+            attrs = E.getAttributes();
+            attrsLength = attrs.getLength();
+        }
+
+        SortedSet result = this.result;
+        result.clear();
+
+        for (int i = 0; i < attrsLength; i++) {
+            Attr N = (Attr) attrs.item(i);
+            String NUri = N.getNamespaceURI();
+
+            if (XMLNS_URI != NUri) {
+                // A non namespace definition node.
+                if (XML_LANG_URI == NUri) {
+                    if (N.getLocalName().equals("id")) {
+                        if (isRealVisible) {
+                            // treat xml:id like any other attribute
+                            // (emit it, but don't inherit it)
+                            result.add(N);
+                        }
+                    } else {
+                        xmlattrStack.addXmlnsAttr(N);
+                    }
+                } else if (isRealVisible) {
+                    // The node is visible add the attribute to the list of
+                    // output attributes.
+                    result.add(N);
+                }
+                // keep working
+                continue;
+            }
+
+            String NName = N.getLocalName();
+            String NValue = N.getValue();
+            if ("xml".equals(NName)
+                && XML_LANG_URI.equals(NValue)) {
+                /* except omit namespace node with local name xml, which defines
+                 * the xml prefix, if its string value is
+                 * http://www.w3.org/XML/1998/namespace.
+                 */
+                continue;
+            }
+            // add the prefix binding to the ns symb table.
+            // ns.addInclusiveMapping(NName,NValue,N,isRealVisible);
+            if (isVisible(N))  {
+                if (!isRealVisible && ns.removeMappingIfRender(NName)) {
+                    continue;
+                }
+                // The xpath select this node output it if needed.
+                // Node n = ns.addMappingAndRenderXNodeSet
+                //      (NName, NValue, N, isRealVisible);
+                Node n = ns.addMappingAndRender(NName, NValue, N);
+                if (n != null) {
+                    result.add(n);
+                    if (C14nHelper.namespaceIsRelative(N)) {
+                        Object exArgs[] =
+                            { E.getTagName(), NName, N.getNodeValue() };
+                        throw new CanonicalizationException(
+                            "c14n.Canonicalizer.RelativeNamespace", exArgs);
+                    }
+                }
+            } else {
+                if (isRealVisible && NName != XMLNS) {
+                    ns.removeMapping(NName);
+                } else {
+                    ns.addMapping(NName, NValue, N);
+                }
+            }
+        }
+        if (isRealVisible) {
+            // The element is visible, handle the xmlns definition
+            Attr xmlns = E.getAttributeNodeNS(XMLNS_URI, XMLNS);
+            Node n = null;
+            if (xmlns == null) {
+                // No xmlns def just get the already defined.
+                n = ns.getMapping(XMLNS);
+            } else if (!isVisible(xmlns)) {
+                // There is a defn but the xmlns is not selected by the xpath.
+                // then xmlns=""
+                n = ns.addMappingAndRender(XMLNS, "", nullNode);
+            }
+            // output the xmlns def if needed.
+            if (n != null) {
+                result.add(n);
+            }
+            // Float all xml:* attributes of the unselected parent elements to
+            // this one. addXmlAttributes(E,result);
+            xmlattrStack.getXmlnsAttr(result);
+            ns.getUnrenderedNodes(result);
+        }
+
+        return result.iterator();
+    }
+
+    /**
+     * Always throws a CanonicalizationException because this is inclusive c14n.
+     *
+     * @param xpathNodeSet
+     * @param inclusiveNamespaces
+     * @return none it always fails
+     * @throws CanonicalizationException always
+     */
+    public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet,
+        String inclusiveNamespaces) throws CanonicalizationException {
+        throw new CanonicalizationException(
+         "c14n.Canonicalizer.UnsupportedOperation");
+    }
+
+    /**
+     * Always throws a CanonicalizationException because this is inclusive c14n.
+     *
+     * @param rootNode
+     * @param inclusiveNamespaces
+     * @return none it always fails
+     * @throws CanonicalizationException
+     */
+    public byte[] engineCanonicalizeSubTree(Node rootNode,
+        String inclusiveNamespaces) throws CanonicalizationException {
+        throw new CanonicalizationException(
+            "c14n.Canonicalizer.UnsupportedOperation");
+    }
+
+    void circumventBugIfNeeded(XMLSignatureInput input)
+        throws CanonicalizationException, ParserConfigurationException,
+        IOException, SAXException {
+        if (!input.isNeedsToBeExpanded())
+            return;
+        Document doc = null;
+        if (input.getSubNode() != null) {
+            doc = XMLUtils.getOwnerDocument(input.getSubNode());
+        } else {
+            doc = XMLUtils.getOwnerDocument(input.getNodeSet());
+        }
+        XMLUtils.circumventBug2650(doc);
+    }
+
+    void handleParent(Element e, NameSpaceSymbTable ns) {
+        if (!e.hasAttributes()) {
+            return;
+        }
+        xmlattrStack.push(-1);
+        NamedNodeMap attrs = e.getAttributes();
+        int attrsLength = attrs.getLength();
+        for (int i = 0; i < attrsLength; i++) {
+            Attr N = (Attr) attrs.item(i);
+            if (Constants.NamespaceSpecNS != N.getNamespaceURI()) {
+                // Not a namespace definition, ignore.
+                if (XML_LANG_URI == N.getNamespaceURI()) {
+                    xmlattrStack.addXmlnsAttr(N);
+                }
+                continue;
+            }
+
+            String NName = N.getLocalName();
+            String NValue = N.getNodeValue();
+            if (XML.equals(NName)
+                && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) {
+                continue;
+            }
+            ns.addMapping(NName,NValue,N);
+        }
+    }
+
+    private static String joinURI(String baseURI, String relativeURI)
+        throws URISyntaxException {
+        String bscheme = null;
+        String bauthority = null;
+        String bpath = "";
+        String bquery = null;
+        String bfragment = null; // Is this correct?
+
+        // pre-parse the baseURI
+        if (baseURI != null) {
+            if (baseURI.endsWith("..")) {
+                baseURI = baseURI + "/";
+            }
+            URI base = new URI(baseURI);
+            bscheme = base.getScheme();
+            bauthority = base.getAuthority();
+            bpath = base.getPath();
+            bquery = base.getQuery();
+            bfragment = base.getFragment();
+        }
+
+        URI r = new URI(relativeURI);
+        String rscheme = r.getScheme();
+        String rauthority = r.getAuthority();
+        String rpath = r.getPath();
+        String rquery = r.getQuery();
+        String rfragment = null;
+
+        String tscheme, tauthority, tpath, tquery, tfragment;
+        if (rscheme != null && rscheme.equals(bscheme)) {
+            rscheme = null;
+        }
+        if (rscheme != null) {
+            tscheme = rscheme;
+            tauthority = rauthority;
+            tpath = removeDotSegments(rpath);
+            tquery = rquery;
+        } else {
+            if (rauthority != null) {
+                tauthority = rauthority;
+                tpath = removeDotSegments(rpath);
+                tquery = rquery;
+            } else {
+                if (rpath.length() == 0) {
+                    tpath = bpath;
+                    if (rquery != null) {
+                        tquery = rquery;
+                    } else {
+                        tquery = bquery;
+                    }
+                } else {
+                    if (rpath.startsWith("/")) {
+                        tpath = removeDotSegments(rpath);
+                    } else {
+                        if (bauthority != null && bpath.length() == 0) {
+                            tpath = "/" + rpath;
+                        } else {
+                            int last = bpath.lastIndexOf('/');
+                            if (last == -1) {
+                                tpath = rpath;
+                            } else {
+                                tpath = bpath.substring(0, last+1) + rpath;
+                            }
+                        }
+                        tpath = removeDotSegments(tpath);
+                    }
+                    tquery = rquery;
+                }
+                tauthority = bauthority;
+            }
+            tscheme = bscheme;
+        }
+        tfragment = rfragment;
+        return new URI(tscheme, tauthority, tpath, tquery, tfragment).toString();
+    }
+
+    private static String removeDotSegments(String path) {
+
+        log.log(java.util.logging.Level.FINE, "STEP   OUTPUT BUFFER\t\tINPUT BUFFER");
+
+        // 1. The input buffer is initialized with the now-appended path
+        // components then replace occurrences of "//" in the input buffer
+        // with "/" until no more occurrences of "//" are in the input buffer.
+        String input = path;
+        while (input.indexOf("//") > -1) {
+            input = input.replaceAll("//", "/");
+        }
+
+        // Initialize the output buffer with the empty string.
+        StringBuffer output = new StringBuffer();
+
+        // If the input buffer starts with a root slash "/" then move this
+        // character to the output buffer.
+        if (input.charAt(0) == '/') {
+            output.append("/");
+            input = input.substring(1);
+        }
+
+        printStep("1 ", output.toString(), input);
+
+        // While the input buffer is not empty, loop as follows
+        while (input.length() != 0) {
+            // 2A. If the input buffer begins with a prefix of "./",
+            // then remove that prefix from the input buffer
+            // else if the input buffer begins with a prefix of "../", then
+            // if also the output does not contain the root slash "/" only,
+            // then move this prefix to the end of the output buffer else
+            // remove that prefix
+            if (input.startsWith("./")) {
+                input = input.substring(2);
+                printStep("2A", output.toString(), input);
+            } else if (input.startsWith("../")) {
+                input = input.substring(3);
+                if (!output.toString().equals("/")) {
+                    output.append("../");
+                }
+                printStep("2A", output.toString(), input);
+            // 2B. if the input buffer begins with a prefix of "/./" or "/.",
+            // where "." is a complete path segment, then replace that prefix
+            // with "/" in the input buffer; otherwise,
+            } else if (input.startsWith("/./")) {
+                input = input.substring(2);
+                printStep("2B", output.toString(), input);
+            } else if (input.equals("/.")) {
+                // FIXME: what is complete path segment?
+                input = input.replaceFirst("/.", "/");
+                printStep("2B", output.toString(), input);
+            // 2C. if the input buffer begins with a prefix of "/../" or "/..",
+            // where ".." is a complete path segment, then replace that prefix
+            // with "/" in the input buffer and if also the output buffer is
+            // empty, last segment in the output buffer equals "../" or "..",
+            // where ".." is a complete path segment, then append ".." or "/.."
+            // for the latter case respectively to the output buffer else
+            // remove the last segment and its preceding "/" (if any) from the
+            // output buffer and if hereby the first character in the output
+            // buffer was removed and it was not the root slash then delete a
+            // leading slash from the input buffer; otherwise,
+            } else if (input.startsWith("/../")) {
+                input = input.substring(3);
+                if (output.length() == 0) {
+                    output.append("/");
+                } else if (output.toString().endsWith("../")) {
+                    output.append("..");
+                } else if (output.toString().endsWith("..")) {
+                    output.append("/..");
+                } else {
+                    int index = output.lastIndexOf("/");
+                    if (index == -1) {
+                        output = new StringBuffer();
+                        if (input.charAt(0) == '/') {
+                            input = input.substring(1);
+                        }
+                    } else {
+                        output = output.delete(index, output.length());
+                    }
+                }
+                printStep("2C", output.toString(), input);
+            } else if (input.equals("/..")) {
+                // FIXME: what is complete path segment?
+                input = input.replaceFirst("/..", "/");
+                if (output.length() == 0) {
+                    output.append("/");
+                } else if (output.toString().endsWith("../")) {
+                    output.append("..");
+                } else if (output.toString().endsWith("..")) {
+                    output.append("/..");
+                } else {
+                    int index = output.lastIndexOf("/");
+                    if (index == -1) {
+                        output = new StringBuffer();
+                        if (input.charAt(0) == '/') {
+                            input = input.substring(1);
+                        }
+                    } else {
+                        output = output.delete(index, output.length());
+                    }
+                }
+                printStep("2C", output.toString(), input);
+            // 2D. if the input buffer consists only of ".", then remove
+            // that from the input buffer else if the input buffer consists
+            // only of ".." and if the output buffer does not contain only
+            // the root slash "/", then move the ".." to the output buffer
+            // else delte it.; otherwise,
+            } else if (input.equals(".")) {
+                input = "";
+                printStep("2D", output.toString(), input);
+            } else if (input.equals("..")) {
+                if (!output.toString().equals("/"))
+                    output.append("..");
+                input = "";
+                printStep("2D", output.toString(), input);
+            // 2E. move the first path segment (if any) in the input buffer
+            // to the end of the output buffer, including the initial "/"
+            // character (if any) and any subsequent characters up to, but not
+            // including, the next "/" character or the end of the input buffer.
+            } else {
+                int end = -1;
+                int begin = input.indexOf('/');
+                if (begin == 0) {
+                    end = input.indexOf('/', 1);
+                } else {
+                    end = begin;
+                    begin = 0;
+                }
+                String segment;
+                if (end == -1) {
+                    segment = input.substring(begin);
+                    input = "";
+                } else {
+                    segment = input.substring(begin, end);
+                    input = input.substring(end);
+                }
+                output.append(segment);
+                printStep("2E", output.toString(), input);
+            }
+        }
+
+        // 3. Finally, if the only or last segment of the output buffer is
+        // "..", where ".." is a complete path segment not followed by a slash
+        // then append a slash "/". The output buffer is returned as the result
+        // of remove_dot_segments
+        if (output.toString().endsWith("..")) {
+            output.append("/");
+            printStep("3 ", output.toString(), input);
+        }
+
+        return output.toString();
+    }
+
+    private static void printStep(String step, String output, String input) {
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
+            log.log(java.util.logging.Level.FINE, " " + step + ":   " + output);
+            if (output.length() == 0) {
+                log.log(java.util.logging.Level.FINE, "\t\t\t\t" + input);
+            } else {
+                log.log(java.util.logging.Level.FINE, "\t\t\t" + input);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,41 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.c14n.implementations;
+
+import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
+
+/**
+ * @author Sean Mullan
+ */
+public class Canonicalizer11_OmitComments extends Canonicalizer11 {
+
+    public Canonicalizer11_OmitComments() {
+        super(false);
+    }
+
+    public final String engineGetURI() {
+        return Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
+    }
+
+    public final boolean engineGetIncludeComments() {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,41 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.c14n.implementations;
+
+import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
+
+/**
+ * @author Sean Mullan
+ */
+public class Canonicalizer11_WithComments extends Canonicalizer11 {
+
+    public Canonicalizer11_WithComments() {
+        super(true);
+    }
+
+    public final String engineGetURI() {
+        return Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS;
+    }
+
+    public final boolean engineGetIncludeComments() {
+        return true;
+    }
+}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -23,20 +22,30 @@
 
 
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import javax.xml.parsers.ParserConfigurationException;
+
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.helper.C14nHelper;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
 
 
 /**
@@ -44,13 +53,92 @@
  * XML Version 1.0</A>, a W3C Recommendation from 15 March 2001.
  *
  * @author Christian Geuer-Pollmann <geuerp@apache.org>
+ * @version $Revision: 1.5 $
  */
 public abstract class Canonicalizer20010315 extends CanonicalizerBase {
         boolean firstCall=true;
         final SortedSet result= new TreeSet(COMPARE);
     static final String XMLNS_URI=Constants.NamespaceSpecNS;
     static final String XML_LANG_URI=Constants.XML_LANG_SPACE_SpecNS;
-   /**
+    static class XmlAttrStack {
+        int currentLevel=0;
+        int lastlevel=0;
+        XmlsStackElement cur;
+        static class XmlsStackElement {
+                int level;
+                boolean rendered=false;
+                List nodes=new ArrayList();
+        };
+        List levels=new ArrayList();
+        void push(int level) {
+                currentLevel=level;
+                if (currentLevel==-1)
+                        return;
+                cur=null;
+                while (lastlevel>=currentLevel) {
+                        levels.remove(levels.size()-1);
+                        if (levels.size()==0) {
+                                lastlevel=0;
+                                return;
+                        }
+                        lastlevel=((XmlsStackElement)levels.get(levels.size()-1)).level;
+                }
+        }
+        void addXmlnsAttr(Attr n) {
+                if (cur==null) {
+                        cur=new XmlsStackElement();
+                        cur.level=currentLevel;
+                        levels.add(cur);
+                        lastlevel=currentLevel;
+                }
+                cur.nodes.add(n);
+        }
+        void getXmlnsAttr(Collection col) {
+                int size=levels.size()-1;
+                if (cur==null) {
+                        cur=new XmlsStackElement();
+                        cur.level=currentLevel;
+                        lastlevel=currentLevel;
+                        levels.add(cur);
+                }
+                boolean parentRendered=false;
+                XmlsStackElement e=null;
+                if (size==-1) {
+                        parentRendered=true;
+                } else {
+                        e=(XmlsStackElement)levels.get(size);
+                        if (e.rendered && e.level+1==currentLevel)
+                                parentRendered=true;
+
+                }
+                if (parentRendered) {
+                                col.addAll(cur.nodes);
+                                cur.rendered=true;
+                                return;
+                        }
+
+                        Map loa = new HashMap();
+                for (;size>=0;size--) {
+                        e=(XmlsStackElement)levels.get(size);
+                        Iterator it=e.nodes.iterator();
+                        while (it.hasNext()) {
+                                Attr n=(Attr)it.next();
+                                if (!loa.containsKey(n.getName()))
+                                        loa.put(n.getName(),n);
+                        }
+                        //if (e.rendered)
+                                //break;
+
+                };
+                //cur.nodes.clear();
+                //cur.nodes.addAll(loa.values());
+                        cur.rendered=true;
+                col.addAll(loa.values());
+        }
+
+    }
+    XmlAttrStack xmlattrStack=new XmlAttrStack();
+    /**
     * Constructor Canonicalizer20010315
     *
     * @param includeComments
@@ -86,16 +174,16 @@
 
       for (int i = 0; i < attrsLength; i++) {
          Attr N = (Attr) attrs.item(i);
-         String NName=N.getLocalName();
-         String NValue=N.getValue();
          String NUri =N.getNamespaceURI();
 
-         if (!XMLNS_URI.equals(NUri)) {
+         if (XMLNS_URI!=NUri) {
                 //It's not a namespace attr node. Add to the result and continue.
             result.add(N);
             continue;
          }
 
+         String NName=N.getLocalName();
+         String NValue=N.getValue();
          if (XML.equals(NName)
                  && XML_LANG_URI.equals(NValue)) {
                 //The default mapping for xml must not be output.
@@ -120,65 +208,14 @@
         //Obtain all the namespaces defined in the parents, and added to the output.
         ns.getUnrenderedNodes(result);
         //output the attributes in the xml namespace.
-                addXmlAttributesSubtree(E, result);
-        firstCall=false;
+        xmlattrStack.getXmlnsAttr(result);
+                firstCall=false;
       }
 
       return result.iterator();
    }
 
    /**
-    * Float the xml:* attributes of the parent nodes to the root node of c14n
-    * @param E the root node.
-    * @param result the xml:* attributes  to output.
-    */
-   private void addXmlAttributesSubtree(Element E, SortedSet result) {
-         // E is in the node-set
-         Node parent = E.getParentNode();
-         Map loa = new HashMap();
-
-         if ((parent != null) && (parent.getNodeType() == Node.ELEMENT_NODE)) {
-
-            // parent element is not in node set
-            for (Node ancestor = parent;
-                    (ancestor != null)
-                    && (ancestor.getNodeType() == Node.ELEMENT_NODE);
-                    ancestor = ancestor.getParentNode()) {
-               Element el=((Element) ancestor);
-               if (!el.hasAttributes()) {
-                    continue;
-               }
-               // for all ancestor elements
-               NamedNodeMap ancestorAttrs = el.getAttributes();
-
-               for (int i = 0; i < ancestorAttrs.getLength(); i++) {
-                  // for all attributes in the ancestor element
-                  Attr currentAncestorAttr = (Attr) ancestorAttrs.item(i);
-
-                  if (XML_LANG_URI.equals(
-                          currentAncestorAttr.getNamespaceURI())) {
-
-                     // do we have an xml:* ?
-                     if (!E.hasAttributeNS(
-                             XML_LANG_URI,
-                             currentAncestorAttr.getLocalName())) {
-
-                        // the xml:* attr is not in E
-                        if (!loa.containsKey(currentAncestorAttr.getName())) {
-                           loa.put(currentAncestorAttr.getName(),
-                                   currentAncestorAttr);
-                        }
-                     }
-                  }
-               }
-            }
-         }
-
-         result.addAll( loa.values());
-
-      }
-
-   /**
     * Returns the Attr[]s to be outputted for the given element.
     * <br>
     * IMPORTANT: This method expects to work on a modified DOM tree, i.e. a DOM which has
@@ -192,7 +229,8 @@
     */
    Iterator handleAttributes(Element E,  NameSpaceSymbTable ns ) throws CanonicalizationException {
     // result will contain the attrs which have to be outputted
-    boolean isRealVisible=isVisible(E);
+        xmlattrStack.push(ns.getLevel());
+    boolean isRealVisible=isVisibleDO(E,ns.getLevel())==1;
     NamedNodeMap attrs = null;
     int attrsLength = 0;
     if (E.hasAttributes()) {
@@ -204,16 +242,15 @@
     SortedSet result = this.result;
     result.clear();
 
-
     for (int i = 0; i < attrsLength; i++) {
        Attr N = (Attr) attrs.item(i);
-       String NName=N.getLocalName();
-       String NValue=N.getValue();
        String NUri =N.getNamespaceURI();
 
-       if (!XMLNS_URI.equals(NUri)) {
+       if (XMLNS_URI!=NUri) {
           //A non namespace definition node.
-          if (isRealVisible){
+           if (XML_LANG_URI==NUri) {
+                          xmlattrStack.addXmlnsAttr(N);
+           } else if (isRealVisible){
                 //The node is visible add the attribute to the list of output attributes.
                 result.add(N);
           }
@@ -221,7 +258,8 @@
           continue;
        }
 
-
+       String NName=N.getLocalName();
+       String NValue=N.getValue();
        if ("xml".equals(NName)
                && XML_LANG_URI.equals(NValue)) {
           /* except omit namespace node with local name xml, which defines
@@ -232,16 +270,26 @@
        //add the prefix binding to the ns symb table.
        //ns.addInclusiveMapping(NName,NValue,N,isRealVisible);
             if  (isVisible(N))  {
-                            //The xpath select this node output it if needed.
-                        Node n=ns.addMappingAndRenderXNodeSet(NName,NValue,N,isRealVisible);
-                                if (n!=null) {
+                if (!isRealVisible && ns.removeMappingIfRender(NName)) {
+                        continue;
+                }
+                        //The xpath select this node output it if needed.
+                //Node n=ns.addMappingAndRenderXNodeSet(NName,NValue,N,isRealVisible);
+                Node n=ns.addMappingAndRender(NName,NValue,N);
+                        if (n!=null) {
                                         result.add(n);
                     if (C14nHelper.namespaceIsRelative(N)) {
                        Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() };
                        throw new CanonicalizationException(
                           "c14n.Canonicalizer.RelativeNamespace", exArgs);
-                    }
-                                }
+                   }
+                         }
+        } else {
+                if (isRealVisible && NName!=XMLNS) {
+                        ns.removeMapping(NName);
+                } else {
+                        ns.addMapping(NName,NValue,N);
+                }
         }
     }
     if (isRealVisible) {
@@ -254,85 +302,22 @@
         } else if ( !isVisible(xmlns)) {
                 //There is a definition but the xmlns is not selected by the xpath.
                 //then xmlns=""
-                n=ns.addMappingAndRenderXNodeSet(XMLNS,"",nullNode,true);
+                n=ns.addMappingAndRender(XMLNS,"",nullNode);
         }
         //output the xmlns def if needed.
         if (n!=null) {
                         result.add(n);
         }
         //Float all xml:* attributes of the unselected parent elements to this one.
-        addXmlAttributes(E,result);
+        //addXmlAttributes(E,result);
+        xmlattrStack.getXmlnsAttr(result);
+        ns.getUnrenderedNodes(result);
+
     }
 
     return result.iterator();
    }
    /**
-    *  Float the xml:* attributes of the unselected parent nodes to the ciurrent node.
-    * @param E
-    * @param result
-    */
-   private void addXmlAttributes(Element E, SortedSet result) {
-        /* The processing of an element node E MUST be modified slightly when an
-       * XPath node-set is given as input and the element's parent is omitted
-       * from the node-set. The method for processing the attribute axis of an
-       * element E in the node-set is enhanced. All element nodes along E's
-       * ancestor axis are examined for nearest occurrences of attributes in
-       * the xml namespace, such as xml:lang and xml:space (whether or not they
-       * are in the node-set). From this list of attributes, remove any that are
-       * in E's attribute axis (whether or not they are in the node-set). Then,
-       * lexicographically merge this attribute list with the nodes of E's
-       * attribute axis that are in the node-set. The result of visiting the
-       * attribute axis is computed by processing the attribute nodes in this
-       * merged attribute list.
-       */
-
-         // E is in the node-set
-         Node parent = E.getParentNode();
-         Map loa = new HashMap();
-
-         if ((parent != null) && (parent.getNodeType() == Node.ELEMENT_NODE)
-                 &&!isVisible(parent)) {
-
-            // parent element is not in node set
-            for (Node ancestor = parent;
-                    (ancestor != null)
-                    && (ancestor.getNodeType() == Node.ELEMENT_NODE);
-                    ancestor = ancestor.getParentNode()) {
-                Element el=((Element) ancestor);
-                if (!el.hasAttributes()) {
-                        continue;
-                }
-               // for all ancestor elements
-               NamedNodeMap ancestorAttrs =el.getAttributes();
-
-               for (int i = 0; i < ancestorAttrs.getLength(); i++) {
-
-                  // for all attributes in the ancestor element
-                  Attr currentAncestorAttr = (Attr) ancestorAttrs.item(i);
-
-                  if (XML_LANG_URI.equals(
-                          currentAncestorAttr.getNamespaceURI())) {
-
-                     // do we have an xml:* ?
-                     if (!E.hasAttributeNS(
-                             XML_LANG_URI,
-                             currentAncestorAttr.getLocalName())) {
-
-                        // the xml:* attr is not in E
-                        if (!loa.containsKey(currentAncestorAttr.getName())) {
-                           loa.put(currentAncestorAttr.getName(),
-                                   currentAncestorAttr);
-                        }
-                     }
-                  }
-               }
-            }
-         }
-         result.addAll(loa.values());
-
-}
-
-   /**
     * Always throws a CanonicalizationException because this is inclusive c14n.
     *
     * @param xpathNodeSet
@@ -363,4 +348,43 @@
       throw new CanonicalizationException(
          "c14n.Canonicalizer.UnsupportedOperation");
    }
+   void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException {
+           if (!input.isNeedsToBeExpanded())
+                   return;
+           Document doc = null;
+       if (input.getSubNode() != null) {
+           doc=XMLUtils.getOwnerDocument(input.getSubNode());
+       } else {
+           doc=XMLUtils.getOwnerDocument(input.getNodeSet());
+       }
+           XMLUtils.circumventBug2650(doc);
+
+   }
+
+   void handleParent(Element e, NameSpaceSymbTable ns) {
+           if (!e.hasAttributes()) {
+                        return;
+           }
+           xmlattrStack.push(-1);
+           NamedNodeMap attrs = e.getAttributes();
+           int attrsLength = attrs.getLength();
+           for (int i = 0; i < attrsLength; i++) {
+                   Attr N = (Attr) attrs.item(i);
+                   if (Constants.NamespaceSpecNS!=N.getNamespaceURI()) {
+                           //Not a namespace definition, ignore.
+                           if (XML_LANG_URI==N.getNamespaceURI()) {
+                                   xmlattrStack.addXmlnsAttr(N);
+                           }
+                           continue;
+                   }
+
+                   String NName=N.getLocalName();
+                   String NValue=N.getNodeValue();
+                   if (XML.equals(NName)
+                                   && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) {
+                                continue;
+                   }
+                   ns.addMapping(NName,NValue,N);
+           }
+   }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright 1999-2004 The Apache Software Foundation.
  *
@@ -21,20 +20,26 @@
  */
 package com.sun.org.apache.xml.internal.security.c14n.implementations;
 
+import java.io.IOException;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import javax.xml.parsers.ParserConfigurationException;
+
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.helper.C14nHelper;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
 import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
 /**
  * Implements &quot; <A
  * HREF="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">Exclusive XML
@@ -47,6 +52,7 @@
  * <i>THIS </i> implementation is a complete rewrite of the algorithm.
  *
  * @author Christian Geuer-Pollmann <geuerp@apache.org>
+ * @version $Revision: 1.5 $
  * @see <a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/ Exclusive#">
  *          XML Canonicalization, Version 1.0</a>
  */
@@ -55,7 +61,7 @@
       * This Set contains the names (Strings like "xmlns" or "xmlns:foo") of
       * the inclusive namespaces.
       */
-    TreeSet _inclusiveNSSet = null;
+    TreeSet _inclusiveNSSet = new TreeSet();
     static final String XMLNS_URI=Constants.NamespaceSpecNS;
     final SortedSet result = new TreeSet(COMPARE);
         /**
@@ -143,10 +149,8 @@
 
                 for (int i = 0; i < attrsLength; i++) {
                         Attr N = (Attr) attrs.item(i);
-                        String NName=N.getLocalName();
-                        String NNodeValue=N.getNodeValue();
 
-                        if (!XMLNS_URI.equals(N.getNamespaceURI())) {
+                        if (XMLNS_URI!=N.getNamespaceURI()) {
                                 //Not a namespace definition.
                                 //The Element is output element, add his prefix(if used) to visibyUtilized
                                 String prefix = N.getPrefix();
@@ -157,6 +161,8 @@
                                  result.add(N);
                                 continue;
                         }
+                        String NName=N.getLocalName();
+                        String NNodeValue=N.getNodeValue();
 
                         if (ns.addMapping(NName, NNodeValue,N)) {
                                 //New definition check if it is relative.
@@ -168,17 +174,17 @@
                 }
             }
                 }
-
+                String prefix;
                 if (E.getNamespaceURI() != null) {
-                        String prefix = E.getPrefix();
+                        prefix = E.getPrefix();
                         if ((prefix == null) || (prefix.length() == 0)) {
-                                visiblyUtilized.add(XMLNS);
-                        } else {
-                                visiblyUtilized.add(prefix);
+                                prefix=XMLNS;
                         }
+
                 } else {
-                        visiblyUtilized.add(XMLNS);
+                        prefix=XMLNS;
                 }
+                visiblyUtilized.add(prefix);
 
                 //This can be optimezed by I don't have time
                 Iterator it=visiblyUtilized.iterator();
@@ -211,12 +217,6 @@
 
         }
 
-    /** @inheritDoc */
-    public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet
-            ) throws CanonicalizationException {
-        return engineCanonicalizeXPathNodeSet(xpathNodeSet,"");
-    }
-
         /**
      * @inheritDoc
          * @param E
@@ -236,21 +236,20 @@
                 //The prefix visibly utilized(in the attribute or in the name) in the element
                 Set visiblyUtilized =null;
                 //It's the output selected.
-                boolean isOutputElement = isVisible(E);
+                boolean isOutputElement=isVisibleDO(E,ns.getLevel())==1;
                 if (isOutputElement) {
                         visiblyUtilized =  (Set) this._inclusiveNSSet.clone();
                 }
 
                 for (int i = 0; i < attrsLength; i++) {
                         Attr N = (Attr) attrs.item(i);
-                        String NName=N.getLocalName();
-                        String NNodeValue=N.getNodeValue();
-                        if ( !isVisible(N) )  {
-                                //The node is not in the nodeset(if there is a nodeset)
-                                continue;
-                        }
+
 
-                        if (!XMLNS_URI.equals(N.getNamespaceURI())) {
+                        if (XMLNS_URI!=N.getNamespaceURI()) {
+                                if ( !isVisible(N) )  {
+                                        //The node is not in the nodeset(if there is a nodeset)
+                                        continue;
+                                }
                                 //Not a namespace definition.
                                 if (isOutputElement) {
                                         //The Element is output element, add his prefix(if used) to visibyUtilized
@@ -263,6 +262,25 @@
                                 }
                                 continue;
                         }
+                        String NName=N.getLocalName();
+                        if (isOutputElement && !isVisible(N) && NName!=XMLNS) {
+                        ns.removeMappingIfNotRender(NName);
+                        continue;
+                }
+                        String NNodeValue=N.getNodeValue();
+
+                        if (!isOutputElement && isVisible(N) && _inclusiveNSSet.contains(NName) && !ns.removeMappingIfRender(NName)) {
+                                Node n=ns.addMappingAndRender(NName,NNodeValue,N);
+                                if (n!=null) {
+                                                result.add(n);
+                            if (C14nHelper.namespaceIsRelative(N)) {
+                               Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() };
+                               throw new CanonicalizationException(
+                                  "c14n.Canonicalizer.RelativeNamespace", exArgs);
+                           }
+                                 }
+                        }
+
 
 
                         if (ns.addMapping(NName, NNodeValue,N)) {
@@ -306,18 +324,20 @@
                                 }
                                 result.add(key);
                         }
-                } else /*if (_circunvented)*/ {
-                        Iterator it=this._inclusiveNSSet.iterator();
-                        while (it.hasNext()) {
-                                String s=(String)it.next();
-                                Attr key=ns.getMappingWithoutRendered(s);
-                                if (key==null) {
-                                        continue;
-                                }
-                                result.add(key);
-                        }
                 }
 
                 return result.iterator();
         }
+        void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException {
+                if (!input.isNeedsToBeExpanded() || _inclusiveNSSet.isEmpty())
+                        return;
+                Document doc = null;
+               if (input.getSubNode() != null) {
+                   doc=XMLUtils.getOwnerDocument(input.getSubNode());
+               } else {
+                   doc=XMLUtils.getOwnerDocument(input.getNodeSet());
+               }
+
+                XMLUtils.circumventBug2650(doc);
+           }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -28,6 +28,7 @@
 /**
  * Class Canonicalizer20010315ExclWithComments
  *
+ * @version $Revision: 1.5 $
  */
 public class Canonicalizer20010315ExclWithComments
         extends Canonicalizer20010315Excl {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	Wed Jul 05 16:42:37 2017 +0200
@@ -27,9 +27,11 @@
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.Map;
 import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -45,7 +47,6 @@
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -57,6 +58,7 @@
  * Abstract base class for canonicalization algorithms.
  *
  * @author Christian Geuer-Pollmann <geuerp@apache.org>
+ * @version $Revision: 1.5 $
  */
 public abstract class CanonicalizerBase extends CanonicalizerSpi {
    //Constants to be outputed, In char array form, so
@@ -123,6 +125,18 @@
                 return engineCanonicalizeSubTree(rootNode,(Node)null);
    }
    /**
+    * Method engineCanonicalizeXPathNodeSet
+    * @inheritDoc
+    * @param xpathNodeSet
+    * @throws CanonicalizationException
+    */
+   public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet)
+           throws CanonicalizationException {
+           this._xpathNodeSet = xpathNodeSet;
+           return engineCanonicalizeXPathNodeSetInternal(XMLUtils.getOwnerDocument(this._xpathNodeSet));
+   }
+
+   /**
     * Canonicalizes a Subtree node.
     * @param input the root of the subtree to canicalize
     * @return The canonicalize stream.
@@ -143,15 +157,8 @@
                                 return bytes;
                         } else if (input.isNodeSet()) {
                                 nodeFilter=input.getNodeFilters();
-                                Document doc = null;
-                                if (input.getSubNode() != null) {
-                                    doc=XMLUtils.getOwnerDocument(input.getSubNode());
-                                } else {
-                                    doc=XMLUtils.getOwnerDocument(input.getNodeSet());
-                                }
-                                if (input.isNeedsToBeExpanded()) {
-                                        XMLUtils.circumventBug2650(doc);
-                                }
+
+                circumventBugIfNeeded(input);
 
                                 if (input.getSubNode() != null) {
                                     bytes = engineCanonicalizeXPathNodeSetInternal(input.getSubNode());
@@ -173,6 +180,13 @@
                 }
    }
    /**
+    * @param _writer The _writer to set.
+    */
+    public void setWriter(OutputStream _writer) {
+        this._writer = _writer;
+    }
+
+    /**
          * Canonicalizes a Subtree node.
          *
          * @param rootNode
@@ -187,11 +201,13 @@
         this._excludeNode = excludeNode;
         try {
          NameSpaceSymbTable ns=new NameSpaceSymbTable();
+         int nodeLevel=NODE_BEFORE_DOCUMENT_ELEMENT;
          if (rootNode instanceof Element) {
                 //Fills the nssymbtable with the definitions of the parent of the root subnode
                 getParentNameSpaces((Element)rootNode,ns);
+                nodeLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
          }
-         this.canonicalizeSubTree(rootNode,ns,rootNode);
+         this.canonicalizeSubTree(rootNode,ns,rootNode,nodeLevel);
          this._writer.close();
          if (this._writer instanceof ByteArrayOutputStream) {
             byte []result=((ByteArrayOutputStream)this._writer).toByteArray();
@@ -199,6 +215,12 @@
                 ((ByteArrayOutputStream)this._writer).reset();
             }
                 return result;
+         }  else if (this._writer instanceof UnsyncByteArrayOutputStream) {
+                 byte []result=((UnsyncByteArrayOutputStream)this._writer).toByteArray();
+             if (reset) {
+                 ((UnsyncByteArrayOutputStream)this._writer).reset();
+             }
+                 return result;
          }
          return null;
 
@@ -219,13 +241,17 @@
     * @throws CanonicalizationException
     * @throws IOException
     */
-    final void canonicalizeSubTree(Node currentNode, NameSpaceSymbTable ns,Node endnode)
+    final void canonicalizeSubTree(Node currentNode, NameSpaceSymbTable ns,Node endnode,
+                int documentLevel)
     throws CanonicalizationException, IOException {
+        if (isVisibleInt(currentNode)==-1)
+                return;
         Node sibling=null;
         Node parentNode=null;
         final OutputStream writer=this._writer;
         final Node excludeNode=this._excludeNode;
         final boolean includeComments=this._includeComments;
+        Map cache=new HashMap();
         do {
                 switch (currentNode.getNodeType()) {
 
@@ -242,18 +268,17 @@
             case Node.DOCUMENT_FRAGMENT_NODE :
                 case Node.DOCUMENT_NODE :
                         ns.outputNodePush();
-                        //currentNode = currentNode.getFirstChild();
                         sibling= currentNode.getFirstChild();
                         break;
 
                 case Node.COMMENT_NODE :
                         if (includeComments) {
-                                outputCommentToWriter((Comment) currentNode, writer);
+                                outputCommentToWriter((Comment) currentNode, writer, documentLevel);
                         }
                         break;
 
                 case Node.PROCESSING_INSTRUCTION_NODE :
-                        outputPItoWriter((ProcessingInstruction) currentNode, writer);
+                        outputPItoWriter((ProcessingInstruction) currentNode, writer, documentLevel);
                         break;
 
                 case Node.TEXT_NODE :
@@ -262,6 +287,7 @@
                         break;
 
                 case Node.ELEMENT_NODE :
+                        documentLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
                         if (currentNode==excludeNode) {
                                 break;
                         }
@@ -270,27 +296,27 @@
                         ns.outputNodePush();
                         writer.write('<');
                         String name=currentElement.getTagName();
-                        writeStringToUtf8(name,writer);
+                        UtfHelpper.writeByte(name,writer,cache);
 
                         Iterator attrs = this.handleAttributesSubtree(currentElement,ns);
                         if (attrs!=null) {
                                 //we output all Attrs which are available
                                 while (attrs.hasNext()) {
                                         Attr attr = (Attr) attrs.next();
-                                        outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer);
+                                        outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache);
                                 }
                         }
                         writer.write('>');
                         sibling= currentNode.getFirstChild();
                         if (sibling==null) {
                                 writer.write(_END_TAG);
-                                writeStringToUtf8(name,writer);
+                                UtfHelpper.writeStringToUtf8(name,writer);
                                 writer.write('>');
                                 //We fineshed with this level, pop to the previous definitions.
                                 ns.outputNodePop();
-                                if (parentNode != null) {
+                                    if (parentNode != null) {
                                         sibling= currentNode.getNextSibling();
-                                }
+                                    }
                         } else {
                                 parentNode=currentElement;
                         }
@@ -298,7 +324,7 @@
                 }
                 while (sibling==null  && parentNode!=null) {
                         writer.write(_END_TAG);
-                        writeStringToUtf8(((Element)parentNode).getTagName(),writer);
+                        UtfHelpper.writeByte(((Element)parentNode).getTagName(),writer,cache);
                         writer.write('>');
                         //We fineshed with this level, pop to the previous definitions.
                         ns.outputNodePop();
@@ -307,6 +333,7 @@
                         sibling=parentNode.getNextSibling();
                         parentNode=parentNode.getParentNode();
                         if (!(parentNode instanceof Element)) {
+                                documentLevel=NODE_AFTER_DOCUMENT_ELEMENT;
                                 parentNode=null;
                         }
                 }
@@ -317,47 +344,8 @@
         } while(true);
     }
 
-   /**
-    * Checks whether a Comment or ProcessingInstruction is before or after the
-    * document element. This is needed for prepending or appending "\n"s.
-    *
-    * @param currentNode comment or pi to check
-    * @return NODE_BEFORE_DOCUMENT_ELEMENT, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT or NODE_AFTER_DOCUMENT_ELEMENT
-    * @see #NODE_BEFORE_DOCUMENT_ELEMENT
-    * @see #NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
-    * @see #NODE_AFTER_DOCUMENT_ELEMENT
-    */
-   final static int getPositionRelativeToDocumentElement(Node currentNode) {
-
-      if ((currentNode == null) ||
-            (currentNode.getParentNode().getNodeType() != Node.DOCUMENT_NODE) ) {
-         return CanonicalizerBase.NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
-      }
-      Element documentElement = currentNode.getOwnerDocument().getDocumentElement();
-      if ( (documentElement == null)  || (documentElement == currentNode) ){
-         return CanonicalizerBase.NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
-      }
 
-      for (Node x = currentNode; x != null; x = x.getNextSibling()) {
-         if (x == documentElement) {
-            return CanonicalizerBase.NODE_BEFORE_DOCUMENT_ELEMENT;
-         }
-      }
 
-      return CanonicalizerBase.NODE_AFTER_DOCUMENT_ELEMENT;
-   }
-
-   /**
-    * Method engineCanonicalizeXPathNodeSet
-    * @inheritDoc
-    * @param xpathNodeSet
-    * @throws CanonicalizationException
-    */
-   public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet)
-           throws CanonicalizationException {
-           this._xpathNodeSet = xpathNodeSet;
-           return engineCanonicalizeXPathNodeSetInternal(XMLUtils.getOwnerDocument(this._xpathNodeSet));
-   }
    private  byte[] engineCanonicalizeXPathNodeSetInternal(Node doc)
            throws CanonicalizationException {
 
@@ -370,6 +358,12 @@
                 ((ByteArrayOutputStream)this._writer).reset();
             }
                 return sol;
+         }  else if (this._writer instanceof UnsyncByteArrayOutputStream) {
+                 byte []result=((UnsyncByteArrayOutputStream)this._writer).toByteArray();
+             if (reset) {
+                 ((UnsyncByteArrayOutputStream)this._writer).reset();
+             }
+                 return result;
          }
          return null;
       } catch (UnsupportedEncodingException ex) {
@@ -390,11 +384,17 @@
     */
    final void canonicalizeXPathNodeSet(Node currentNode,Node endnode )
            throws CanonicalizationException, IOException {
-           boolean currentNodeIsVisible = false;
-           NameSpaceSymbTable ns=new  NameSpaceSymbTable();
+        if (isVisibleInt(currentNode)==-1)
+                return;
+        boolean currentNodeIsVisible = false;
+        NameSpaceSymbTable ns=new  NameSpaceSymbTable();
+        if (currentNode instanceof Element)
+                getParentNameSpaces((Element)currentNode,ns);
         Node sibling=null;
         Node parentNode=null;
         OutputStream writer=this._writer;
+        int documentLevel=NODE_BEFORE_DOCUMENT_ELEMENT;
+        Map cache=new HashMap();
         do {
                 switch (currentNode.getNodeType()) {
 
@@ -416,14 +416,14 @@
                         break;
 
                 case Node.COMMENT_NODE :
-                        if (this._includeComments && isVisible(currentNode)) {
-                                outputCommentToWriter((Comment) currentNode, writer);
+                        if (this._includeComments && (isVisibleDO(currentNode,ns.getLevel())==1)) {
+                                outputCommentToWriter((Comment) currentNode, writer, documentLevel);
                         }
                         break;
 
                 case Node.PROCESSING_INSTRUCTION_NODE :
                         if (isVisible(currentNode))
-                                outputPItoWriter((ProcessingInstruction) currentNode, writer);
+                                outputPItoWriter((ProcessingInstruction) currentNode, writer, documentLevel);
                         break;
 
                 case Node.TEXT_NODE :
@@ -436,12 +436,6 @@
                         || (nextSibling.getNodeType()
                             == Node.CDATA_SECTION_NODE));
                     nextSibling = nextSibling.getNextSibling()) {
-               /* The XPath data model allows to select only the first of a
-                * sequence of mixed text and CDATA nodes. But we must output
-                * them all, so we must search:
-                *
-                * @see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6329
-                */
                outputTextToWriter(nextSibling.getNodeValue(), writer);
                currentNode=nextSibling;
                sibling=currentNode.getNextSibling();
@@ -451,15 +445,21 @@
                         break;
 
                 case Node.ELEMENT_NODE :
+                        documentLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
                         Element currentElement = (Element) currentNode;
                         //Add a level to the nssymbtable. So latter can be pop-back.
                         String name=null;
-                        currentNodeIsVisible=isVisible(currentNode);
+                        int i=isVisibleDO(currentNode,ns.getLevel());
+                        if (i==-1) {
+                                sibling= currentNode.getNextSibling();
+                                break;
+                        }
+                        currentNodeIsVisible=(i==1);
                         if (currentNodeIsVisible) {
                                 ns.outputNodePush();
                                 writer.write('<');
                                 name=currentElement.getTagName();
-                                writeStringToUtf8(name,writer);
+                                UtfHelpper.writeByte(name,writer,cache);
                         } else {
                                 ns.push();
                         }
@@ -469,7 +469,7 @@
                                 //we output all Attrs which are available
                                 while (attrs.hasNext()) {
                                         Attr attr = (Attr) attrs.next();
-                                        outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer);
+                                        outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache);
                                 }
                         }
                         if (currentNodeIsVisible) {
@@ -480,7 +480,7 @@
                         if (sibling==null) {
                                 if (currentNodeIsVisible) {
                                         writer.write(_END_TAG);
-                                        writeStringToUtf8(name,writer);
+                                        UtfHelpper.writeByte(name,writer,cache);
                                         writer.write('>');
                                         //We fineshed with this level, pop to the previous definitions.
                                         ns.outputNodePop();
@@ -498,7 +498,7 @@
                 while (sibling==null  && parentNode!=null) {
                         if (isVisible(parentNode)) {
                                 writer.write(_END_TAG);
-                                writeStringToUtf8(((Element)parentNode).getTagName(),writer);
+                                UtfHelpper.writeByte(((Element)parentNode).getTagName(),writer,cache);
                                 writer.write('>');
                                 //We fineshed with this level, pop to the previous definitions.
                                 ns.outputNodePop();
@@ -511,6 +511,7 @@
                         parentNode=parentNode.getParentNode();
                         if (!(parentNode instanceof Element)) {
                                 parentNode=null;
+                                documentLevel=NODE_AFTER_DOCUMENT_ELEMENT;
                         }
                 }
                 if (sibling==null)
@@ -519,12 +520,38 @@
                 sibling=currentNode.getNextSibling();
         } while(true);
    }
+   int isVisibleDO(Node currentNode,int level) {
+           if (nodeFilter!=null) {
+                        Iterator it=nodeFilter.iterator();
+                        while (it.hasNext()) {
+                                int i=((NodeFilter)it.next()).isNodeIncludeDO(currentNode,level);
+                                if (i!=1)
+                                        return i;
+                        }
+                   }
+           if ((this._xpathNodeSet!=null) && !this._xpathNodeSet.contains(currentNode))
+                        return 0;
+           return 1;
+   }
+   int isVisibleInt(Node currentNode) {
+           if (nodeFilter!=null) {
+                Iterator it=nodeFilter.iterator();
+                while (it.hasNext()) {
+                        int i=((NodeFilter)it.next()).isNodeInclude(currentNode);
+                        if (i!=1)
+                                return i;
+                }
+           }
+                if ((this._xpathNodeSet!=null) && !this._xpathNodeSet.contains(currentNode))
+                        return 0;
+                return 1;
+        }
 
    boolean isVisible(Node currentNode) {
            if (nodeFilter!=null) {
                 Iterator it=nodeFilter.iterator();
                 while (it.hasNext()) {
-                        if (!((NodeFilter)it.next()).isNodeInclude(currentNode))
+                        if (((NodeFilter)it.next()).isNodeInclude(currentNode)!=1)
                                 return false;
                 }
            }
@@ -533,19 +560,42 @@
                 return true;
         }
 
+        void handleParent(Element e,NameSpaceSymbTable ns) {
+           if (!e.hasAttributes()) {
+                                return;
+                }
+                NamedNodeMap attrs = e.getAttributes();
+                int attrsLength = attrs.getLength();
+                for (int i = 0; i < attrsLength; i++) {
+                        Attr N = (Attr) attrs.item(i);
+                        if (Constants.NamespaceSpecNS!=N.getNamespaceURI()) {
+                                //Not a namespace definition, ignore.
+                                continue;
+                        }
+
+                        String NName=N.getLocalName();
+                        String NValue=N.getNodeValue();
+                        if (XML.equals(NName)
+               && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) {
+                                        continue;
+                        }
+                        ns.addMapping(NName,NValue,N);
+                }
+   }
+
         /**
          * Adds to ns the definitons from the parent elements of el
          * @param el
          * @param ns
          */
-        final static void getParentNameSpaces(Element el,NameSpaceSymbTable ns)  {
-                List parents=new ArrayList();
+        final void getParentNameSpaces(Element el,NameSpaceSymbTable ns)  {
+                List parents=new ArrayList(10);
                 Node n1=el.getParentNode();
                 if (!(n1 instanceof Element)) {
                         return;
                 }
                 //Obtain all the parents of the elemnt
-                Element parent=(Element) el.getParentNode();
+                Element parent=(Element) n1;
                 while (parent!=null) {
                         parents.add(parent);
                         Node n=parent.getParentNode();
@@ -557,28 +607,9 @@
                 //Visit them in reverse order.
                 ListIterator it=parents.listIterator(parents.size());
                 while (it.hasPrevious()) {
-                Element ele=(Element)it.previous();
-        if (!ele.hasAttributes()) {
-                continue;
+                        Element ele=(Element)it.previous();
+                        handleParent(ele, ns);
         }
-                NamedNodeMap attrs = ele.getAttributes();
-                int attrsLength = attrs.getLength();
-                 for (int i = 0; i < attrsLength; i++) {
-            Attr N = (Attr) attrs.item(i);
-            if (!Constants.NamespaceSpecNS.equals(N.getNamespaceURI())) {
-               //Not a namespace definition, ignore.
-               continue;
-            }
-
-            String NName=N.getLocalName();
-            String NValue=N.getNodeValue();
-            if (XML.equals(NName)
-                    && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) {
-               continue;
-            }
-            ns.addMapping(NName,NValue,N);
-                 }
-                }
         Attr nsprefix;
         if (((nsprefix=ns.getMappingWithoutRendered("xmlns"))!=null)
                 && "".equals(nsprefix.getValue())) {
@@ -586,269 +617,6 @@
         }
         }
    /**
-    * Outputs an Attribute to the internal Writer.
-    *
-    * The string value of the node is modified by replacing
-    * <UL>
-    * <LI>all ampersands (&) with <CODE>&amp;amp;</CODE></LI>
-    * <LI>all open angle brackets (<) with <CODE>&amp;lt;</CODE></LI>
-    * <LI>all quotation mark characters with <CODE>&amp;quot;</CODE></LI>
-    * <LI>and the whitespace characters <CODE>#x9</CODE>, #xA, and #xD, with character
-    * references. The character references are written in uppercase
-    * hexadecimal with no leading zeroes (for example, <CODE>#xD</CODE> is represented
-    * by the character reference <CODE>&amp;#xD;</CODE>)</LI>
-    * </UL>
-    *
-    * @param name
-    * @param value
-    * @param writer
-    * @throws IOException
-    */
-   static final void outputAttrToWriter(final String name, final String value, final OutputStream writer) throws IOException {
-      writer.write(' ');
-      writeStringToUtf8(name,writer);
-      writer.write(equalsStr);
-      byte  []toWrite;
-      final int length = value.length();
-      for (int i=0;i < length; i++) {
-         char c = value.charAt(i);
-
-         switch (c) {
-
-         case '&' :
-                toWrite=_AMP_;
-            //writer.write(_AMP_);
-            break;
-
-         case '<' :
-                toWrite=_LT_;
-            //writer.write(_LT_);
-            break;
-
-         case '"' :
-                toWrite=_QUOT_;
-            //writer.write(_QUOT_);
-            break;
-
-         case 0x09 :    // '\t'
-                toWrite=__X9_;
-            //writer.write(__X9_);
-            break;
-
-         case 0x0A :    // '\n'
-                toWrite=__XA_;
-            //writer.write(__XA_);
-            break;
-
-         case 0x0D :    // '\r'
-                toWrite=__XD_;
-            //writer.write(__XD_);
-            break;
-
-         default :
-            writeCharToUtf8(c,writer);
-            //this._writer.write(c);
-            continue;
-         }
-         writer.write(toWrite);
-      }
-
-      writer.write('\"');
-   }
-
-   final static void writeCharToUtf8(final char c,final OutputStream out) throws IOException{
-        char ch;
-        if (/*(c >= 0x0001) &&*/ (c <= 0x007F)) {
-        out.write(c);
-        return;
-    }
-    int bias;
-    int write;
-    if (c > 0x07FF) {
-        ch=(char)(c>>>12);
-        write=0xE0;
-        if (ch>0) {
-            write |= ( ch & 0x0F);
-        }
-        out.write(write);
-        write=0x80;
-        bias=0x3F;
-    } else {
-        write=0xC0;
-        bias=0x1F;
-    }
-    ch=(char)(c>>>6);
-    if (ch>0) {
-         write|= (ch & bias);
-    }
-    out.write(write);
-    out.write(0x80 | ((c) & 0x3F));
-
-   }
-
-   final static void writeStringToUtf8(final String str,final OutputStream out) throws IOException{
-        final int length=str.length();
-        int i=0;
-    char c;
-        while (i<length) {
-                c=str.charAt(i++);
-        if (/*(c >= 0x0001) &&*/ (c <= 0x007F)) {
-            out.write(c);
-            continue;
-        }
-        char ch;
-        int bias;
-        int write;
-        if (c > 0x07FF) {
-            ch=(char)(c>>>12);
-            write=0xE0;
-            if (ch>0) {
-                write |= ( ch & 0x0F);
-            }
-            out.write(write);
-            write=0x80;
-            bias=0x3F;
-        } else {
-                write=0xC0;
-                bias=0x1F;
-        }
-        ch=(char)(c>>>6);
-        if (ch>0) {
-             write|= (ch & bias);
-        }
-        out.write(write);
-        out.write(0x80 | ((c) & 0x3F));
-        continue;
-
-        }
-
-   }
-   /**
-    * Outputs a PI to the internal Writer.
-    *
-    * @param currentPI
-    * @param writer where to write the things
-    * @throws IOException
-    */
-   static final void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer) throws IOException {
-          final int position = getPositionRelativeToDocumentElement(currentPI);
-
-      if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
-        writer.write('\n');
-      }
-      writer.write(_BEGIN_PI);
-
-      final String target = currentPI.getTarget();
-      int length = target.length();
-
-      for (int i = 0; i < length; i++) {
-         char c=target.charAt(i);
-         if (c==0x0D) {
-            writer.write(__XD_);
-         } else {
-            writeCharToUtf8(c,writer);
-         }
-      }
-
-      final String data = currentPI.getData();
-
-      length = data.length();
-
-      if (length > 0) {
-         writer.write(' ');
-
-         for (int i = 0; i < length; i++) {
-                char c=data.charAt(i);
-            if (c==0x0D) {
-               writer.write(__XD_);
-            } else {
-               writeCharToUtf8(c,writer);
-            }
-         }
-      }
-
-      writer.write(_END_PI);
-      if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
-        writer.write('\n');
-     }
-   }
-
-   /**
-    * Method outputCommentToWriter
-    *
-    * @param currentComment
-    * @param writer writer where to write the things
-    * @throws IOException
-    */
-   static final void outputCommentToWriter(Comment currentComment, OutputStream writer) throws IOException {
-          final int position = getPositionRelativeToDocumentElement(currentComment);
-          if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
-                writer.write('\n');
-          }
-      writer.write(_BEGIN_COMM);
-
-      final String data = currentComment.getData();
-      final int length = data.length();
-
-      for (int i = 0; i < length; i++) {
-         char c=data.charAt(i);
-         if (c==0x0D) {
-            writer.write(__XD_);
-         } else {
-            writeCharToUtf8(c,writer);
-         }
-      }
-
-      writer.write(_END_COMM);
-      if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
-                writer.write('\n');
-         }
-   }
-
-   /**
-    * Outputs a Text of CDATA section to the internal Writer.
-    *
-    * @param text
-    * @param writer writer where to write the things
-    * @throws IOException
-    */
-   static final void outputTextToWriter(final String text, final OutputStream writer) throws IOException {
-      final int length = text.length();
-      byte []toWrite;
-      for (int i = 0; i < length; i++) {
-         char c = text.charAt(i);
-
-         switch (c) {
-
-         case '&' :
-                toWrite=_AMP_;
-            //writer.write(_AMP_);
-            break;
-
-         case '<' :
-                toWrite=_LT_;
-            //writer.write(_LT_);
-            break;
-
-         case '>' :
-                toWrite=_GT_;
-            //writer.write(_GT_);
-            break;
-
-         case 0xD :
-                toWrite=__XD_;
-            //writer.write(__XD_);
-            break;
-
-         default :
-            writeCharToUtf8(c,writer);
-            continue;
-         }
-         writer.write(toWrite);
-      }
-   }
-
-   /**
     * Obtain the attributes to output for this node in XPathNodeSet c14n.
     *
     * @param E
@@ -870,13 +638,207 @@
    abstract Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns)
    throws CanonicalizationException;
 
+   abstract void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException;
 
+   /**
+            * Outputs an Attribute to the internal Writer.
+            *
+            * The string value of the node is modified by replacing
+            * <UL>
+            * <LI>all ampersands (&) with <CODE>&amp;amp;</CODE></LI>
+            * <LI>all open angle brackets (<) with <CODE>&amp;lt;</CODE></LI>
+            * <LI>all quotation mark characters with <CODE>&amp;quot;</CODE></LI>
+            * <LI>and the whitespace characters <CODE>#x9</CODE>, #xA, and #xD, with character
+            * references. The character references are written in uppercase
+            * hexadecimal with no leading zeroes (for example, <CODE>#xD</CODE> is represented
+            * by the character reference <CODE>&amp;#xD;</CODE>)</LI>
+            * </UL>
+            *
+            * @param name
+            * @param value
+            * @param writer
+            * @throws IOException
+            */
+           static final void outputAttrToWriter(final String name, final String value, final OutputStream writer,
+                                final Map cache) throws IOException {
+              writer.write(' ');
+              UtfHelpper.writeByte(name,writer,cache);
+              writer.write(equalsStr);
+              byte  []toWrite;
+              final int length = value.length();
+              int i=0;
+              while (i < length) {
+                 char c = value.charAt(i++);
+
+                 switch (c) {
+
+                 case '&' :
+                        toWrite=_AMP_;
+                    break;
+
+                 case '<' :
+                        toWrite=_LT_;
+                    break;
+
+                 case '"' :
+                        toWrite=_QUOT_;
+                    break;
+
+                 case 0x09 :    // '\t'
+                        toWrite=__X9_;
+                    break;
+
+                 case 0x0A :    // '\n'
+                        toWrite=__XA_;
+                    break;
+
+                 case 0x0D :    // '\r'
+                        toWrite=__XD_;
+                    break;
+
+                 default :
+                        if (c < 0x80 ) {
+                                writer.write(c);
+                        } else {
+                                UtfHelpper.writeCharToUtf8(c,writer);
+                        };
+                    continue;
+                 }
+                 writer.write(toWrite);
+              }
+
+              writer.write('\"');
+           }
+
+        /**
+            * Outputs a PI to the internal Writer.
+            *
+            * @param currentPI
+            * @param writer where to write the things
+            * @throws IOException
+            */
+           static final void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer,int position) throws IOException {
+
+              if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
+                writer.write('\n');
+              }
+              writer.write(_BEGIN_PI);
+
+              final String target = currentPI.getTarget();
+              int length = target.length();
 
-    /**
-     * @param _writer The _writer to set.
-     */
-    public void setWriter(OutputStream _writer) {
-        this._writer = _writer;
-    }
+              for (int i = 0; i < length; i++) {
+                 char c=target.charAt(i);
+                 if (c==0x0D) {
+                    writer.write(__XD_);
+                 } else {
+                         if (c < 0x80)  {
+                                writer.write(c);
+                        } else {
+                                UtfHelpper.writeCharToUtf8(c,writer);
+                        };
+                 }
+              }
+
+              final String data = currentPI.getData();
+
+              length = data.length();
+
+              if (length > 0) {
+                 writer.write(' ');
+
+                 for (int i = 0; i < length; i++) {
+                        char c=data.charAt(i);
+                    if (c==0x0D) {
+                       writer.write(__XD_);
+                    } else {
+                        UtfHelpper.writeCharToUtf8(c,writer);
+                    }
+                 }
+              }
+
+              writer.write(_END_PI);
+              if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
+                writer.write('\n');
+             }
+           }
+
+           /**
+            * Method outputCommentToWriter
+            *
+            * @param currentComment
+            * @param writer writer where to write the things
+            * @throws IOException
+            */
+           static final void outputCommentToWriter(Comment currentComment, OutputStream writer,int position) throws IOException {
+                  if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
+                        writer.write('\n');
+                  }
+              writer.write(_BEGIN_COMM);
+
+              final String data = currentComment.getData();
+              final int length = data.length();
+
+              for (int i = 0; i < length; i++) {
+                 char c=data.charAt(i);
+                 if (c==0x0D) {
+                    writer.write(__XD_);
+                 } else {
+                         if (c < 0x80)  {
+                                writer.write(c);
+                        } else {
+                                UtfHelpper.writeCharToUtf8(c,writer);
+                        };
+                 }
+              }
+
+              writer.write(_END_COMM);
+              if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
+                        writer.write('\n');
+                 }
+           }
+
+           /**
+            * Outputs a Text of CDATA section to the internal Writer.
+            *
+            * @param text
+            * @param writer writer where to write the things
+            * @throws IOException
+            */
+           static final void outputTextToWriter(final String text, final OutputStream writer) throws IOException {
+              final int length = text.length();
+              byte []toWrite;
+              for (int i = 0; i < length; i++) {
+                 char c = text.charAt(i);
+
+                 switch (c) {
+
+                 case '&' :
+                        toWrite=_AMP_;
+                    break;
+
+                 case '<' :
+                        toWrite=_LT_;
+                    break;
+
+                 case '>' :
+                        toWrite=_GT_;
+                    break;
+
+                 case 0xD :
+                        toWrite=__XD_;
+                    break;
+
+                 default :
+                         if (c < 0x80) {
+                                 writer.write(c);
+                         } else {
+                                 UtfHelpper.writeCharToUtf8(c,writer);
+                         };
+                    continue;
+                 }
+                 writer.write(toWrite);
+              }
+           }
 
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,16 +20,10 @@
  */
 package com.sun.org.apache.xml.internal.security.c14n.implementations;
 
-import java.lang.reflect.Array;
-import java.util.AbstractList;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-
 
 
 import org.w3c.dom.Attr;
@@ -46,21 +40,26 @@
 public class NameSpaceSymbTable {
 
         /**The map betwen prefix-> entry table. */
-        SymbMap symb = new SymbMap();
+        SymbMap symb;
         /**The level of nameSpaces (for Inclusive visibility).*/
         int nameSpaces=0;
         /**The stacks for removing the definitions when doing pop.*/
-        List level = new ArrayList();
+        List level;
     boolean cloned=true;
         static final String XMLNS="xmlns";
+        final static SymbMap initialMap=new SymbMap();
+        static {
+                NameSpaceSymbEntry ne=new NameSpaceSymbEntry("",null,true,XMLNS);
+                ne.lastrendered="";
+                initialMap.put(XMLNS,ne);
+        }
     /**
      * Default constractor
      **/
     public NameSpaceSymbTable() {
+        level = new ArrayList(10);
         //Insert the default binding for xmlns.
-        NameSpaceSymbEntry ne=new NameSpaceSymbEntry("",null,true);
-                ne.lastrendered="";
-        symb.put(XMLNS,ne);
+        symb=(SymbMap) initialMap.clone();
     }
 
     /**
@@ -75,8 +74,14 @@
                         NameSpaceSymbEntry n=(NameSpaceSymbEntry)(it.next());
                         //put them rendered?
                         if ((!n.rendered) && (n.n!=null)) {
+                                n=(NameSpaceSymbEntry) n.clone();
+                needsClone();
+                symb.put(n.prefix,n);
+                n.lastrendered=n.uri;
+                n.rendered=true;
+
                                 result.add(n.n);
-                                n.rendered=true;
+
                         }
            }
         }
@@ -104,10 +109,6 @@
      **/
         public void push() {
                 //Put the number of namespace definitions in the stack.
-        /**if (cloned) {
-                Object ob[]= {symb,cloned ? symb : null};
-                level.add(ob);
-        } **/
         level.add(null);
         cloned=false;
         }
@@ -124,7 +125,7 @@
             if (size==0) {
                cloned=false;
             } else
-            cloned=(level.get(size-1)!=symb);
+                cloned=(level.get(size-1)!=symb);
         } else {
                 cloned=false;
         }
@@ -134,8 +135,7 @@
 
         final void needsClone() {
                 if (!cloned) {
-            level.remove(level.size()-1);
-            level.add(symb);
+            level.set(level.size()-1,symb);
                         symb=(SymbMap) symb.clone();
             cloned=true;
         }
@@ -200,7 +200,7 @@
                         return false;
                 }
                 //Creates and entry in the table for this new definition.
-                NameSpaceSymbEntry ne=new NameSpaceSymbEntry(uri,n,false);
+                NameSpaceSymbEntry ne=new NameSpaceSymbEntry(uri,n,false,prefix);
         needsClone();
                 symb.put(prefix, ne);
                 if (ob != null) {
@@ -238,7 +238,7 @@
             return null;
         }
 
-        NameSpaceSymbEntry ne=new NameSpaceSymbEntry(uri,n,true);
+        NameSpaceSymbEntry ne=new NameSpaceSymbEntry(uri,n,true,prefix);
         ne.lastrendered=uri;
         needsClone();
         symb.put(prefix, ne);
@@ -251,53 +251,38 @@
         }
         return ne.n;
     }
-        /**
-     * Adds & gets(if needed) the attribute node that defines the binding for the prefix.
-     * Take on account if the rules of rendering in the inclusive c14n.
-     * For inclusive c14n.
-     * @param prefix the prefix to obtain the attribute.
-     * @param outputNode the container element is an output element.
-     * @param uri the Uri of the definition
-     * @param n the attribute that have the definition
-     * @return null if there is no need to render the prefix. Otherwise the node of
-     * definition.
-     **/
-        public Node addMappingAndRenderXNodeSet(String prefix, String uri,Attr n,boolean outputNode) {
+
+        public int getLevel() {
+                // TODO Auto-generated method stub
+                return level.size();
+        }
+
+        public void removeMapping(String prefix) {
                 NameSpaceSymbEntry ob = symb.get(prefix);
-                int visibleNameSpaces=nameSpaces;
-                if ((ob!=null) && uri.equals(ob.uri)) {
-                        if (!ob.rendered) {
-                                ob=(NameSpaceSymbEntry)ob.clone();
-                needsClone();
-                symb.put(prefix,ob);
-                                ob.rendered=true;
-                                ob.level=visibleNameSpaces;
-                                return ob.n;
-                        }
-            ob=(NameSpaceSymbEntry)ob.clone();
+
+        if (ob!=null) {
+            needsClone();
+            symb.put(prefix,null);
+        }
+        }
+
+        public void removeMappingIfNotRender(String prefix) {
+                NameSpaceSymbEntry ob = symb.get(prefix);
+
+        if (ob!=null && !ob.rendered) {
             needsClone();
-            symb.put(prefix,ob);
-                        if (outputNode && (((visibleNameSpaces-ob.level)<2) || XMLNS.equals(prefix)) ) {
-                                ob.level=visibleNameSpaces;
-                                return null; //Already rendered, just return nulll
-                        }
-                        ob.level=visibleNameSpaces;
-                        return ob.n;
-                }
+            symb.put(prefix,null);
+        }
+        }
 
-                NameSpaceSymbEntry ne=new NameSpaceSymbEntry(uri,n,true);
-                ne.level=nameSpaces;
-                ne.rendered=true;
-        needsClone();
-                symb.put(prefix, ne);
-                if (ob != null) {
-                        ne.lastrendered=ob.lastrendered;
+        public boolean removeMappingIfRender(String prefix) {
+                NameSpaceSymbEntry ob = symb.get(prefix);
 
-                        if ((ob.lastrendered!=null)&& (ob.lastrendered.equals(uri))) {
-                                ne.rendered=true;
-                        }
-                }
-                return ne.n;
+        if (ob!=null && ob.rendered) {
+            needsClone();
+            symb.put(prefix,null);
+        }
+        return false;
         }
 }
 
@@ -305,10 +290,11 @@
  * The internal structure of NameSpaceSymbTable.
  **/
 class NameSpaceSymbEntry implements Cloneable {
-    NameSpaceSymbEntry(String name,Attr n,boolean rendered) {
+    NameSpaceSymbEntry(String name,Attr n,boolean rendered,String prefix) {
         this.uri=name;
         this.rendered=rendered;
         this.n=n;
+        this.prefix=prefix;
     }
     /** @inheritDoc */
     public Object clone() {
@@ -320,6 +306,7 @@
     }
     /** The level where the definition was rendered(Only for inclusive) */
     int level=0;
+    String prefix;
     /**The URI that the prefix defines */
     String uri;
     /**The last output in the URI for this prefix (This for speed reason).*/
@@ -330,53 +317,57 @@
     Attr n;
 };
 
-class SymbMap implements Cloneable{
-        int free=23;
-        NameSpaceSymbEntry[] entries=new NameSpaceSymbEntry[free];
-        String[] keys=new String[free];
-
-        void put(String key, NameSpaceSymbEntry value) {
+class SymbMap implements Cloneable {
+    int free=23;
+    NameSpaceSymbEntry[] entries;
+    String[] keys;
+        SymbMap() {
+                entries=new NameSpaceSymbEntry[free];
+                keys=new String[free];
+        }
+    void put(String key, NameSpaceSymbEntry value) {
         int index = index(key);
-                Object oldKey = keys[index];
-                keys[index] = key;
-                entries[index] = value;
+        Object oldKey = keys[index];
+        keys[index] = key;
+        entries[index] = value;
         if (oldKey==null || !oldKey.equals(key)) {
-                if (--free == 0) {
-                                free=entries.length;
-                    int newCapacity = free<<2;
-                    rehash(newCapacity);
-                }
+            if (--free == 0) {
+                free=entries.length;
+                int newCapacity = free<<2;
+                rehash(newCapacity);
+            }
         }
     }
 
     List entrySet() {
-                List a=new ArrayList();
-                for (int i=0;i<entries.length;i++) {
-                        if ((entries[i]!=null) && !("".equals(entries[i]))) {
-                                a.add(entries[i]);
-                        }
-                }
-                return a;
+        List a=new ArrayList();
+        for (int i=0;i<entries.length;i++) {
+                if ((entries[i]!=null) && !("".equals(entries[i].uri))) {
+                        a.add(entries[i]);
+            }
         }
-
+        return a;
+    }
 
-        protected int index(Object obj) {
+    protected int index(Object obj) {
         Object[] set = keys;
-                int length = set.length;
-                //abs of index
+        int length = set.length;
+        //abs of index
         int index = (obj.hashCode() & 0x7fffffff) %  length;
         Object cur = set[index];
 
         if (cur == null || (cur.equals( obj))) {
-                        return index;
+                return index;
         }
+        length=length-1;
         do {
-                        index=index==length? 0:++index;
-                        cur = set[index];
+                index=index==length? 0:++index;
+                cur = set[index];
         } while (cur != null && (!cur.equals(obj)));
         return index;
     }
-         /**
+
+    /**
      * rehashes the map to the new capacity.
      *
      * @param newCapacity an <code>int</code> value
@@ -384,37 +375,38 @@
     protected void rehash(int newCapacity) {
         int oldCapacity = keys.length;
         String oldKeys[] = keys;
-                NameSpaceSymbEntry oldVals[] = entries;
+        NameSpaceSymbEntry oldVals[] = entries;
 
-                keys = new String[newCapacity];
-                entries = new NameSpaceSymbEntry[newCapacity];
+        keys = new String[newCapacity];
+        entries = new NameSpaceSymbEntry[newCapacity];
 
         for (int i = oldCapacity; i-- > 0;) {
             if(oldKeys[i] != null) {
                 String o = oldKeys[i];
                 int index = index(o);
-                                keys[index] = o;
-                                entries[index] = oldVals[i];
+                keys[index] = o;
+                entries[index] = oldVals[i];
             }
         }
     }
-         NameSpaceSymbEntry get(String key) {
-                return  entries[index(key)];
-            }
-         protected Object clone()  {
-                // TODO Auto-generated method stub
-                try {
-                        SymbMap copy=(SymbMap) super.clone();
-                        copy.entries=new NameSpaceSymbEntry[entries.length];
-                        System.arraycopy(entries,0,copy.entries,0,entries.length);
-                        copy.keys=new String[keys.length];
-                        System.arraycopy(keys,0,copy.keys,0,keys.length);
+
+    NameSpaceSymbEntry get(String key) {
+        return  entries[index(key)];
+    }
 
-                        return copy;
-                } catch (CloneNotSupportedException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-                }
-                return null;
+    protected Object clone()  {
+        try {
+                SymbMap copy=(SymbMap) super.clone();
+                copy.entries=new NameSpaceSymbEntry[entries.length];
+                System.arraycopy(entries,0,copy.entries,0,entries.length);
+                copy.keys=new String[keys.length];
+                System.arraycopy(keys,0,copy.keys,0,keys.length);
+
+                return copy;
+        } catch (CloneNotSupportedException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
         }
+        return null;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/UtfHelpper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,155 @@
+package com.sun.org.apache.xml.internal.security.c14n.implementations;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+
+public class UtfHelpper {
+
+        final static void writeByte(final String str,final OutputStream out,Map cache) throws IOException {
+                   byte []result=(byte[]) cache.get(str);
+                   if (result==null) {
+                           result=getStringInUtf8(str);
+                           cache.put(str,result);
+                   }
+
+                   out.write(result);
+
+           }
+
+        final static void writeCharToUtf8(final char c,final OutputStream out) throws IOException{
+                if (c < 0x80) {
+                out.write(c);
+                return;
+            }
+                if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF) ){
+                //No Surrogates in sun java
+                out.write(0x3f);
+                return;
+        }
+            int bias;
+            int write;
+            char ch;
+            if (c > 0x07FF) {
+                ch=(char)(c>>>12);
+                write=0xE0;
+                if (ch>0) {
+                    write |= ( ch & 0x0F);
+                }
+                out.write(write);
+                write=0x80;
+                bias=0x3F;
+            } else {
+                write=0xC0;
+                bias=0x1F;
+            }
+            ch=(char)(c>>>6);
+            if (ch>0) {
+                 write|= (ch & bias);
+            }
+            out.write(write);
+            out.write(0x80 | ((c) & 0x3F));
+
+           }
+
+        final static void writeStringToUtf8(final String str,final OutputStream out) throws IOException{
+                final int length=str.length();
+                int i=0;
+            char c;
+                while (i<length) {
+                        c=str.charAt(i++);
+                if (c < 0x80)  {
+                    out.write(c);
+                    continue;
+                }
+                if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF) ){
+                        //No Surrogates in sun java
+                        out.write(0x3f);
+                        continue;
+                }
+                char ch;
+                int bias;
+                int write;
+                if (c > 0x07FF) {
+                    ch=(char)(c>>>12);
+                    write=0xE0;
+                    if (ch>0) {
+                        write |= ( ch & 0x0F);
+                    }
+                    out.write(write);
+                    write=0x80;
+                    bias=0x3F;
+                } else {
+                        write=0xC0;
+                        bias=0x1F;
+                }
+                ch=(char)(c>>>6);
+                if (ch>0) {
+                     write|= (ch & bias);
+                }
+                out.write(write);
+                out.write(0x80 | ((c) & 0x3F));
+
+                }
+
+           }
+        public final static byte[] getStringInUtf8(final String str) {
+                   final int length=str.length();
+                   boolean expanded=false;
+                   byte []result=new byte[length];
+                        int i=0;
+                        int out=0;
+                    char c;
+                        while (i<length) {
+                                c=str.charAt(i++);
+                        if ( c < 0x80 ) {
+                            result[out++]=(byte)c;
+                            continue;
+                        }
+                        if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF) ){
+                                   //No Surrogates in sun java
+                                   result[out++]=0x3f;
+
+                                continue;
+                        }
+                        if (!expanded) {
+                                byte newResult[]=new byte[3*length];
+                                        System.arraycopy(result, 0, newResult, 0, out);
+                                        result=newResult;
+                                        expanded=true;
+                        }
+                        char ch;
+                        int bias;
+                        byte write;
+                        if (c > 0x07FF) {
+                            ch=(char)(c>>>12);
+                            write=(byte)0xE0;
+                            if (ch>0) {
+                                write |= ( ch & 0x0F);
+                            }
+                            result[out++]=write;
+                            write=(byte)0x80;
+                            bias=0x3F;
+                        } else {
+                                write=(byte)0xC0;
+                                bias=0x1F;
+                        }
+                        ch=(char)(c>>>6);
+                        if (ch>0) {
+                             write|= (ch & bias);
+                        }
+                        result[out++]=write;
+                        result[out++]=(byte)(0x80 | ((c) & 0x3F));/**/
+
+                        }
+                        if (expanded) {
+                                byte newResult[]=new byte[out];
+                                System.arraycopy(result, 0, newResult, 0, out);
+                                result=newResult;
+                        }
+                        return result;
+           }
+
+
+
+}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java	Wed Jul 05 16:42:37 2017 +0200
@@ -22,6 +22,7 @@
 
 
 import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
 import java.io.IOException;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
@@ -30,6 +31,7 @@
 import java.security.Key;
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchProviderException;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -204,7 +206,7 @@
      * @since 1.0.
      */
     private XMLCipher() {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Constructing XMLCipher...");
+        logger.log(java.util.logging.Level.FINE, "Constructing XMLCipher...");
 
         _factory = new Factory();
         _serializer = new Serializer();
@@ -266,7 +268,7 @@
     public static XMLCipher getInstance(String transformation) throws
             XMLEncryptionException {
         // sanity checks
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
+        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
         if (null == transformation)
             logger.log(java.util.logging.Level.SEVERE, "Transformation unexpectedly null...");
         if(!isValidEncryptionAlgorithm(transformation))
@@ -294,7 +296,7 @@
 
                 try {
             instance._contextCipher = Cipher.getInstance(jceAlgorithm);
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "cihper.algoritm = " +
+            logger.log(java.util.logging.Level.FINE, "cihper.algoritm = " +
                 instance._contextCipher.getAlgorithm());
         } catch (NoSuchAlgorithmException nsae) {
             throw new XMLEncryptionException("empty", nsae);
@@ -305,49 +307,6 @@
         return (instance);
     }
 
-    public static XMLCipher getInstance(String transformation,Cipher cipher) throws
-            XMLEncryptionException {
-        // sanity checks
-        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
-        if (null == transformation)
-            logger.log(java.util.logging.Level.SEVERE, "Transformation unexpectedly null...");
-        if(!isValidEncryptionAlgorithm(transformation))
-            logger.log(java.util.logging.Level.WARNING, "Algorithm non-standard, expected one of " + ENC_ALGORITHMS);
-
-        XMLCipher instance = new XMLCipher();
-
-        instance._algorithm = transformation;
-        instance._key = null;
-        instance._kek = null;
-
-
-                /* Create a canonicaliser - used when serialising DOM to octets
-                 * prior to encryption (and for the reverse) */
-
-        try {
-            instance._canon = Canonicalizer.getInstance
-                    (Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
-
-        } catch (InvalidCanonicalizerException ice) {
-            throw new XMLEncryptionException("empty", ice);
-        }
-
-        String jceAlgorithm = JCEMapper.translateURItoJCEID(transformation);
-
-        try {
-            instance._contextCipher = cipher;
-            //Cipher.getInstance(jceAlgorithm);
-            logger.log(java.util.logging.Level.FINE, "cihper.algoritm = " +
-                    instance._contextCipher.getAlgorithm());
-        }catch(Exception ex) {
-            throw new XMLEncryptionException("empty", ex);
-        }
-
-        return (instance);
-    }
-
-
-
         /**
          * Returns an <code>XMLCipher</code> that implements the specified
          * transformation, operates on the specified context document and serializes
@@ -380,6 +339,45 @@
                 return instance;
         }
 
+    public static XMLCipher getInstance(String transformation,Cipher cipher) throws XMLEncryptionException {
+        // sanity checks
+        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
+        if (null == transformation)
+            logger.log(java.util.logging.Level.SEVERE, "Transformation unexpectedly null...");
+        if(!isValidEncryptionAlgorithm(transformation))
+            logger.log(java.util.logging.Level.WARNING, "Algorithm non-standard, expected one of " + ENC_ALGORITHMS);
+
+        XMLCipher instance = new XMLCipher();
+
+        instance._algorithm = transformation;
+        instance._key = null;
+        instance._kek = null;
+
+
+        /* Create a canonicaliser - used when serialising DOM to octets
+         * prior to encryption (and for the reverse) */
+
+        try {
+            instance._canon = Canonicalizer.getInstance
+                    (Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
+
+        } catch (InvalidCanonicalizerException ice) {
+            throw new XMLEncryptionException("empty", ice);
+        }
+
+        String jceAlgorithm = JCEMapper.translateURItoJCEID(transformation);
+
+        try {
+            instance._contextCipher = cipher;
+            //Cipher.getInstance(jceAlgorithm);
+            logger.log(java.util.logging.Level.FINE, "cihper.algoritm = " +
+                    instance._contextCipher.getAlgorithm());
+        }catch(Exception ex) {
+            throw new XMLEncryptionException("empty", ex);
+        }
+
+        return (instance);
+    }
 
     /**
      * Returns an <code>XMLCipher</code> that implements the specified
@@ -396,7 +394,7 @@
     public static XMLCipher getProviderInstance(String transformation, String provider)
             throws XMLEncryptionException {
         // sanity checks
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
+        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher...");
         if (null == transformation)
             logger.log(java.util.logging.Level.SEVERE, "Transformation unexpectedly null...");
         if(null == provider)
@@ -429,9 +427,9 @@
 
             instance._contextCipher = Cipher.getInstance(jceAlgorithm, provider);
 
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "cipher._algorithm = " +
+            logger.log(java.util.logging.Level.FINE, "cipher._algorithm = " +
                 instance._contextCipher.getAlgorithm());
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "provider.name = " + provider);
+            logger.log(java.util.logging.Level.FINE, "provider.name = " + provider);
         } catch (NoSuchAlgorithmException nsae) {
             throw new XMLEncryptionException("empty", nsae);
         } catch (NoSuchProviderException nspre) {
@@ -490,7 +488,7 @@
     public static XMLCipher getInstance()
             throws XMLEncryptionException {
         // sanity checks
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Getting XMLCipher for no transformation...");
+        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher for no transformation...");
 
                 XMLCipher instance = new XMLCipher();
 
@@ -532,7 +530,7 @@
             throws XMLEncryptionException {
         // sanity checks
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Getting XMLCipher, provider but no transformation");
+        logger.log(java.util.logging.Level.FINE, "Getting XMLCipher, provider but no transformation");
         if(null == provider)
             logger.log(java.util.logging.Level.SEVERE, "Provider unexpectedly null..");
         if("" == provider)
@@ -578,7 +576,7 @@
      */
     public void init(int opmode, Key key) throws XMLEncryptionException {
         // sanity checks
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Initializing XMLCipher...");
+        logger.log(java.util.logging.Level.FINE, "Initializing XMLCipher...");
 
                 _ek = null;
                 _ed = null;
@@ -586,18 +584,18 @@
                 switch (opmode) {
 
                 case ENCRYPT_MODE :
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "opmode = ENCRYPT_MODE");
+                        logger.log(java.util.logging.Level.FINE, "opmode = ENCRYPT_MODE");
                         _ed = createEncryptedData(CipherData.VALUE_TYPE, "NO VALUE YET");
                         break;
                 case DECRYPT_MODE :
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "opmode = DECRYPT_MODE");
+                        logger.log(java.util.logging.Level.FINE, "opmode = DECRYPT_MODE");
                         break;
                 case WRAP_MODE :
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "opmode = WRAP_MODE");
+                        logger.log(java.util.logging.Level.FINE, "opmode = WRAP_MODE");
                         _ek = createEncryptedKey(CipherData.VALUE_TYPE, "NO VALUE YET");
                         break;
                 case UNWRAP_MODE :
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "opmode = UNWRAP_MODE");
+                        logger.log(java.util.logging.Level.FINE, "opmode = UNWRAP_MODE");
                         break;
                 default :
                         logger.log(java.util.logging.Level.SEVERE, "Mode unexpectedly invalid");
@@ -622,7 +620,7 @@
         public EncryptedData getEncryptedData() {
 
                 // Sanity checks
-                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Returning EncryptedData");
+                logger.log(java.util.logging.Level.FINE, "Returning EncryptedData");
                 return _ed;
 
         }
@@ -640,7 +638,7 @@
         public EncryptedKey getEncryptedKey() {
 
                 // Sanity checks
-                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Returning EncryptedKey");
+                logger.log(java.util.logging.Level.FINE, "Returning EncryptedKey");
                 return _ek;
         }
 
@@ -750,11 +748,11 @@
      */
 
     private Document encryptElement(Element element) throws Exception{
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypting element...");
+        logger.log(java.util.logging.Level.FINE, "Encrypting element...");
         if(null == element)
             logger.log(java.util.logging.Level.SEVERE, "Element unexpectedly null...");
         if(_cipherMode != ENCRYPT_MODE)
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
 
                 if (_algorithm == null) {
                 throw new XMLEncryptionException("XMLCipher instance without transformation specified");
@@ -785,11 +783,11 @@
      */
     private Document encryptElementContent(Element element) throws
             /* XMLEncryption */Exception {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypting element content...");
+        logger.log(java.util.logging.Level.FINE, "Encrypting element content...");
         if(null == element)
             logger.log(java.util.logging.Level.SEVERE, "Element unexpectedly null...");
         if(_cipherMode != ENCRYPT_MODE)
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
 
                 if (_algorithm == null) {
                 throw new XMLEncryptionException("XMLCipher instance without transformation specified");
@@ -815,7 +813,7 @@
      */
     public Document doFinal(Document context, Document source) throws
             /* XMLEncryption */Exception {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Processing source document...");
+        logger.log(java.util.logging.Level.FINE, "Processing source document...");
         if(null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
         if(null == source)
@@ -855,7 +853,7 @@
      */
     public Document doFinal(Document context, Element element) throws
             /* XMLEncryption */Exception {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Processing source element...");
+        logger.log(java.util.logging.Level.FINE, "Processing source element...");
         if(null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
         if(null == element)
@@ -898,7 +896,7 @@
      */
     public Document doFinal(Document context, Element element, boolean content)
             throws /* XMLEncryption*/ Exception {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Processing source element...");
+        logger.log(java.util.logging.Level.FINE, "Processing source element...");
         if(null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
         if(null == element)
@@ -954,6 +952,34 @@
 
     /**
      * Returns an <code>EncryptedData</code> interface. Use this operation if
+     * you want to have full control over the serialization of the element
+     * or element content.
+     *
+     * This does not change the source document in any way.
+     *
+     * @param context the context <code>Document</code>.
+     * @param type a URI identifying type information about the plaintext form
+     *    of the encrypted content (may be <code>null</code>)
+     * @param serializedData the serialized data
+     * @return the <code>EncryptedData</code>
+     * @throws Exception
+     */
+    public EncryptedData encryptData(Document context, String type,
+        InputStream serializedData) throws Exception {
+
+        logger.log(java.util.logging.Level.FINE, "Encrypting element...");
+        if (null == context)
+            logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
+        if (null == serializedData)
+            logger.log(java.util.logging.Level.SEVERE, "Serialized data unexpectedly null...");
+        if (_cipherMode != ENCRYPT_MODE)
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
+
+        return encryptData(context, null, type, serializedData);
+    }
+
+    /**
+     * Returns an <code>EncryptedData</code> interface. Use this operation if
      * you want to have full control over the contents of the
      * <code>EncryptedData</code> structure.
      *
@@ -966,160 +992,60 @@
      * @return the <code>EncryptedData</code>
      * @throws Exception
      */
-    public EncryptedData encryptData(Document context, Element element, boolean contentMode) throws
-            /* XMLEncryption */ Exception {
-                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypting element...");
-                if (null == context)
-                        logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
-                if (null == element)
-                        logger.log(java.util.logging.Level.SEVERE, "Element unexpectedly null...");
-                if (_cipherMode != ENCRYPT_MODE)
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
-
-                _contextDocument = context;
-
-                if (_algorithm == null) {
-                        throw new XMLEncryptionException("XMLCipher instance without transformation specified");
-                }
-
-                String serializedOctets = null;
-                if (contentMode) {
-                        NodeList children = element.getChildNodes();
-                        if ((null != children)) {
-                                serializedOctets = _serializer.serialize(children);
-                        } else {
-                                Object exArgs[] = { "Element has no content." };
-                                throw new XMLEncryptionException("empty", exArgs);
-                        }
-                } else {
-                        serializedOctets = _serializer.serialize(element);
-                }
-                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Serialized octets:\n" + serializedOctets);
-
-        byte[] encryptedBytes = null;
-
-                // Now create the working cipher if none was created already
-                Cipher c;
-                if (_contextCipher == null) {
-                        String jceAlgorithm =
-                                JCEMapper.translateURItoJCEID(_algorithm);
-
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "alg = " + jceAlgorithm);
-
-                        try {
-                            if (_requestedJCEProvider == null)
-                                c = Cipher.getInstance(jceAlgorithm);
-                            else
-                                c = Cipher.getInstance(jceAlgorithm, _requestedJCEProvider);
-                        } catch (NoSuchAlgorithmException nsae) {
-                                throw new XMLEncryptionException("empty", nsae);
-                        } catch (NoSuchProviderException nspre) {
-                                throw new XMLEncryptionException("empty", nspre);
-                        } catch (NoSuchPaddingException nspae) {
-                                throw new XMLEncryptionException("empty", nspae);
-                        }
-                }
-                else {
-                        c = _contextCipher;
-                }
-                // Now perform the encryption
-
-                try {
-                        // Should internally generate an IV
-                        // todo - allow user to set an IV
-                        c.init(_cipherMode, _key);
-                } catch (InvalidKeyException ike) {
-                        throw new XMLEncryptionException("empty", ike);
-                }
-
-        try {
-            encryptedBytes =
-                c.doFinal(serializedOctets.getBytes("UTF-8"));
-
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Expected cipher.outputSize = " +
-                Integer.toString(c.getOutputSize(
-                    serializedOctets.getBytes().length)));
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Actual cipher.outputSize = " +
-                Integer.toString(encryptedBytes.length));
-        } catch (IllegalStateException ise) {
-            throw new XMLEncryptionException("empty", ise);
-        } catch (IllegalBlockSizeException ibse) {
-            throw new XMLEncryptionException("empty", ibse);
-        } catch (BadPaddingException bpe) {
-            throw new XMLEncryptionException("empty", bpe);
-        } catch (UnsupportedEncodingException uee) {
-                        throw new XMLEncryptionException("empty", uee);
-                }
-
-                // Now build up to a properly XML Encryption encoded octet stream
-                // IvParameterSpec iv;
-
-                byte[] iv = c.getIV();
-                byte[] finalEncryptedBytes =
-                        new byte[iv.length + encryptedBytes.length];
-                System.arraycopy(iv, 0, finalEncryptedBytes, 0,
-                                                 iv.length);
-                System.arraycopy(encryptedBytes, 0, finalEncryptedBytes,
-                                                 iv.length,
-                                                 encryptedBytes.length);
-
-        String base64EncodedEncryptedOctets = Base64.encode(finalEncryptedBytes);
-
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypted octets:\n" + base64EncodedEncryptedOctets);
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypted octets length = " +
-            base64EncodedEncryptedOctets.length());
-
-                try {
-                        CipherData cd = _ed.getCipherData();
-                        CipherValue cv = cd.getCipherValue();
-                        // cv.setValue(base64EncodedEncryptedOctets.getBytes());
-                        cv.setValue(base64EncodedEncryptedOctets);
-
-                        if (contentMode) {
-                                _ed.setType(
-                                        new URI(EncryptionConstants.TYPE_CONTENT).toString());
-                        } else {
-                                _ed.setType(
-                                        new URI(EncryptionConstants.TYPE_ELEMENT).toString());
-                        }
-                        EncryptionMethod method =
-                                _factory.newEncryptionMethod(new URI(_algorithm).toString());
-                        _ed.setEncryptionMethod(method);
-                } catch (URI.MalformedURIException mfue) {
-                        throw new XMLEncryptionException("empty", mfue);
-                }
-        return (_ed);
-    }
-
-
-
-    public EncryptedData encryptData(Document context, byte [] serializedOctets, boolean contentMode) throws
-            /* XMLEncryption */ Exception {
+    public EncryptedData encryptData(
+        Document context, Element element, boolean contentMode)
+        throws /* XMLEncryption */ Exception {
+
         logger.log(java.util.logging.Level.FINE, "Encrypting element...");
         if (null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
-        if (null == serializedOctets)
-            logger.log(java.util.logging.Level.SEVERE, "Canonicalized Data is unexpectedly null...");
+        if (null == element)
+            logger.log(java.util.logging.Level.SEVERE, "Element unexpectedly null...");
         if (_cipherMode != ENCRYPT_MODE)
             logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in ENCRYPT_MODE...");
 
+        if (contentMode) {
+            return encryptData
+                (context, element, EncryptionConstants.TYPE_CONTENT, null);
+        } else {
+            return encryptData
+                (context, element, EncryptionConstants.TYPE_ELEMENT, null);
+        }
+    }
+
+    private EncryptedData encryptData(
+        Document context, Element element, String type,
+        InputStream serializedData) throws /* XMLEncryption */ Exception {
+
         _contextDocument = context;
 
         if (_algorithm == null) {
-            throw new XMLEncryptionException("XMLCipher instance without transformation specified");
+            throw new XMLEncryptionException
+                ("XMLCipher instance without transformation specified");
         }
 
-
-        logger.log(java.util.logging.Level.FINE, "Serialized octets:\n" + serializedOctets);
+        String serializedOctets = null;
+        if (serializedData == null) {
+            if (type == EncryptionConstants.TYPE_CONTENT) {
+                NodeList children = element.getChildNodes();
+                if (null != children) {
+                    serializedOctets = _serializer.serialize(children);
+                } else {
+                    Object exArgs[] = { "Element has no content." };
+                    throw new XMLEncryptionException("empty", exArgs);
+                }
+            } else {
+                serializedOctets = _serializer.serialize(element);
+            }
+            logger.log(java.util.logging.Level.FINE, "Serialized octets:\n" + serializedOctets);
+        }
 
         byte[] encryptedBytes = null;
 
         // Now create the working cipher if none was created already
         Cipher c;
         if (_contextCipher == null) {
-            String jceAlgorithm =
-                    JCEMapper.translateURItoJCEID(_algorithm);
-
+            String jceAlgorithm = JCEMapper.translateURItoJCEID(_algorithm);
             logger.log(java.util.logging.Level.FINE, "alg = " + jceAlgorithm);
 
             try {
@@ -1148,41 +1074,47 @@
         }
 
         try {
-            encryptedBytes =
-                    c.doFinal(serializedOctets);
-
-            logger.log(java.util.logging.Level.FINE, "Expected cipher.outputSize = " +
+            if (serializedData != null) {
+                int numBytes;
+                byte[] buf = new byte[8192];
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                while ((numBytes = serializedData.read(buf)) != -1) {
+                    byte[] data = c.update(buf, 0, numBytes);
+                    baos.write(data);
+                }
+                baos.write(c.doFinal());
+                encryptedBytes = baos.toByteArray();
+            } else {
+                encryptedBytes = c.doFinal(serializedOctets.getBytes("UTF-8"));
+                logger.log(java.util.logging.Level.FINE, "Expected cipher.outputSize = " +
                     Integer.toString(c.getOutputSize(
-                    serializedOctets.length)));
+                        serializedOctets.getBytes().length)));
+            }
             logger.log(java.util.logging.Level.FINE, "Actual cipher.outputSize = " +
-                    Integer.toString(encryptedBytes.length));
+                Integer.toString(encryptedBytes.length));
         } catch (IllegalStateException ise) {
             throw new XMLEncryptionException("empty", ise);
         } catch (IllegalBlockSizeException ibse) {
             throw new XMLEncryptionException("empty", ibse);
         } catch (BadPaddingException bpe) {
             throw new XMLEncryptionException("empty", bpe);
-        } catch (Exception uee) {
+        } catch (UnsupportedEncodingException uee) {
             throw new XMLEncryptionException("empty", uee);
         }
 
         // Now build up to a properly XML Encryption encoded octet stream
         // IvParameterSpec iv;
-
         byte[] iv = c.getIV();
         byte[] finalEncryptedBytes =
                 new byte[iv.length + encryptedBytes.length];
-        System.arraycopy(iv, 0, finalEncryptedBytes, 0,
-                iv.length);
-        System.arraycopy(encryptedBytes, 0, finalEncryptedBytes,
-                iv.length,
-                encryptedBytes.length);
-
+        System.arraycopy(iv, 0, finalEncryptedBytes, 0, iv.length);
+        System.arraycopy(encryptedBytes, 0, finalEncryptedBytes, iv.length,
+                         encryptedBytes.length);
         String base64EncodedEncryptedOctets = Base64.encode(finalEncryptedBytes);
 
         logger.log(java.util.logging.Level.FINE, "Encrypted octets:\n" + base64EncodedEncryptedOctets);
         logger.log(java.util.logging.Level.FINE, "Encrypted octets length = " +
-                base64EncodedEncryptedOctets.length());
+            base64EncodedEncryptedOctets.length());
 
         try {
             CipherData cd = _ed.getCipherData();
@@ -1190,15 +1122,11 @@
             // cv.setValue(base64EncodedEncryptedOctets.getBytes());
             cv.setValue(base64EncodedEncryptedOctets);
 
-            if (contentMode) {
-                _ed.setType(
-                        new URI(EncryptionConstants.TYPE_CONTENT).toString());
-            } else {
-                _ed.setType(
-                        new URI(EncryptionConstants.TYPE_ELEMENT).toString());
+            if (type != null) {
+                _ed.setType(new URI(type).toString());
             }
             EncryptionMethod method =
-                    _factory.newEncryptionMethod(new URI(_algorithm).toString());
+                _factory.newEncryptionMethod(new URI(_algorithm).toString());
             _ed.setEncryptionMethod(method);
         } catch (URI.MalformedURIException mfue) {
             throw new XMLEncryptionException("empty", mfue);
@@ -1206,7 +1134,6 @@
         return (_ed);
     }
 
-
     /**
      * Returns an <code>EncryptedData</code> interface. Use this operation if
      * you want to load an <code>EncryptedData</code> structure from a DOM
@@ -1219,7 +1146,7 @@
      */
     public EncryptedData loadEncryptedData(Document context, Element element)
                 throws XMLEncryptionException {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Loading encrypted element...");
+        logger.log(java.util.logging.Level.FINE, "Loading encrypted element...");
         if(null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
         if(null == element)
@@ -1246,13 +1173,13 @@
 
     public EncryptedKey loadEncryptedKey(Document context, Element element)
                 throws XMLEncryptionException {
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Loading encrypted key...");
+        logger.log(java.util.logging.Level.FINE, "Loading encrypted key...");
         if(null == context)
             logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
         if(null == element)
             logger.log(java.util.logging.Level.SEVERE, "Element unexpectedly null...");
         if(_cipherMode != UNWRAP_MODE && _cipherMode != DECRYPT_MODE)
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in UNWRAP_MODE or DECRYPT_MODE...");
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in UNWRAP_MODE or DECRYPT_MODE...");
 
         _contextDocument = context;
         _ek = _factory.newEncryptedKey(element);
@@ -1290,12 +1217,12 @@
     public EncryptedKey encryptKey(Document doc, Key key) throws
             XMLEncryptionException {
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypting key ...");
+        logger.log(java.util.logging.Level.FINE, "Encrypting key ...");
 
         if(null == key)
             logger.log(java.util.logging.Level.SEVERE, "Key unexpectedly null...");
         if(_cipherMode != WRAP_MODE)
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in WRAP_MODE...");
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in WRAP_MODE...");
 
                 if (_algorithm == null) {
 
@@ -1313,7 +1240,7 @@
                         String jceAlgorithm =
                                 JCEMapper.translateURItoJCEID(_algorithm);
 
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "alg = " + jceAlgorithm);
+                        logger.log(java.util.logging.Level.FINE, "alg = " + jceAlgorithm);
 
                         try {
                             if (_requestedJCEProvider == null)
@@ -1345,8 +1272,8 @@
 
         String base64EncodedEncryptedOctets = Base64.encode(encryptedBytes);
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypted key octets:\n" + base64EncodedEncryptedOctets);
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypted key octets length = " +
+        logger.log(java.util.logging.Level.FINE, "Encrypted key octets:\n" + base64EncodedEncryptedOctets);
+        logger.log(java.util.logging.Level.FINE, "Encrypted key octets length = " +
             base64EncodedEncryptedOctets.length());
 
                 CipherValue cv = _ek.getCipherData().getCipherValue();
@@ -1376,10 +1303,10 @@
         public Key decryptKey(EncryptedKey encryptedKey, String algorithm) throws
                     XMLEncryptionException {
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Decrypting key from previously loaded EncryptedKey...");
+        logger.log(java.util.logging.Level.FINE, "Decrypting key from previously loaded EncryptedKey...");
 
         if(_cipherMode != UNWRAP_MODE)
-            if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in UNWRAP_MODE...");
+            logger.log(java.util.logging.Level.FINE, "XMLCipher unexpectedly not in UNWRAP_MODE...");
 
                 if (algorithm == null) {
                         throw new XMLEncryptionException("Cannot decrypt a key without knowing the algorithm");
@@ -1387,7 +1314,7 @@
 
                 if (_key == null) {
 
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Trying to find a KEK via key resolvers");
+                        logger.log(java.util.logging.Level.FINE, "Trying to find a KEK via key resolvers");
 
                         KeyInfo ki = encryptedKey.getKeyInfo();
                         if (ki != null) {
@@ -1418,7 +1345,7 @@
                                 JCEMapper.translateURItoJCEID(
                                         encryptedKey.getEncryptionMethod().getAlgorithm());
 
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "JCE Algorithm = " + jceAlgorithm);
+                        logger.log(java.util.logging.Level.FINE, "JCE Algorithm = " + jceAlgorithm);
 
                         try {
                             if (_requestedJCEProvider == null)
@@ -1448,7 +1375,7 @@
                         throw new XMLEncryptionException("empty", nsae);
                 }
 
-                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Decryption of key type " + algorithm + " OK");
+                logger.log(java.util.logging.Level.FINE, "Decryption of key type " + algorithm + " OK");
 
                 return ret;
 
@@ -1478,14 +1405,9 @@
      *
      * @param node the <code>Node</code> to clear.
      */
-    private void removeContent(Node node) {
-        NodeList list = node.getChildNodes();
-        if (list.getLength() > 0) {
-            Node n = list.item(0);
-            if (null != n) {
-                n.getParentNode().removeChild(n);
-            }
-            removeContent(node);
+    private static void removeContent(Node node) {
+       while (node.hasChildNodes()) {
+            node.removeChild(node.getFirstChild());
         }
     }
 
@@ -1499,7 +1421,7 @@
     private Document decryptElement(Element element) throws
             XMLEncryptionException {
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Decrypting element...");
+        logger.log(java.util.logging.Level.FINE, "Decrypting element...");
 
         if(_cipherMode != DECRYPT_MODE)
             logger.log(java.util.logging.Level.SEVERE, "XMLCipher unexpectedly not in DECRYPT_MODE...");
@@ -1512,7 +1434,7 @@
                 }
 
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Decrypted octets:\n" + octets);
+        logger.log(java.util.logging.Level.FINE, "Decrypted octets:\n" + octets);
 
         Node sourceParent =  element.getParentNode();
 
@@ -1573,7 +1495,7 @@
         public byte[] decryptToByteArray(Element element)
                 throws XMLEncryptionException {
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Decrypting to ByteArray...");
+        logger.log(java.util.logging.Level.FINE, "Decrypting to ByteArray...");
 
         if(_cipherMode != DECRYPT_MODE)
             logger.log(java.util.logging.Level.SEVERE, "XMLCipher unexpectedly not in DECRYPT_MODE...");
@@ -2226,7 +2148,7 @@
         AgreementMethod newAgreementMethod(Element element) throws
                 XMLEncryptionException {
             if (null == element) {
-                //complain
+                throw new NullPointerException("element is null");
             }
 
             String algorithm = element.getAttributeNS(null,
@@ -2292,7 +2214,7 @@
         CipherData newCipherData(Element element) throws
                 XMLEncryptionException {
             if (null == element) {
-                // complain
+                throw new NullPointerException("element is null");
             }
 
             int type = 0;
@@ -2352,7 +2274,7 @@
                                 (Element) transformsElements.item(0);
 
                         if (transformsElement != null) {
-                                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Creating a DSIG based Transforms element");
+                                logger.log(java.util.logging.Level.FINE, "Creating a DSIG based Transforms element");
                                 try {
                                         result.setTransforms(new TransformsImpl(transformsElement));
                                 }
@@ -2411,34 +2333,28 @@
                         XMLEncryptionException {
             EncryptedData result = null;
 
-                        NodeList dataElements = element.getElementsByTagNameNS(
-                    EncryptionConstants.EncryptionSpecNS,
-                    EncryptionConstants._TAG_CIPHERDATA);
-
-                        // Need to get the last CipherData found, as earlier ones will
-                        // be for elements in the KeyInfo lists
+            NodeList dataElements = element.getElementsByTagNameNS(
+                EncryptionConstants.EncryptionSpecNS,
+                EncryptionConstants._TAG_CIPHERDATA);
+
+            // Need to get the last CipherData found, as earlier ones will
+            // be for elements in the KeyInfo lists
 
             Element dataElement =
-                                (Element) dataElements.item(dataElements.getLength() - 1);
+                (Element) dataElements.item(dataElements.getLength() - 1);
 
             CipherData data = newCipherData(dataElement);
 
             result = newEncryptedData(data);
 
-            try {
-                result.setId(element.getAttributeNS(
-                    null, EncryptionConstants._ATT_ID));
-                result.setType(new URI(
-                    element.getAttributeNS(
-                        null, EncryptionConstants._ATT_TYPE)).toString());
-                result.setMimeType(element.getAttributeNS(
-                    null, EncryptionConstants._ATT_MIMETYPE));
-                result.setEncoding(new URI(
-                    element.getAttributeNS(
-                        null, Constants._ATT_ENCODING)).toString());
-            } catch (URI.MalformedURIException mfue) {
-                // do nothing
-            }
+            result.setId(element.getAttributeNS(
+                null, EncryptionConstants._ATT_ID));
+            result.setType(
+                element.getAttributeNS(null, EncryptionConstants._ATT_TYPE));
+            result.setMimeType(element.getAttributeNS(
+                null, EncryptionConstants._ATT_MIMETYPE));
+            result.setEncoding(
+                element.getAttributeNS(null, Constants._ATT_ENCODING));
 
             Element encryptionMethodElement =
                 (Element) element.getElementsByTagNameNS(
@@ -2450,18 +2366,18 @@
             }
 
             // BFL 16/7/03 - simple implementation
-                        // TODO: Work out how to handle relative URI
+            // TODO: Work out how to handle relative URI
 
             Element keyInfoElement =
                 (Element) element.getElementsByTagNameNS(
                     Constants.SignatureSpecNS, Constants._TAG_KEYINFO).item(0);
             if (null != keyInfoElement) {
-                                try {
-                                        result.setKeyInfo(new KeyInfo(keyInfoElement, null));
-                                } catch (XMLSecurityException xse) {
-                                        throw new XMLEncryptionException("Error loading Key Info",
-                                                                                                         xse);
-                                }
+                try {
+                    result.setKeyInfo(new KeyInfo(keyInfoElement, null));
+                } catch (XMLSecurityException xse) {
+                    throw new XMLEncryptionException("Error loading Key Info",
+                                                     xse);
+                }
             }
 
             // TODO: Implement
@@ -2511,31 +2427,25 @@
         EncryptedKey newEncryptedKey(Element element) throws
                 XMLEncryptionException {
             EncryptedKey result = null;
-                        NodeList dataElements = element.getElementsByTagNameNS(
-                    EncryptionConstants.EncryptionSpecNS,
-                    EncryptionConstants._TAG_CIPHERDATA);
+            NodeList dataElements = element.getElementsByTagNameNS(
+                EncryptionConstants.EncryptionSpecNS,
+                EncryptionConstants._TAG_CIPHERDATA);
             Element dataElement =
-                                (Element) dataElements.item(dataElements.getLength() - 1);
+                (Element) dataElements.item(dataElements.getLength() - 1);
 
             CipherData data = newCipherData(dataElement);
             result = newEncryptedKey(data);
 
-            try {
-                result.setId(element.getAttributeNS(
-                    null, EncryptionConstants._ATT_ID));
-                result.setType(new URI(
-                    element.getAttributeNS(
-                        null, EncryptionConstants._ATT_TYPE)).toString());
-                result.setMimeType(element.getAttributeNS(
-                    null, EncryptionConstants._ATT_MIMETYPE));
-                result.setEncoding(new URI(
-                    element.getAttributeNS(
-                        null, Constants._ATT_ENCODING)).toString());
-                result.setRecipient(element.getAttributeNS(
-                    null, EncryptionConstants._ATT_RECIPIENT));
-            } catch (URI.MalformedURIException mfue) {
-                // do nothing
-            }
+            result.setId(element.getAttributeNS(
+                null, EncryptionConstants._ATT_ID));
+            result.setType(
+                element.getAttributeNS(null, EncryptionConstants._ATT_TYPE));
+            result.setMimeType(element.getAttributeNS(
+                null, EncryptionConstants._ATT_MIMETYPE));
+            result.setEncoding(
+                element.getAttributeNS(null, Constants._ATT_ENCODING));
+            result.setRecipient(element.getAttributeNS(
+                null, EncryptionConstants._ATT_RECIPIENT));
 
             Element encryptionMethodElement =
                 (Element) element.getElementsByTagNameNS(
@@ -2550,12 +2460,12 @@
                 (Element) element.getElementsByTagNameNS(
                     Constants.SignatureSpecNS, Constants._TAG_KEYINFO).item(0);
             if (null != keyInfoElement) {
-                                try {
-                                        result.setKeyInfo(new KeyInfo(keyInfoElement, null));
-                                } catch (XMLSecurityException xse) {
-                                        throw new XMLEncryptionException("Error loading Key Info",
-                                                                                                         xse);
-                                }
+                try {
+                    result.setKeyInfo(new KeyInfo(keyInfoElement, null));
+                } catch (XMLSecurityException xse) {
+                    throw new XMLEncryptionException
+                        ("Error loading Key Info", xse);
+                }
             }
 
             // TODO: Implement
@@ -2581,7 +2491,8 @@
                     EncryptionConstants.EncryptionSpecNS,
                     EncryptionConstants._TAG_CARRIEDKEYNAME).item(0);
             if (null != carriedNameElement) {
-                result.setCarriedName(carriedNameElement.getNodeValue());
+                result.setCarriedName
+                    (carriedNameElement.getFirstChild().getNodeValue());
             }
 
             return (result);
@@ -2680,13 +2591,8 @@
         EncryptionProperty newEncryptionProperty(Element element) {
             EncryptionProperty result = newEncryptionProperty();
 
-            try {
-                result.setTarget(new URI(
-                    element.getAttributeNS(
-                        null, EncryptionConstants._ATT_TARGET)).toString());
-            } catch (URI.MalformedURIException mfue) {
-                // do nothing
-            }
+            result.setTarget(
+                element.getAttributeNS(null, EncryptionConstants._ATT_TARGET));
             result.setId(element.getAttributeNS(
                 null, EncryptionConstants._ATT_ID));
             // TODO: Make this lot work...
@@ -2943,7 +2849,7 @@
                 } catch (URI.MalformedURIException mfue) {
                     //complain
                 }
-                algorithm = tmpAlgorithm.toString();
+                algorithmURI = tmpAlgorithm.toString();
             }
 
             // <element name="AgreementMethod" type="xenc:AgreementMethodType"/>
@@ -3183,7 +3089,7 @@
                     _contextDocument, EncryptionConstants.EncryptionSpecNS,
                     EncryptionConstants._TAG_CIPHERVALUE);
                 result.appendChild(_contextDocument.createTextNode(
-                    new String(cipherValue)));
+                    cipherValue));
 
                 return (result);
             }
@@ -3247,8 +3153,7 @@
                 }
                 if (null != super.getType()) {
                     result.setAttributeNS(
-                        null, EncryptionConstants._ATT_TYPE,
-                        super.getType().toString());
+                        null, EncryptionConstants._ATT_TYPE, super.getType());
                 }
                 if (null != super.getMimeType()) {
                     result.setAttributeNS(
@@ -3258,7 +3163,7 @@
                 if (null != super.getEncoding()) {
                     result.setAttributeNS(
                         null, EncryptionConstants._ATT_ENCODING,
-                        super.getEncoding().toString());
+                        super.getEncoding());
                 }
                 if (null != super.getEncryptionMethod()) {
                     result.appendChild(((EncryptionMethodImpl)
@@ -3383,8 +3288,7 @@
                 }
                 if (null != super.getType()) {
                     result.setAttributeNS(
-                        null, EncryptionConstants._ATT_TYPE,
-                        super.getType().toString());
+                        null, EncryptionConstants._ATT_TYPE, super.getType());
                 }
                 if (null != super.getMimeType()) {
                     result.setAttributeNS(null,
@@ -3392,7 +3296,7 @@
                 }
                 if (null != super.getEncoding()) {
                     result.setAttributeNS(null, Constants._ATT_ENCODING,
-                        super.getEncoding().toString());
+                        super.getEncoding());
                 }
                 if (null != getRecipient()) {
                     result.setAttributeNS(null,
@@ -3468,13 +3372,17 @@
              * @param type
              */
             public void setType(String type) {
-                URI tmpType = null;
-                try {
-                    tmpType = new URI(type);
-                } catch (URI.MalformedURIException mfue) {
-                    // complain
+                if (type == null || type.length() == 0) {
+                    this.type = null;
+                } else {
+                    URI tmpType = null;
+                    try {
+                        tmpType = new URI(type);
+                    } catch (URI.MalformedURIException mfue) {
+                        // complain
+                    }
+                    this.type = tmpType.toString();
                 }
-                this.type = tmpType.toString();
             }
             /**
              *
@@ -3502,13 +3410,17 @@
              * @param encoding
              */
             public void setEncoding(String encoding) {
-                URI tmpEncoding = null;
-                try {
-                    tmpEncoding = new URI(encoding);
-                } catch (URI.MalformedURIException mfue) {
-                    // complain
+                if (encoding == null || encoding.length() == 0) {
+                    this.encoding = null;
+                } else {
+                    URI tmpEncoding = null;
+                    try {
+                        tmpEncoding = new URI(encoding);
+                    } catch (URI.MalformedURIException mfue) {
+                        // complain
+                    }
+                    this.encoding = tmpEncoding.toString();
                 }
-                this.encoding = tmpEncoding.toString();
             }
             /**
              *
@@ -3635,7 +3547,7 @@
                     _contextDocument, EncryptionConstants.EncryptionSpecNS,
                     EncryptionConstants._TAG_ENCRYPTIONMETHOD);
                 result.setAttributeNS(null, EncryptionConstants._ATT_ALGORITHM,
-                    algorithm.toString());
+                    algorithm);
                 if (keySize > 0) {
                     result.appendChild(
                         ElementProxy.createElementForFamily(_contextDocument,
@@ -3735,8 +3647,7 @@
         private class EncryptionPropertyImpl implements EncryptionProperty {
             private String target = null;
             private String id = null;
-            private String attributeName = null;
-            private String attributeValue = null;
+            private HashMap attributeMap = new HashMap();
             private List encryptionInformation = null;
 
             /**
@@ -3752,13 +3663,24 @@
             }
             /** @inheritDoc */
             public void setTarget(String target) {
-                URI tmpTarget = null;
-                try {
-                    tmpTarget = new URI(target);
-                } catch (URI.MalformedURIException mfue) {
-                    // complain
+                if (target == null || target.length() == 0) {
+                    this.target = null;
+                } else if (target.startsWith("#")) {
+                    /*
+                     * This is a same document URI reference. Do not parse,
+                     * because com.sun.org.apache.xml.internal.utils.URI considers this an
+                     * illegal URI because it has no scheme.
+                     */
+                    this.target = target;
+                } else {
+                    URI tmpTarget = null;
+                    try {
+                        tmpTarget = new URI(target);
+                    } catch (URI.MalformedURIException mfue) {
+                        // complain
+                    }
+                    this.target = tmpTarget.toString();
                 }
-                this.target = tmpTarget.toString();
             }
             /** @inheritDoc */
             public String getId() {
@@ -3770,12 +3692,11 @@
             }
             /** @inheritDoc */
             public String getAttribute(String attribute) {
-                return (attributeValue);
+                return (String) attributeMap.get(attribute);
             }
             /** @inheritDoc */
             public void setAttribute(String attribute, String value) {
-                attributeName = attribute;
-                attributeValue = value;
+                attributeMap.put(attribute, value);
             }
             /** @inheritDoc */
             public Iterator getEncryptionInformation() {
@@ -3805,7 +3726,7 @@
                     EncryptionConstants._TAG_ENCRYPTIONPROPERTY);
                 if (null != target) {
                     result.setAttributeNS(null, EncryptionConstants._ATT_TARGET,
-                        target.toString());
+                        target);
                 }
                 if (null != id) {
                     result.setAttributeNS(null, EncryptionConstants._ATT_ID,
@@ -3839,7 +3760,13 @@
                          * @param doc
                          */
                         public TransformsImpl(Document doc) {
-                                super(doc);
+                                if (doc == null) {
+                                 throw new RuntimeException("Document is null");
+                              }
+
+                              this._doc = doc;
+                              this._constructionElement =  createElementForFamilyLocal(this._doc,
+                                          this.getBaseNamespace(), this.getBaseLocalName());
                         }
                         /**
              *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipherInput.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipherInput.java	Wed Jul 05 16:42:37 2017 +0200
@@ -108,84 +108,78 @@
                 return null;
         }
 
-        /**
-         * Internal method to get bytes in decryption mode
+    /**
+     * Internal method to get bytes in decryption mode
      * @return the decripted bytes
      * @throws XMLEncryptionException
-         */
+     */
+    private byte[] getDecryptBytes() throws XMLEncryptionException {
 
-        private byte[] getDecryptBytes() throws XMLEncryptionException {
-
-                String base64EncodedEncryptedOctets = null;
+        String base64EncodedEncryptedOctets = null;
 
         if (_cipherData.getDataType() == CipherData.REFERENCE_TYPE) {
-                        // Fun time!
-                        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Found a reference type CipherData");
-                        CipherReference cr = _cipherData.getCipherReference();
+            // Fun time!
+            logger.log(java.util.logging.Level.FINE, "Found a reference type CipherData");
+            CipherReference cr = _cipherData.getCipherReference();
 
-                        // Need to wrap the uri in an Attribute node so that we can
-                        // Pass to the resource resolvers
+            // Need to wrap the uri in an Attribute node so that we can
+            // Pass to the resource resolvers
 
-                        Attr uriAttr = cr.getURIAsAttr();
-                        XMLSignatureInput input = null;
+            Attr uriAttr = cr.getURIAsAttr();
+            XMLSignatureInput input = null;
 
-                        try {
-                                ResourceResolver resolver =
-                                        ResourceResolver.getInstance(uriAttr, null);
-                                input = resolver.resolve(uriAttr, null);
-                        } catch (ResourceResolverException ex) {
-                                throw new XMLEncryptionException("empty", ex);
-                        }
+            try {
+                ResourceResolver resolver =
+                    ResourceResolver.getInstance(uriAttr, null);
+                input = resolver.resolve(uriAttr, null);
+            } catch (ResourceResolverException ex) {
+                throw new XMLEncryptionException("empty", ex);
+            }
 
-                        if (input != null) {
-                                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Managed to resolve URI \"" + cr.getURI() + "\"");
-                        }
-                        else {
-                                if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Failed to resolve URI \"" + cr.getURI() + "\"");
-                        }
+            if (input != null) {
+                logger.log(java.util.logging.Level.FINE, "Managed to resolve URI \"" + cr.getURI() + "\"");
+            } else {
+                logger.log(java.util.logging.Level.FINE, "Failed to resolve URI \"" + cr.getURI() + "\"");
+            }
 
-                        // Lets see if there are any transforms
-                        Transforms transforms = cr.getTransforms();
-                        if (transforms != null) {
-                                if (logger.isLoggable(java.util.logging.Level.FINE))                                  logger.log(java.util.logging.Level.FINE, "Have transforms in cipher reference");
-                                try {
-                                    com.sun.org.apache.xml.internal.security.transforms.Transforms dsTransforms =
-                                                transforms.getDSTransforms();
-                                    input =     dsTransforms.performTransforms(input);
-                                } catch (TransformationException ex) {
-                                        throw new XMLEncryptionException("empty", ex);
-                                }
-                        }
+            // Lets see if there are any transforms
+            Transforms transforms = cr.getTransforms();
+            if (transforms != null) {
+                logger.log(java.util.logging.Level.FINE, "Have transforms in cipher reference");
+                try {
+                    com.sun.org.apache.xml.internal.security.transforms.Transforms dsTransforms =
+                        transforms.getDSTransforms();
+                    input = dsTransforms.performTransforms(input);
+                } catch (TransformationException ex) {
+                    throw new XMLEncryptionException("empty", ex);
+                }
+            }
 
-                        try {
-                                return input.getBytes();
-                        }
-                        catch (IOException ex) {
-                                throw new XMLEncryptionException("empty", ex);
-                        } catch (CanonicalizationException ex) {
-                                throw new XMLEncryptionException("empty", ex);
-                        }
+            try {
+                return input.getBytes();
+            } catch (IOException ex) {
+                throw new XMLEncryptionException("empty", ex);
+            } catch (CanonicalizationException ex) {
+                throw new XMLEncryptionException("empty", ex);
+            }
 
-            // retrieve the cipher text
+        // retrieve the cipher text
         } else if (_cipherData.getDataType() == CipherData.VALUE_TYPE) {
-            CipherValue cv = _cipherData.getCipherValue();
-            base64EncodedEncryptedOctets = new String(cv.getValue());
+            base64EncodedEncryptedOctets =
+                _cipherData.getCipherValue().getValue();
         } else {
-                        throw new XMLEncryptionException("CipherData.getDataType() returned unexpected value");
-                }
+            throw new XMLEncryptionException("CipherData.getDataType() returned unexpected value");
+        }
 
-        if (logger.isLoggable(java.util.logging.Level.FINE))                                     logger.log(java.util.logging.Level.FINE, "Encrypted octets:\n" + base64EncodedEncryptedOctets);
+        logger.log(java.util.logging.Level.FINE, "Encrypted octets:\n" + base64EncodedEncryptedOctets);
 
         byte[] encryptedBytes = null;
-
         try {
-                        encryptedBytes = Base64.decode(base64EncodedEncryptedOctets);
+            encryptedBytes = Base64.decode(base64EncodedEncryptedOctets);
         } catch (Base64DecodingException bde) {
             throw new XMLEncryptionException("empty", bde);
         }
 
-                return (encryptedBytes);
-
-        }
-
+        return (encryptedBytes);
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/ContentHandlerAlreadyRegisteredException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/ContentHandlerAlreadyRegisteredException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -28,7 +27,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class ContentHandlerAlreadyRegisteredException
         extends XMLSecurityException {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -25,6 +25,8 @@
 import java.security.PublicKey;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 
 import javax.crypto.SecretKey;
@@ -88,15 +90,22 @@
  * The <CODE>containsXXX()</CODE> methods return <I>whether</I> the KeyInfo
  * contains the corresponding type.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class KeyInfo extends SignatureElementProxy {
 
    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(KeyInfo.class.getName());
+    List x509Datas=null;
+    List encryptedKeys=null;
 
-
+    static final List nullList;
+    static {
+        List list = new ArrayList();
+        list.add(null);
+        nullList = Collections.unmodifiableList(list);
+    }
 
    /**
     * Constructor KeyInfo
@@ -108,7 +117,6 @@
 
       XMLUtils.addReturnToElement(this._constructionElement);
 
-
    }
 
    /**
@@ -119,8 +127,8 @@
     * @throws XMLSecurityException
     */
    public KeyInfo(Element element, String BaseURI) throws XMLSecurityException {
-
       super(element, BaseURI);
+     // _storageResolvers.add(null);
 
    }
 
@@ -131,7 +139,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ((Id != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -162,10 +170,8 @@
     */
    public void add(KeyName keyname) {
 
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(keyname.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -219,11 +225,8 @@
     * @param keyvalue
     */
    public void add(KeyValue keyvalue) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(keyvalue.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -241,11 +244,8 @@
     * @param mgmtdata
     */
    public void add(MgmtData mgmtdata) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(mgmtdata.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -254,11 +254,8 @@
     * @param pgpdata
     */
    public void add(PGPData pgpdata) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(pgpdata.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -279,11 +276,8 @@
     * @param retrievalmethod
     */
    public void add(RetrievalMethod retrievalmethod) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(retrievalmethod.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -292,11 +286,8 @@
     * @param spkidata
     */
    public void add(SPKIData spkidata) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(spkidata.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -305,11 +296,11 @@
     * @param x509data
     */
    public void add(X509Data x509data) {
-
-      if (this._state == MODE_SIGN) {
+          if (x509Datas==null)
+                  x509Datas=new ArrayList();
+          x509Datas.add(x509data);
          this._constructionElement.appendChild(x509data.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
         /**
@@ -321,12 +312,11 @@
 
         public void add(EncryptedKey encryptedKey)
                 throws XMLEncryptionException {
-
-                if (this._state == MODE_SIGN) {
+                        if (encryptedKeys==null)
+                                encryptedKeys=new ArrayList();
+                        encryptedKeys.add(encryptedKey);
                         XMLCipher cipher = XMLCipher.getInstance();
                         this._constructionElement.appendChild(cipher.martial(encryptedKey));
-                }
-
         }
 
    /**
@@ -335,11 +325,8 @@
     * @param element
     */
    public void addUnknownElement(Element element) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(element);
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -403,6 +390,9 @@
     *@return the number of the X509Data tags
     */
    public int lengthX509Data() {
+           if (x509Datas!=null) {
+                   return x509Datas.size();
+           }
       return this.length(Constants.SignatureSpecNS, Constants._TAG_X509DATA);
    }
 
@@ -550,7 +540,9 @@
     * @throws XMLSecurityException
     */
    public X509Data itemX509Data(int i) throws XMLSecurityException {
-
+           if (x509Datas!=null) {
+                   return (X509Data) x509Datas.get(i);
+           }
       Element e = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
                                                 Constants._TAG_X509DATA,i);
 
@@ -569,7 +561,9 @@
         */
 
         public EncryptedKey itemEncryptedKey(int i) throws XMLSecurityException {
-
+                if (encryptedKeys!=null) {
+                        return (EncryptedKey) encryptedKeys.get(i);
+                }
                 Element e =
                         XMLUtils.selectXencNode(this._constructionElement.getFirstChild(),
                                                                                   EncryptionConstants._TAG_ENCRYPTEDKEY,i);
@@ -707,20 +701,20 @@
       PublicKey pk = this.getPublicKeyFromInternalResolvers();
 
       if (pk != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I could find a key using the per-KeyInfo key resolvers");
+         log.log(java.util.logging.Level.FINE, "I could find a key using the per-KeyInfo key resolvers");
 
          return pk;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I couldn't find a key using the per-KeyInfo key resolvers");
+      log.log(java.util.logging.Level.FINE, "I couldn't find a key using the per-KeyInfo key resolvers");
 
       pk = this.getPublicKeyFromStaticResolvers();
 
       if (pk != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I could find a key using the system-wide key resolvers");
+         log.log(java.util.logging.Level.FINE, "I could find a key using the system-wide key resolvers");
 
          return pk;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I couldn't find a key using the system-wide key resolvers");
+      log.log(java.util.logging.Level.FINE, "I couldn't find a key using the system-wide key resolvers");
 
       return null;
    }
@@ -732,46 +726,29 @@
     * @throws KeyResolverException
     */
    PublicKey getPublicKeyFromStaticResolvers() throws KeyResolverException {
-
-      for (int i = 0; i < KeyResolver.length(); i++) {
-         KeyResolver keyResolver = KeyResolver.item(i);
+          int length=KeyResolver.length();
+          int storageLength=this._storageResolvers.size();
+          Iterator it= KeyResolver.iterator();
+      for (int i = 0; i < length; i++) {
+         KeyResolverSpi keyResolver = (KeyResolverSpi) it.next();
          Node currentChild=this._constructionElement.getFirstChild();
+         String uri= this.getBaseURI();
          while (currentChild!=null)      {
             if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
-
-                  if (keyResolver.canResolve((Element) currentChild,
-                                             this.getBaseURI(), storage)) {
-                     PublicKey pk =
-                        keyResolver.resolvePublicKey((Element) currentChild,
-                                                     this.getBaseURI(),
-                                                     storage);
-
-                     if (pk != null) {
-                        return pk;
-                     }
-                  }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
+                  for (int k = 0; k < storageLength; k++) {
                      StorageResolver storage =
                         (StorageResolver) this._storageResolvers.get(k);
 
-                     if (keyResolver.canResolve((Element) currentChild,
-                                                this.getBaseURI(), storage)) {
-                        PublicKey pk =
-                           keyResolver.resolvePublicKey((Element) currentChild,
-                                                        this.getBaseURI(),
+                     PublicKey pk =
+                           keyResolver.engineLookupAndResolvePublicKey((Element) currentChild,
+                                                       uri,
                                                         storage);
 
-                        if (pk != null) {
-                           return pk;
-                        }
+                     if (pk != null) {
+                         KeyResolver.hit(it);
+                         return pk;
                      }
                   }
-               }
             }
             currentChild=currentChild.getNextSibling();
          }
@@ -786,50 +763,27 @@
     * @throws KeyResolverException
     */
    PublicKey getPublicKeyFromInternalResolvers() throws KeyResolverException {
-
-      for (int i = 0; i < this.lengthInternalKeyResolver(); i++) {
+          int length=lengthInternalKeyResolver();
+          int storageLength=this._storageResolvers.size();
+      for (int i = 0; i < length; i++) {
          KeyResolverSpi keyResolver = this.itemInternalKeyResolver(i);
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
 
          Node currentChild=this._constructionElement.getFirstChild();
+         String uri=this.getBaseURI();
          while (currentChild!=null)      {
             if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
-
-                  if (keyResolver.engineCanResolve((Element) currentChild,
-                                                   this.getBaseURI(),
-                                                   storage)) {
-                     PublicKey pk =
-                        keyResolver
-                           .engineResolvePublicKey((Element) currentChild, this
-                              .getBaseURI(), storage);
+               for (int k = 0; k < storageLength; k++) {
+                   StorageResolver storage =
+                      (StorageResolver) this._storageResolvers.get(k);
+                   PublicKey pk = keyResolver
+                           .engineLookupAndResolvePublicKey((Element) currentChild, uri, storage);
 
                      if (pk != null) {
-                        return pk;
+                         return pk;
                      }
                   }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
-                     StorageResolver storage =
-                        (StorageResolver) this._storageResolvers.get(k);
-
-                     if (keyResolver.engineCanResolve((Element) currentChild,
-                                                      this.getBaseURI(),
-                                                      storage)) {
-                        PublicKey pk = keyResolver
-                           .engineResolvePublicKey((Element) currentChild, this
-                              .getBaseURI(), storage);
-
-                        if (pk != null) {
-                           return pk;
-                        }
-                     }
-                  }
-               }
             }
             currentChild=currentChild.getNextSibling();
          }
@@ -850,12 +804,12 @@
       X509Certificate cert = this.getX509CertificateFromInternalResolvers();
 
       if (cert != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+         log.log(java.util.logging.Level.FINE,
             "I could find a X509Certificate using the per-KeyInfo key resolvers");
 
          return cert;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+      log.log(java.util.logging.Level.FINE,
             "I couldn't find a X509Certificate using the per-KeyInfo key resolvers");
 
 
@@ -863,12 +817,12 @@
       cert = this.getX509CertificateFromStaticResolvers();
 
       if (cert != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+         log.log(java.util.logging.Level.FINE,
             "I could find a X509Certificate using the system-wide key resolvers");
 
          return cert;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+      log.log(java.util.logging.Level.FINE,
             "I couldn't find a X509Certificate using the system-wide key resolvers");
 
 
@@ -885,53 +839,44 @@
     */
    X509Certificate getX509CertificateFromStaticResolvers()
            throws KeyResolverException {
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Start getX509CertificateFromStaticResolvers() with "
+      if (log.isLoggable(java.util.logging.Level.FINE))
+        log.log(java.util.logging.Level.FINE, "Start getX509CertificateFromStaticResolvers() with "
                 + KeyResolver.length() + " resolvers");
-
-      for (int i = 0; i < KeyResolver.length(); i++) {
-         KeyResolver keyResolver = KeyResolver.item(i);
-         Node currentChild=this._constructionElement.getFirstChild();
-         while (currentChild!=null)      {
-            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
+      String uri=this.getBaseURI();
+      int length= KeyResolver.length();
+      int storageLength=this._storageResolvers.size();
+      Iterator it = KeyResolver.iterator();
+      for (int i = 0; i <length; i++) {
+         KeyResolverSpi keyResolver = (KeyResolverSpi) it.next();
+         X509Certificate cert= applyCurrentResolver(uri, storageLength, keyResolver);
+         if (cert!=null) {
+                 KeyResolver.hit(it);
+                 return cert;
+         }
+      }
+      return null;
+   }
 
-                  if (keyResolver.canResolve((Element) currentChild,
-                                             this.getBaseURI(), storage)) {
-                     X509Certificate cert =
-                        keyResolver
-                           .resolveX509Certificate((Element) currentChild, this
-                              .getBaseURI(), storage);
+   private X509Certificate applyCurrentResolver(String uri, int storageLength, KeyResolverSpi keyResolver) throws KeyResolverException {
+           Node currentChild=this._constructionElement.getFirstChild();
+           while (currentChild!=null)      {
+                   if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
+               for (int k = 0; k < storageLength; k++) {
+                   StorageResolver storage =
+                      (StorageResolver) this._storageResolvers.get(k);
 
-                     if (cert != null) {
-                        return cert;
-                     }
-                  }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
-                     StorageResolver storage =
-                        (StorageResolver) this._storageResolvers.get(k);
+                   X509Certificate cert = keyResolver
+                        .engineLookupResolveX509Certificate((Element) currentChild, uri,
+                                        storage);
 
-                     if (keyResolver.canResolve((Element) currentChild,
-                                                this.getBaseURI(), storage)) {
-                        X509Certificate cert = keyResolver
-                           .resolveX509Certificate((Element) currentChild, this
-                              .getBaseURI(), storage);
-
-                        if (cert != null) {
-                           return cert;
-                        }
-                     }
+                   if (cert != null) {
+                       return cert;
                   }
                }
             }
             currentChild=currentChild.getNextSibling();
          }
-      }
-      return null;
+         return null;
    }
 
    /**
@@ -942,55 +887,18 @@
     */
    X509Certificate getX509CertificateFromInternalResolvers()
            throws KeyResolverException {
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Start getX509CertificateFromInternalResolvers() with "
+      if (log.isLoggable(java.util.logging.Level.FINE))
+        log.log(java.util.logging.Level.FINE, "Start getX509CertificateFromInternalResolvers() with "
                 + this.lengthInternalKeyResolver() + " resolvers");
-
+      String uri=this.getBaseURI();
+      int storageLength=this._storageResolvers.size();
       for (int i = 0; i < this.lengthInternalKeyResolver(); i++) {
          KeyResolverSpi keyResolver = this.itemInternalKeyResolver(i);
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
-
-         Node currentChild=this._constructionElement.getFirstChild();
-         while (currentChild!=null)      {
-            if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
-
-                  if (keyResolver.engineCanResolve((Element) currentChild,
-                                                   this.getBaseURI(),
-                                                   storage)) {
-                     X509Certificate cert =
-                        keyResolver.engineResolveX509Certificate(
-                           (Element) currentChild, this.getBaseURI(), storage);
-
-                     if (cert != null) {
-                        return cert;
-                     }
-                  }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
-                     StorageResolver storage =
-                        (StorageResolver) this._storageResolvers.get(k);
-
-                     if (keyResolver.engineCanResolve((Element) currentChild,
-                                                      this.getBaseURI(),
-                                                      storage)) {
-                        X509Certificate cert =
-                           keyResolver.engineResolveX509Certificate(
-                              (Element) currentChild, this.getBaseURI(),
-                              storage);
-
-                        if (cert != null) {
-                           return cert;
-                        }
-                     }
-                  }
-               }
-            }
-            currentChild=currentChild.getNextSibling();
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
+         X509Certificate cert= applyCurrentResolver(uri, storageLength, keyResolver);
+         if (cert!=null) {
+                 return cert;
          }
       }
 
@@ -1006,21 +914,21 @@
       SecretKey sk = this.getSecretKeyFromInternalResolvers();
 
       if (sk != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I could find a secret key using the per-KeyInfo key resolvers");
+         log.log(java.util.logging.Level.FINE, "I could find a secret key using the per-KeyInfo key resolvers");
 
          return sk;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I couldn't find a secret key using the per-KeyInfo key resolvers");
+      log.log(java.util.logging.Level.FINE, "I couldn't find a secret key using the per-KeyInfo key resolvers");
 
 
       sk = this.getSecretKeyFromStaticResolvers();
 
       if (sk != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I could find a secret key using the system-wide key resolvers");
+         log.log(java.util.logging.Level.FINE, "I could find a secret key using the system-wide key resolvers");
 
          return sk;
       }
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I couldn't find a secret key using the system-wide key resolvers");
+      log.log(java.util.logging.Level.FINE, "I couldn't find a secret key using the system-wide key resolvers");
 
 
       return null;
@@ -1034,47 +942,29 @@
     */
 
    SecretKey getSecretKeyFromStaticResolvers() throws KeyResolverException {
-
-      for (int i = 0; i < KeyResolver.length(); i++) {
-         KeyResolver keyResolver = KeyResolver.item(i);
+          final int length=KeyResolver.length();
+          int storageLength=this._storageResolvers.size();
+          Iterator it = KeyResolver.iterator();
+      for (int i = 0; i < length; i++) {
+         KeyResolverSpi keyResolver = (KeyResolverSpi) it.next();
 
          Node currentChild=this._constructionElement.getFirstChild();
+         String uri=this.getBaseURI();
          while (currentChild!=null)      {
             if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
+                  for (int k = 0; k < storageLength; k++) {
+                     StorageResolver storage =
+                        (StorageResolver) this._storageResolvers.get(k);
 
-                  if (keyResolver.canResolve((Element) currentChild,
-                                             this.getBaseURI(), storage)) {
-                     SecretKey sk  =
-                        keyResolver.resolveSecretKey((Element) currentChild,
-                                                     this.getBaseURI(),
-                                                     storage);
+                     SecretKey sk =
+                           keyResolver.engineLookupAndResolveSecretKey((Element) currentChild,
+                                                        uri,
+                                                        storage);
 
                      if (sk != null) {
                         return sk;
                      }
                   }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
-                     StorageResolver storage =
-                        (StorageResolver) this._storageResolvers.get(k);
-
-                     if (keyResolver.canResolve((Element) currentChild,
-                                                this.getBaseURI(), storage)) {
-                        SecretKey sk =
-                           keyResolver.resolveSecretKey((Element) currentChild,
-                                                        this.getBaseURI(),
-                                                        storage);
-
-                        if (sk != null) {
-                           return sk;
-                        }
-                     }
-                  }
-               }
             }
             currentChild=currentChild.getNextSibling();
          }
@@ -1090,51 +980,28 @@
     */
 
    SecretKey getSecretKeyFromInternalResolvers() throws KeyResolverException {
-
+           int storageLength=this._storageResolvers.size();
       for (int i = 0; i < this.lengthInternalKeyResolver(); i++) {
          KeyResolverSpi keyResolver = this.itemInternalKeyResolver(i);
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Try " + keyResolver.getClass().getName());
 
          Node currentChild=this._constructionElement.getFirstChild();
+         String uri=this.getBaseURI();
          while (currentChild!=null)      {
             if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
-               if (this._storageResolvers.size() == 0) {
-
-                  // if we do not have storage resolvers, we verify with null
-                  StorageResolver storage = null;
+               for (int k = 0; k < storageLength; k++) {
+                     StorageResolver storage =
+                        (StorageResolver) this._storageResolvers.get(k);
 
-                  if (keyResolver.engineCanResolve((Element) currentChild,
-                                                   this.getBaseURI(),
-                                                   storage)) {
-                     SecretKey sk =
-                        keyResolver
-                           .engineResolveSecretKey((Element) currentChild, this
-                              .getBaseURI(), storage);
+                     SecretKey sk = keyResolver
+                           .engineLookupAndResolveSecretKey((Element) currentChild, uri, storage);
 
                      if (sk != null) {
                         return sk;
                      }
-                  }
-               } else {
-                  for (int k = 0; k < this._storageResolvers.size(); k++) {
-                     StorageResolver storage =
-                        (StorageResolver) this._storageResolvers.get(k);
-
-                     if (keyResolver.engineCanResolve((Element) currentChild,
-                                                      this.getBaseURI(),
-                                                      storage)) {
-                        SecretKey sk = keyResolver
-                           .engineResolveSecretKey((Element) currentChild, this
-                              .getBaseURI(), storage);
-
-                        if (sk != null) {
-                           return sk;
-                        }
-                     }
-                  }
-               }
-            }
+                }
+             }
             currentChild=currentChild.getNextSibling();
          }
       }
@@ -1145,7 +1012,7 @@
    /**
     * Stores the individual (per-KeyInfo) {@link KeyResolver}s
     */
-   List _internalKeyResolvers = new ArrayList();
+   List _internalKeyResolvers = null;
 
    /**
     * This method is used to add a custom {@link KeyResolverSpi} to a KeyInfo
@@ -1154,6 +1021,9 @@
     * @param realKeyResolver
     */
    public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver) {
+           if (_internalKeyResolvers==null) {
+                   _internalKeyResolvers=new ArrayList();
+           }
       this._internalKeyResolvers.add(realKeyResolver);
    }
 
@@ -1162,6 +1032,8 @@
     * @return the length of the key
     */
    int lengthInternalKeyResolver() {
+           if (_internalKeyResolvers==null)
+                   return 0;
       return this._internalKeyResolvers.size();
    }
 
@@ -1176,7 +1048,7 @@
    }
 
    /** Field _storageResolvers */
-   List _storageResolvers = new ArrayList();
+   List _storageResolvers = nullList;
 
    /**
     * Method addStorageResolver
@@ -1184,19 +1056,11 @@
     * @param storageResolver
     */
    public void addStorageResolver(StorageResolver storageResolver) {
-
-      if (storageResolver != null) {
+           if  (_storageResolvers == nullList  ){
+                   _storageResolvers=new ArrayList();
+           }
          this._storageResolvers.add(storageResolver);
-      }
-   }
 
-   /**
-    * Method getStorageResolvers
-    *
-    * @return the internalStorages
-    */
-   List getStorageResolvers() {
-      return this._storageResolvers;
    }
 
    //J-
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -36,7 +35,7 @@
 /**
  * Utility class for for <CODE>com.sun.org.apache.xml.internal.security.keys</CODE> package.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class KeyUtils {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoContent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoContent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -28,7 +27,7 @@
 /**
  * Empty interface just to identify Elements that can be cildren of ds:KeyInfo.
  *
- * @author $Author: blautenb $
+ * @author $Author: mullan $
  */
 public interface KeyInfoContent {
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,25 +20,18 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class KeyName extends SignatureElementProxy implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(KeyName.class.getName());
-
    /**
     * Constructor KeyName
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,11 +20,8 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
 import java.security.PublicKey;
 
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue;
 import com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue;
@@ -34,140 +31,131 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  * The KeyValue element contains a single public key that may be useful in
  * validating the signature. Structured formats for defining DSA (REQUIRED)
  * and RSA (RECOMMENDED) public keys are defined in Signature Algorithms
  * (section 6.4). The KeyValue element may include externally defined public
- * keys values represented as PCDATA or element types from an external namespace.
+ * keys values represented as PCDATA or element types from an external
+ * namespace.
  *
- * @author $Author: vishal $
+ * @author $Author: mullan $
  */
 public class KeyValue extends SignatureElementProxy implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(KeyValue.class.getName());
+    /**
+     * Constructor KeyValue
+     *
+     * @param doc
+     * @param dsaKeyValue
+     */
+    public KeyValue(Document doc, DSAKeyValue dsaKeyValue) {
 
-   /**
-    * Constructor KeyValue
-    *
-    * @param doc
-    * @param dsaKeyValue
-    */
-   public KeyValue(Document doc, DSAKeyValue dsaKeyValue) {
-
-      super(doc);
+        super(doc);
 
-      XMLUtils.addReturnToElement(this._constructionElement);
-      this._constructionElement.appendChild(dsaKeyValue.getElement());
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+        XMLUtils.addReturnToElement(this._constructionElement);
+        this._constructionElement.appendChild(dsaKeyValue.getElement());
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * Constructor KeyValue
-    *
-    * @param doc
-    * @param rsaKeyValue
-    */
-   public KeyValue(Document doc, RSAKeyValue rsaKeyValue) {
+    /**
+     * Constructor KeyValue
+     *
+     * @param doc
+     * @param rsaKeyValue
+     */
+    public KeyValue(Document doc, RSAKeyValue rsaKeyValue) {
 
-      super(doc);
+        super(doc);
 
-      XMLUtils.addReturnToElement(this._constructionElement);
-      this._constructionElement.appendChild(rsaKeyValue.getElement());
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+        XMLUtils.addReturnToElement(this._constructionElement);
+        this._constructionElement.appendChild(rsaKeyValue.getElement());
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * Constructor KeyValue
-    *
-    * @param doc
-    * @param unknownKeyValue
-    */
-   public KeyValue(Document doc, Element unknownKeyValue) {
+    /**
+     * Constructor KeyValue
+     *
+     * @param doc
+     * @param unknownKeyValue
+     */
+    public KeyValue(Document doc, Element unknownKeyValue) {
 
-      super(doc);
+        super(doc);
 
-      XMLUtils.addReturnToElement(this._constructionElement);
-      this._constructionElement.appendChild(unknownKeyValue);
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+        XMLUtils.addReturnToElement(this._constructionElement);
+        this._constructionElement.appendChild(unknownKeyValue);
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * Constructor KeyValue
-    *
-    * @param doc
-    * @param pk
-    */
-   public KeyValue(Document doc, PublicKey pk) {
+    /**
+     * Constructor KeyValue
+     *
+     * @param doc
+     * @param pk
+     */
+    public KeyValue(Document doc, PublicKey pk) {
 
-      super(doc);
+        super(doc);
 
-      XMLUtils.addReturnToElement(this._constructionElement);
+        XMLUtils.addReturnToElement(this._constructionElement);
 
-      if (pk instanceof java.security.interfaces.DSAPublicKey) {
-         DSAKeyValue dsa = new DSAKeyValue(this._doc, pk);
+        if (pk instanceof java.security.interfaces.DSAPublicKey) {
+            DSAKeyValue dsa = new DSAKeyValue(this._doc, pk);
 
-         this._constructionElement.appendChild(dsa.getElement());
-         XMLUtils.addReturnToElement(this._constructionElement);
-      } else if (pk instanceof java.security.interfaces.RSAPublicKey) {
-         RSAKeyValue rsa = new RSAKeyValue(this._doc, pk);
+            this._constructionElement.appendChild(dsa.getElement());
+            XMLUtils.addReturnToElement(this._constructionElement);
+        } else if (pk instanceof java.security.interfaces.RSAPublicKey) {
+            RSAKeyValue rsa = new RSAKeyValue(this._doc, pk);
 
-         this._constructionElement.appendChild(rsa.getElement());
-         XMLUtils.addReturnToElement(this._constructionElement);
-      }
-   }
+            this._constructionElement.appendChild(rsa.getElement());
+            XMLUtils.addReturnToElement(this._constructionElement);
+        }
+    }
 
-   /**
-    * Constructor KeyValue
-    *
-    * @param element
-    * @param BaseURI
-    * @throws XMLSecurityException
-    */
-   public KeyValue(Element element, String BaseURI)
+    /**
+     * Constructor KeyValue
+     *
+     * @param element
+     * @param BaseURI
+     * @throws XMLSecurityException
+     */
+    public KeyValue(Element element, String BaseURI)
            throws XMLSecurityException {
-      super(element, BaseURI);
-   }
+        super(element, BaseURI);
+    }
 
-   /**
-    * Method getPublicKey
-    *
-    * @return the public key
-    * @throws XMLSecurityException
-    */
-   public PublicKey getPublicKey() throws XMLSecurityException {
-
+    /**
+     * Method getPublicKey
+     *
+     * @return the public key
+     * @throws XMLSecurityException
+     */
+    public PublicKey getPublicKey() throws XMLSecurityException {
 
-         Element rsa = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                                        Constants._TAG_RSAKEYVALUE,0);
+        Element rsa = XMLUtils.selectDsNode
+            (this._constructionElement.getFirstChild(),
+             Constants._TAG_RSAKEYVALUE,0);
 
-         if (rsa != null) {
-            RSAKeyValue kv = new RSAKeyValue(rsa,
-                                             this._baseURI);
-
+        if (rsa != null) {
+            RSAKeyValue kv = new RSAKeyValue(rsa, this._baseURI);
             return kv.getPublicKey();
-         }
+        }
 
-         Element dsa = XMLUtils.selectDsNode(this._constructionElement,
-                         Constants._TAG_DSAKEYVALUE,0);
-
+        Element dsa = XMLUtils.selectDsNode
+            (this._constructionElement.getFirstChild(),
+             Constants._TAG_DSAKEYVALUE,0);
 
-         if (dsa != null) {
-            DSAKeyValue kv = new DSAKeyValue(dsa,
-                                             this._baseURI);
-
+        if (dsa != null) {
+            DSAKeyValue kv = new DSAKeyValue(dsa, this._baseURI);
             return kv.getPublicKey();
-         }
-
+        }
 
-      return null;
-   }
+        return null;
+    }
 
-   /** @inheritDoc */
-   public String getBaseLocalName() {
-      return Constants._TAG_KEYVALUE;
-   }
+    /** @inheritDoc */
+    public String getBaseLocalName() {
+        return Constants._TAG_KEYVALUE;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,25 +20,18 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class MgmtData extends SignatureElementProxy implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(MgmtData.class.getName());
-
    /**
     * Constructor MgmtData
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,25 +20,18 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * $todo$ Implement
  */
 public class PGPData extends SignatureElementProxy implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(PGPData.class.getName());
-
    /**
     * Constructor PGPData
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,9 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -33,17 +30,13 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class RetrievalMethod extends SignatureElementProxy
         implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(RetrievalMethod.class.getName());
    //J-
     /** DSA retrieval */
    public static final String TYPE_DSA     = Constants.SignatureSpecNS + "DSAKeyValue";
@@ -133,7 +126,7 @@
 
       try {
        Element transformsElem =
-             XMLUtils.selectDsNode(this._constructionElement,
+             XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
                                                 Constants
                                                    ._TAG_TRANSFORMS, 0);
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,25 +20,18 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * $todo$ implement
  */
 public class SPKIData extends SignatureElementProxy implements KeyInfoContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(SPKIData.class.getName());
-
    /**
     * Constructor SPKIData
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java	Wed Jul 05 16:42:37 2017 +0200
@@ -41,7 +41,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class X509Data extends SignatureElementProxy implements KeyInfoContent {
 
@@ -72,60 +72,17 @@
            throws XMLSecurityException {
 
       super(element, BaseURI);
-
-      boolean noElements=true;
       Node sibling=this._constructionElement.getFirstChild();
       while (sibling!=null) {
          if (sibling.getNodeType()!=Node.ELEMENT_NODE) {
                 sibling=sibling.getNextSibling();
             continue;
          }
-        noElements=false;
-         Element currentElem = (Element) sibling;
-         sibling=sibling.getNextSibling();
-         String localname = currentElem.getLocalName();
-
-         if (currentElem.getNamespaceURI().equals(Constants.SignatureSpecNS)) {
-            if (localname.equals(Constants._TAG_X509ISSUERSERIAL)) {
-               XMLX509IssuerSerial is = new XMLX509IssuerSerial(currentElem,
-                                           BaseURI);
-
-               this.add(is);
-            } else if (localname.equals(Constants._TAG_X509SKI)) {
-               XMLX509SKI ski = new XMLX509SKI(currentElem, BaseURI);
-
-               this.add(ski);
-            } else if (localname.equals(Constants._TAG_X509SUBJECTNAME)) {
-               XMLX509SubjectName sn = new XMLX509SubjectName(currentElem,
-                                          BaseURI);
-
-               this.add(sn);
-            } else if (localname.equals(Constants._TAG_X509CERTIFICATE)) {
-               XMLX509Certificate cert = new XMLX509Certificate(currentElem,
-                                            BaseURI);
-
-               this.add(cert);
-            } else if (localname.equals(Constants._TAG_X509CRL)) {
-               XMLX509CRL crl = new XMLX509CRL(currentElem, BaseURI);
-
-               this.add(crl);
-            } else {
-               log.log(java.util.logging.Level.WARNING, "Found a " + currentElem.getTagName() + " element in "
-                        + Constants._TAG_X509DATA);
-               this.addUnknownElement(currentElem);
-            }
-         } else {
-            log.log(java.util.logging.Level.WARNING, "Found a " + currentElem.getTagName() + " element in "
-                     + Constants._TAG_X509DATA);
-            this.addUnknownElement(currentElem);
-         }
+         return;
       }
-      if (noElements) {
-        Object exArgs[] = { "Elements", Constants._TAG_X509DATA };
-
-        throw new XMLSecurityException("xml.WrongContent", exArgs);
-     }
-
+      /* No Elements found */
+      Object exArgs[] = { "Elements", Constants._TAG_X509DATA };
+      throw new XMLSecurityException("xml.WrongContent", exArgs);
    }
 
    /**
@@ -169,11 +126,9 @@
     */
    public void add(XMLX509IssuerSerial xmlX509IssuerSerial) {
 
-      if (this._state == MODE_SIGN) {
          this._constructionElement
             .appendChild(xmlX509IssuerSerial.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -202,11 +157,8 @@
     * @param xmlX509SKI
     */
    public void add(XMLX509SKI xmlX509SKI) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(xmlX509SKI.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -233,11 +185,8 @@
     * @param xmlX509SubjectName
     */
    public void add(XMLX509SubjectName xmlX509SubjectName) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(xmlX509SubjectName.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -266,11 +215,8 @@
     * @param xmlX509Certificate
     */
    public void add(XMLX509Certificate xmlX509Certificate) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(xmlX509Certificate.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -288,11 +234,8 @@
     * @param xmlX509CRL
     */
    public void add(XMLX509CRL xmlX509CRL) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(xmlX509CRL.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -301,11 +244,8 @@
     * @param element
     */
    public void addUnknownElement(Element element) {
-
-      if (this._state == MODE_SIGN) {
          this._constructionElement.appendChild(element);
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -479,7 +419,7 @@
     * TODO implement
     **/
    public Element itemUnknownElement(int i) {
-          if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "itemUnknownElement not implemented:"+i);
+          log.log(java.util.logging.Level.FINE, "itemUnknownElement not implemented:"+i);
       return null;
    }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.keyvalues;
 
-
-
 import java.math.BigInteger;
 import java.security.Key;
 import java.security.KeyFactory;
@@ -39,18 +37,13 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class DSAKeyValue extends SignatureElementProxy
         implements KeyValueContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(DSAKeyValue.class.getName());
-
    /**
     * Constructor DSAKeyValue
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/KeyValueContent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/KeyValueContent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -32,7 +31,7 @@
  *
  *
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  *
  */
 public interface KeyValueContent {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.keyvalues;
 
-
-
 import java.math.BigInteger;
 import java.security.Key;
 import java.security.KeyFactory;
@@ -39,19 +37,13 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class RSAKeyValue extends SignatureElementProxy
         implements KeyValueContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(
-                        RSAKeyValue.class.getName());
-
    /**
     * Constructor RSAKeyValue
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,30 +20,20 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.x509;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- *
- *
- *
- * @author $Author: raul $
+ * @author $Author: mullan $
  *
  */
 public class XMLX509CRL extends SignatureElementProxy
         implements XMLX509DataContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(XMLX509CRL.class.getName());
-
    /**
     * Constructor XMLX509CRL
     *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.x509;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.security.PublicKey;
 import java.security.cert.CertificateException;
@@ -34,18 +32,13 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class XMLX509Certificate extends SignatureElementProxy
         implements XMLX509DataContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(XMLX509Certificate.class.getName());
-
    /** Field JCA_CERT_ID */
    public static final String JCA_CERT_ID = "X.509";
 
@@ -146,23 +139,25 @@
       return null;
    }
 
-   /** @inheritDoc */
-   public boolean equals(Object obj) {
-
-      try {
-         if (!obj.getClass().getName().equals(this.getClass().getName())) {
-            return false;
-         }
+    /** @inheritDoc */
+    public boolean equals(Object obj) {
 
-         XMLX509Certificate other = (XMLX509Certificate) obj;
+        if (obj == null) {
+            return false;
+        }
+        if (!this.getClass().getName().equals(obj.getClass().getName())) {
+            return false;
+        }
+        XMLX509Certificate other = (XMLX509Certificate) obj;
+        try {
 
-         /** $todo$ or should be create X509Certificates and use the equals() from the Certs */
-         return java.security.MessageDigest.isEqual(other.getCertificateBytes(),
-                                        this.getCertificateBytes());
-      } catch (XMLSecurityException ex) {
-         return false;
-      }
-   }
+            /** $todo$ or should be create X509Certificates and use the equals() from the Certs */
+            return java.security.MessageDigest.isEqual
+                (other.getCertificateBytes(), this.getCertificateBytes());
+        } catch (XMLSecurityException ex) {
+            return false;
+        }
+    }
 
    /** @inheritDoc */
    public String getBaseLocalName() {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -28,7 +27,7 @@
 /**
  * Just used for tagging contents that are allowed inside a ds:X509Data Element.
  *
- * @author $Author: blautenb $
+ * @author $Author: mullan $
  */
 public interface XMLX509DataContent {
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.x509;
 
-
-
 import java.math.BigInteger;
 import java.security.cert.X509Certificate;
 
@@ -33,148 +31,139 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class XMLX509IssuerSerial extends SignatureElementProxy
         implements XMLX509DataContent {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(
                     XMLX509IssuerSerial.class.getName());
 
-   /**
-    * Constructor XMLX509IssuerSerial
-    *
-    * @param element
-    * @param BaseURI
-    * @throws XMLSecurityException
-    */
-   public XMLX509IssuerSerial(Element element, String BaseURI)
+    /**
+     * Constructor XMLX509IssuerSerial
+     *
+     * @param element
+     * @param baseURI
+     * @throws XMLSecurityException
+     */
+    public XMLX509IssuerSerial(Element element, String baseURI)
            throws XMLSecurityException {
-      super(element, BaseURI);
-   }
+        super(element, baseURI);
+    }
 
-   /**
-    * Constructor XMLX509IssuerSerial
-    *
-    * @param doc
-    * @param X509IssuerName
-    * @param X509SerialNumber
-    */
-   public XMLX509IssuerSerial(Document doc, String X509IssuerName,
-                              BigInteger X509SerialNumber) {
+    /**
+     * Constructor XMLX509IssuerSerial
+     *
+     * @param doc
+     * @param x509IssuerName
+     * @param x509SerialNumber
+     */
+    public XMLX509IssuerSerial(Document doc, String x509IssuerName,
+                               BigInteger x509SerialNumber) {
 
-      super(doc);
-
-      XMLUtils.addReturnToElement(this._constructionElement);
-      this.addTextElement(X509IssuerName, Constants._TAG_X509ISSUERNAME);
-      XMLUtils.addReturnToElement(this._constructionElement);
-      this.addTextElement(X509SerialNumber.toString(), Constants._TAG_X509SERIALNUMBER);
-   }
+        super(doc);
+        XMLUtils.addReturnToElement(this._constructionElement);
+        addTextElement(x509IssuerName, Constants._TAG_X509ISSUERNAME);
+        addTextElement(x509SerialNumber.toString(), Constants._TAG_X509SERIALNUMBER);
+    }
 
-   /**
-    * Constructor XMLX509IssuerSerial
-    *
-    * @param doc
-    * @param X509IssuerName
-    * @param X509SerialNumber
-    */
-   public XMLX509IssuerSerial(Document doc, String X509IssuerName,
-                              String X509SerialNumber) {
-      this(doc, X509IssuerName, new BigInteger(X509SerialNumber));
-   }
+    /**
+     * Constructor XMLX509IssuerSerial
+     *
+     * @param doc
+     * @param x509IssuerName
+     * @param x509SerialNumber
+     */
+    public XMLX509IssuerSerial(Document doc, String x509IssuerName,
+                               String x509SerialNumber) {
+        this(doc, x509IssuerName, new BigInteger(x509SerialNumber));
+    }
 
-   /**
-    * Constructor XMLX509IssuerSerial
-    *
-    * @param doc
-    * @param X509IssuerName
-    * @param X509SerialNumber
-    */
-   public XMLX509IssuerSerial(Document doc, String X509IssuerName,
-                              int X509SerialNumber) {
-      this(doc, X509IssuerName,
-           new BigInteger(Integer.toString(X509SerialNumber)));
-   }
+    /**
+     * Constructor XMLX509IssuerSerial
+     *
+     * @param doc
+     * @param x509IssuerName
+     * @param x509SerialNumber
+     */
+    public XMLX509IssuerSerial(Document doc, String x509IssuerName,
+                               int x509SerialNumber) {
+        this(doc, x509IssuerName,
+             new BigInteger(Integer.toString(x509SerialNumber)));
+    }
 
-   /**
-    * Constructor XMLX509IssuerSerial
-    *
-    * @param doc
-    * @param x509certificate
-    */
-   public XMLX509IssuerSerial(Document doc, X509Certificate x509certificate) {
+    /**
+     * Constructor XMLX509IssuerSerial
+     *
+     * @param doc
+     * @param x509certificate
+     */
+    public XMLX509IssuerSerial(Document doc, X509Certificate x509certificate) {
 
-      this(doc,
-           RFC2253Parser.normalize(x509certificate.getIssuerDN().getName()),
-           x509certificate.getSerialNumber());
-   }
+        this(doc,
+             RFC2253Parser.normalize(x509certificate.getIssuerDN().getName()),
+             x509certificate.getSerialNumber());
+    }
 
-   /**
-    * Method getSerialNumber
-    *
-    *
-    * @return the serial number
-    */
-   public BigInteger getSerialNumber() {
+    /**
+     * Method getSerialNumber
+     *
+     * @return the serial number
+     */
+    public BigInteger getSerialNumber() {
 
-      String text =
-         this.getTextFromChildElement(Constants._TAG_X509SERIALNUMBER,
-                                      Constants.SignatureSpecNS);
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "In dem X509SerialNumber wurde gefunden: " + text);
+        String text = this.getTextFromChildElement
+            (Constants._TAG_X509SERIALNUMBER, Constants.SignatureSpecNS);
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "X509SerialNumber text: " + text);
 
-      return new BigInteger(text);
-   }
+        return new BigInteger(text);
+    }
 
-   /**
-    * Method getSerialNumberInteger
-    *
-    *
-    * @return the serial number as plain int
-    */
-   public int getSerialNumberInteger() {
-      return this.getSerialNumber().intValue();
-   }
+    /**
+     * Method getSerialNumberInteger
+     *
+     * @return the serial number as plain int
+     */
+    public int getSerialNumberInteger() {
+        return this.getSerialNumber().intValue();
+    }
 
-   /**
-    * Method getIssuerName
-    *
-    *
-    * @return the issuer name
-    */
-   public String getIssuerName()  {
+    /**
+     * Method getIssuerName
+     *
+     * @return the issuer name
+     */
+    public String getIssuerName()  {
 
-      return RFC2253Parser
-         .normalize(this
-            .getTextFromChildElement(Constants._TAG_X509ISSUERNAME,
-                                     Constants.SignatureSpecNS));
-   }
+        return RFC2253Parser
+           .normalize(this
+              .getTextFromChildElement(Constants._TAG_X509ISSUERNAME,
+                                       Constants.SignatureSpecNS));
+    }
 
-   /** @inheritDoc */
-   public boolean equals(Object obj) {
+    /** @inheritDoc */
+    public boolean equals(Object obj) {
 
-      if (!obj.getClass().getName().equals(this.getClass().getName())) {
-         return false;
-      }
+        if (obj == null) {
+            return false;
+        }
+        if (!this.getClass().getName().equals(obj.getClass().getName())) {
+            return false;
+        }
 
-      XMLX509IssuerSerial other = (XMLX509IssuerSerial) obj;
-
+        XMLX509IssuerSerial other = (XMLX509IssuerSerial) obj;
 
-      if (other.getSerialNumber().equals(this.getSerialNumber())
-                 && other.getIssuerName().equals(this.getIssuerName())) {
-           return true;
-      }
+        return this.getSerialNumber().equals(other.getSerialNumber())
+               && this.getIssuerName().equals(other.getIssuerName());
+    }
 
-       return false;
-   }
-
-   /** @inheritDoc */
-   public String getBaseLocalName() {
-      return Constants._TAG_X509ISSUERSERIAL;
-   }
+    /** @inheritDoc */
+    public String getBaseLocalName() {
+        return Constants._TAG_X509ISSUERSERIAL;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.x509;
 
-
-
 import java.io.IOException;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -36,192 +34,143 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import sun.security.util.DerValue;
-
-
 /**
  * Handles SubjectKeyIdentifier (SKI) for X.509v3.
  *
- * @author $Author: raul $
- * @see <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/security/cert/X509Extension.html">Interface X509Extension</A>
+ * @author $Author: mullan $
+ * @see <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Extension.html">Interface X509Extension</A>
  */
 public class XMLX509SKI extends SignatureElementProxy
         implements XMLX509DataContent {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(XMLX509SKI.class.getName());
 
-   /**
-    * <CODE>SubjectKeyIdentifier (id-ce-subjectKeyIdentifier) (2.5.29.14)</CODE>:
-    * This extension identifies the public key being certified. It enables
-    * distinct keys used by the same subject to be differentiated
-    * (e.g., as key updating occurs).
-    * <BR />
-    * A key identifer shall be unique with respect to all key identifiers
-    * for the subject with which it is used. This extension is always non-critical.
-    */
-   public static final String SKI_OID = "2.5.29.14";
-
-   /**
-    * Constructor X509SKI
-    *
-    * @param doc
-    * @param skiBytes
-    */
-   public XMLX509SKI(Document doc, byte[] skiBytes) {
+    /**
+     * <CODE>SubjectKeyIdentifier (id-ce-subjectKeyIdentifier) (2.5.29.14)</CODE>:
+     * This extension identifies the public key being certified. It enables
+     * distinct keys used by the same subject to be differentiated
+     * (e.g., as key updating occurs).
+     * <BR />
+     * A key identifer shall be unique with respect to all key identifiers
+     * for the subject with which it is used. This extension is always non-critical.
+     */
+    public static final String SKI_OID = "2.5.29.14";
 
-      super(doc);
-
-      this.addBase64Text(skiBytes);
-   }
+    /**
+     * Constructor X509SKI
+     *
+     * @param doc
+     * @param skiBytes
+     */
+    public XMLX509SKI(Document doc, byte[] skiBytes) {
+        super(doc);
+        this.addBase64Text(skiBytes);
+    }
 
-   /**
-    * Constructor XMLX509SKI
-    *
-    * @param doc
-    * @param x509certificate
-    * @throws XMLSecurityException
-    */
-   public XMLX509SKI(Document doc, X509Certificate x509certificate)
+    /**
+     * Constructor XMLX509SKI
+     *
+     * @param doc
+     * @param x509certificate
+     * @throws XMLSecurityException
+     */
+    public XMLX509SKI(Document doc, X509Certificate x509certificate)
            throws XMLSecurityException {
-
-      super(doc);
-
-      this.addBase64Text(XMLX509SKI.getSKIBytesFromCert(x509certificate));
-   }
+        super(doc);
+        this.addBase64Text(XMLX509SKI.getSKIBytesFromCert(x509certificate));
+    }
 
-   /**
-    * Constructor XMLX509SKI
-    *
-    * @param element
-    * @param BaseURI
-    * @throws XMLSecurityException
-    */
-   public XMLX509SKI(Element element, String BaseURI)
+    /**
+     * Constructor XMLX509SKI
+     *
+     * @param element
+     * @param BaseURI
+     * @throws XMLSecurityException
+     */
+    public XMLX509SKI(Element element, String BaseURI)
            throws XMLSecurityException {
-      super(element, BaseURI);
-   }
-
-   /**
-    * Method getSKIBytes
-    *
-    * @return the skibytes
-    * @throws XMLSecurityException
-    */
-   public byte[] getSKIBytes() throws XMLSecurityException {
-      return this.getBytesFromTextChild();
-   }
+        super(element, BaseURI);
+    }
 
-   /**
-    * Method getSKIBytesFromCert
-    *
-    * @param cert
-    * @return sky bytes from the given certificate
-    *
-    * @throws XMLSecurityException
-    * @see java.security.cert.X509Extension#getExtensionValue(java.lang.String)
-    */
-   public static byte[] getSKIBytesFromCert(X509Certificate cert)
-           throws XMLSecurityException {
+    /**
+     * Method getSKIBytes
+     *
+     * @return the skibytes
+     * @throws XMLSecurityException
+     */
+    public byte[] getSKIBytes() throws XMLSecurityException {
+        return this.getBytesFromTextChild();
+    }
 
-      try {
+    /**
+     * Method getSKIBytesFromCert
+     *
+     * @param cert
+     * @return ski bytes from the given certificate
+     *
+     * @throws XMLSecurityException
+     * @see java.security.cert.X509Extension#getExtensionValue(java.lang.String)
+     */
+    public static byte[] getSKIBytesFromCert(X509Certificate cert)
+        throws XMLSecurityException {
 
-         /*
-          * Gets the DER-encoded OCTET string for the extension value (extnValue)
-          * identified by the passed-in oid String. The oid string is
-          * represented by a set of positive whole numbers separated by periods.
-          */
-         byte[] derEncodedValue = cert.getExtensionValue(XMLX509SKI.SKI_OID);
-
-         if (cert.getVersion() < 3) {
+        if (cert.getVersion() < 3) {
             Object exArgs[] = { new Integer(cert.getVersion()) };
-
             throw new XMLSecurityException("certificate.noSki.lowVersion",
                                            exArgs);
-         }
+        }
 
-          byte[] extensionValue = null;
+        /*
+         * Gets the DER-encoded OCTET string for the extension value
+         * (extnValue) identified by the passed-in oid String. The oid
+         * string is represented by a set of positive whole numbers
+         * separated by periods.
+         */
+        byte[] extensionValue = cert.getExtensionValue(XMLX509SKI.SKI_OID);
+        if (extensionValue == null) {
+            throw new XMLSecurityException("certificate.noSki.null");
+        }
 
-          /**
-           * Use sun.security.util.DerValue if it is present.
-           */
-          try {
-                  DerValue dervalue = new DerValue(derEncodedValue);
-                  if (dervalue == null) {
-                      throw new XMLSecurityException("certificate.noSki.null");
-                  }
-                  if (dervalue.tag != DerValue.tag_OctetString) {
-                      throw new XMLSecurityException("certificate.noSki.notOctetString");
-                  }
-                  extensionValue = dervalue.getOctetString();
-          } catch (NoClassDefFoundError e) {
-          }
+        /**
+         * Strip away first four bytes from the extensionValue
+         * The first two bytes are the tag and length of the extensionValue
+         * OCTET STRING, and the next two bytes are the tag and length of
+         * the skid OCTET STRING.
+         */
+        byte skidValue[] = new byte[extensionValue.length - 4];
+
+        System.arraycopy(extensionValue, 4, skidValue, 0, skidValue.length);
+
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
+            log.log(java.util.logging.Level.FINE, "Base64 of SKI is " + Base64.encode(skidValue));
+        }
 
-          /**
-           * Fall back to org.bouncycastle.asn1.DERInputStream
-           */
-          if (extensionValue == null) {
-              try {
-                  Class clazz = Class.forName("org.bouncycastle.asn1.DERInputStream");
-                  if (clazz != null) {
-                      Constructor constructor = clazz.getConstructor(new Class[]{InputStream.class});
-                      InputStream is = (InputStream) constructor.newInstance(new Object[]{new ByteArrayInputStream(derEncodedValue)});
-                      Method method = clazz.getMethod("readObject", new Class[]{});
-                      Object obj = method.invoke(is, new Object[]{});
-                      if (obj == null) {
-                          throw new XMLSecurityException("certificate.noSki.null");
-                      }
-                      Class clazz2 = Class.forName("org.bouncycastle.asn1.ASN1OctetString");
-                      if (!clazz2.isInstance(obj)) {
-                          throw new XMLSecurityException("certificate.noSki.notOctetString");
-                      }
-                      Method method2 = clazz2.getMethod("getOctets", new Class[]{});
-                      extensionValue = (byte[]) method2.invoke(obj, new Object[]{});
-                  }
-              } catch (Throwable t) {
-              }
-          }
+        return skidValue;
+    }
 
-         /**
-          * Strip away first two bytes from the DerValue (tag and length)
-          */
-         byte abyte0[] = new byte[extensionValue.length - 2];
+    /** @inheritDoc */
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (!this.getClass().getName().equals(obj.getClass().getName())) {
+            return false;
+        }
 
-         System.arraycopy(extensionValue, 2, abyte0, 0, abyte0.length);
+        XMLX509SKI other = (XMLX509SKI) obj;
 
-         /*
-         byte abyte0[] = new byte[derEncodedValue.length - 4];
-         System.arraycopy(derEncodedValue, 4, abyte0, 0, abyte0.length);
-         */
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Base64 of SKI is " + Base64.encode(abyte0));
-
-         return abyte0;
-      } catch (IOException ex) {
-         throw new XMLSecurityException("generic.EmptyMessage", ex);
-      }
-   }
-
-   /** @inheritDoc */
-   public boolean equals(Object obj) {
+        try {
+            return java.security.MessageDigest.isEqual(other.getSKIBytes(),
+                                        this.getSKIBytes());
+        } catch (XMLSecurityException ex) {
+            return false;
+        }
+    }
 
-      if (!obj.getClass().getName().equals(this.getClass().getName())) {
-         return false;
-      }
-
-      XMLX509SKI other = (XMLX509SKI) obj;
-
-      try {
-         return java.security.MessageDigest.isEqual(other.getSKIBytes(),
-                                        this.getSKIBytes());
-      } catch (XMLSecurityException ex) {
-         return false;
-      }
-   }
-
-   /** @inheritDoc */
-   public String getBaseLocalName() {
-      return Constants._TAG_X509SKI;
-   }
+    /** @inheritDoc */
+    public String getBaseLocalName() {
+        return Constants._TAG_X509SKI;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.content.x509;
 
-
-
 import java.security.cert.X509Certificate;
 
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
@@ -33,15 +31,11 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class XMLX509SubjectName extends SignatureElementProxy
         implements XMLX509DataContent {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(XMLX509SubjectName.class.getName());
-
    /**
     * Constructor X509SubjectName
     *
@@ -88,23 +82,21 @@
       return RFC2253Parser.normalize(this.getTextFromTextChild());
    }
 
-   /** @inheritDoc */
-   public boolean equals(Object obj) {
-
-      if (!obj.getClass().getName().equals(this.getClass().getName())) {
-         return false;
-      }
+    /** @inheritDoc */
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
 
-      XMLX509SubjectName other = (XMLX509SubjectName) obj;
-      String otherSubject = other.getSubjectName();
-      String thisSubject = this.getSubjectName();
+        if (!this.getClass().getName().equals(obj.getClass().getName())) {
+            return false;
+        }
 
-      if (otherSubject.equals(thisSubject)) {
-            return true;
-      }
+        XMLX509SubjectName other = (XMLX509SubjectName) obj;
+        String otherSubject = other.getSubjectName();
+        String thisSubject = this.getSubjectName();
 
-       return false;
-
+        return thisSubject.equals(otherSubject);
    }
 
    /** @inheritDoc */
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/InvalidKeyResolverException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/InvalidKeyResolverException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -29,7 +28,7 @@
 /**
  *
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class InvalidKeyResolverException extends XMLSecurityException {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -26,6 +25,7 @@
 import java.security.PublicKey;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 import javax.crypto.SecretKey;
@@ -39,7 +39,8 @@
  * KeyResolver is factory class for subclass of KeyResolverSpi that
  * represent child element of KeyInfo.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
+ * @version %I%, %G%
  */
 public class KeyResolver {
 
@@ -72,6 +73,7 @@
                   InstantiationException {
       this._resolverSpi =
          (KeyResolverSpi) Class.forName(className).newInstance();
+      this._resolverSpi.setGlobalResolver(true);
    }
 
    /**
@@ -83,21 +85,17 @@
       return KeyResolver._resolverVector.size();
    }
 
-   /**
-    * Method item
-    *
-    * @param i
-    * @return the number i resolver registerd
-    * @throws KeyResolverException
-    */
-   public static KeyResolver item(int i) throws KeyResolverException {
-
-           KeyResolver resolver = (KeyResolver) KeyResolver._resolverVector.get(i);
-      if (resolver==null) {
-         throw new KeyResolverException("utils.resolver.noClass");
-      }
-
-      return resolver;
+   public static void hit(Iterator hintI) {
+           ResolverIterator hint = (ResolverIterator) hintI;
+           int i = hint.i;
+           if (i!=1 && hint.res ==_resolverVector) {
+                   List resolverVector=(List)((ArrayList)_resolverVector).clone();
+                Object ob=resolverVector.remove(i-1);
+                resolverVector.add(0,ob);
+                 _resolverVector=resolverVector;
+         } else {
+                 //System.out.println("KeyResolver hitting");
+         }
    }
 
    /**
@@ -106,17 +104,19 @@
     * @param element
     * @param BaseURI
     * @param storage
-    * @return the instance that happends to implement the thing.
+    * @return The certificate represented by the element.
     *
     * @throws KeyResolverException
     */
-   public static final KeyResolver getInstance(
+   public static final X509Certificate getX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
-      for (int i = 0; i < KeyResolver._resolverVector.size(); i++) {
+          // use the old vector to not be hit by updates
+          List resolverVector = KeyResolver._resolverVector;
+      for (int i = 0; i < resolverVector.size(); i++) {
                   KeyResolver resolver=
-            (KeyResolver) KeyResolver._resolverVector.get(i);
+            (KeyResolver) resolverVector.get(i);
 
                   if (resolver==null) {
             Object exArgs[] = {
@@ -127,11 +127,63 @@
 
             throw new KeyResolverException("utils.resolver.noClass", exArgs);
          }
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "check resolvability by class " + resolver.getClass());
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "check resolvability by class " + resolver.getClass());
+
+         X509Certificate cert=resolver.resolveX509Certificate(element, BaseURI, storage);
+         if (cert!=null) {
+            return cert;
+         }
+      }
+
+      Object exArgs[] = {
+         (((element != null) && (element.getNodeType() == Node.ELEMENT_NODE))
+          ? element.getTagName()
+          : "null") };
 
-         if (resolver.canResolve(element, BaseURI, storage)) {
-            return resolver;
+      throw new KeyResolverException("utils.resolver.noClass", exArgs);
+   }
+   /**
+    * Method getInstance
+    *
+    * @param element
+    * @param BaseURI
+    * @param storage
+    * @return the public key contained in the element
+    *
+    * @throws KeyResolverException
+    */
+   public static final PublicKey getPublicKey(
+           Element element, String BaseURI, StorageResolver storage)
+              throws KeyResolverException {
+
+          List resolverVector = KeyResolver._resolverVector;
+      for (int i = 0; i < resolverVector.size(); i++) {
+                  KeyResolver resolver=
+            (KeyResolver) resolverVector.get(i);
+
+                  if (resolver==null) {
+            Object exArgs[] = {
+               (((element != null)
+                 && (element.getNodeType() == Node.ELEMENT_NODE))
+                ? element.getTagName()
+                : "null") };
+
+            throw new KeyResolverException("utils.resolver.noClass", exArgs);
+         }
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "check resolvability by class " + resolver.getClass());
+
+         PublicKey cert=resolver.resolvePublicKey(element, BaseURI, storage);
+         if (cert!=null) {
+                 if (i!=0 && resolverVector==_resolverVector) {
+                         //update resolver.
+                         resolverVector=(List)((ArrayList)_resolverVector).clone();
+                                 Object ob=resolverVector.remove(i);
+                                 resolverVector.add(0,ob);
+                                 _resolverVector=resolverVector;
+                 }
+                 return cert;
          }
       }
 
@@ -182,34 +234,6 @@
       KeyResolver._resolverVector.add(0, className);
    }
 
-   /*
-    * Method resolve
-    *
-    * @param element
-    *
-    * @throws KeyResolverException
-    */
-
-   /**
-    * Method resolveStatic
-    *
-    * @param element
-    * @param BaseURI
-    * @param storage
-    * @return resolve from the static register an element
-    *
-    * @throws KeyResolverException
-    */
-   public static PublicKey resolveStatic(
-           Element element, String BaseURI, StorageResolver storage)
-              throws KeyResolverException {
-
-      KeyResolver myResolver = KeyResolver.getInstance(element, BaseURI,
-                                  storage);
-
-      return myResolver.resolvePublicKey(element, BaseURI, storage);
-   }
-
    /**
     * Method resolve
     *
@@ -223,7 +247,7 @@
    public PublicKey resolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
-      return this._resolverSpi.engineResolvePublicKey(element, BaseURI, storage);
+      return this._resolverSpi.engineLookupAndResolvePublicKey(element, BaseURI, storage);
    }
 
    /**
@@ -239,7 +263,7 @@
    public X509Certificate resolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
-      return this._resolverSpi.engineResolveX509Certificate(element, BaseURI,
+      return this._resolverSpi.engineLookupResolveX509Certificate(element, BaseURI,
               storage);
    }
 
@@ -253,7 +277,7 @@
    public SecretKey resolveSecretKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
-      return this._resolverSpi.engineResolveSecretKey(element, BaseURI,
+      return this._resolverSpi.engineLookupAndResolveSecretKey(element, BaseURI,
               storage);
    }
 
@@ -277,14 +301,6 @@
       return this._resolverSpi.engineGetProperty(key);
    }
 
-   /**
-    * Method getPropertyKeys
-    *
-    * @return the properties key registerd in this resolver
-    */
-   public String[] getPropertyKeys() {
-      return this._resolverSpi.engineGetPropertyKeys();
-   }
 
    /**
     * Method understandsProperty
@@ -296,18 +312,6 @@
       return this._resolverSpi.understandsProperty(propertyToTest);
    }
 
-   /**
-    * Method canResolve
-    *
-    * @param element
-    * @param BaseURI
-    * @param storage
-    * @return true if can resolve the key in the element
-    */
-   public boolean canResolve(Element element, String BaseURI,
-                             StorageResolver storage) {
-      return this._resolverSpi.engineCanResolve(element, BaseURI, storage);
-   }
 
    /**
     * Method resolverClassName
@@ -317,4 +321,37 @@
    public String resolverClassName() {
       return this._resolverSpi.getClass().getName();
    }
+
+   static class ResolverIterator implements Iterator {
+           List res;
+                Iterator it;
+                int i;
+           public ResolverIterator(List list) {
+                res = list;
+                it = res.iterator();
+        }
+                public boolean hasNext() {
+                        // TODO Auto-generated method stub
+                        return it.hasNext();
+                }
+
+                public Object next() {
+                        i++;
+                        KeyResolver resolver = (KeyResolver) it.next();
+                      if (resolver==null) {
+                         throw new RuntimeException("utils.resolver.noClass");
+                      }
+
+                      return resolver._resolverSpi;
+                }
+
+                public void remove() {
+                        // TODO Auto-generated method stub
+
+                }
+
+        };
+        public static Iterator iterator() {
+                return new ResolverIterator(_resolverVector);
+   }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -31,7 +30,7 @@
  *
  *
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  *
  */
 public class KeyResolverException extends XMLSecurityException {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,17 +20,15 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.keyresolver;
 
-
-
 import java.security.PublicKey;
 import java.security.cert.X509Certificate;
+import java.util.HashMap;
 
 import javax.crypto.SecretKey;
 
 import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver;
 import org.w3c.dom.Element;
 
-
 /**
  * This class is abstract class for a child KeyInfo Elemnet.
  *
@@ -41,14 +39,10 @@
  *   JAVACLASS="MyPackage.MyKeyValueImpl"//gt;
  * </PRE>
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
+ * @version $Revision: 1.5 $
  */
 public abstract class KeyResolverSpi {
-
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(KeyResolverSpi.class.getName());
-
    /**
     * This method helps the {@link com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver} to decide whether a
     * {@link com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverSpi} is able to perform the requested action.
@@ -56,10 +50,28 @@
     * @param element
     * @param BaseURI
     * @param storage
-    * @return true if can resolve the key in the element
+    * @return
     */
-   abstract public boolean engineCanResolve(Element element, String BaseURI,
-                                            StorageResolver storage);
+   public boolean engineCanResolve(Element element, String BaseURI,
+                                                    StorageResolver storage) {
+           throw new UnsupportedOperationException();
+   }
+
+   /**
+    * Method engineResolvePublicKey
+    *
+    * @param element
+    * @param BaseURI
+    * @param storage
+    * @return resolved public key from the registered from the element.
+    *
+    * @throws KeyResolverException
+    */
+   public PublicKey engineResolvePublicKey(
+      Element element, String BaseURI, StorageResolver storage)
+         throws KeyResolverException {
+           throw new UnsupportedOperationException();
+    };
 
    /**
     * Method engineResolvePublicKey
@@ -71,9 +83,44 @@
     *
     * @throws KeyResolverException
     */
-   abstract public PublicKey engineResolvePublicKey(
+    public PublicKey engineLookupAndResolvePublicKey(
       Element element, String BaseURI, StorageResolver storage)
-         throws KeyResolverException;
+         throws KeyResolverException {
+        KeyResolverSpi tmp = cloneIfNeeded();
+        if (!tmp.engineCanResolve(element, BaseURI, storage))
+                return null;
+            return tmp.engineResolvePublicKey(element, BaseURI, storage);
+    }
+
+    private KeyResolverSpi cloneIfNeeded() throws KeyResolverException {
+        KeyResolverSpi tmp=this;
+        if (globalResolver) {
+                try {
+                        tmp = (KeyResolverSpi) getClass().newInstance();
+                } catch (InstantiationException e) {
+                        throw new KeyResolverException("",e);
+                } catch (IllegalAccessException e) {
+                        throw new KeyResolverException("",e);
+                }
+        }
+        return tmp;
+    }
+
+    /**
+     * Method engineResolveCertificate
+     *
+     * @param element
+     * @param BaseURI
+     * @param storage
+     * @return resolved X509Certificate key from the registered from the elements
+     *
+     * @throws KeyResolverException
+     */
+    public X509Certificate engineResolveX509Certificate(
+       Element element, String BaseURI, StorageResolver storage)
+          throws KeyResolverException{
+                   throw new UnsupportedOperationException();
+    };
 
    /**
     * Method engineResolveCertificate
@@ -85,9 +132,30 @@
     *
     * @throws KeyResolverException
     */
-   abstract public X509Certificate engineResolveX509Certificate(
+    public X509Certificate engineLookupResolveX509Certificate(
       Element element, String BaseURI, StorageResolver storage)
-         throws KeyResolverException;
+         throws KeyResolverException {
+        KeyResolverSpi tmp = cloneIfNeeded();
+        if (!tmp.engineCanResolve(element, BaseURI, storage))
+                return null;
+        return tmp.engineResolveX509Certificate(element, BaseURI, storage);
+
+    }
+    /**
+     * Method engineResolveSecretKey
+     *
+     * @param element
+     * @param BaseURI
+     * @param storage
+     * @return resolved SecretKey key from the registered from the elements
+     *
+     * @throws KeyResolverException
+     */
+    public SecretKey engineResolveSecretKey(
+       Element element, String BaseURI, StorageResolver storage)
+          throws KeyResolverException{
+                   throw new UnsupportedOperationException();
+    };
 
    /**
     * Method engineResolveSecretKey
@@ -99,12 +167,19 @@
     *
     * @throws KeyResolverException
     */
-   abstract public SecretKey engineResolveSecretKey(
+   public SecretKey engineLookupAndResolveSecretKey(
       Element element, String BaseURI, StorageResolver storage)
-         throws KeyResolverException;
+         throws KeyResolverException {
+           KeyResolverSpi tmp = cloneIfNeeded();
+           if (!tmp.engineCanResolve(element, BaseURI, storage))
+                   return null;
+                return tmp.engineResolveSecretKey(element, BaseURI, storage);
+   }
 
    /** Field _properties */
-   protected java.util.Map _properties = new java.util.HashMap(10);
+   protected java.util.Map _properties = null;
+
+   protected boolean globalResolver=false;
 
    /**
     * Method engineSetProperty
@@ -113,19 +188,8 @@
     * @param value
     */
    public void engineSetProperty(String key, String value) {
-
-      java.util.Iterator i = this._properties.keySet().iterator();
-
-      while (i.hasNext()) {
-         String c = (String) i.next();
-
-         if (c.equals(key)) {
-            key = c;
-
-            break;
-         }
-      }
-
+           if (_properties==null)
+                   _properties=new HashMap();
       this._properties.put(key, value);
    }
 
@@ -136,49 +200,26 @@
     * @return obtain the property appointed by key
     */
    public String engineGetProperty(String key) {
-
-      java.util.Iterator i = this._properties.keySet().iterator();
-
-      while (i.hasNext()) {
-         String c = (String) i.next();
-
-         if (c.equals(key)) {
-            key = c;
-
-            break;
-         }
-      }
+           if (_properties==null)
+                   return null;
 
       return (String) this._properties.get(key);
    }
 
    /**
-    * Method engineGetPropertyKeys
-    *
-    * @return the keys of properties known by this resolver
-    */
-   public String[] engineGetPropertyKeys() {
-      return new String[0];
-   }
-
-   /**
     * Method understandsProperty
     *
     * @param propertyToTest
     * @return true if understood the property
     */
    public boolean understandsProperty(String propertyToTest) {
-
-      String[] understood = this.engineGetPropertyKeys();
+           if (_properties==null)
+                   return false;
 
-      if (understood != null) {
-         for (int i = 0; i < understood.length; i++) {
-            if (understood[i].equals(propertyToTest)) {
-               return true;
-            }
-         }
-      }
+      return  this._properties.get(propertyToTest)!=null;
+   }
+   public void setGlobalResolver(boolean globalResolver) {
+        this.globalResolver = globalResolver;
+   }
 
-      return false;
-   }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DSAKeyValueResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DSAKeyValueResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -37,46 +37,10 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class DSAKeyValueResolver extends KeyResolverSpi {
 
-   /** Field _dsaKeyElement */
-   private Element _dsaKeyElement = null;
-
-   /** @inheritDoc */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-
-      if (element == null) {
-         return false;
-      }
-
-      boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
-                              Constants._TAG_KEYVALUE);
-      boolean isDSAKeyValue = XMLUtils.elementIsInSignatureSpace(element,
-                                 Constants._TAG_DSAKEYVALUE);
-
-      if (isKeyValue) {
-
-            this._dsaKeyElement =
-                XMLUtils.selectDsNode(element.getFirstChild(),Constants._TAG_DSAKEYVALUE,0);
-
-            if (this._dsaKeyElement != null) {
-               return true;
-            }
-      } else if (isDSAKeyValue) {
-
-         // this trick is needed to allow the RetrievalMethodResolver to eat a
-         // ds:DSAKeyValue directly (without KeyValue)
-         this._dsaKeyElement = element;
-
-         return true;
-      }
-
-      return false;
-   }
-
    /**
     * Method engineResolvePublicKey
     *
@@ -85,20 +49,30 @@
     * @param storage
     * @return null if no {@link PublicKey} could be obtained
     */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage) {
+            if (element == null) {
+                 return null;
+            }
+            Element dsaKeyElement=null;
+            boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
+                                      Constants._TAG_KEYVALUE);
+            if (isKeyValue) {
+                dsaKeyElement =
+                        XMLUtils.selectDsNode(element.getFirstChild(),Constants._TAG_DSAKEYVALUE,0);
+       } else if (XMLUtils.elementIsInSignatureSpace(element,
+               Constants._TAG_DSAKEYVALUE)) {
+                 // this trick is needed to allow the RetrievalMethodResolver to eat a
+                 // ds:DSAKeyValue directly (without KeyValue)
+                 dsaKeyElement = element;
+            }
 
-      if (this._dsaKeyElement == null) {
-         boolean weCanResolve = this.engineCanResolve(element, BaseURI,
-                                   storage);
-
-         if (!weCanResolve || (this._dsaKeyElement == null)) {
-            return null;
-         }
+      if (dsaKeyElement == null) {
+                    return null;
       }
 
       try {
-         DSAKeyValue dsaKeyValue = new DSAKeyValue(this._dsaKeyElement,
+         DSAKeyValue dsaKeyValue = new DSAKeyValue(dsaKeyElement,
                                                    BaseURI);
          PublicKey pk = dsaKeyValue.getPublicKey();
 
@@ -112,13 +86,13 @@
 
 
    /** @inheritDoc */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage) {
       return null;
    }
 
    /** @inheritDoc */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage){
       return null;
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/EncryptedKeyResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/EncryptedKeyResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,7 +56,6 @@
                         RSAKeyValueResolver.class.getName());
 
 
-        Key _key;
         Key _kek;
         String _algorithm;
 
@@ -66,7 +65,6 @@
          * @param algorithm
          */
         public EncryptedKeyResolver(String algorithm) {
-                _key = null;
                 _kek = null;
         _algorithm=algorithm;
         }
@@ -78,64 +76,49 @@
          */
 
         public EncryptedKeyResolver(String algorithm, Key kek) {
-                _key = null;
                 _algorithm = algorithm;
                 _kek = kek;
 
         }
 
-        /**
-         * Method engineCanResolve
-         *
-         * @param element
-         * @param BaseURI
-         * @param storage
-         * @return true if can resolve the key in the element
-         *
-         */
-
-        public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-          if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "EncryptedKeyResolver - Can I resolve " + element.getTagName());
-
-      if (element == null) {
-         return false;
-      }
-
-      boolean isEncryptedKey = XMLUtils.elementIsInEncryptionSpace(element,
-                              EncryptionConstants._TAG_ENCRYPTEDKEY);
-
-      if (isEncryptedKey) {
-                  if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Passed an Encrypted Key");
-                  try {
-                          XMLCipher cipher = XMLCipher.getInstance();
-                          cipher.init(XMLCipher.UNWRAP_MODE, _kek);
-                          EncryptedKey ek = cipher.loadEncryptedKey(element);
-                          _key = cipher.decryptKey(ek, _algorithm);
-                  }
-                  catch (Exception e) {}
-      }
-
-      return (_key != null);
-   }
-
     /** @inheritDoc */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage) {
 
            return null;
    }
 
    /** @inheritDoc */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage) {
       return null;
    }
 
    /** @inheritDoc */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage) {
-      return (SecretKey) _key;
+           SecretKey key=null;
+           if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "EncryptedKeyResolver - Can I resolve " + element.getTagName());
+
+              if (element == null) {
+                 return null;
+              }
+
+              boolean isEncryptedKey = XMLUtils.elementIsInEncryptionSpace(element,
+                                      EncryptionConstants._TAG_ENCRYPTEDKEY);
+
+              if (isEncryptedKey) {
+                          log.log(java.util.logging.Level.FINE, "Passed an Encrypted Key");
+                          try {
+                                  XMLCipher cipher = XMLCipher.getInstance();
+                                  cipher.init(XMLCipher.UNWRAP_MODE, _kek);
+                                  EncryptedKey ek = cipher.loadEncryptedKey(element);
+                                  key = (SecretKey) cipher.decryptKey(ek, _algorithm);
+                          }
+                          catch (Exception e) {}
+              }
+
+      return key;
    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -38,7 +37,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class RSAKeyValueResolver extends KeyResolverSpi {
 
@@ -48,75 +47,55 @@
                         RSAKeyValueResolver.class.getName());
 
    /** Field _rsaKeyElement */
-   private Element _rsaKeyElement = null;
+
 
    /** @inheritDoc */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-          if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName());
-
+   public PublicKey engineLookupAndResolvePublicKey(
+           Element element, String BaseURI, StorageResolver storage) {
+           if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName());
       if (element == null) {
-         return false;
+         return null;
       }
 
-      boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
-                              Constants._TAG_KEYVALUE);
-      boolean isRSAKeyValue = XMLUtils.elementIsInSignatureSpace(element,
-                                 Constants._TAG_RSAKEYVALUE);
-
-      if (isKeyValue) {
-            this._rsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(),
-                    Constants._TAG_RSAKEYVALUE, 0);
-
-            if (this._rsaKeyElement != null) {
-               return true;
-            }
-      } else if (isRSAKeyValue) {
-
+          boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
+                                              Constants._TAG_KEYVALUE);
+          Element rsaKeyElement=null;
+          if (isKeyValue) {
+                   rsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(),
+                                    Constants._TAG_RSAKEYVALUE, 0);
+          } else if (XMLUtils.elementIsInSignatureSpace(element,
+              Constants._TAG_RSAKEYVALUE)) {
          // this trick is needed to allow the RetrievalMethodResolver to eat a
          // ds:RSAKeyValue directly (without KeyValue)
-         this._rsaKeyElement = element;
-
-         return true;
-      }
-
-      return false;
-   }
+         rsaKeyElement = element;
+          }
 
-   /** @inheritDoc */
-   public PublicKey engineResolvePublicKey(
-           Element element, String BaseURI, StorageResolver storage) {
 
-      if (this._rsaKeyElement == null) {
-         boolean weCanResolve = this.engineCanResolve(element, BaseURI,
-                                   storage);
-
-         if (!weCanResolve || (this._rsaKeyElement == null)) {
-            return null;
-         }
+      if (rsaKeyElement == null) {
+         return null;
       }
 
       try {
-         RSAKeyValue rsaKeyValue = new RSAKeyValue(this._rsaKeyElement,
+         RSAKeyValue rsaKeyValue = new RSAKeyValue(rsaKeyElement,
                                                    BaseURI);
 
          return rsaKeyValue.getPublicKey();
       } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
       }
 
       return null;
    }
 
    /** @inheritDoc */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage) {
       return null;
    }
 
    /** @inheritDoc */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage) {
       return null;
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -28,7 +28,15 @@
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
 
+import javax.xml.parsers.ParserConfigurationException;
+
+import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod;
 import com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509Certificate;
@@ -44,6 +52,7 @@
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
 
 
 /**
@@ -55,7 +64,7 @@
  * RetrievalMethodResolver cannot handle itself, resolving of the extracted
  * element is delegated back to the KeyResolver mechanism.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $ modified by Dave Garcia
  */
 public class RetrievalMethodResolver extends KeyResolverSpi {
 
@@ -65,26 +74,6 @@
                         RetrievalMethodResolver.class.getName());
 
    /**
-    * Method engineCanResolve
-    * @inheritDoc
-    * @param element
-    * @param BaseURI
-    * @param storage
-    *
-    */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-
-      if
-         (!XMLUtils.elementIsInSignatureSpace(element,
-                 Constants._TAG_RETRIEVALMETHOD)) {
-         return false;
-      }
-
-      return true;
-   }
-
-   /**
     * Method engineResolvePublicKey
     * @inheritDoc
     * @param element
@@ -92,82 +81,59 @@
     * @param storage
     *
     */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               {
+           if  (!XMLUtils.elementIsInSignatureSpace(element,
+               Constants._TAG_RETRIEVALMETHOD)) {
+                   return null;
+           }
 
       try {
-         RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
-         Attr uri = rm.getURIAttr();
-
-         // type can be null because it's optional
-         String type = rm.getType();
-         Transforms transforms = rm.getTransforms();
-         ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI);
-
-         if (resRes != null) {
-            XMLSignatureInput resource = resRes.resolve(uri, BaseURI);
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Before applying Transforms, resource has "
-                      + resource.getBytes().length + "bytes");
-
-            if (transforms != null) {
-               if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "We have Transforms");
-
-               resource = transforms.performTransforms(resource);
-            }
-            if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "After applying Transforms, resource has "
-                      + resource.getBytes().length + "bytes");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Resolved to resource " + resource.getSourceURI());
-            }
-
-            byte inputBytes[] = resource.getBytes();
-
-            if ((type != null) && type.equals(RetrievalMethod.TYPE_RAWX509)) {
+                   //Create a retrieval method over the given element
+                   RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
+               String type = rm.getType();
+                   XMLSignatureInput resource=resolveInput(rm,BaseURI);
+           if (RetrievalMethod.TYPE_RAWX509.equals(type)) {
+                //a raw certificate, direct parsing is done!
+                X509Certificate cert=getRawCertificate(resource);
+                                if (cert != null) {
+                                 return cert.getPublicKey();
+                            }
+                                return null;
+            };
+                        Element e = obtainRefrenceElement(resource);
+                        return resolveKey(e,BaseURI,storage);
+          } catch (XMLSecurityException ex) {
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+      } catch (CertificateException ex) {
+         log.log(java.util.logging.Level.FINE, "CertificateException", ex);
+      } catch (IOException ex) {
+         log.log(java.util.logging.Level.FINE, "IOException", ex);
+      } catch (ParserConfigurationException e) {
+                  log.log(java.util.logging.Level.FINE, "ParserConfigurationException", e);
+          } catch (SAXException e) {
+                 log.log(java.util.logging.Level.FINE, "SAXException", e);
+          }
+      return null;
+   }
 
-               // if the resource stores a raw certificate, we have to handle it
-               CertificateFactory certFact =
-                  CertificateFactory
-                     .getInstance(XMLX509Certificate.JCA_CERT_ID);
-               X509Certificate cert =
-                  (X509Certificate) certFact
-                     .generateCertificate(new ByteArrayInputStream(inputBytes));
-
-               if (cert != null) {
-                  return cert.getPublicKey();
-               }
-            } else {
-
-               // otherwise, we parse the resource, create an Element and delegate
-                if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "we have to parse " + inputBytes.length + " bytes");
-
-               Element e = this.getDocFromBytes(inputBytes);
-               if (true)
-                    if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Now we have a {" + e.getNamespaceURI() + "}"
-                         + e.getLocalName() + " Element");
-
-               if (e != null) {
-                  KeyResolver newKeyResolver = KeyResolver.getInstance(getFirstElementChild(e),
-                                                  BaseURI, storage);
-
-                  if (newKeyResolver != null) {
-                     return newKeyResolver.resolvePublicKey(getFirstElementChild(e), BaseURI,
-                                                            storage);
-                  }
-               }
-            }
-         }
-      } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
-      } catch (CertificateException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "CertificateException", ex);
-      } catch (IOException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "IOException", ex);
-      }
-
-      return null;
+   static private Element obtainRefrenceElement(XMLSignatureInput resource) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException {
+           Element e;
+           if (resource.isElement()){
+                   e=(Element) resource.getSubNode();
+           } else if (resource.isNodeSet()) {
+                   //Retrieved resource is a nodeSet
+                   e=getDocumentElement(resource.getNodeSet());
+           } else {
+                   //Retrieved resource is an inputStream
+                   byte inputBytes[] = resource.getBytes();
+                   e = getDocFromBytes(inputBytes);
+                   //otherwise, we parse the resource, create an Element and delegate
+                   if (log.isLoggable(java.util.logging.Level.FINE))
+                           log.log(java.util.logging.Level.FINE, "we have to parse " + inputBytes.length + " bytes");
+           }
+           return e;
    }
 
    /**
@@ -178,85 +144,100 @@
     * @param storage
     *
     */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               {
-
-      try {
-         RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
-         Attr uri = rm.getURIAttr();
-         Transforms transforms = rm.getTransforms();
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Asked to resolve URI " + uri);
-
-         ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI);
-
-         if (resRes != null) {
-            XMLSignatureInput resource = resRes.resolve(uri, BaseURI);
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Before applying Transforms, resource has "
-                      + resource.getBytes().length + "bytes");
+           if  (!XMLUtils.elementIsInSignatureSpace(element,
+               Constants._TAG_RETRIEVALMETHOD)) {
+                   return null;
+           }
 
-            if (transforms != null) {
-               if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "We have Transforms");
-
-               resource = transforms.performTransforms(resource);
-            }
-
-            if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "After applying Transforms, resource has "
-                      + resource.getBytes().length + "bytes");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Resolved to resource " + resource.getSourceURI());
-            }
-
-            byte inputBytes[] = resource.getBytes();
-
-            if ((rm.getType() != null)
-                    && rm.getType().equals(RetrievalMethod.TYPE_RAWX509)) {
+           try {
+         RetrievalMethod rm = new RetrievalMethod(element, BaseURI);
+                 String type = rm.getType();
+                 XMLSignatureInput resource=resolveInput(rm,BaseURI);
+                 if (RetrievalMethod.TYPE_RAWX509.equals(type)) {
+                X509Certificate cert=getRawCertificate(resource);
+            return cert;
+                 }
+                 Element e = obtainRefrenceElement(resource);
+                 return resolveCertificate(e,BaseURI,storage);
+      } catch (XMLSecurityException ex) {
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+      } catch (CertificateException ex) {
+         log.log(java.util.logging.Level.FINE, "CertificateException", ex);
+      } catch (IOException ex) {
+         log.log(java.util.logging.Level.FINE, "IOException", ex);
+          } catch (ParserConfigurationException e) {
+                  log.log(java.util.logging.Level.FINE, "ParserConfigurationException", e);
+          } catch (SAXException e) {
+                 log.log(java.util.logging.Level.FINE, "SAXException", e);
+          }
+      return null;
+   }
 
-               // if the resource stores a raw certificate, we have to handle it
-               CertificateFactory certFact =
-                  CertificateFactory
-                     .getInstance(XMLX509Certificate.JCA_CERT_ID);
-               X509Certificate cert =
-                  (X509Certificate) certFact
-                     .generateCertificate(new ByteArrayInputStream(inputBytes));
-
-               if (cert != null) {
-                  return cert;
-               }
-            } else {
-
-               // otherwise, we parse the resource, create an Element and delegate
-                if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "we have to parse " + inputBytes.length + " bytes");
-
-               Element e = this.getDocFromBytes(inputBytes);
+   /**
+    * Retrieves a x509Certificate from the given information
+    * @param e
+    * @param BaseURI
+    * @param storage
+    * @return
+    * @throws KeyResolverException
+    */
+   static private X509Certificate resolveCertificate(Element e,String BaseURI,StorageResolver storage) throws KeyResolverException{
+                  if (log.isLoggable(java.util.logging.Level.FINE))
+                          log.log(java.util.logging.Level.FINE, "Now we have a {" + e.getNamespaceURI() + "}"+ e.getLocalName() + " Element");
+                  //An element has been provided
+          if (e != null) {
+                          return KeyResolver.getX509Certificate(e,BaseURI, storage);
+                  }
+                  return null;
+   }
 
-               if (true)
-                    if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Now we have a {" + e.getNamespaceURI() + "}"
-                         + e.getLocalName() + " Element");
-
-               if (e != null) {
-                  KeyResolver newKeyResolver = KeyResolver.getInstance(getFirstElementChild(e),
-                                                  BaseURI, storage);
-
-                  if (newKeyResolver != null) {
-                     return newKeyResolver.resolveX509Certificate(getFirstElementChild(e), BaseURI,
-                             storage);
+   /**
+    * Retrieves a x509Certificate from the given information
+    * @param e
+    * @param BaseURI
+    * @param storage
+    * @return
+    * @throws KeyResolverException
+    */
+   static private PublicKey resolveKey(Element e,String BaseURI,StorageResolver storage) throws KeyResolverException{
+                  if (log.isLoggable(java.util.logging.Level.FINE))
+                          log.log(java.util.logging.Level.FINE, "Now we have a {" + e.getNamespaceURI() + "}"+ e.getLocalName() + " Element");
+                  //An element has been provided
+          if (e != null) {
+                          return KeyResolver.getPublicKey(e,BaseURI, storage);
                   }
-               }
-            }
-         }
-      } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
-      } catch (CertificateException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "CertificateException", ex);
-      } catch (IOException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "IOException", ex);
-      }
+                  return null;
+   }
 
-      return null;
+   static private X509Certificate getRawCertificate(XMLSignatureInput resource) throws CanonicalizationException, IOException, CertificateException{
+           byte inputBytes[] = resource.getBytes();
+       // if the resource stores a raw certificate, we have to handle it
+       CertificateFactory certFact =CertificateFactory.getInstance(XMLX509Certificate.JCA_CERT_ID);
+       X509Certificate cert =(X509Certificate) certFact.generateCertificate(new ByteArrayInputStream(inputBytes));
+       return cert;
+   }
+   /**
+    * Resolves the input from the given retrieval method
+    * @return
+    * @throws XMLSecurityException
+    */
+   static private XMLSignatureInput resolveInput(RetrievalMethod rm,String BaseURI) throws XMLSecurityException{
+       Attr uri = rm.getURIAttr();
+           //Apply the trnasforms
+       Transforms transforms = rm.getTransforms();
+       ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI);
+       if (resRes != null) {
+          XMLSignatureInput resource = resRes.resolve(uri, BaseURI);
+          if (transforms != null) {
+                  log.log(java.util.logging.Level.FINE, "We have Transforms");
+                          resource = transforms.performTransforms(resource);
+          }
+                  return resource;
+       }
+           return null;
    }
 
    /**
@@ -266,18 +247,13 @@
     * @return the Document Element after parsing bytes
     * @throws KeyResolverException if something goes wrong
     */
-   Element getDocFromBytes(byte[] bytes) throws KeyResolverException {
-
+   static Element getDocFromBytes(byte[] bytes) throws KeyResolverException {
       try {
-         javax.xml.parsers.DocumentBuilderFactory dbf =
-            javax.xml.parsers.DocumentBuilderFactory.newInstance();
-
+         javax.xml.parsers.DocumentBuilderFactory dbf =javax.xml.parsers.DocumentBuilderFactory.newInstance();
          dbf.setNamespaceAware(true);
-
          javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
          org.w3c.dom.Document doc =
             db.parse(new java.io.ByteArrayInputStream(bytes));
-
          return doc.getDocumentElement();
       } catch (org.xml.sax.SAXException ex) {
          throw new KeyResolverException("empty", ex);
@@ -296,16 +272,43 @@
     * @param storage
     *
     */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage)
    {
       return null;
    }
-   static Element getFirstElementChild(Element e){
-            Node n=e.getFirstChild();
-            while (n!=null && n.getNodeType()!=Node.ELEMENT_NODE) {
-                n=n.getNextSibling();
-            }
-                return (Element)n;
+
+   static Element getDocumentElement(Set set) {
+           Iterator it=set.iterator();
+           Element e=null;
+           while (it.hasNext()) {
+                   Node currentNode=(Node)it.next();
+                   if (currentNode instanceof Element) {
+                           e=(Element)currentNode;
+                           break;
+                   }
+
+           }
+           List parents=new ArrayList(10);
+
+                //Obtain all the parents of the elemnt
+                do {
+                        parents.add(e);
+                        Node n=e.getParentNode();
+                        if (!(n instanceof Element )) {
+                                break;
+                        }
+                        e=(Element)n;
+                } while (e!=null);
+                //Visit them in reverse order.
+                ListIterator it2=parents.listIterator(parents.size()-1);
+                Element ele=null;
+                while (it2.hasPrevious()) {
+                        ele=(Element)it2.previous();
+                        if (set.contains(ele)) {
+                                return ele;
+                        }
+        }
+                return null;
    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -41,7 +40,7 @@
  * Resolves Certificates which are directly contained inside a
  * <CODE>ds:X509Certificate</CODE> Element.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class X509CertificateResolver extends KeyResolverSpi {
 
@@ -49,47 +48,7 @@
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(X509CertificateResolver.class.getName());
 
-   /** Field _dsaKeyElement */
-   Element[] _x509CertKeyElements = null;
 
-   /**
-    * Method engineCanResolve
-    * @inheritDoc
-    * @param element
-    * @param BaseURI
-    * @param storage
-    *
-    */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-          if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
-
-      if (!XMLUtils.elementIsInSignatureSpace(element,
-                 Constants._TAG_X509DATA)) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-         return false;
-      }
-
-
-         this._x509CertKeyElements = XMLUtils.selectDsNodes(element.getFirstChild(),
-                 Constants._TAG_X509CERTIFICATE);
-
-         if ((this._x509CertKeyElements != null)
-                 && (this._x509CertKeyElements.length > 0)) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Yes Sir, I can");
-
-            return true;
-         }
-
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-      return false;
-   }
-
-   /** Field _x509certObject[] */
-   XMLX509Certificate _x509certObject[] = null;
 
    /**
     * Method engineResolvePublicKey
@@ -100,11 +59,11 @@
     *
     * @throws KeyResolverException
     */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
-      X509Certificate cert = this.engineResolveX509Certificate(element,
+      X509Certificate cert = this.engineLookupResolveX509Certificate(element,
                                 BaseURI, storage);
 
       if (cert != null) {
@@ -123,43 +82,33 @@
     *
     * @throws KeyResolverException
     */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
       try {
-         if ((this._x509CertKeyElements == null)
-                 || (this._x509CertKeyElements.length == 0)) {
-            boolean weCanResolve = this.engineCanResolve(element, BaseURI,
-                                      storage);
-
-            if (!weCanResolve || (this._x509CertKeyElements == null)
-                    || (this._x509CertKeyElements.length == 0)) {
-               return null;
-            }
+          Element[] els=XMLUtils.selectDsNodes(element.getFirstChild(),
+                  Constants._TAG_X509CERTIFICATE);
+         if ((els == null) || (els.length == 0)) {
+                 Element el=XMLUtils.selectDsNode(element.getFirstChild(),
+                     Constants._TAG_X509DATA,0);
+             if (el!=null) {
+                 return engineLookupResolveX509Certificate(el, BaseURI, storage);
+             }
+                 return null;
          }
 
-         this._x509certObject =
-            new XMLX509Certificate[this._x509CertKeyElements.length];
-
          // populate Object array
-         for (int i = 0; i < this._x509CertKeyElements.length; i++) {
-            this._x509certObject[i] =
-               new XMLX509Certificate(this._x509CertKeyElements[i]
-                  , BaseURI);
-         }
-
-         for (int i = 0; i < this._x509certObject.length; i++) {
-            X509Certificate cert = this._x509certObject[i].getX509Certificate();
-
-            if (cert != null) {
-               return cert;
+         for (int i = 0; i < els.length; i++) {
+                 XMLX509Certificate xmlCert=new XMLX509Certificate(els[i], BaseURI);
+                 X509Certificate cert = xmlCert.getX509Certificate();
+            if (cert!=null) {
+                return cert;
             }
          }
-
          return null;
       } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
 
          throw new KeyResolverException("generic.EmptyMessage", ex);
       }
@@ -173,7 +122,7 @@
     * @param storage
     *
     */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage)
    {
       return null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -39,7 +38,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class X509IssuerSerialResolver extends KeyResolverSpi {
 
@@ -48,44 +47,13 @@
         java.util.logging.Logger.getLogger(
                     X509IssuerSerialResolver.class.getName());
 
-    /** @inheritDoc */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
-
-      X509Data x509data = null;
-      try {
-         x509data = new X509Data(element, BaseURI);
-      } catch (XMLSignatureException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-         return false;
-      } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-         return false;
-      }
-
-      if (x509data == null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-         return false;
-      }
-
-      if (x509data.containsIssuerSerial()) {
-            return true;
-      }
-
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-      return false;
-   }
 
    /** @inheritDoc */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
-      X509Certificate cert = this.engineResolveX509Certificate(element,
+      X509Certificate cert = this.engineLookupResolveX509Certificate(element,
                                 BaseURI, storage);
 
       if (cert != null) {
@@ -96,10 +64,31 @@
    }
 
    /** @inheritDoc */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
 
+          X509Data x509data = null;
+          try {
+             x509data = new X509Data(element, BaseURI);
+           } catch (XMLSignatureException ex) {
+              log.log(java.util.logging.Level.FINE, "I can't");
+         return null;
+           } catch (XMLSecurityException ex) {
+              log.log(java.util.logging.Level.FINE, "I can't");
+          return null;
+           }
+
+           if (x509data == null) {
+              log.log(java.util.logging.Level.FINE, "I can't");
+              return null;
+           }
+
+           if (!x509data.containsIssuerSerial()) {
+                    return null;
+           }
       try {
          if (storage == null) {
             Object exArgs[] = { Constants._TAG_X509ISSUERSERIAL };
@@ -107,53 +96,52 @@
                new KeyResolverException("KeyResolver.needStorageResolver",
                                         exArgs);
 
-            if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "", ex);
+            log.log(java.util.logging.Level.INFO, "", ex);
             throw ex;
          }
 
-         X509Data x509data = new X509Data(element, BaseURI);
          int noOfISS = x509data.lengthIssuerSerial();
 
          while (storage.hasNext()) {
             X509Certificate cert = storage.next();
             XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(element.getOwnerDocument(), cert);
 
-            if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Certificate Issuer: "
+            if (log.isLoggable(java.util.logging.Level.FINE)) {
+                log.log(java.util.logging.Level.FINE, "Found Certificate Issuer: "
                       + certSerial.getIssuerName());
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Certificate Serial: "
+                log.log(java.util.logging.Level.FINE, "Found Certificate Serial: "
                       + certSerial.getSerialNumber().toString());
             }
 
             for (int i=0; i<noOfISS; i++) {
                XMLX509IssuerSerial xmliss = x509data.itemIssuerSerial(i);
 
-               if (true) {
-                    if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Element Issuer:     "
+               if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Found Element Issuer:     "
                          + xmliss.getIssuerName());
-                    if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Element Serial:     "
+                    log.log(java.util.logging.Level.FINE, "Found Element Serial:     "
                          + xmliss.getSerialNumber().toString());
                }
 
                if (certSerial.equals(xmliss)) {
-                  if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "match !!! ");
+                  log.log(java.util.logging.Level.FINE, "match !!! ");
 
                   return cert;
                }
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "no match...");
+                log.log(java.util.logging.Level.FINE, "no match...");
             }
          }
 
          return null;
       } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
 
          throw new KeyResolverException("generic.EmptyMessage", ex);
       }
    }
 
    /** @inheritDoc */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage) {
       return null;
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -40,7 +39,7 @@
 /**
  *
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class X509SKIResolver extends KeyResolverSpi {
 
@@ -48,50 +47,6 @@
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(X509SKIResolver.class.getName());
 
-   /** Field _x509childNodes */
-   private Element _x509childNodes[] = null;
-
-   /** Field _x509childObject[] */
-   private XMLX509SKI _x509childObject[] = null;
-
-   /**
-    * Method engineCanResolve
-    * @inheritDoc
-    * @param element
-    * @param BaseURI
-    * @param storage
-    *
-    */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-      if (true) {
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
-      }
-
-         if (!XMLUtils.elementIsInSignatureSpace(element,
-                 Constants._TAG_X509DATA)) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-         return false;
-      }
-
-
-
-
-         this._x509childNodes = XMLUtils.selectDsNodes(element,
-                  Constants._TAG_X509SKI);
-
-         if ((this._x509childNodes != null)
-                 && (this._x509childNodes.length > 0)) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Yes Sir, I can");
-
-            return true;
-         }
-
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-      return false;
-   }
 
    /**
     * Method engineResolvePublicKey
@@ -102,11 +57,11 @@
     * @return null if no {@link PublicKey} could be obtained
     * @throws KeyResolverException
     */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
-      X509Certificate cert = this.engineResolveX509Certificate(element,
+      X509Certificate cert = this.engineLookupResolveX509Certificate(element,
                                 BaseURI, storage);
 
       if (cert != null) {
@@ -125,46 +80,55 @@
     *
     * @throws KeyResolverException
     */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
-
-      try {
-         if (this._x509childNodes == null) {
-            boolean weCanResolve = this.engineCanResolve(element, BaseURI,
-                                      storage);
+           if (log.isLoggable(java.util.logging.Level.FINE)) {
+             log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
+           }
+           if (!XMLUtils.elementIsInSignatureSpace(element,
+              Constants._TAG_X509DATA)) {
+                 log.log(java.util.logging.Level.FINE, "I can't");
+                 return null;
+           }
+           /** Field _x509childObject[] */
+           XMLX509SKI x509childObject[] = null;
 
-            if (!weCanResolve || (this._x509childNodes == null)) {
-               return null;
-            }
-         }
+           Element x509childNodes[] = null;
+           x509childNodes = XMLUtils.selectDsNodes(element.getFirstChild(),
+                          Constants._TAG_X509SKI);
 
+           if (!((x509childNodes != null)
+                         && (x509childNodes.length > 0))) {
+                   log.log(java.util.logging.Level.FINE, "I can't");
+                return null;
+           }
+           try {
          if (storage == null) {
             Object exArgs[] = { Constants._TAG_X509SKI };
             KeyResolverException ex =
                new KeyResolverException("KeyResolver.needStorageResolver",
                                         exArgs);
 
-            if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "", ex);
+            log.log(java.util.logging.Level.INFO, "", ex);
 
             throw ex;
          }
 
-         this._x509childObject =
-            new XMLX509SKI[this._x509childNodes.length];
+         x509childObject = new XMLX509SKI[x509childNodes.length];
 
-         for (int i = 0; i < this._x509childNodes.length; i++) {
-            this._x509childObject[i] =
-               new XMLX509SKI(this._x509childNodes[i], BaseURI);
+         for (int i = 0; i < x509childNodes.length; i++) {
+            x509childObject[i] =
+               new XMLX509SKI(x509childNodes[i], BaseURI);
          }
 
          while (storage.hasNext()) {
             X509Certificate cert = storage.next();
             XMLX509SKI certSKI = new XMLX509SKI(element.getOwnerDocument(), cert);
 
-            for (int i = 0; i < this._x509childObject.length; i++) {
-               if (certSKI.equals(this._x509childObject[i])) {
-                  if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Return PublicKey from "
+            for (int i = 0; i < x509childObject.length; i++) {
+               if (certSKI.equals(x509childObject[i])) {
+                  log.log(java.util.logging.Level.FINE, "Return PublicKey from "
                             + cert.getSubjectDN().getName());
 
                   return cert;
@@ -186,7 +150,7 @@
     * @param storage
     *
     */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage)
     {
       return null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -38,7 +38,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class X509SubjectNameResolver extends KeyResolverSpi {
 
@@ -47,50 +47,6 @@
         java.util.logging.Logger.getLogger(
                     X509SubjectNameResolver.class.getName());
 
-   /** Field _x509childNodes */
-   private Element[] _x509childNodes = null;
-
-   /** Field _x509childObject[] */
-   private XMLX509SubjectName _x509childObject[] = null;
-
-   /**
-    * Method engineCanResolve
-    * @inheritDoc
-    * @param element
-    * @param BaseURI
-    * @param storage
-    *
-    */
-   public boolean engineCanResolve(Element element, String BaseURI,
-                                   StorageResolver storage) {
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
-
-
-       if (!XMLUtils.elementIsInSignatureSpace(element,
-                 Constants._TAG_X509DATA) ) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-         return false;
-      }
-
-
-
-         this._x509childNodes = XMLUtils.selectDsNodes(element,
-                 Constants._TAG_X509SUBJECTNAME);
-
-         if ((this._x509childNodes != null)
-                 && (this._x509childNodes.length > 0)) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Yes Sir, I can");
-
-            return true;
-         }
-
-
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I can't");
-
-      return false;
-   }
 
    /**
     * Method engineResolvePublicKey
@@ -101,11 +57,11 @@
     * @return null if no {@link PublicKey} could be obtained
     * @throws KeyResolverException
     */
-   public PublicKey engineResolvePublicKey(
+   public PublicKey engineLookupAndResolvePublicKey(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
 
-      X509Certificate cert = this.engineResolveX509Certificate(element,
+      X509Certificate cert = this.engineLookupResolveX509Certificate(element,
                                 BaseURI, storage);
 
       if (cert != null) {
@@ -124,37 +80,46 @@
     *
     * @throws KeyResolverException
     */
-   public X509Certificate engineResolveX509Certificate(
+   public X509Certificate engineLookupResolveX509Certificate(
            Element element, String BaseURI, StorageResolver storage)
               throws KeyResolverException {
+           if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName() + "?");
+           Element[] x509childNodes = null;
+           XMLX509SubjectName x509childObject[] = null;
+
+           if (!XMLUtils.elementIsInSignatureSpace(element,
+                         Constants._TAG_X509DATA) ) {
+                        log.log(java.util.logging.Level.FINE, "I can't");
+                 return null;
+           }
+       x509childNodes = XMLUtils.selectDsNodes(element.getFirstChild(),
+                 Constants._TAG_X509SUBJECTNAME);
+
+        if (!((x509childNodes != null)
+                && (x509childNodes.length > 0))) {
+                    log.log(java.util.logging.Level.FINE, "I can't");
+                    return null;
+            }
 
       try {
-         if (this._x509childNodes == null) {
-            boolean weCanResolve = this.engineCanResolve(element, BaseURI,
-                                      storage);
-
-            if (!weCanResolve || (this._x509childNodes == null)) {
-               return null;
-            }
-         }
-
          if (storage == null) {
             Object exArgs[] = { Constants._TAG_X509SUBJECTNAME };
             KeyResolverException ex =
                new KeyResolverException("KeyResolver.needStorageResolver",
                                         exArgs);
 
-            if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "", ex);
+            log.log(java.util.logging.Level.INFO, "", ex);
 
             throw ex;
          }
 
-         this._x509childObject =
-            new XMLX509SubjectName[this._x509childNodes.length];
+         x509childObject =
+            new XMLX509SubjectName[x509childNodes.length];
 
-         for (int i = 0; i < this._x509childNodes.length; i++) {
-            this._x509childObject[i] =
-               new XMLX509SubjectName(this._x509childNodes[i],
+         for (int i = 0; i < x509childNodes.length; i++) {
+            x509childObject[i] =
+               new XMLX509SubjectName(x509childNodes[i],
                                       BaseURI);
          }
 
@@ -163,24 +128,24 @@
             XMLX509SubjectName certSN =
                new XMLX509SubjectName(element.getOwnerDocument(), cert);
 
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Certificate SN: " + certSN.getSubjectName());
+            log.log(java.util.logging.Level.FINE, "Found Certificate SN: " + certSN.getSubjectName());
 
-            for (int i = 0; i < this._x509childObject.length; i++) {
-               if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found Element SN:     "
-                         + this._x509childObject[i].getSubjectName());
+            for (int i = 0; i < x509childObject.length; i++) {
+               log.log(java.util.logging.Level.FINE, "Found Element SN:     "
+                         + x509childObject[i].getSubjectName());
 
-               if (certSN.equals(this._x509childObject[i])) {
-                  if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "match !!! ");
+               if (certSN.equals(x509childObject[i])) {
+                  log.log(java.util.logging.Level.FINE, "match !!! ");
 
                   return cert;
                }
-               if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "no match...");
+               log.log(java.util.logging.Level.FINE, "no match...");
             }
          }
 
          return null;
       } catch (XMLSecurityException ex) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
+         log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
 
          throw new KeyResolverException("generic.EmptyMessage", ex);
       }
@@ -194,7 +159,7 @@
     * @param storage
     *
     */
-   public javax.crypto.SecretKey engineResolveSecretKey(
+   public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
            Element element, String BaseURI, StorageResolver storage)
    {
       return null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.storage;
 
-
-
 import java.security.KeyStore;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
@@ -36,7 +33,7 @@
 /**
  * This class collects customized resolvers for Certificates.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class StorageResolver {
 
@@ -45,7 +42,7 @@
         java.util.logging.Logger.getLogger(StorageResolver.class.getName());
 
    /** Field _storageResolvers */
-   List _storageResolvers = new ArrayList();
+   List _storageResolvers = null;
 
    /** Field _iterator */
    Iterator _iterator = null;
@@ -71,7 +68,8 @@
     * @param resolver
     */
    public void add(StorageResolverSpi resolver) {
-
+           if (_storageResolvers==null)
+                   _storageResolvers=new ArrayList();
       this._storageResolvers.add(resolver);
 
       this._iterator = null;
@@ -126,6 +124,8 @@
    public Iterator getIterator() {
 
       if (this._iterator == null) {
+         if (_storageResolvers==null)
+                   _storageResolvers=new ArrayList();
          this._iterator = new StorageResolverIterator(this._storageResolvers.iterator());
       }
 
@@ -140,6 +140,8 @@
    public boolean hasNext() {
 
       if (this._iterator == null) {
+          if (_storageResolvers==null)
+                   _storageResolvers=new ArrayList();
          this._iterator = new StorageResolverIterator(this._storageResolvers.iterator());
       }
 
@@ -158,15 +160,13 @@
    /**
     * Class StorageResolverIterator
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
-   class StorageResolverIterator implements Iterator {
+   static class StorageResolverIterator implements Iterator {
 
       /** Field _resolvers */
-           Iterator _resolvers = null;
-
-      /** Field _currentResolver */
-      int _currentResolver = 0;
+      Iterator _resolvers = null;
 
       /**
        * Constructor FilesystemIterator
@@ -179,17 +179,16 @@
 
       /** @inheritDoc */
       public boolean hasNext() {
-                  return _resolvers.hasNext();
+          return _resolvers.hasNext();
       }
 
       /** @inheritDoc */
       public Object next() {
-                  return _resolvers.next();
+          return _resolvers.next();
       }
 
       /**
        * Method remove
-       *
        */
       public void remove() {
          throw new UnsupportedOperationException(
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -28,7 +27,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class StorageResolverException extends XMLSecurityException {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverSpi.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverSpi.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -28,7 +27,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class StorageResolverSpi {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.storage.implementations;
 
-
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -40,12 +37,11 @@
 import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolverSpi;
 import com.sun.org.apache.xml.internal.security.utils.Base64;
 
-
 /**
  * This {@link StorageResolverSpi} makes all raw (binary) {@link X509Certificate}s
  * which reside as files in a single directory available to the {@link com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver}.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
 
@@ -131,20 +127,20 @@
             dn = cert.getSubjectDN().getName();
             added = true;
          } catch (FileNotFoundException ex) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
+            log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
          } catch (IOException ex) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
+            log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
          } catch (CertificateNotYetValidException ex) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
+            log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
          } catch (CertificateExpiredException ex) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
+            log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
          } catch (CertificateException ex) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
+            log.log(java.util.logging.Level.FINE, "Could not add certificate from file " + filename, ex);
          }
 
          if (added) {
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Added certificate: " + dn);
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Added certificate: " + dn);
          }
       }
    }
@@ -157,9 +153,10 @@
    /**
     * Class FilesystemIterator
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
-   class FilesystemIterator implements Iterator {
+   private static class FilesystemIterator implements Iterator {
 
       /** Field _certs */
       List _certs = null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.storage.implementations;
 
-
-
 import java.security.KeyStore;
 import java.security.KeyStoreException;
 import java.security.cert.X509Certificate;
@@ -37,7 +34,7 @@
  * Makes the Certificates from a JAVA {@link KeyStore} object available to the
  * {@link com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver}.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class KeyStoreResolver extends StorageResolverSpi {
 
@@ -66,9 +63,10 @@
    /**
     * Class KeyStoreIterator
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
-   class KeyStoreIterator implements Iterator {
+   static class KeyStoreIterator implements Iterator {
 
       /** Field _keyStore */
       KeyStore _keyStore = null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.keys.storage.implementations;
 
-
-
 import java.security.cert.X509Certificate;
 import java.util.Iterator;
 
@@ -33,7 +30,7 @@
  * This {@link StorageResolverSpi} makes a single {@link X509Certificate}
  * available to the {@link com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver}.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class SingleCertificateResolver extends StorageResolverSpi {
 
@@ -61,9 +58,10 @@
    /**
     * Class InternalIterator
     *
-    * @author $Author: raul $
+    * @author $Author: mullan $
+    * @version $Revision: 1.5 $
     */
-   class InternalIterator implements Iterator {
+   static class InternalIterator implements Iterator {
 
       /** Field _alreadyReturned */
       boolean _alreadyReturned = false;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd	Wed Jul 05 16:42:37 2017 +0200
@@ -1,73 +1,73 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
-
-<!ATTLIST Configuration  xmlns CDATA  #FIXED 'http://www.xmlsecurity.org/NS/#configuration' 
-target        CDATA  #IMPLIED>
-<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
-
-<!ATTLIST CanonicalizationMethods  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
-<!ELEMENT CanonicalizationMethod EMPTY>
-
-<!ATTLIST CanonicalizationMethod  URI       CDATA  #REQUIRED
-                                    JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
-
-<!ATTLIST TransformAlgorithms  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
-<!ELEMENT TransformAlgorithm EMPTY>
-
-<!ATTLIST TransformAlgorithm  URI       CDATA  #REQUIRED
-                                JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
-
-<!ELEMENT Providers (Provider+)>
-
-<!ELEMENT Provider EMPTY>
-
-<!ATTLIST Provider  Id          ID     #REQUIRED
-                      Class       CDATA  #REQUIRED
-                      Info        CDATA  #IMPLIED
-                      ProviderURL CDATA  #IMPLIED >
-<!ELEMENT Algorithms (Algorithm+)>
-
-<!ELEMENT Algorithm (ProviderAlgo+)>
-
-<!ATTLIST Algorithm  URI            CDATA  #REQUIRED
-                       Description    CDATA  #IMPLIED
-                       AlgorithmClass CDATA  #IMPLIED >
-<!ELEMENT ProviderAlgo EMPTY>
-
-<!ATTLIST ProviderAlgo  ProviderId IDREF  #REQUIRED
-                          JCEName    CDATA  #REQUIRED
-                          JCEAlias   CDATA  #IMPLIED >
-<!ELEMENT Log4J EMPTY>
-
-<!ATTLIST Log4J  configFile CDATA  'data/log4j.xml' >
-<!ELEMENT ResourceBundles (ResourceBundle+)>
-
-<!ATTLIST ResourceBundles  defaultLanguageCode CDATA  'de'
-                             defaultCountryCode  CDATA  'DE' >
-<!ELEMENT ResourceBundle EMPTY>
-
-<!ATTLIST ResourceBundle  LanguageCode CDATA  #REQUIRED
-                            CountryCode  CDATA  #REQUIRED
-                            LOCATION     CDATA  #REQUIRED >
-<!ELEMENT UnitTests (UnitTest+)>
-
-<!ATTLIST UnitTests  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
-<!ELEMENT ResourceResolvers (Resolver+)>
-
-<!ELEMENT Resolver EMPTY>
-
-<!ATTLIST Resolver  JAVACLASS   CDATA  #REQUIRED
-                      DESCRIPTION CDATA  #IMPLIED >
-<!ELEMENT KeyResolvers (KeyResolver+)>
-<!ATTLIST KeyResolvers  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
-
-<!ELEMENT KeyResolver EMPTY>
-
-<!ATTLIST KeyResolver  URI       CDATA  #REQUIRED
-                         JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT UnitTest (#PCDATA)>
-
-<!ATTLIST UnitTest  JAVACLASS CDATA  #REQUIRED >
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
+
+<!ATTLIST Configuration  xmlns CDATA  #FIXED 'http://www.xmlsecurity.org/NS/#configuration' 
+target        CDATA  #IMPLIED>
+<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
+
+<!ATTLIST CanonicalizationMethods  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
+<!ELEMENT CanonicalizationMethod EMPTY>
+
+<!ATTLIST CanonicalizationMethod  URI       CDATA  #REQUIRED
+                                    JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
+
+<!ATTLIST TransformAlgorithms  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
+<!ELEMENT TransformAlgorithm EMPTY>
+
+<!ATTLIST TransformAlgorithm  URI       CDATA  #REQUIRED
+                                JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
+
+<!ELEMENT Providers (Provider+)>
+
+<!ELEMENT Provider EMPTY>
+
+<!ATTLIST Provider  Id          ID     #REQUIRED
+                      Class       CDATA  #REQUIRED
+                      Info        CDATA  #IMPLIED
+                      ProviderURL CDATA  #IMPLIED >
+<!ELEMENT Algorithms (Algorithm+)>
+
+<!ELEMENT Algorithm (ProviderAlgo+)>
+
+<!ATTLIST Algorithm  URI            CDATA  #REQUIRED
+                       Description    CDATA  #IMPLIED
+                       AlgorithmClass CDATA  #IMPLIED >
+<!ELEMENT ProviderAlgo EMPTY>
+
+<!ATTLIST ProviderAlgo  ProviderId IDREF  #REQUIRED
+                          JCEName    CDATA  #REQUIRED
+                          JCEAlias   CDATA  #IMPLIED >
+<!ELEMENT Log4J EMPTY>
+
+<!ATTLIST Log4J  configFile CDATA  'data/log4j.xml' >
+<!ELEMENT ResourceBundles (ResourceBundle+)>
+
+<!ATTLIST ResourceBundles  defaultLanguageCode CDATA  'de'
+                             defaultCountryCode  CDATA  'DE' >
+<!ELEMENT ResourceBundle EMPTY>
+
+<!ATTLIST ResourceBundle  LanguageCode CDATA  #REQUIRED
+                            CountryCode  CDATA  #REQUIRED
+                            LOCATION     CDATA  #REQUIRED >
+<!ELEMENT UnitTests (UnitTest+)>
+
+<!ATTLIST UnitTests  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
+<!ELEMENT ResourceResolvers (Resolver+)>
+
+<!ELEMENT Resolver EMPTY>
+
+<!ATTLIST Resolver  JAVACLASS   CDATA  #REQUIRED
+                      DESCRIPTION CDATA  #IMPLIED >
+<!ELEMENT KeyResolvers (KeyResolver+)>
+<!ATTLIST KeyResolvers  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
+
+<!ELEMENT KeyResolver EMPTY>
+
+<!ATTLIST KeyResolver  URI       CDATA  #REQUIRED
+                         JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT UnitTest (#PCDATA)>
+
+<!ATTLIST UnitTest  JAVACLASS CDATA  #REQUIRED >
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml	Wed Jul 05 16:42:37 2017 +0200
@@ -1,380 +1,399 @@
-<?xml version="1.0"?>
-<!--
-<!DOCTYPE Configuration SYSTEM "config.dtd">
--->
-<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
-<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
-   <CanonicalizationMethods>
-      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
-      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
-
-      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
-      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
-   </CanonicalizationMethods>
-   <TransformAlgorithms>
-      <!-- Base64 -->
-      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
-      <!-- c14n omitting comments -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
-      <!-- c14n with comments -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
-      <!-- exclusive c14n omitting comments -->
-      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
-      <!-- exclusive c14n with comments -->
-      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
-
-      <!-- XPath transform -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
-      <!-- enveloped signature -->
-      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
-      <!-- XSLT -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
-      <!-- XPath version 2 -->
-      <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
-      <!-- XPath version 2b -->
-      <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
-   </TransformAlgorithms>
-   <SignatureAlgorithms>
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
-
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
-
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
-   </SignatureAlgorithms>
-   <JCEAlgorithmMappings>
-      <Algorithms>
-         <!-- MessageDigest Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
-                    Description="MD5 message digest from RFC 1321"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="MD5"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
-                    Description="RIPEMD-160 message digest"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    JCEName="RIPEMD160"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
-                    Description="SHA-1 message digest"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="REQUIRED"
-                    JCEName="SHA-1"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
-                    Description="SHA-1 message digest with 256 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="RECOMMENDED"
-                    JCEName="SHA-256"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
-                    Description="SHA message digest with 384 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA-384"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
-                    Description="SHA-1 message digest with 512 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    JCEName="SHA-512"/>
-
-         <!-- Signature Algorithms -->
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
-                    Description="Digital Signature Algorithm with SHA-1 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="REQUIRED"
-                    JCEName="SHA1withDSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
-                    Description="RSA Signature with MD5 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="MD5withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
-                    Description="RSA Signature with RIPEMD-160 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="RIPEMD160withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
-                    Description="RSA Signature with SHA-1 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="RECOMMENDED"
-                    JCEName="SHA1withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
-                    Description="RSA Signature with SHA-256 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA256withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
-                    Description="RSA Signature with SHA-384 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA384withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
-                    Description="RSA Signature with SHA-512 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA512withRSA"/>
-
-         <!-- MAC Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
-                    Description="Message Authentication code using MD5"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacMD5"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
-                    Description="Message Authentication code using RIPEMD-160"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HMACRIPEMD160"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
-                    Description="Message Authentication code using SHA1"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="REQUIRED"
-                    JCEName="HmacSHA1"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
-                    Description="Message Authentication code using SHA-256"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA256"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
-                    Description="Message Authentication code using SHA-384"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA384"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
-                    Description="Message Authentication code using SHA-512"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA512"/>
-
-         <!-- Block encryption Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
-                    Description="Block encryption using Triple-DES"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="192"
-                    RequiredKey="DESede"
-                    JCEName="DESede/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
-                    Description="Block encryption using AES with a key length of 128 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="128"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
-                    Description="Block encryption using AES with a key length of 192 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="OPTIONAL"
-                    KeyLength="192"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
-                    Description="Block encryption using AES with a key length of 256 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="256"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
-                    Description="Key Transport RSA-v1.5"
-                    AlgorithmClass="KeyTransport"
-                    RequirementLevel="REQUIRED"
-                    RequiredKey="RSA"
-                    JCEName="RSA/ECB/PKCS1Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
-                    Description="Key Transport RSA-OAEP"
-                    AlgorithmClass="KeyTransport"
-                    RequirementLevel="REQUIRED"
-                    RequiredKey="RSA"
-                    JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
-                    Description="Key Agreement Diffie-Hellman"
-                    AlgorithmClass="KeyAgreement"
-                    RequirementLevel="OPTIONAL"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
-                    Description="Symmetric Key Wrap using Triple DES"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="192"
-                    RequiredKey="DESede"
-                    JCEName="DESedeWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
-                    Description="Symmetric Key Wrap using AES with a key length of 128 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="128"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
-                    Description="Symmetric Key Wrap using AES with a key length of 192 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="OPTIONAL"
-                    KeyLength="192"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
-                    Description="Symmetric Key Wrap using AES with a key length of 256 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="256"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-      </Algorithms>
-   </JCEAlgorithmMappings>
-   <ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
-      <ResourceBundle LanguageCode="en"
-                      CountryCode="US"
-                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
-      <ResourceBundle LanguageCode="de"
-                      CountryCode="DE"
-                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
-   </ResourceBundles>
-   <ResourceResolvers>
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
-                DESCRIPTION="A simple resolver for requests to HTTP space" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
-                DESCRIPTION="A simple resolver for requests to the local file system" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
-                DESCRIPTION="A simple resolver for requests of same-document URIs" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
-                DESCRIPTION="A simple resolver for requests of XPointer fragents" />
-   </ResourceResolvers>
-   <!-- <defaultLocale languageCode="en" countryCode="US" /> -->
-   <KeyInfo>
-      <ContentHandler LOCALNAME="KeyName"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
-      <ContentHandler LOCALNAME="KeyValue"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
-      <ContentHandler LOCALNAME="RetrievalMethod"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
-      <ContentHandler LOCALNAME="X509Data"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
-      <ContentHandler LOCALNAME="PGPData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
-      <ContentHandler LOCALNAME="SPKIData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
-      <ContentHandler LOCALNAME="MgmtData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
-   </KeyInfo>
-   <KeyResolver>
-      <!-- This section contains a list of KeyResolvers that are available in
-           every KeyInfo object -->
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
-                DESCRIPTION="Can extract RSA public keys" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
-                DESCRIPTION="Can extract DSA public keys" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
-                DESCRIPTION="Can extract public keys from X509 certificates" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
-                DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
-                DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
-                DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
-                DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
-   </KeyResolver>
- 
-   <PrefixMappings>
-      <!-- Many classes create Elements which are in a specific namespace;
-           here, the prefixes for these namespaces are defined. But this
-           can also be overwritten using the ElementProxy#setDefaultPrefix()
-           method. You can even set all prefixes to "" so that the corresponding
-           elements are created using the default namespace -->
-      <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
-                     prefix="ds" />
-      <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
-                     prefix="xenc" />
-      <PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
-                     prefix="experimental" />
-      <PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
-                     prefix="dsig-xpath-old" />
-      <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
-                     prefix="dsig-xpath" />
-      <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
-                     prefix="ec" />
-      <PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
-                     prefix="xx" />
-   </PrefixMappings>
-</Configuration>
+<?xml version="1.0"?>
+<!--
+<!DOCTYPE Configuration SYSTEM "config.dtd">
+-->
+<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
+<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
+   <CanonicalizationMethods>
+      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
+      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
+
+      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
+      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
+      <CanonicalizationMethod URI="http://www.w3.org/2006/12/xml-c14n11"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_OmitComments"/>
+      <CanonicalizationMethod URI="http://www.w3.org/2006/12/xml-c14n11#WithComments"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_WithComments"/>
+   </CanonicalizationMethods>
+   <TransformAlgorithms>
+      <!-- Base64 -->
+      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
+      <!-- c14n omitting comments -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
+      <!-- c14n with comments -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
+      <!-- c14n 1.1 omitting comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N11" />
+      <!-- c14n 1.1 with comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11#WithComments"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N11_WithComments" />
+      <!-- exclusive c14n omitting comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
+      <!-- exclusive c14n with comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
+
+      <!-- XPath transform -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
+      <!-- enveloped signature -->
+      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
+      <!-- XSLT -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
+      <!-- XPath version 2 -->
+      <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
+      <!-- XPath version 2b -->
+      <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
+   </TransformAlgorithms>
+   <SignatureAlgorithms>
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
+
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureECDSA$SignatureECDSASHA1" />
+
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
+   </SignatureAlgorithms>
+   <JCEAlgorithmMappings>
+      <Algorithms>
+         <!-- MessageDigest Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
+                    Description="MD5 message digest from RFC 1321"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="MD5"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
+                    Description="RIPEMD-160 message digest"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    JCEName="RIPEMD160"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
+                    Description="SHA-1 message digest"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="REQUIRED"
+                    JCEName="SHA-1"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
+                    Description="SHA-1 message digest with 256 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="RECOMMENDED"
+                    JCEName="SHA-256"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
+                    Description="SHA message digest with 384 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA-384"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
+                    Description="SHA-1 message digest with 512 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    JCEName="SHA-512"/>
+
+         <!-- Signature Algorithms -->
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+                    Description="Digital Signature Algorithm with SHA-1 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="REQUIRED"
+                    JCEName="SHA1withDSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+                    Description="RSA Signature with MD5 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="MD5withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+                    Description="RSA Signature with RIPEMD-160 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="RIPEMD160withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+                    Description="RSA Signature with SHA-1 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="RECOMMENDED"
+                    JCEName="SHA1withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+                    Description="RSA Signature with SHA-256 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA256withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+                    Description="RSA Signature with SHA-384 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA384withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+                    Description="RSA Signature with SHA-512 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA512withRSA"/>
+                    
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
+                    Description="ECDSA Signature with SHA-1 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="ECDSAwithSHA1"/>
+
+         <!-- MAC Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+                    Description="Message Authentication code using MD5"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacMD5"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+                    Description="Message Authentication code using RIPEMD-160"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HMACRIPEMD160"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+                    Description="Message Authentication code using SHA1"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="REQUIRED"
+                    JCEName="HmacSHA1"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+                    Description="Message Authentication code using SHA-256"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA256"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+                    Description="Message Authentication code using SHA-384"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA384"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+                    Description="Message Authentication code using SHA-512"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA512"/>
+
+         <!-- Block encryption Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
+                    Description="Block encryption using Triple-DES"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="192"
+                    RequiredKey="DESede"
+                    JCEName="DESede/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
+                    Description="Block encryption using AES with a key length of 128 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="128"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
+                    Description="Block encryption using AES with a key length of 192 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="OPTIONAL"
+                    KeyLength="192"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+                    Description="Block encryption using AES with a key length of 256 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="256"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+                    Description="Key Transport RSA-v1.5"
+                    AlgorithmClass="KeyTransport"
+                    RequirementLevel="REQUIRED"
+                    RequiredKey="RSA"
+                    JCEName="RSA/ECB/PKCS1Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
+                    Description="Key Transport RSA-OAEP"
+                    AlgorithmClass="KeyTransport"
+                    RequirementLevel="REQUIRED"
+                    RequiredKey="RSA"
+                    JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
+                    Description="Key Agreement Diffie-Hellman"
+                    AlgorithmClass="KeyAgreement"
+                    RequirementLevel="OPTIONAL"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
+                    Description="Symmetric Key Wrap using Triple DES"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="192"
+                    RequiredKey="DESede"
+                    JCEName="DESedeWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
+                    Description="Symmetric Key Wrap using AES with a key length of 128 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="128"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
+                    Description="Symmetric Key Wrap using AES with a key length of 192 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="OPTIONAL"
+                    KeyLength="192"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
+                    Description="Symmetric Key Wrap using AES with a key length of 256 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="256"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+      </Algorithms>
+   </JCEAlgorithmMappings>
+   <ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
+      <ResourceBundle LanguageCode="en"
+                      CountryCode="US"
+                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
+      <ResourceBundle LanguageCode="de"
+                      CountryCode="DE"
+                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
+   </ResourceBundles>
+   <ResourceResolvers>
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
+                DESCRIPTION="A simple resolver for requests to HTTP space" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
+                DESCRIPTION="A simple resolver for requests to the local file system" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
+                DESCRIPTION="A simple resolver for requests of same-document URIs" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
+                DESCRIPTION="A simple resolver for requests of XPointer fragents" />
+   </ResourceResolvers>
+   <!-- <defaultLocale languageCode="en" countryCode="US" /> -->
+   <KeyInfo>
+      <ContentHandler LOCALNAME="KeyName"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
+      <ContentHandler LOCALNAME="KeyValue"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
+      <ContentHandler LOCALNAME="RetrievalMethod"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
+      <ContentHandler LOCALNAME="X509Data"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
+      <ContentHandler LOCALNAME="PGPData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
+      <ContentHandler LOCALNAME="SPKIData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
+      <ContentHandler LOCALNAME="MgmtData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
+   </KeyInfo>
+   <KeyResolver>
+      <!-- This section contains a list of KeyResolvers that are available in
+           every KeyInfo object -->
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
+                DESCRIPTION="Can extract RSA public keys" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
+                DESCRIPTION="Can extract DSA public keys" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
+                DESCRIPTION="Can extract public keys from X509 certificates" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
+                DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
+                DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
+                DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
+                DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
+   </KeyResolver>
+ 
+   <PrefixMappings>
+      <!-- Many classes create Elements which are in a specific namespace;
+           here, the prefixes for these namespaces are defined. But this
+           can also be overwritten using the ElementProxy#setDefaultPrefix()
+           method. You can even set all prefixes to "" so that the corresponding
+           elements are created using the default namespace -->
+      <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
+                     prefix="ds" />
+      <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
+                     prefix="xenc" />
+      <PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
+                     prefix="experimental" />
+      <PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
+                     prefix="dsig-xpath-old" />
+      <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
+                     prefix="dsig-xpath" />
+      <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
+                     prefix="ec" />
+      <PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
+                     prefix="xx" />
+   </PrefixMappings>
+</Configuration>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd	Wed Jul 05 16:42:37 2017 +0200
@@ -1,347 +1,347 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
-<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
-	<xsd:element name="Any" type="AnyType"/>
-	<xsd:complexType name="AnyType" mixed="true">
-		<xsd:sequence>
-			<xsd:any namespace="##any"/>
-		</xsd:sequence>
-		<xsd:anyAttribute namespace="##any"/>
-	</xsd:complexType>
-	<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
-	<xsd:complexType name="ObjectIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="Identifier" type="IdentifierType"/>
-			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="IdentifierType">
-		<xsd:simpleContent>
-			<xsd:extension base="xsd:anyURI">
-				<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
-			</xsd:extension>
-		</xsd:simpleContent>
-	</xsd:complexType>
-	<xsd:simpleType name="QualifierType">
-		<xsd:restriction base="xsd:string">
-			<xsd:enumeration value="OIDAsURI"/>
-			<xsd:enumeration value="OIDAsURN"/>
-		</xsd:restriction>
-	</xsd:simpleType>
-	<xsd:complexType name="DocumentationReferencesType">
-		<xsd:sequence maxOccurs="unbounded">
-			<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
-	<xsd:complexType name="EncapsulatedPKIDataType">
-		<xsd:simpleContent>
-			<xsd:extension base="xsd:base64Binary">
-				<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-			</xsd:extension>
-		</xsd:simpleContent>
-	</xsd:complexType>
-	<xsd:element name="TimeStamp" type="TimeStampType"/>
-	<xsd:complexType name="TimeStampType">
-		<xsd:sequence>
-			<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
-			<xsd:choice>
-				<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
-				<xsd:element name="XMLTimeStamp" type="AnyType"/>
-			</xsd:choice>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="HashDataInfoType">
-		<xsd:sequence>
-			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
-	</xsd:complexType>
-	<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
-	<xsd:complexType name="QualifyingPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
-			<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
-	<xsd:complexType name="SignedPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
-			<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
-	<xsd:complexType name="UnsignedPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
-			<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
-	<xsd:complexType name="SignedSignaturePropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SigningTime" type="xsd:dateTime"/>
-			<xsd:element name="SigningCertificate" type="CertIDListType"/>
-			<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
-			<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
-			<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
-	<xsd:complexType name="SignedDataObjectPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
-	<xsd:complexType name="UnsignedSignaturePropertiesType">
-		<xsd:sequence>
-			<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
-			<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
-			<xsd:choice>
-				<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-				<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			</xsd:choice>
-			<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
-			<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
-			<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
-	<xsd:complexType name="UnsignedDataObjectPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
-	<xsd:complexType name="QualifyingPropertiesReferenceType">
-		<xsd:sequence>
-			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SigningTime" type="xsd:dateTime"/>
-	<xsd:element name="SigningCertificate" type="CertIDListType"/>
-	<xsd:complexType name="CertIDListType">
-		<xsd:sequence>
-			<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CertIDType">
-		<xsd:sequence>
-			<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
-			<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="DigestAlgAndValueType">
-		<xsd:sequence>
-			<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
-			<xsd:element name="DigestValue" type="ds:DigestValueType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
-	<xsd:complexType name="SignaturePolicyIdentifierType">
-		<xsd:choice>
-			<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
-			<xsd:element name="SignaturePolicyImplied"/>
-		</xsd:choice>
-	</xsd:complexType>
-	<xsd:complexType name="SignaturePolicyIdType">
-		<xsd:sequence>
-			<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
-			<xsd:element ref="ds:Transforms" minOccurs="0"/>
-			<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
-			<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="SigPolicyQualifiersListType">
-		<xsd:sequence>
-			<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SPURI" type="xsd:anyURI"/>
-	<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
-	<xsd:complexType name="SPUserNoticeType">
-		<xsd:sequence>
-			<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
-			<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="NoticeReferenceType">
-		<xsd:sequence>
-			<xsd:element name="Organization" type="xsd:string"/>
-			<xsd:element name="NoticeNumbers" type="IntegerListType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="IntegerListType">
-		<xsd:sequence>
-			<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="CounterSignature" type="CounterSignatureType"/>
-	<xsd:complexType name="CounterSignatureType">
-		<xsd:sequence>
-			<xsd:element ref="ds:Signature"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
-	<xsd:complexType name="DataObjectFormatType">
-		<xsd:sequence>
-			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
-			<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
-	</xsd:complexType>
-	<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
-	<xsd:complexType name="CommitmentTypeIndicationType">
-		<xsd:sequence>
-			<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
-			<xsd:choice>
-				<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
-				<xsd:element name="AllSignedDataObjects"/>
-			</xsd:choice>
-			<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CommitmentTypeQualifiersListType">
-		<xsd:sequence>
-			<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
-	<xsd:complexType name="SignatureProductionPlaceType">
-		<xsd:sequence>
-			<xsd:element name="City" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignerRole" type="SignerRoleType"/>
-	<xsd:complexType name="SignerRoleType">
-		<xsd:sequence>
-			<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
-			<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="ClaimedRolesListType">
-		<xsd:sequence>
-			<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CertifiedRolesListType">
-		<xsd:sequence>
-			<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
-	<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
-	<xsd:complexType name="CompleteCertificateRefsType">
-		<xsd:sequence>
-			<xsd:element name="CertRefs" type="CertIDListType"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
-	<xsd:complexType name="CompleteRevocationRefsType">
-		<xsd:sequence>
-			<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
-			<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
-			<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="CRLRefsType">
-		<xsd:sequence>
-			<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CRLRefType">
-		<xsd:sequence>
-			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
-			<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CRLIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="Issuer" type="xsd:string"/>
-			<xsd:element name="IssueTime" type="xsd:dateTime"/>
-			<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPRefsType">
-		<xsd:sequence>
-			<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPRefType">
-		<xsd:sequence>
-			<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
-			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="ResponderID" type="xsd:string"/>
-			<xsd:element name="ProducedAt" type="xsd:dateTime"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="OtherCertStatusRefsType">
-		<xsd:sequence>
-			<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
-	<xsd:element name="CertificateValues" type="CertificateValuesType"/>
-	<xsd:complexType name="CertificateValuesType">
-		<xsd:choice minOccurs="0" maxOccurs="unbounded">
-			<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
-			<xsd:element name="OtherCertificate" type="AnyType"/>
-		</xsd:choice>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="RevocationValues" type="RevocationValuesType"/>
-	<xsd:complexType name="RevocationValuesType">
-		<xsd:sequence>
-			<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
-			<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
-			<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="CRLValuesType">
-		<xsd:sequence>
-			<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPValuesType">
-		<xsd:sequence>
-			<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OtherCertStatusValuesType">
-		<xsd:sequence>
-			<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
+	<xsd:element name="Any" type="AnyType"/>
+	<xsd:complexType name="AnyType" mixed="true">
+		<xsd:sequence>
+			<xsd:any namespace="##any"/>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##any"/>
+	</xsd:complexType>
+	<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
+	<xsd:complexType name="ObjectIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="Identifier" type="IdentifierType"/>
+			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="IdentifierType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:anyURI">
+				<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:simpleType name="QualifierType">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="OIDAsURI"/>
+			<xsd:enumeration value="OIDAsURN"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:complexType name="DocumentationReferencesType">
+		<xsd:sequence maxOccurs="unbounded">
+			<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
+	<xsd:complexType name="EncapsulatedPKIDataType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:base64Binary">
+				<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="TimeStamp" type="TimeStampType"/>
+	<xsd:complexType name="TimeStampType">
+		<xsd:sequence>
+			<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
+			<xsd:choice>
+				<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+				<xsd:element name="XMLTimeStamp" type="AnyType"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="HashDataInfoType">
+		<xsd:sequence>
+			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
+	<xsd:complexType name="QualifyingPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
+			<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
+	<xsd:complexType name="SignedPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+			<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
+	<xsd:complexType name="UnsignedPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
+			<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+	<xsd:complexType name="SignedSignaturePropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SigningTime" type="xsd:dateTime"/>
+			<xsd:element name="SigningCertificate" type="CertIDListType"/>
+			<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+			<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
+			<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
+	<xsd:complexType name="SignedDataObjectPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
+	<xsd:complexType name="UnsignedSignaturePropertiesType">
+		<xsd:sequence>
+			<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
+			<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
+			<xsd:choice>
+				<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+				<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+			<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
+			<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
+			<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
+	<xsd:complexType name="UnsignedDataObjectPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
+	<xsd:complexType name="QualifyingPropertiesReferenceType">
+		<xsd:sequence>
+			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SigningTime" type="xsd:dateTime"/>
+	<xsd:element name="SigningCertificate" type="CertIDListType"/>
+	<xsd:complexType name="CertIDListType">
+		<xsd:sequence>
+			<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CertIDType">
+		<xsd:sequence>
+			<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
+			<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="DigestAlgAndValueType">
+		<xsd:sequence>
+			<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
+			<xsd:element name="DigestValue" type="ds:DigestValueType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+	<xsd:complexType name="SignaturePolicyIdentifierType">
+		<xsd:choice>
+			<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
+			<xsd:element name="SignaturePolicyImplied"/>
+		</xsd:choice>
+	</xsd:complexType>
+	<xsd:complexType name="SignaturePolicyIdType">
+		<xsd:sequence>
+			<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
+			<xsd:element ref="ds:Transforms" minOccurs="0"/>
+			<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
+			<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="SigPolicyQualifiersListType">
+		<xsd:sequence>
+			<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SPURI" type="xsd:anyURI"/>
+	<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
+	<xsd:complexType name="SPUserNoticeType">
+		<xsd:sequence>
+			<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
+			<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="NoticeReferenceType">
+		<xsd:sequence>
+			<xsd:element name="Organization" type="xsd:string"/>
+			<xsd:element name="NoticeNumbers" type="IntegerListType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="IntegerListType">
+		<xsd:sequence>
+			<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="CounterSignature" type="CounterSignatureType"/>
+	<xsd:complexType name="CounterSignatureType">
+		<xsd:sequence>
+			<xsd:element ref="ds:Signature"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
+	<xsd:complexType name="DataObjectFormatType">
+		<xsd:sequence>
+			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
+			<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
+	<xsd:complexType name="CommitmentTypeIndicationType">
+		<xsd:sequence>
+			<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
+			<xsd:choice>
+				<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+				<xsd:element name="AllSignedDataObjects"/>
+			</xsd:choice>
+			<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CommitmentTypeQualifiersListType">
+		<xsd:sequence>
+			<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
+	<xsd:complexType name="SignatureProductionPlaceType">
+		<xsd:sequence>
+			<xsd:element name="City" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignerRole" type="SignerRoleType"/>
+	<xsd:complexType name="SignerRoleType">
+		<xsd:sequence>
+			<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
+			<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="ClaimedRolesListType">
+		<xsd:sequence>
+			<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CertifiedRolesListType">
+		<xsd:sequence>
+			<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
+	<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+	<xsd:complexType name="CompleteCertificateRefsType">
+		<xsd:sequence>
+			<xsd:element name="CertRefs" type="CertIDListType"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+	<xsd:complexType name="CompleteRevocationRefsType">
+		<xsd:sequence>
+			<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
+			<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
+			<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="CRLRefsType">
+		<xsd:sequence>
+			<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CRLRefType">
+		<xsd:sequence>
+			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
+			<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CRLIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="Issuer" type="xsd:string"/>
+			<xsd:element name="IssueTime" type="xsd:dateTime"/>
+			<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPRefsType">
+		<xsd:sequence>
+			<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPRefType">
+		<xsd:sequence>
+			<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
+			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="ResponderID" type="xsd:string"/>
+			<xsd:element name="ProducedAt" type="xsd:dateTime"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="OtherCertStatusRefsType">
+		<xsd:sequence>
+			<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
+	<xsd:element name="CertificateValues" type="CertificateValuesType"/>
+	<xsd:complexType name="CertificateValuesType">
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
+			<xsd:element name="OtherCertificate" type="AnyType"/>
+		</xsd:choice>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="RevocationValues" type="RevocationValuesType"/>
+	<xsd:complexType name="RevocationValuesType">
+		<xsd:sequence>
+			<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
+			<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
+			<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="CRLValuesType">
+		<xsd:sequence>
+			<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPValuesType">
+		<xsd:sequence>
+			<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OtherCertStatusValuesType">
+		<xsd:sequence>
+			<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
+</xsd:schema>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.dtd	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.dtd	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
     Joseph Reagle $last changed 20001215$
 
     http://www.w3.org/2000/09/xmldsig#
-    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
+    $Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
 
     Copyright 2001 The Internet Society and W3C (Massachusetts Institute
     of Technology, Institut National de Recherche en Informatique et en
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.xsd	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.xsd	Wed Jul 05 16:42:37 2017 +0200
@@ -11,7 +11,7 @@
 
 <!-- Schema for XML Signatures
     http://www.w3.org/2000/09/xmldsig#
-    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
+    $Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
 
     Copyright 2001 The Internet Society and W3C (Massachusetts Institute
     of Technology, Institut National de Recherche en Informatique et en
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -1,123 +1,123 @@
-algorithm.alreadyRegistered = URI {0} already assigned to class {1}
-algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
-algorithm.ClassDoesNotExist = Class {0} does not exist
-algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
-algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
-algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
-algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
-algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
-algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
-algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
-algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
-algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
-algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
-attributeValueIllegal = The attribute {0} has value {1} but must be {2}
-c14n.Canonicalizer.Exception = Exception during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
-c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
-c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
-c14n.Canonicalizer.SAXException = SAXException during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
-c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
-c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
-c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
-certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
-certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
-certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
-defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
-ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
-empty = {0}
-encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
-encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
-encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
-encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
-encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
-encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
-encryption.RSAOAEP.dataHashWrong = data hash wrong
-encryption.RSAOAEP.dataStartWrong = data wrong start {0}
-encryption.RSAOAEP.dataTooShort = data too short
-encryption.RSAPKCS15.blockTruncated = block truncated
-encryption.RSAPKCS15.noDataInBlock = no data in block
-encryption.RSAPKCS15.unknownBlockType = unknown block type
-encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
-endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
-errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
-errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
-errorMessages.IOException = Other file I/O and similar exceptions.
-errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
-errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
-errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
-errorMessages.NotYetImplementedException = Functionality not yet there.
-errorMessages.XMLSignatureException = Verification failed for some other reason.
-decoding.divisible.four = It should be divisible by four
-decoding.general = Error while decoding
-FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
-FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
-FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
-FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
-generic.dontHaveConstructionElement = I do not have a construction Element
-generic.EmptyMessage = {0}
-generic.NotYetImplemented = {0} Not YET implemented ;-((
-java.security.InvalidKeyException = Invalid key
-java.security.NoSuchProviderException = Unknown or unsupported provider
-java.security.UnknownKeyType = Unknown or unsupported key type {0}
-KeyInfo.needKeyResolver = More than one keyResovler have to be registered
-KeyInfo.nokey = Cannot get key from {0}
-KeyInfo.noKey = Cannot get the public key
-KeyInfo.wrongNumberOfObject = Need {0} keyObjects
-KeyInfo.wrongUse = This object was made for getting {0}
-keyResolver.alreadyRegistered = {1} class has already been registered for {0}
-KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
-KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
-KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
-KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
-KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
-KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
-KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
-KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
-KeyResoverSpiImpl.wrongKeyObject =  Need {1} type of KeyObject for generation Element in implement class{0}
-KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
-KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
-KeyStore.register = {1} type class register error  in class {0}
-KeyStore.registerStore.register = Registeration error for type {0}
-KeyValue.IllegalArgument = Cannot create a {0} from {1}
-namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
-notYetInitialized = The module {0} is not yet initialized
-prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
-signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
-signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
-signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
-signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
-signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
-signature.Transform.NotYetImplemented = Transform {0} not yet implemented
-signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
-signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
-signature.Transform.node = Current Node: {0}
-signature.Transform.nodeAndType = Current Node: {0}, type: {1} 
-signature.Util.BignumNonPositive = bigInteger.signum() must be positive
-signature.Util.NonTextNode = Not a text node
-signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
-signature.Verification.certificateError = Certificate error
-signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
-signature.Verification.internalError = Internal error
-signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
-signature.Verification.keyStore = KeyStore error
-signature.Verification.MissingID = Cannot resolve element with ID {0}
-signature.Verification.MissingResources = Cannot resolve external resource {0}
-signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
-signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
-signature.Verification.SignatureError = Signature error
-signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
-signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
-signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
-transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
-transform.init.NotInitialized =
-transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
-utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
-Base64Decoding = Error while decoding
-utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
-xml.WrongContent = Cannot find {0} in {1}
-xml.WrongElement = Cannot create a {0} from a {1} element
-xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
-xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}
+algorithm.alreadyRegistered = URI {0} already assigned to class {1}
+algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
+algorithm.ClassDoesNotExist = Class {0} does not exist
+algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
+algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
+algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
+algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
+algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
+algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
+algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
+algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
+algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
+algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
+attributeValueIllegal = The attribute {0} has value {1} but must be {2}
+c14n.Canonicalizer.Exception = Exception during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
+c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
+c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
+c14n.Canonicalizer.SAXException = SAXException during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
+c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
+c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
+c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
+certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
+certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
+certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
+defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
+ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
+empty = {0}
+encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
+encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
+encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
+encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
+encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
+encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
+encryption.RSAOAEP.dataHashWrong = data hash wrong
+encryption.RSAOAEP.dataStartWrong = data wrong start {0}
+encryption.RSAOAEP.dataTooShort = data too short
+encryption.RSAPKCS15.blockTruncated = block truncated
+encryption.RSAPKCS15.noDataInBlock = no data in block
+encryption.RSAPKCS15.unknownBlockType = unknown block type
+encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
+endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
+errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
+errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
+errorMessages.IOException = Other file I/O and similar exceptions.
+errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
+errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
+errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
+errorMessages.NotYetImplementedException = Functionality not yet there.
+errorMessages.XMLSignatureException = Verification failed for some other reason.
+decoding.divisible.four = It should be divisible by four
+decoding.general = Error while decoding
+FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
+FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
+FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
+FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
+generic.dontHaveConstructionElement = I do not have a construction Element
+generic.EmptyMessage = {0}
+generic.NotYetImplemented = {0} Not YET implemented ;-((
+java.security.InvalidKeyException = Invalid key
+java.security.NoSuchProviderException = Unknown or unsupported provider
+java.security.UnknownKeyType = Unknown or unsupported key type {0}
+KeyInfo.needKeyResolver = More than one keyResovler have to be registered
+KeyInfo.nokey = Cannot get key from {0}
+KeyInfo.noKey = Cannot get the public key
+KeyInfo.wrongNumberOfObject = Need {0} keyObjects
+KeyInfo.wrongUse = This object was made for getting {0}
+keyResolver.alreadyRegistered = {1} class has already been registered for {0}
+KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
+KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
+KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
+KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
+KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
+KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
+KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
+KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
+KeyResoverSpiImpl.wrongKeyObject =  Need {1} type of KeyObject for generation Element in implement class{0}
+KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
+KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
+KeyStore.register = {1} type class register error  in class {0}
+KeyStore.registerStore.register = Registeration error for type {0}
+KeyValue.IllegalArgument = Cannot create a {0} from {1}
+namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
+notYetInitialized = The module {0} is not yet initialized
+prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
+signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
+signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
+signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
+signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
+signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
+signature.Transform.NotYetImplemented = Transform {0} not yet implemented
+signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
+signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
+signature.Transform.node = Current Node: {0}
+signature.Transform.nodeAndType = Current Node: {0}, type: {1} 
+signature.Util.BignumNonPositive = bigInteger.signum() must be positive
+signature.Util.NonTextNode = Not a text node
+signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
+signature.Verification.certificateError = Certificate error
+signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
+signature.Verification.internalError = Internal error
+signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
+signature.Verification.keyStore = KeyStore error
+signature.Verification.MissingID = Cannot resolve element with ID {0}
+signature.Verification.MissingResources = Cannot resolve external resource {0}
+signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
+signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
+signature.Verification.SignatureError = Signature error
+signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
+signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
+signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
+transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
+transform.init.NotInitialized =
+transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
+utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
+Base64Decoding = Error while decoding
+utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
+xml.WrongContent = Cannot find {0} in {1}
+xml.WrongElement = Cannot create a {0} from a {1} element
+xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
+xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidDigestValueException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidDigestValueException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidSignatureValueException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidSignatureValueException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -68,14 +68,11 @@
    /** Field verificationResults[] */
    private boolean verificationResults[] = null;
 
-   /** Field _signedContents */
-   List _signedContents = new ArrayList();
-
    /** Field _resolverProperties */
-   HashMap _resolverProperties = new HashMap(10);
+   HashMap _resolverProperties = null;
 
    /** Field _perManifestResolvers */
-   List _perManifestResolvers = new ArrayList();
+   List _perManifestResolvers = null;
 
    /**
     * Consturts {@link Manifest}
@@ -144,8 +141,6 @@
            String BaseURI, String referenceURI, Transforms transforms, String digestURI, String ReferenceId, String ReferenceType)
               throws XMLSignatureException {
 
-      if (this._state == MODE_SIGN) {
-
          // the this._doc is handed implicitly by the this.getOwnerDocument()
          Reference ref = new Reference(this._doc, BaseURI, referenceURI, this,
                                        transforms, digestURI);
@@ -164,7 +159,6 @@
          // add the Element of the Reference object to the Manifest/SignedInfo
          this._constructionElement.appendChild(ref.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      }
    }
 
    /**
@@ -178,7 +172,6 @@
    public void generateDigestValues()
            throws XMLSignatureException, ReferenceNotInitializedException {
 
-      if (this._state == MODE_SIGN) {
          for (int i = 0; i < this.getLength(); i++) {
 
             // update the cached Reference object, the Element content is automatically updated
@@ -186,7 +179,6 @@
 
             currentRef.generateDigestValue();
          }
-      }
    }
 
    /**
@@ -208,11 +200,6 @@
     */
    public Reference item(int i) throws XMLSecurityException {
 
-      if (this._state == MODE_SIGN) {
-
-         // we already have real objects
-         return (Reference) this._references.get(i);
-      }
          if (this._references.get(i) == null) {
 
             // not yet constructed, so _we_ have to
@@ -232,7 +219,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if (Id != null) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -294,9 +281,9 @@
             XMLUtils.selectDsNodes(this._constructionElement.getFirstChild(),
                          Constants._TAG_REFERENCE);
       }
-          if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "verify " +_referencesEl.length + " References");
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I am " + (followManifests
+          if (log.isLoggable(java.util.logging.Level.FINE)) {
+                log.log(java.util.logging.Level.FINE, "verify " +_referencesEl.length + " References");
+        log.log(java.util.logging.Level.FINE, "I am " + (followManifests
                            ? ""
                            : "not") + " requested to follow nested Manifests");
       }
@@ -325,13 +312,13 @@
             if (!currentRefVerified) {
                verify = false;
             }
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "The Reference has Type " + currentRef.getType());
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "The Reference has Type " + currentRef.getType());
 
             // was verification successful till now and do we want to verify the Manifest?
             if (verify && followManifests
                     && currentRef.typeIsReferenceToManifest()) {
-               if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "We have to follow a nested Manifest");
+               log.log(java.util.logging.Level.FINE, "We have to follow a nested Manifest");
 
                 try {
                   XMLSignatureInput signedManifestNodes =
@@ -381,7 +368,7 @@
 
                      log.log(java.util.logging.Level.WARNING, "The nested Manifest was invalid (bad)");
                   } else {
-                     if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "The nested Manifest was valid (good)");
+                     log.log(java.util.logging.Level.FINE, "The nested Manifest was valid (good)");
                   }
                } catch (IOException ex) {
                   throw new ReferenceNotInitializedException("empty", ex);
@@ -458,9 +445,13 @@
     */
    public void addResourceResolver(ResourceResolver resolver) {
 
-      if (resolver != null) {
-         this._perManifestResolvers.add(resolver);
+      if (resolver == null) {
+          return;
       }
+      if (_perManifestResolvers==null)
+          _perManifestResolvers = new ArrayList();
+      this._perManifestResolvers.add(resolver);
+
    }
 
    /**
@@ -470,9 +461,13 @@
     */
    public void addResourceResolver(ResourceResolverSpi resolverSpi) {
 
-      if (resolverSpi != null) {
-         this._perManifestResolvers.add(new ResourceResolver(resolverSpi));
+      if (resolverSpi == null) {
+          return;
       }
+      if (_perManifestResolvers==null)
+                  _perManifestResolvers = new ArrayList();
+      this._perManifestResolvers.add(new ResourceResolver(resolverSpi));
+
    }
 
    /**
@@ -483,6 +478,9 @@
     * @param value the value
     */
    public void setResolverProperty(String key, String value) {
+           if (_resolverProperties==null) {
+                   _resolverProperties=new HashMap(10);
+           }
       this._resolverProperties.put(key, value);
    }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/NodeFilter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/NodeFilter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -31,8 +31,23 @@
         /**
          * Tells if a node must be outputed in c14n.
          * @param n
-         * @return true if node must be outputed, false otherwise.
+         * @return 1 if the node should be outputed.
+         *                 0 if node must not be outputed,
+         *                -1 if the node and all it's child must not be output.
+         *
          */
-        public boolean isNodeInclude(Node n);
+        public int isNodeInclude(Node n);
+        /**
+         * Tells if a node must be outputed in a c14n.
+         * The caller must assured that this method is always call
+         * in document order. The implementations can use this
+         * restriction to optimize the transformation.
+         * @param n
+         * @param level the relative level in the tree
+         * @return 1 if the node should be outputed.
+         *                 0 if node must not be outputed,
+         *                -1 if the node and all it's child must not be output.
+         */
+        public int isNodeIncludeDO(Node n, int level);
 
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.signature;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.IdResolver;
@@ -35,16 +33,11 @@
  * Handles <code>&lt;ds:Object&gt;</code> elements
  * <code>Object<code> {@link Element} supply facility which can contain any kind data
  *
- *
  * @author Christian Geuer-Pollmann
  * $todo$ if we remove childen, the boolean values are not updated
  */
 public class ObjectContainer extends SignatureElementProxy {
 
-   /** {@link java.util.logging} logging facility */
-   static java.util.logging.Logger log =
-       java.util.logging.Logger.getLogger(ObjectContainer.class.getName());
-
    /**
     * Constructs {@link ObjectContainer}
     *
@@ -75,7 +68,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ((Id != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -97,7 +90,7 @@
     */
    public void setMimeType(String MimeType) {
 
-      if ((this._state == MODE_SIGN) && (MimeType != null)) {
+      if ( (MimeType != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_MIMETYPE,
                                                 MimeType);
       }
@@ -119,7 +112,7 @@
     */
    public void setEncoding(String Encoding) {
 
-      if ((this._state == MODE_SIGN) && (Encoding != null)) {
+      if ((Encoding != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ENCODING,
                                                 Encoding);
       }
@@ -135,18 +128,16 @@
    }
 
    /**
-    * Adds childe Node
+    * Adds child Node
     *
-    * @param node childe Node
+    * @param node child Node
     * @return the new node in the tree.
     */
    public Node appendChild(Node node) {
 
       Node result = null;
 
-      if (this._state == MODE_SIGN) {
-         result = this._constructionElement.appendChild(node);
-      }
+      result = this._constructionElement.appendChild(node);
 
       return result;
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -25,6 +24,8 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -102,6 +103,32 @@
  */
 public class Reference extends SignatureElementProxy {
 
+   /**
+    * Look up useC14N11 system property. If true, an explicit C14N11 transform
+    * will be added if necessary when generating the signature. See section
+    * 3.1.1 of http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/ for more info.
+    */
+   private static boolean useC14N11 =
+      AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+         public Boolean run() {
+            return Boolean.getBoolean
+               ("com.sun.org.apache.xml.internal.security.useC14N11");
+         }
+      });
+
+/*
+   static {
+      try {
+         useC14N11 = Boolean.getBoolean("com.sun.org.apache.xml.internal.security.useC14N11");
+      } catch (Exception e) {
+         // ignore exceptions
+      }
+   }
+*/
+
+   /** Field CacheSignedNodes */
+   public final static boolean CacheSignedNodes = false;
+
    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(Reference.class.getName());
@@ -118,6 +145,12 @@
    XMLSignatureInput _transformsOutput;
    //J+
 
+private Transforms transforms;
+
+private Element digestMethodElem;
+
+private Element digestValueElement;
+
    /**
     * Constructor Reference
     *
@@ -148,6 +181,7 @@
       // this._manifest.appendChild(this._doc.createTextNode("\n"));
 
       if (transforms != null) {
+          this.transforms=transforms;
          this._constructionElement.appendChild(transforms.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
       }
@@ -156,11 +190,12 @@
             MessageDigestAlgorithm.getInstance(this._doc,
                                                messageDigestAlgorithm);
 
-         this._constructionElement.appendChild(mda.getElement());
+         digestMethodElem=mda.getElement();
+         this._constructionElement.appendChild(digestMethodElem);
          XMLUtils.addReturnToElement(this._constructionElement);
       }
       {
-         Element digestValueElement =
+         digestValueElement =
             XMLUtils.createElementInSignatureSpace(this._doc,
                                                    Constants._TAG_DIGESTVALUE);
 
@@ -182,7 +217,15 @@
            throws XMLSecurityException {
 
       super(element, BaseURI);
-
+      this._baseURI=BaseURI;
+      Element el=XMLUtils.getNextElement(element.getFirstChild());
+      if (Constants._TAG_TRANSFORMS.equals(el.getLocalName()) &&
+                  Constants.SignatureSpecNS.equals(el.getNamespaceURI())) {
+          transforms = new Transforms(el,this._baseURI);
+          el=XMLUtils.getNextElement(el.getNextSibling());
+      }
+      digestMethodElem = el;
+      digestValueElement =XMLUtils.getNextElement(digestMethodElem.getNextSibling());;
       this._manifest = manifest;
    }
 
@@ -197,9 +240,6 @@
    public MessageDigestAlgorithm getMessageDigestAlgorithm()
            throws XMLSignatureException {
 
-      Element digestMethodElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-            Constants._TAG_DIGESTMETHOD,0);
-
       if (digestMethodElem == null) {
          return null;
       }
@@ -221,7 +261,7 @@
     */
    public void setURI(String URI) {
 
-      if ((this._state == MODE_SIGN) && (URI != null)) {
+      if ( URI != null) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_URI,
                                                   URI);
       }
@@ -243,7 +283,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ( Id != null ) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -265,7 +305,7 @@
     */
    public void setType(String Type) {
 
-      if ((this._state == MODE_SIGN) && (Type != null)) {
+      if (Type != null) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_TYPE,
                                                   Type);
       }
@@ -291,8 +331,7 @@
     */
    public boolean typeIsReferenceToObject() {
 
-      if ((this.getType() != null)
-              && this.getType().equals(Reference.OBJECT_URI)) {
+      if (Reference.OBJECT_URI.equals(this.getType())) {
          return true;
       }
 
@@ -309,8 +348,7 @@
     */
    public boolean typeIsReferenceToManifest() {
 
-      if ((this.getType() != null)
-              && this.getType().equals(Reference.MANIFEST_URI)) {
+      if (Reference.MANIFEST_URI.equals(this.getType())) {
          return true;
       }
 
@@ -324,10 +362,6 @@
     */
    private void setDigestValueElement(byte[] digestValue)
    {
-
-      if (this._state == MODE_SIGN) {
-         Element digestValueElement =XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                 Constants._TAG_DIGESTVALUE,0);
          Node n=digestValueElement.getFirstChild();
          while (n!=null) {
                digestValueElement.removeChild(n);
@@ -338,7 +372,6 @@
          Text t = this._doc.createTextNode(base64codedValue);
 
          digestValueElement.appendChild(t);
-      }
    }
 
    /**
@@ -349,11 +382,7 @@
     */
    public void generateDigestValue()
            throws XMLSignatureException, ReferenceNotInitializedException {
-
-      if (this._state == MODE_SIGN) {
-
-         this.setDigestValueElement(this.calculateDigest());
-      }
+      this.setDigestValueElement(this.calculateDigest(false));
    }
 
    /**
@@ -608,9 +637,12 @@
           * but only preserve the octets, the memory footprint is dramatically
           * reduced.
           */
+         if (!Reference.CacheSignedNodes) {
 
-         this._transformsOutput = output;
+            this._transformsOutput = output;//new XMLSignatureInput(output.getBytes());
 
+            //this._transformsOutput.setSourceURI(output.getSourceURI());
+         }
          return output;
       } catch (XMLSecurityException ex) {
          throw new ReferenceNotInitializedException("empty", ex);
@@ -630,16 +662,7 @@
            throws XMLSignatureException, InvalidTransformException,
                   TransformationException, XMLSecurityException {
 
-      Element transformsElement = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-            Constants._TAG_TRANSFORMS,0);
-
-      if (transformsElement != null) {
-         Transforms transforms = new Transforms(transformsElement,
-                                                this._baseURI);
-
-         return transforms;
-      }
-       return null;
+      return transforms;
    }
 
    /**
@@ -667,13 +690,14 @@
 
 
    /**
-    * Method resolverResult
+    * Method calculateDigest
     *
+    * @param validating true if validating the reference
     * @return reference Calculate the digest of this reference.
     * @throws ReferenceNotInitializedException
     * @throws XMLSignatureException
     */
-   private byte[] calculateDigest()
+   private byte[] calculateDigest(boolean validating)
            throws ReferenceNotInitializedException, XMLSignatureException {
 
       try {
@@ -684,7 +708,20 @@
          DigesterOutputStream diOs=new DigesterOutputStream(mda);
          OutputStream os=new UnsyncBufferedOutputStream(diOs);
          XMLSignatureInput output=this.dereferenceURIandPerformTransforms(os);
-         output.updateOutputStream(os);
+         // if signing and c14n11 property == true explicitly add
+         // C14N11 transform if needed
+         if (this.useC14N11 && !validating &&
+             !output.isOutputStreamSet() && !output.isOctetStream()) {
+             if (transforms == null) {
+                 transforms = new Transforms(this._doc);
+                 this._constructionElement.insertBefore
+                     (transforms.getElement(), digestMethodElem);
+             }
+             transforms.addTransform(Transforms.TRANSFORM_C14N11_OMIT_COMMENTS);
+             output.updateOutputStream(os, true);
+         } else {
+             output.updateOutputStream(os);
+         }
          os.flush();
          //this.getReferencedBytes(diOs);
          //mda.update(data);
@@ -694,7 +731,7 @@
          throw new ReferenceNotInitializedException("empty", ex);
       } catch (IOException ex) {
          throw new ReferenceNotInitializedException("empty", ex);
-        }
+      }
    }
 
    /**
@@ -702,12 +739,10 @@
     *
     * @return the digest value.
     * @throws Base64DecodingException if Reference contains no proper base64 encoded data.
-        * @throws XMLSecurityException if the Reference does not contain a DigestValue element
+    * @throws XMLSecurityException if the Reference does not contain a DigestValue element
     */
    public byte[] getDigestValue() throws Base64DecodingException, XMLSecurityException {
-      Element digestValueElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild()
-            ,Constants._TAG_DIGESTVALUE,0);
-          if (digestValueElem == null) {
+      if (digestValueElement == null) {
                   // The required element is not in the XML!
                   Object[] exArgs ={ Constants._TAG_DIGESTVALUE,
                                                          Constants.SignatureSpecNS };
@@ -715,7 +750,7 @@
                                         "signature.Verification.NoSignatureElement",
                                         exArgs);
           }
-      byte[] elemDig = Base64.decode(digestValueElem);
+      byte[] elemDig = Base64.decode(digestValueElement);
       return elemDig;
    }
 
@@ -731,13 +766,15 @@
            throws ReferenceNotInitializedException, XMLSecurityException {
 
       byte[] elemDig = this.getDigestValue();
-      byte[] calcDig = this.calculateDigest();
+      byte[] calcDig = this.calculateDigest(true);
       boolean equal = MessageDigestAlgorithm.isEqual(elemDig, calcDig);
 
       if (!equal) {
          log.log(java.util.logging.Level.WARNING, "Verification failed for URI \"" + this.getURI() + "\"");
+         log.log(java.util.logging.Level.WARNING, "Expected Digest: " + Base64.encode(elemDig));
+         log.log(java.util.logging.Level.WARNING, "Actual Digest: " + Base64.encode(calcDig));
       } else {
-         if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "Verification successful for URI \"" + this.getURI() + "\"");
+         log.log(java.util.logging.Level.INFO, "Verification successful for URI \"" + this.getURI() + "\"");
       }
 
       return equal;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/ReferenceNotInitializedException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/ReferenceNotInitializedException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.signature;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.IdResolver;
@@ -42,10 +40,6 @@
  */
 public class SignatureProperties extends SignatureElementProxy {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(SignatureProperties.class.getName());
-
    /**
     * Constructor SignatureProperties
     *
@@ -115,7 +109,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ((Id != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java	Wed Jul 05 16:42:37 2017 +0200
@@ -30,18 +30,13 @@
 
 /**
  * Handles <code>&lt;ds:SignatureProperty&gt;</code> elements
- * Addittional information item concerning the generation of the signature(s) can
+ * Additional information item concerning the generation of the signature(s) can
  * be placed in this Element
  *
  * @author Christian Geuer-Pollmann
  */
 public class SignatureProperty extends SignatureElementProxy {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(
-                            SignatureProperty.class.getName());
-
    /**
     * Constructs{@link SignatureProperty} using specified <code>Target</code> attribute
     *
@@ -85,7 +80,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ((Id != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -107,7 +102,7 @@
     */
    public void setTarget(String Target) {
 
-      if ((this._state == MODE_SIGN) && (Target != null)) {
+      if ((Target != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_TARGET, Target);
       }
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,12 +20,9 @@
  */
 package com.sun.org.apache.xml.internal.security.signature;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-
 import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
 import javax.xml.parsers.ParserConfigurationException;
@@ -43,165 +40,174 @@
 import org.w3c.dom.Node;
 import org.xml.sax.SAXException;
 
-
 /**
  * Handles <code>&lt;ds:SignedInfo&gt;</code> elements
  * This <code>SignedInfo<code> element includes the canonicalization algorithm,
- * a signature algorithm, and one or more references
+ * a signature algorithm, and one or more references.
+ *
  * @author Christian Geuer-Pollmann
  */
 public class SignedInfo extends Manifest {
 
-   /** Field _signatureAlgorithm */
-   private SignatureAlgorithm _signatureAlgorithm = null;
+    /** Field _signatureAlgorithm */
+    private SignatureAlgorithm _signatureAlgorithm = null;
 
-   /** Field _c14nizedBytes           */
-   private byte[] _c14nizedBytes = null;
+    /** Field _c14nizedBytes           */
+    private byte[] _c14nizedBytes = null;
+
+    private Element c14nMethod;
+    private Element signatureMethod;
 
-   /**
-    * Overwrites {@link Manifest#addDocument} because it creates another Element.
-    *
-    * @param doc the {@link Document} in which <code>XMLsignature</code> will be placed
-    * @throws XMLSecurityException
-    */
-   public SignedInfo(Document doc) throws XMLSecurityException {
-      this(doc, XMLSignature.ALGO_ID_SIGNATURE_DSA, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);
-   }
+    /**
+     * Overwrites {@link Manifest#addDocument} because it creates another
+     * Element.
+     *
+     * @param doc the {@link Document} in which <code>XMLsignature</code> will
+     *    be placed
+     * @throws XMLSecurityException
+     */
+    public SignedInfo(Document doc) throws XMLSecurityException {
+        this(doc, XMLSignature.ALGO_ID_SIGNATURE_DSA,
+             Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);
+    }
 
-   /**
-    * Constructs {@link SignedInfo} using given Canoicaliztion algorithm and Signature algorithm
-    *
-    * @param doc <code>SignedInfo</code> is placed in this document
-    * @param CanonicalizationMethodURI URI representation of the Canonicalization method
-    * @param SignatureMethodURI URI representation of the Digest and Signature algorithm
-    * @throws XMLSecurityException
-    */
-   public SignedInfo(
-           Document doc, String SignatureMethodURI, String CanonicalizationMethodURI)
+    /**
+     * Constructs {@link SignedInfo} using given Canonicalization algorithm and
+     * Signature algorithm.
+     *
+     * @param doc <code>SignedInfo</code> is placed in this document
+     * @param signatureMethodURI URI representation of the Digest and
+     *    Signature algorithm
+     * @param canonicalizationMethodURI URI representation of the
+     *    Canonicalization method
+     * @throws XMLSecurityException
+     */
+    public SignedInfo(Document doc, String signatureMethodURI,
+        String canonicalizationMethodURI)
               throws XMLSecurityException {
-      this(doc, SignatureMethodURI, 0, CanonicalizationMethodURI);
-   }
+        this(doc, signatureMethodURI, 0, canonicalizationMethodURI);
+    }
 
-   /**
-    * Constructor SignedInfo
-    *
-    * @param doc
-    * @param CanonicalizationMethodURI
-    * @param SignatureMethodURI
-    * @param HMACOutputLength
-    * @throws XMLSecurityException
-    */
-   public SignedInfo(
-           Document doc, String SignatureMethodURI, int HMACOutputLength, String CanonicalizationMethodURI)
+    /**
+     * Constructor SignedInfo
+     *
+     * @param doc <code>SignedInfo</code> is placed in this document
+     * @param signatureMethodURI URI representation of the Digest and
+     *    Signature algorithm
+     * @param hMACOutputLength
+     * @param canonicalizationMethodURI URI representation of the
+     *    Canonicalization method
+     * @throws XMLSecurityException
+     */
+    public SignedInfo(Document doc, String signatureMethodURI,
+        int hMACOutputLength, String canonicalizationMethodURI)
               throws XMLSecurityException {
 
-      super(doc);
+        super(doc);
 
-      // XMLUtils.addReturnToElement(this._constructionElement);
-      {
-         Element canonElem = XMLUtils.createElementInSignatureSpace(this._doc,
+        c14nMethod = XMLUtils.createElementInSignatureSpace(this._doc,
                                 Constants._TAG_CANONICALIZATIONMETHOD);
 
-         canonElem.setAttributeNS(null, Constants._ATT_ALGORITHM,
-                                CanonicalizationMethodURI);
-         this._constructionElement.appendChild(canonElem);
-         XMLUtils.addReturnToElement(this._constructionElement);
-      }
-      {
-         if (HMACOutputLength > 0) {
+        c14nMethod.setAttributeNS(null, Constants._ATT_ALGORITHM,
+                                  canonicalizationMethodURI);
+        this._constructionElement.appendChild(c14nMethod);
+        XMLUtils.addReturnToElement(this._constructionElement);
+
+        if (hMACOutputLength > 0) {
             this._signatureAlgorithm = new SignatureAlgorithm(this._doc,
-                    SignatureMethodURI, HMACOutputLength);
-         } else {
+                    signatureMethodURI, hMACOutputLength);
+        } else {
             this._signatureAlgorithm = new SignatureAlgorithm(this._doc,
-                    SignatureMethodURI);
-         }
+                    signatureMethodURI);
+        }
 
-         this._constructionElement
-            .appendChild(this._signatureAlgorithm.getElement());
-         XMLUtils.addReturnToElement(this._constructionElement);
-      }
-   }
+        signatureMethod = this._signatureAlgorithm.getElement();
+        this._constructionElement.appendChild(signatureMethod);
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * @param doc
-    * @param SignatureMethodElem
-    * @param CanonicalizationMethodElem
-    * @throws XMLSecurityException
-    */
-   public SignedInfo(
-           Document doc, Element SignatureMethodElem, Element CanonicalizationMethodElem)
-              throws XMLSecurityException {
+    /**
+     * @param doc
+     * @param signatureMethodElem
+     * @param canonicalizationMethodElem
+     * @throws XMLSecurityException
+     */
+    public SignedInfo(Document doc, Element signatureMethodElem,
+        Element canonicalizationMethodElem) throws XMLSecurityException {
 
-      super(doc);
-
-      this._constructionElement.appendChild(CanonicalizationMethodElem);
-      XMLUtils.addReturnToElement(this._constructionElement);
+        super(doc);
+        // Check this?
+        this.c14nMethod = canonicalizationMethodElem;
+        this._constructionElement.appendChild(c14nMethod);
+        XMLUtils.addReturnToElement(this._constructionElement);
 
-      this._signatureAlgorithm = new SignatureAlgorithm(SignatureMethodElem, null);
+        this._signatureAlgorithm =
+            new SignatureAlgorithm(signatureMethodElem, null);
 
-      this._constructionElement
-         .appendChild(this._signatureAlgorithm.getElement());
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+        signatureMethod = this._signatureAlgorithm.getElement();
+        this._constructionElement.appendChild(signatureMethod);
+
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * Build a {@link SignedInfo} from an {@link Element}
-    *
-    * @param element <code>SignedInfo</code>
-    * @param BaseURI the URI of the resource where the XML instance was stored
-    * @throws XMLSecurityException
-    * @see <A HREF="http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001OctDec/0033.html">Question</A>
-    * @see <A HREF="http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001OctDec/0054.html">Answer</A>
-    */
-   public SignedInfo(Element element, String BaseURI)
+    /**
+     * Build a {@link SignedInfo} from an {@link Element}
+     *
+     * @param element <code>SignedInfo</code>
+     * @param baseURI the URI of the resource where the XML instance was stored
+     * @throws XMLSecurityException
+     * @see <A HREF="http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001OctDec/0033.html">Question</A>
+     * @see <A HREF="http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2001OctDec/0054.html">Answer</A>
+     */
+    public SignedInfo(Element element, String baseURI)
            throws XMLSecurityException {
 
-      // Parse the Reference children and Id attribute in the Manifest
-      super(element, BaseURI);
+        // Parse the Reference children and Id attribute in the Manifest
+        super(element, baseURI);
 
-      /* canonicalize ds:SignedInfo, reparse it into a new document
-       * and replace the original not-canonicalized ds:SignedInfo by
-       * the re-parsed canonicalized one.
-       */
-      String c14nMethodURI=this.getCanonicalizationMethodURI();
-     if (!(c14nMethodURI.equals("http://www.w3.org/TR/2001/REC-xml-c14n-20010315") ||
-                c14nMethodURI.equals("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments") ||
-                        c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#") ||
-                        c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#WithComments"))) {
-        //The c14n is not a secure one and can rewrite the URIs or like that reparse the SignedInfo to be sure
-      try {
-         Canonicalizer c14nizer =
-            Canonicalizer.getInstance(this.getCanonicalizationMethodURI());
-
-         this._c14nizedBytes =
-            c14nizer.canonicalizeSubtree(this._constructionElement);
-         javax.xml.parsers.DocumentBuilderFactory dbf =
-            javax.xml.parsers.DocumentBuilderFactory.newInstance();
+        /* canonicalize ds:SignedInfo, reparse it into a new document
+         * and replace the original not-canonicalized ds:SignedInfo by
+         * the re-parsed canonicalized one.
+         */
+        c14nMethod = XMLUtils.getNextElement(element.getFirstChild());
+        String c14nMethodURI = this.getCanonicalizationMethodURI();
+        if (!(c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS) ||
+              c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS) ||
+              c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS) ||
+              c14nMethodURI.equals(Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS))) {
+            // the c14n is not a secure one and can rewrite the URIs or like
+            // that reparse the SignedInfo to be sure
+            try {
+                Canonicalizer c14nizer =
+                Canonicalizer.getInstance(this.getCanonicalizationMethodURI());
 
-         dbf.setNamespaceAware(true);
+                this._c14nizedBytes =
+                    c14nizer.canonicalizeSubtree(this._constructionElement);
+                javax.xml.parsers.DocumentBuilderFactory dbf =
+                    javax.xml.parsers.DocumentBuilderFactory.newInstance();
+                dbf.setNamespaceAware(true);
+                javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
+                org.w3c.dom.Document newdoc =
+                    db.parse(new ByteArrayInputStream(this._c14nizedBytes));
+                Node imported =
+                    this._doc.importNode(newdoc.getDocumentElement(), true);
 
-         javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
-         org.w3c.dom.Document newdoc =
-            db.parse(new ByteArrayInputStream(this._c14nizedBytes));
-         Node imported = this._doc.importNode(newdoc.getDocumentElement(),
-                                              true);
-
-         this._constructionElement.getParentNode().replaceChild(imported,
-                 this._constructionElement);
+                this._constructionElement.getParentNode().replaceChild(imported,
+                    this._constructionElement);
 
-         this._constructionElement = (Element) imported;
-      } catch (ParserConfigurationException ex) {
-         throw new XMLSecurityException("empty", ex);
-      } catch (IOException ex) {
-         throw new XMLSecurityException("empty", ex);
-      } catch (SAXException ex) {
-         throw new XMLSecurityException("empty", ex);
-      }
-      }
-      this._signatureAlgorithm =
-         new SignatureAlgorithm(this.getSignatureMethodElement(),
-                                this.getBaseURI());
-   }
+                this._constructionElement = (Element) imported;
+            } catch (ParserConfigurationException ex) {
+                throw new XMLSecurityException("empty", ex);
+            } catch (IOException ex) {
+                throw new XMLSecurityException("empty", ex);
+            } catch (SAXException ex) {
+                throw new XMLSecurityException("empty", ex);
+            }
+        }
+        signatureMethod = XMLUtils.getNextElement(c14nMethod.getNextSibling());
+        this._signatureAlgorithm =
+            new SignatureAlgorithm(signatureMethod, this.getBaseURI());
+    }
 
    /**
     * Tests core validation process
@@ -294,12 +300,8 @@
     */
    public String getCanonicalizationMethodURI() {
 
-    Element el= XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-     Constants._TAG_CANONICALIZATIONMETHOD,0);
-     if (el==null) {
-        return null;
-     }
-     return el.getAttributeNS(null, Constants._ATT_ALGORITHM);
+
+     return c14nMethod.getAttributeNS(null, Constants._ATT_ALGORITHM);
    }
 
    /**
@@ -324,8 +326,7 @@
     *
     */
    public Element getSignatureMethodElement() {
-      return XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-        Constants._TAG_SIGNATUREMETHOD,0);
+           return signatureMethod;
    }
 
    /**
@@ -343,6 +344,9 @@
                                   .getJCEAlgorithmString());
    }
 
+   protected SignatureAlgorithm getSignatureAlgorithm() {
+           return _signatureAlgorithm;
+   }
    /**
     * Method getBaseLocalName
     * @inheritDoc
@@ -354,21 +358,16 @@
 
    public String getInclusiveNamespaces() {
 
-    Element el= XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-     Constants._TAG_CANONICALIZATIONMETHOD,0);
-     if (el==null) {
-        return null;
-     }
+
 
-     String c14nMethodURI = el.getAttributeNS(null, Constants._ATT_ALGORITHM);
+     String c14nMethodURI = c14nMethod.getAttributeNS(null, Constants._ATT_ALGORITHM);
      if(!(c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#") ||
                         c14nMethodURI.equals("http://www.w3.org/2001/10/xml-exc-c14n#WithComments"))) {
                 return null;
             }
 
-     Element inclusiveElement = XMLUtils.selectNode(
-             el.getFirstChild(),InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
-        InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);
+     Element inclusiveElement = XMLUtils.getNextElement(
+                 c14nMethod.getFirstChild());
 
      if(inclusiveElement != null)
      {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Wed Jul 05 16:42:37 2017 +0200
@@ -75,7 +75,7 @@
  * <li>sign and checkSignatureValue methods are used to sign and validate the
  * signature. </li></ul>
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public final class XMLSignature extends SignatureElementProxy {
 
@@ -115,6 +115,10 @@
    public static final String ALGO_ID_MAC_HMAC_SHA384 = Constants.MoreAlgorithmsSpecNS + "hmac-sha384";
    /** HMAC - Optional HMAC-SHA512 */
    public static final String ALGO_ID_MAC_HMAC_SHA512 = Constants.MoreAlgorithmsSpecNS + "hmac-sha512";
+   /**Signature - Optional ECDSAwithSHA1 */
+   public static final String ALGO_ID_SIGNATURE_ECDSA_SHA1 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
+
+
    //J+
 
    /** ds:Signature.ds:SignedInfo element */
@@ -130,6 +134,8 @@
     */
    private boolean _followManifestsDuringValidation = false;
 
+private Element signatureValueElement;
+
   /**
     * This creates a new <CODE>ds:Signature</CODE> Element and adds an empty
     * <CODE>ds:SignedInfo</CODE>.
@@ -195,6 +201,15 @@
 
       super(doc);
 
+      String xmlnsDsPrefix =
+         getDefaultPrefixBindings(Constants.SignatureSpecNS);
+      if (xmlnsDsPrefix == null) {
+         this._constructionElement.setAttributeNS
+            (Constants.NamespaceSpecNS, "xmlns", Constants.SignatureSpecNS);
+      } else {
+         this._constructionElement.setAttributeNS
+            (Constants.NamespaceSpecNS, xmlnsDsPrefix, Constants.SignatureSpecNS);
+      }
       XMLUtils.addReturnToElement(this._constructionElement);
 
       this._baseURI = BaseURI;
@@ -206,7 +221,7 @@
       XMLUtils.addReturnToElement(this._constructionElement);
 
       // create an empty SignatureValue; this is filled by setSignatureValueElement
-      Element signatureValueElement =
+      signatureValueElement =
          XMLUtils.createElementInSignatureSpace(this._doc,
                                                 Constants._TAG_SIGNATUREVALUE);
 
@@ -227,6 +242,15 @@
 
       super(doc);
 
+      String xmlnsDsPrefix =
+         getDefaultPrefixBindings(Constants.SignatureSpecNS);
+      if (xmlnsDsPrefix == null) {
+         this._constructionElement.setAttributeNS
+            (Constants.NamespaceSpecNS, "xmlns", Constants.SignatureSpecNS);
+      } else {
+         this._constructionElement.setAttributeNS
+            (Constants.NamespaceSpecNS, xmlnsDsPrefix, Constants.SignatureSpecNS);
+      }
       XMLUtils.addReturnToElement(this._constructionElement);
 
       this._baseURI = BaseURI;
@@ -236,7 +260,7 @@
       XMLUtils.addReturnToElement(this._constructionElement);
 
       // create an empty SignatureValue; this is filled by setSignatureValueElement
-      Element signatureValueElement =
+      signatureValueElement =
          XMLUtils.createElementInSignatureSpace(this._doc,
                                                 Constants._TAG_SIGNATUREVALUE);
 
@@ -259,8 +283,8 @@
       super(element, BaseURI);
 
       // check out SignedInfo child
-      Element signedInfoElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                                  Constants._TAG_SIGNEDINFO,0);
+      Element signedInfoElem = XMLUtils.getNextElement(element.getFirstChild());// XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
+                                  //Constants._TAG_SIGNEDINFO,0);
 
       // check to see if it is there
       if (signedInfoElem == null) {
@@ -274,8 +298,8 @@
       this._signedInfo = new SignedInfo(signedInfoElem, BaseURI);
 
       // check out SignatureValue child
-      Element signatureValueElement = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                                         Constants._TAG_SIGNATUREVALUE,0);
+      this.signatureValueElement =XMLUtils.getNextElement(signedInfoElem.getNextSibling()); //XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
+                                       //  Constants._TAG_SIGNATUREVALUE,0);
 
       // check to see if it exists
       if (signatureValueElement == null) {
@@ -286,11 +310,12 @@
       }
 
       // <element ref="ds:KeyInfo" minOccurs="0"/>
-      Element keyInfoElem =XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                               Constants._TAG_KEYINFO,0);
+      Element keyInfoElem = XMLUtils.getNextElement(signatureValueElement.getNextSibling());//XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
+                              // Constants._TAG_KEYINFO,0);
 
       // If it exists use it, but it's not mandatory
-      if (keyInfoElem != null) {
+      if ((keyInfoElem != null) && (keyInfoElem.getNamespaceURI().equals(Constants.SignatureSpecNS) &&
+                  keyInfoElem.getLocalName().equals(Constants._TAG_KEYINFO)) ) {
          this._keyInfo = new KeyInfo(keyInfoElem, BaseURI);
       }
    }
@@ -302,7 +327,7 @@
     */
    public void setId(String Id) {
 
-      if ((this._state == MODE_SIGN) && (Id != null)) {
+      if ( (Id != null)) {
          this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
          IdResolver.registerElementById(this._constructionElement, Id);
       }
@@ -336,9 +361,7 @@
    public byte[] getSignatureValue() throws XMLSignatureException {
 
       try {
-         Element signatureValueElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                                         Constants._TAG_SIGNATUREVALUE,0);
-         byte[] signatureValue = Base64.decode(signatureValueElem);
+          byte[] signatureValue = Base64.decode(signatureValueElement);
 
          return signatureValue;
       } catch (Base64DecodingException ex) {
@@ -346,33 +369,28 @@
       }
    }
 
-   /**
-    * Base64 encodes and sets the bytes as the content of the SignatureValue
-    * Node.
-    *
-    * @param bytes bytes to be used by SignatureValue before Base64 encoding
-    */
-   private void setSignatureValueElement(byte[] bytes)
-   {
+    /**
+     * Base64 encodes and sets the bytes as the content of the SignatureValue
+     * Node.
+     *
+     * @param bytes bytes to be used by SignatureValue before Base64 encoding
+     */
+    private void setSignatureValueElement(byte[] bytes) {
 
-      if (this._state == MODE_SIGN) {
-         Element signatureValueElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
-                                         Constants._TAG_SIGNATUREVALUE,0);
-         while (signatureValueElem.hasChildNodes()) {
-            signatureValueElem.removeChild(signatureValueElem.getFirstChild());
-         }
+        while (signatureValueElement.hasChildNodes()) {
+            signatureValueElement.removeChild
+                (signatureValueElement.getFirstChild());
+        }
 
-         String base64codedValue = Base64.encode(bytes);
+        String base64codedValue = Base64.encode(bytes);
 
-         if (base64codedValue.length() > 76) {
+        if (base64codedValue.length() > 76 && !XMLUtils.ignoreLineBreaks()) {
             base64codedValue = "\n" + base64codedValue + "\n";
-         }
+        }
 
-         Text t = this._doc.createTextNode(base64codedValue);
-
-         signatureValueElem.appendChild(t);
-      }
-   }
+        Text t = this._doc.createTextNode(base64codedValue);
+        signatureValueElement.appendChild(t);
+    }
 
    /**
     * Returns the KeyInfo child. If we are in signing mode and the KeyInfo
@@ -385,7 +403,7 @@
    public KeyInfo getKeyInfo() {
 
       // check to see if we are signing and if we have to create a keyinfo
-      if ((this._state == MODE_SIGN) && (this._keyInfo == null)) {
+      if ( (this._keyInfo == null)) {
 
          // create the KeyInfo
          this._keyInfo = new KeyInfo(this._doc);
@@ -401,8 +419,7 @@
                // add it before the object
                this._constructionElement.insertBefore(keyInfoElement,
                                                       firstObject);
-               this._constructionElement
-                  .insertBefore(this._doc.createTextNode("\n"), firstObject);
+               XMLUtils.addReturnBeforeChild(this._constructionElement, firstObject);
             } else {
 
                // add it as the last element to the signature
@@ -425,17 +442,17 @@
    public void appendObject(ObjectContainer object)
            throws XMLSignatureException {
 
-      try {
-         if (this._state != MODE_SIGN) {
-            throw new XMLSignatureException(
-               "signature.operationOnlyBeforeSign");
-         }
+      //try {
+         //if (this._state != MODE_SIGN) {
+           // throw new XMLSignatureException(
+             //  "signature.operationOnlyBeforeSign");
+         //}
 
          this._constructionElement.appendChild(object.getElement());
          XMLUtils.addReturnToElement(this._constructionElement);
-      } catch (XMLSecurityException ex) {
-         throw new XMLSignatureException("empty", ex);
-      }
+      //} catch (XMLSecurityException ex) {
+        // throw new XMLSignatureException("empty", ex);
+      //}
    }
 
    /**
@@ -481,23 +498,13 @@
       }
 
       try {
-         if (this._state == MODE_SIGN) {
-
-            // XMLUtils.indentSignature(this._constructionElement, "   ", 0);
-            // get the SignatureMethodElement
-            Element signatureMethodElement =
-               this._signedInfo.getSignatureMethodElement();
-
+        // if (this._state == MODE_SIGN) {
             //Create a SignatureAlgorithm object
-            SignatureAlgorithm sa =
-               new SignatureAlgorithm(signatureMethodElement,
-                                      this.getBaseURI());
-
+                SignedInfo si = this.getSignedInfo();
+            SignatureAlgorithm sa = si.getSignatureAlgorithm();
             // initialize SignatureAlgorithm for signing
             sa.initSign(signingKey);
 
-            SignedInfo si = this.getSignedInfo();
-
             // generate digest values for all References in this SignedInfo
             si.generateDigestValues();
             OutputStream so=new UnsyncBufferedOutputStream(new SignerOutputStream(sa));
@@ -513,7 +520,7 @@
 
             // set them on the SignateValue element
             this.setSignatureValueElement(jcebytes);
-         }
+         //}
       } catch (CanonicalizationException ex) {
          throw new XMLSignatureException("empty", ex);
       } catch (InvalidCanonicalizerException ex) {
@@ -584,50 +591,45 @@
 
          throw new XMLSignatureException("empty", exArgs);
       }
-
       // all references inside the signedinfo need to be dereferenced and
       // digested again to see if the outcome matches the stored value in the
       // SignedInfo.
       // If _followManifestsDuringValidation is true it will do the same for
       // References inside a Manifest.
       try {
-         if (!this.getSignedInfo()
-                 .verify(this._followManifestsDuringValidation)) {
-            return false;
-         }
-
+         SignedInfo si=this.getSignedInfo();
          //create a SignatureAlgorithms from the SignatureMethod inside
          //SignedInfo. This is used to validate the signature.
-         SignatureAlgorithm sa =
-            new SignatureAlgorithm(this.getSignedInfo()
-               .getSignatureMethodElement(), this.getBaseURI());
-         if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "SignatureMethodURI = " + sa.getAlgorithmURI());
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "jceSigAlgorithm    = " + sa.getJCEAlgorithmString());
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "jceSigProvider     = " + sa.getJCEProviderName());
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "PublicKey = " + pk);
+         SignatureAlgorithm sa =si.getSignatureAlgorithm();
+         if (log.isLoggable(java.util.logging.Level.FINE)) {
+                log.log(java.util.logging.Level.FINE, "SignatureMethodURI = " + sa.getAlgorithmURI());
+                log.log(java.util.logging.Level.FINE, "jceSigAlgorithm    = " + sa.getJCEAlgorithmString());
+                log.log(java.util.logging.Level.FINE, "jceSigProvider     = " + sa.getJCEProviderName());
+                log.log(java.util.logging.Level.FINE, "PublicKey = " + pk);
          }
          sa.initVerify(pk);
 
          // Get the canonicalized (normalized) SignedInfo
          SignerOutputStream so=new SignerOutputStream(sa);
          OutputStream bos=new UnsyncBufferedOutputStream(so);
-         this._signedInfo.signInOctectStream(bos);
+         si.signInOctectStream(bos);
          try {
-                        bos.close();
-                } catch (IOException e) {
-                        //Imposible
-                }
+                bos.close();
+         } catch (IOException e) {
+                //Imposible
+         }
 
          //retrieve the byte[] from the stored signature
          byte sigBytes[] = this.getSignatureValue();
 
-
          //Have SignatureAlgorithm sign the input bytes and compare them to the
          //bytes that were stored in the signature.
-         boolean verify = sa.verify(sigBytes);
+         if (!sa.verify(sigBytes)) {
+            log.log(java.util.logging.Level.WARNING, "Signature verification failed.");
+            return false;
+         }
 
-         return verify;
+         return si.verify(this._followManifestsDuringValidation);
       } catch (XMLSecurityException ex) {
          throw new XMLSignatureException("empty", ex);
       }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,9 +2,8 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright  1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.signature;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -39,7 +36,9 @@
 import javax.xml.parsers.ParserConfigurationException;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
+import com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerBase;
 import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments;
+import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_OmitComments;
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityRuntimeException;
 import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
@@ -47,463 +46,483 @@
 import org.w3c.dom.Node;
 import org.xml.sax.SAXException;
 
-
 /**
  * Class XMLSignatureInput
  *
  * @author Christian Geuer-Pollmann
  * $todo$ check whether an XMLSignatureInput can be _both_, octet stream _and_ node set?
  */
-public class XMLSignatureInput  implements Cloneable {
-         static java.util.logging.Logger log =
-                java.util.logging.Logger.getLogger(XMLSignatureInput.class.getName());
+public class XMLSignatureInput implements Cloneable {
+    static java.util.logging.Logger log =
+        java.util.logging.Logger.getLogger
+            (XMLSignatureInput.class.getName());
 
-        /*
+    /*
      * The XMLSignature Input can be either:
      *   A byteArray like with/or without InputStream.
-     *   Or a  nodeSet like defined either:
-     *                     * as a collection of nodes
-     *                     * or as subnode excluding or not commets and excluding or
-     *                            not other nodes.
-         */
-   /**
-    * Some InputStreams do not support the {@link java.io.InputStream#reset}
-    * method, so we read it in completely and work on our Proxy.
-    */
-   InputStream _inputOctetStreamProxy = null;
-   /**
-    * The original NodeSet for this XMLSignatureInput
-    */
-   Set _inputNodeSet = null;
-   /**
-    * The original Element
-    */
-   Node _subNode=null;
-   /**
-    * Exclude Node *for enveloped transformations*
-    */
-   Node excludeNode=null;
-   /**
-    *
-    */
-   boolean excludeComments=false;
+     *   Or a nodeSet like defined either:
+     *       * as a collection of nodes
+     *       * or as subnode excluding or not commets and excluding or
+     *         not other nodes.
+     */
 
-   boolean isNodeSet=false;
-   /**
-    * A cached bytes
-    */
-   byte []bytes=null;
+    /**
+     * Some InputStreams do not support the {@link java.io.InputStream#reset}
+     * method, so we read it in completely and work on our Proxy.
+     */
+    InputStream _inputOctetStreamProxy = null;
+    /**
+     * The original NodeSet for this XMLSignatureInput
+     */
+    Set _inputNodeSet = null;
+    /**
+     * The original Element
+     */
+    Node _subNode=null;
+    /**
+     * Exclude Node *for enveloped transformations*
+     */
+    Node excludeNode=null;
+    /**
+     *
+     */
+    boolean excludeComments=false;
 
-   /**
-    * Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information. Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.
-    */
-   private String _MIMEType = null;
+    boolean isNodeSet=false;
+    /**
+     * A cached bytes
+     */
+    byte []bytes=null;
+
+    /**
+     * Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information. Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.
+     */
+    private String _MIMEType = null;
 
-   /**
-    * Field _SourceURI
-    */
-   private String _SourceURI = null;
+    /**
+     * Field _SourceURI
+     */
+    private String _SourceURI = null;
+
+    /**
+     * Node Filter list.
+     */
+    List nodeFilters=new ArrayList();
 
-   /**
-    * Node Filter list.
-    */
-   List nodeFilters=new ArrayList();
+    boolean needsToBeExpanded=false;
+    OutputStream outputStream=null;
 
-   boolean needsToBeExpanded=false;
-   /**
-    * Check if the structured is needed to be circumbented.
-    * @return true if so.
-    */
-   public boolean isNeedsToBeExpanded() {
-           return needsToBeExpanded;
-   }
+    /**
+     * Check if the structured is needed to be circumbented.
+     * @return true if so.
+     */
+    public boolean isNeedsToBeExpanded() {
+        return needsToBeExpanded;
+    }
 
-   /**
-    * Set if the structured is needed to be circumbented.
-    * @param needsToBeExpanded true if so.
-    */
-   public void setNeedsToBeExpanded(boolean needsToBeExpanded) {
+    /**
+     * Set if the structured is needed to be circumbented.
+     * @param needsToBeExpanded true if so.
+     */
+    public void setNeedsToBeExpanded(boolean needsToBeExpanded) {
         this.needsToBeExpanded = needsToBeExpanded;
-   }
-   OutputStream outputStream=null;
+    }
 
-   /**
-    * Construct a XMLSignatureInput from an octet array.
-    * <p>
-    * This is a comfort method, which internally converts the byte[] array into an InputStream
-    * <p>NOTE: no defensive copy</p>
-    * @param inputOctets an octet array which including XML document or node
-    */
-   public XMLSignatureInput(byte[] inputOctets) {
+    /**
+     * Construct a XMLSignatureInput from an octet array.
+     * <p>
+     * This is a comfort method, which internally converts the byte[] array into
+     * an InputStream
+     * <p>NOTE: no defensive copy</p>
+     * @param inputOctets an octet array which including XML document or node
+     */
+    public XMLSignatureInput(byte[] inputOctets) {
 
-      // NO  defensive copy
+        // NO  defensive copy
 
-      //this._inputOctetStreamProxy = new ByteArrayInputStream(inputOctets);
-      this.bytes=inputOctets;
-   }
-
+        //this._inputOctetStreamProxy = new ByteArrayInputStream(inputOctets);
+        this.bytes=inputOctets;
+    }
 
-      /**
-    * Constructs a <code>XMLSignatureInput</code> from an octet stream. The
-    * stream is directly read.
-    *
-    * @param inputOctetStream
-    */
-   public XMLSignatureInput(InputStream inputOctetStream)  {
-          this._inputOctetStreamProxy=inputOctetStream;
+    /**
+     * Constructs a <code>XMLSignatureInput</code> from an octet stream. The
+     * stream is directly read.
+     *
+     * @param inputOctetStream
+     */
+    public XMLSignatureInput(InputStream inputOctetStream)  {
+        this._inputOctetStreamProxy=inputOctetStream;
 
-      //this(JavaUtils.getBytesFromStream(inputOctetStream));
-
-   }
+        //this(JavaUtils.getBytesFromStream(inputOctetStream));
+    }
 
-   /**
-    * Construct a XMLSignatureInput from a String.
-    * <p>
-    * This is a comfort method, which internally converts the String into a byte[] array using the {@link java.lang.String#getBytes()} method.
-    * @deprecated
-    * @param inputStr the input String which including XML document or node
-    */
-   public XMLSignatureInput(String inputStr) {
-      this(inputStr.getBytes());
-   }
+    /**
+     * Construct a XMLSignatureInput from a String.
+     * <p>
+     * This is a comfort method, which internally converts the String into a byte
+     * [] array using the {@link java.lang.String#getBytes()} method.
+     * @deprecated
+     * @param inputStr the input String which including XML document or node
+     */
+    public XMLSignatureInput(String inputStr) {
+        this(inputStr.getBytes());
+    }
 
-   /**
-    * Construct a XMLSignatureInput from a String with a given encoding.
-    * <p>
-    * This is a comfort method, which internally converts the String into a byte[] array using the {@link java.lang.String#getBytes()} method.
-    *
-    * @deprecated
-    * @param inputStr the input String with encoding <code>encoding</code>
-    * @param encoding the encoding of <code>inputStr</code>
-    * @throws UnsupportedEncodingException
-    */
-   public XMLSignatureInput(String inputStr, String encoding)
+    /**
+     * Construct a XMLSignatureInput from a String with a given encoding.
+     * <p>
+     * This is a comfort method, which internally converts the String into a byte
+     * [] array using the {@link java.lang.String#getBytes()} method.
+     *
+     * @deprecated
+     * @param inputStr the input String with encoding <code>encoding</code>
+     * @param encoding the encoding of <code>inputStr</code>
+     * @throws UnsupportedEncodingException
+     */
+    public XMLSignatureInput(String inputStr, String encoding)
            throws UnsupportedEncodingException {
-      this(inputStr.getBytes(encoding));
-   }
+        this(inputStr.getBytes(encoding));
+    }
 
-   /**
-    * Construct a XMLSignatureInput from a subtree rooted by rootNode. This
-    * method included the node and <I>all</I> his descendants in the output.
-    *
-    * @param rootNode
-    */
-   public XMLSignatureInput(Node rootNode)
-   {
-      this._subNode = rootNode;
-   }
+    /**
+     * Construct a XMLSignatureInput from a subtree rooted by rootNode. This
+     * method included the node and <I>all</I> his descendants in the output.
+     *
+     * @param rootNode
+     */
+    public XMLSignatureInput(Node rootNode)
+    {
+        this._subNode = rootNode;
+    }
 
-   /**
-    * Constructor XMLSignatureInput
-    *
-    * @param inputNodeSet
-    * @param usedXPathAPI
-    */
-   public XMLSignatureInput(Set inputNodeSet) {
-       this._inputNodeSet = inputNodeSet;
-   }
+    /**
+     * Constructor XMLSignatureInput
+     *
+     * @param inputNodeSet
+     * @param usedXPathAPI
+     */
+    public XMLSignatureInput(Set inputNodeSet) {
+        this._inputNodeSet = inputNodeSet;
+    }
 
-   /**
-    * Returns the node set from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    *
-    * @return the node set
-    * @throws SAXException
-    * @throws IOException
-    * @throws ParserConfigurationException
-    * @throws CanonicalizationException
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws ParserConfigurationException
-    * @throws SAXException
-    */
-   public Set getNodeSet() throws CanonicalizationException, ParserConfigurationException, IOException, SAXException {
-              return getNodeSet(false);
-   }
-   /**
-    * Returns the node set from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    * @param circunvent
-    *
-    * @return the node set
-    * @throws SAXException
-    * @throws IOException
-    * @throws ParserConfigurationException
-    * @throws CanonicalizationException
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws ParserConfigurationException
-    * @throws SAXException
-    */
-   public Set getNodeSet(boolean circunvent)
+    /**
+     * Returns the node set from input which was specified as the parameter of
+     * {@link XMLSignatureInput} constructor
+     *
+     * @return the node set
+     * @throws SAXException
+     * @throws IOException
+     * @throws ParserConfigurationException
+     * @throws CanonicalizationException
+     */
+    public Set getNodeSet() throws CanonicalizationException,
+        ParserConfigurationException, IOException, SAXException {
+        return getNodeSet(false);
+    }
+
+    /**
+     * Returns the node set from input which was specified as the parameter of
+     * {@link XMLSignatureInput} constructor
+     * @param circumvent
+     *
+     * @return the node set
+     * @throws SAXException
+     * @throws IOException
+     * @throws ParserConfigurationException
+     * @throws CanonicalizationException
+     */
+    public Set getNodeSet(boolean circumvent)
            throws ParserConfigurationException, IOException, SAXException,
                   CanonicalizationException {
-      if (this._inputNodeSet!=null) {
-          return this._inputNodeSet;
-      }
-          if (this.isElement()) {
+        if (this._inputNodeSet!=null) {
+            return this._inputNodeSet;
+        }
+        if ((this._inputOctetStreamProxy==null)&& (this._subNode!=null) ) {
 
-                    if (circunvent) {
-                        XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(_subNode));
+            if (circumvent) {
+                XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(_subNode));
             }
             this._inputNodeSet = new HashSet();
             XMLUtils.getSet(_subNode,this._inputNodeSet, excludeNode, this.excludeComments);
 
-                    return this._inputNodeSet;
-          }
-       else if (this.isOctetStream()) {
-         convertToNodes();
-         HashSet result=new HashSet();
-         XMLUtils.getSet(_subNode, result,null,false);
+            return this._inputNodeSet;
+        } else if (this.isOctetStream()) {
+            convertToNodes();
+            HashSet result=new HashSet();
+            XMLUtils.getSet(_subNode, result,null,false);
             //this._inputNodeSet=result;
             return result;
-      }
+        }
 
-      throw new RuntimeException(
-         "getNodeSet() called but no input data present");
-   }
+        throw new RuntimeException(
+            "getNodeSet() called but no input data present");
+    }
 
-   /**
-    * Returns the Octect stream(byte Stream) from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    *
-    * @return the Octect stream(byte Stream) from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    * @throws IOException
-    */
-   public InputStream getOctetStream()
-           throws IOException  {
+    /**
+     * Returns the Octect stream(byte Stream) from input which was specified as
+     * the parameter of {@link XMLSignatureInput} constructor
+     *
+     * @return the Octect stream(byte Stream) from input which was specified as
+     * the parameter of {@link XMLSignatureInput} constructor
+     * @throws IOException
+     */
+    public InputStream getOctetStream() throws IOException  {
 
-      return getResetableInputStream();
+        return getResetableInputStream();
+    }
 
-   }
-   /**
+    /**
      * @return real octect stream
      */
     public InputStream getOctetStreamReal () {
-       return this._inputOctetStreamProxy;
-   }
-   /**
-    * Returns the byte array from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    *
-    * @return the byte[] from input which was specified as the parameter of {@link XMLSignatureInput} constructor
-    *
-    * @throws CanonicalizationException
-    * @throws IOException
-    */
-   public byte[] getBytes()
-           throws IOException, CanonicalizationException {
-    if (bytes!=null) {
-        return bytes;
-      }
-          InputStream is = getResetableInputStream();
-          if (is!=null) {
-        //reseatable can read again bytes.
-                if (bytes==null) {
-            is.reset();
-            bytes=JavaUtils.getBytesFromStream(is);
-                }
-                return bytes;
-      }
-         Canonicalizer20010315OmitComments c14nizer =
-                        new Canonicalizer20010315OmitComments();
+        return this._inputOctetStreamProxy;
+    }
+
+    /**
+     * Returns the byte array from input which was specified as the parameter of
+     * {@link XMLSignatureInput} constructor
+     *
+     * @return the byte[] from input which was specified as the parameter of
+     * {@link XMLSignatureInput} constructor
+     *
+     * @throws CanonicalizationException
+     * @throws IOException
+     */
+    public byte[] getBytes() throws IOException, CanonicalizationException {
+        if (bytes!=null) {
+            return bytes;
+        }
+        InputStream is = getResetableInputStream();
+        if (is!=null) {
+            //resetable can read again bytes.
+            if (bytes==null) {
+                is.reset();
+                bytes=JavaUtils.getBytesFromStream(is);
+            }
+            return bytes;
+        }
+        Canonicalizer20010315OmitComments c14nizer =
+                new Canonicalizer20010315OmitComments();
         bytes=c14nizer.engineCanonicalize(this);
         return bytes;
-   }
-
+    }
 
-   /**
-    * Determines if the object has been set up with a Node set
-    *
-    * @return true is the object has been set up with a Node set
-    */
-   public boolean isNodeSet() {
-      return (( (this._inputOctetStreamProxy == null)
+    /**
+     * Determines if the object has been set up with a Node set
+     *
+     * @return true if the object has been set up with a Node set
+     */
+    public boolean isNodeSet() {
+        return (( (this._inputOctetStreamProxy == null)
               && (this._inputNodeSet != null) ) || isNodeSet);
-   }
-   /**
-    * Determines if the object has been set up with an Element
-    *
-    * @return true is the object has been set up with a Node set
-    */
-   public boolean isElement() {
-                return ((this._inputOctetStreamProxy==null)&& (this._subNode!=null)
-                                && (this._inputNodeSet==null) && !isNodeSet
-                                );
-   }
+    }
+
+    /**
+     * Determines if the object has been set up with an Element
+     *
+     * @return true if the object has been set up with a Node set
+     */
+    public boolean isElement() {
+        return ((this._inputOctetStreamProxy==null)&& (this._subNode!=null)
+                && (this._inputNodeSet==null) && !isNodeSet);
+    }
 
-   /**
-    * Determines if the object has been set up with an octet stream
-    *
-    * @return true is the object has been set up with an octet stream
-    */
-   public boolean isOctetStream() {
-      return ( ((this._inputOctetStreamProxy != null) || bytes!=null)
+    /**
+     * Determines if the object has been set up with an octet stream
+     *
+     * @return true if the object has been set up with an octet stream
+     */
+    public boolean isOctetStream() {
+        return ( ((this._inputOctetStreamProxy != null) || bytes!=null)
               && ((this._inputNodeSet == null) && _subNode ==null));
-   }
+    }
 
-   /**
-    * Determines if the object has been set up with a ByteArray
-    *
-    * @return true is the object has been set up with an octet stream
-    */
-   public boolean isByteArray() {
-      return ( (bytes!=null)
+    /**
+     * Determines if {@link #setOutputStream} has been called with a
+     * non-null OutputStream.
+     *
+     * @return true if {@link #setOutputStream} has been called with a
+     * non-null OutputStream
+     */
+    public boolean isOutputStreamSet() {
+        return outputStream != null;
+    }
+
+    /**
+     * Determines if the object has been set up with a ByteArray
+     *
+     * @return true is the object has been set up with an octet stream
+     */
+    public boolean isByteArray() {
+        return ( (bytes!=null)
               && ((this._inputNodeSet == null) && _subNode ==null));
-   }
-
-   /**
-    * Is the object correctly set up?
-    *
-    * @return true if the object has been set up correctly
-    */
-   public boolean isInitialized() {
-      return (this.isOctetStream() || this.isNodeSet());
-   }
+    }
 
-   /**
-    * Returns MIMEType
-    *
-    * @return MIMEType
-    */
-   public String getMIMEType() {
-      return this._MIMEType;
-   }
+    /**
+     * Is the object correctly set up?
+     *
+     * @return true if the object has been set up correctly
+     */
+    public boolean isInitialized() {
+        return (this.isOctetStream() || this.isNodeSet());
+    }
 
-   /**
-    * Sets MIMEType
-    *
-    * @param MIMEType
-    */
-   public void setMIMEType(String MIMEType) {
-      this._MIMEType = MIMEType;
-   }
+    /**
+     * Returns MIMEType
+     *
+     * @return MIMEType
+     */
+    public String getMIMEType() {
+        return this._MIMEType;
+    }
 
-   /**
-    * Return SourceURI
-    *
-    * @return SourceURI
-    */
-   public String getSourceURI() {
-      return this._SourceURI;
-   }
+    /**
+     * Sets MIMEType
+     *
+     * @param MIMEType
+     */
+    public void setMIMEType(String MIMEType) {
+        this._MIMEType = MIMEType;
+    }
 
-   /**
-    * Sets SourceURI
-    *
-    * @param SourceURI
-    */
-   public void setSourceURI(String SourceURI) {
-      this._SourceURI = SourceURI;
-   }
-
+    /**
+     * Return SourceURI
+     *
+     * @return SourceURI
+     */
+    public String getSourceURI() {
+        return this._SourceURI;
+    }
 
-   /**
-    * Method toString
-    * @inheritDoc
-    *
-    */
-   public String toString() {
+    /**
+     * Sets SourceURI
+     *
+     * @param SourceURI
+     */
+    public void setSourceURI(String SourceURI) {
+        this._SourceURI = SourceURI;
+    }
 
-      if (this.isNodeSet()) {
-         return "XMLSignatureInput/NodeSet/" + this._inputNodeSet.size()
+    /**
+     * Method toString
+     * @inheritDoc
+     */
+    public String toString() {
+        if (this.isNodeSet()) {
+            return "XMLSignatureInput/NodeSet/" + this._inputNodeSet.size()
                    + " nodes/" + this.getSourceURI();
-      }
-      if (this.isElement()) {
-        return "XMLSignatureInput/Element/" + this._subNode
-        + " exclude "+ this.excludeNode + " comments:" +
-        this.excludeComments
-        +"/" + this.getSourceURI();
-      }
-         try {
+        }
+        if (this.isElement()) {
+            return "XMLSignatureInput/Element/" + this._subNode
+                + " exclude "+ this.excludeNode + " comments:" +
+                this.excludeComments +"/" + this.getSourceURI();
+        }
+        try {
             return "XMLSignatureInput/OctetStream/" + this.getBytes().length
                    + " octets/" + this.getSourceURI();
-         } catch (Exception ex) {
+        } catch (IOException iex) {
             return "XMLSignatureInput/OctetStream//" + this.getSourceURI();
-         }
-
-   }
-
-   /**
-    * Method getHTMLRepresentation
-    *
-    * @throws XMLSignatureException
-    * @return The HTML representation for this XMLSignature
-    */
-   public String getHTMLRepresentation() throws XMLSignatureException {
+        } catch (CanonicalizationException cex) {
+            return "XMLSignatureInput/OctetStream//" + this.getSourceURI();
+        }
+    }
 
-      XMLSignatureInputDebugger db = new XMLSignatureInputDebugger(this);
+    /**
+     * Method getHTMLRepresentation
+     *
+     * @throws XMLSignatureException
+     * @return The HTML representation for this XMLSignature
+     */
+    public String getHTMLRepresentation() throws XMLSignatureException {
 
-      return db.getHTMLRepresentation();
-   }
+        XMLSignatureInputDebugger db = new XMLSignatureInputDebugger(this);
 
-   /**
-    * Method getHTMLRepresentation
-    *
-    * @param inclusiveNamespaces
-    * @throws XMLSignatureException
-    * @return The HTML representation for this XMLSignature
-    */
-   public String getHTMLRepresentation(Set inclusiveNamespaces)
+        return db.getHTMLRepresentation();
+    }
+
+    /**
+     * Method getHTMLRepresentation
+     *
+     * @param inclusiveNamespaces
+     * @throws XMLSignatureException
+     * @return The HTML representation for this XMLSignature
+     */
+    public String getHTMLRepresentation(Set inclusiveNamespaces)
            throws XMLSignatureException {
 
-      XMLSignatureInputDebugger db = new XMLSignatureInputDebugger( this,
+        XMLSignatureInputDebugger db = new XMLSignatureInputDebugger( this,
                                         inclusiveNamespaces);
 
-      return db.getHTMLRepresentation();
-   }
+        return db.getHTMLRepresentation();
+    }
 
-   /**
-    * Gets the exclude node of this XMLSignatureInput
-    * @return Returns the excludeNode.
-    */
+    /**
+     * Gets the exclude node of this XMLSignatureInput
+     * @return Returns the excludeNode.
+     */
     public Node getExcludeNode() {
-           return excludeNode;
+        return excludeNode;
     }
 
     /**
      * Sets the exclude node of this XMLSignatureInput
      * @param excludeNode The excludeNode to set.
      */
-     public void setExcludeNode(Node excludeNode) {
-            this.excludeNode = excludeNode;
-     }
+    public void setExcludeNode(Node excludeNode) {
+        this.excludeNode = excludeNode;
+    }
 
-     /**
-      * Gets the node of this XMLSignatureInput
-      * @return The excludeNode set.
-      */
-     public Node getSubNode() {
-            return _subNode;
-     }
-     /**
-      * @return Returns the excludeComments.
-      */
-     public boolean isExcludeComments() {
+    /**
+     * Gets the node of this XMLSignatureInput
+     * @return The excludeNode set.
+     */
+    public Node getSubNode() {
+        return _subNode;
+    }
+
+    /**
+     * @return Returns the excludeComments.
+     */
+    public boolean isExcludeComments() {
         return excludeComments;
-     }
-     /**
-      * @param excludeComments The excludeComments to set.
-      */
-     public void setExcludeComments(boolean excludeComments) {
+    }
+
+    /**
+     * @param excludeComments The excludeComments to set.
+     */
+    public void setExcludeComments(boolean excludeComments) {
         this.excludeComments = excludeComments;
-     }
+    }
 
-        /**
-         * @param diOs
-         * @throws IOException
-         * @throws CanonicalizationException
-         */
-        public void updateOutputStream(OutputStream diOs) throws CanonicalizationException, IOException {
+    /**
+     * @param diOs
+     * @throws IOException
+     * @throws CanonicalizationException
+     */
+    public void updateOutputStream(OutputStream diOs)
+    throws CanonicalizationException, IOException {
+        updateOutputStream(diOs, false);
+    }
+
+    public void updateOutputStream(OutputStream diOs, boolean c14n11)
+    throws CanonicalizationException, IOException {
         if (diOs==outputStream) {
-                return;
+            return;
         }
         if (bytes!=null) {
             diOs.write(bytes);
             return;
-         }else if (_inputOctetStreamProxy==null) {
-             Canonicalizer20010315OmitComments c14nizer =
-                    new Canonicalizer20010315OmitComments();
-             c14nizer.setWriter(diOs);
+        } else if (_inputOctetStreamProxy==null) {
+            CanonicalizerBase c14nizer = null;
+            if (c14n11) {
+                c14nizer = new Canonicalizer11_OmitComments();
+            } else {
+                c14nizer = new Canonicalizer20010315OmitComments();
+            }
+            c14nizer.setWriter(diOs);
             c14nizer.engineCanonicalize(this);
             return;
-          } else {
+        } else {
             InputStream is = getResetableInputStream();
             if (bytes!=null) {
                 //already read write it, can be rea.
@@ -516,25 +535,22 @@
             while ((num=is.read(bytesT))>0) {
                 diOs.write(bytesT,0,num);
             }
-
-          }
-
         }
-
+    }
 
-        /**
-         * @param os
-         */
-        public void setOutputStream(OutputStream os) {
-                outputStream=os;
+    /**
+     * @param os
+     */
+    public void setOutputStream(OutputStream os) {
+        outputStream=os;
+    }
 
-        }
     protected InputStream getResetableInputStream() throws IOException{
         if ((_inputOctetStreamProxy instanceof ByteArrayInputStream) ) {
             if (!_inputOctetStreamProxy.markSupported()) {
                 throw new RuntimeException("Accepted as Markable but not truly been"+_inputOctetStreamProxy);
             }
-           return _inputOctetStreamProxy;
+            return _inputOctetStreamProxy;
         }
         if (bytes!=null) {
             _inputOctetStreamProxy=new ByteArrayInputStream(bytes);
@@ -543,7 +559,7 @@
         if (_inputOctetStreamProxy ==null)
             return null;
         if (_inputOctetStreamProxy.markSupported()) {
-            if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "Mark Suported but not used as reset");
+            log.log(java.util.logging.Level.INFO, "Mark Suported but not used as reset");
         }
         bytes=JavaUtils.getBytesFromStream(_inputOctetStreamProxy);
         _inputOctetStreamProxy.close();
@@ -551,66 +567,63 @@
         return _inputOctetStreamProxy;
     }
 
-
-        /**
-         * @param filter
-         */
-        public void addNodeFilter(NodeFilter filter) {
-                if (isOctetStream()) {
-                        try {
-                                convertToNodes();
-                        } catch (Exception e) {
-                                throw new XMLSecurityRuntimeException("signature.XMLSignatureInput.nodesetReference",e);
-                        }
-                }
-                nodeFilters.add(filter);
-
+    /**
+     * @param filter
+     */
+    public void addNodeFilter(NodeFilter filter) {
+        if (isOctetStream()) {
+            try {
+                convertToNodes();
+            } catch (Exception e) {
+                throw new XMLSecurityRuntimeException("signature.XMLSignatureInput.nodesetReference",e);
+            }
         }
+        nodeFilters.add(filter);
+    }
 
-        /**
-         * @return the node filters
-         */
-        public List getNodeFilters() {
-                // TODO Auto-generated method stub
-                return nodeFilters;
-        }
+    /**
+     * @return the node filters
+     */
+    public List getNodeFilters() {
+        // TODO Auto-generated method stub
+        return nodeFilters;
+    }
 
-        /**
-         * @param b
-         */
-        public void setNodeSet(boolean b) {
-                isNodeSet=b;
+    /**
+     * @param b
+     */
+    public void setNodeSet(boolean b) {
+        isNodeSet=b;
+    }
 
-        }
-
-        void convertToNodes() throws CanonicalizationException, ParserConfigurationException, IOException, SAXException{
-                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+    void convertToNodes() throws CanonicalizationException,
+        ParserConfigurationException, IOException, SAXException {
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
         dfactory.setValidating(false);
         dfactory.setNamespaceAware(true);
         DocumentBuilder db = dfactory.newDocumentBuilder();
         // select all nodes, also the comments.
         try {
-           db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils
-              .IgnoreAllErrorHandler());
+            db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils
+               .IgnoreAllErrorHandler());
 
-           Document doc = db.parse(this.getOctetStream());
+            Document doc = db.parse(this.getOctetStream());
 
-           XMLUtils.circumventBug2650(doc);
-           this._subNode=doc.getDocumentElement();
+            this._subNode=doc.getDocumentElement();
         } catch (SAXException ex) {
 
-           // if a not-wellformed nodeset exists, put a container around it...
-           ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            // if a not-wellformed nodeset exists, put a container around it...
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
-           baos.write("<container>".getBytes());
-           baos.write(this.getBytes());
-           baos.write("</container>".getBytes());
+            baos.write("<container>".getBytes());
+            baos.write(this.getBytes());
+            baos.write("</container>".getBytes());
 
-           byte result[] = baos.toByteArray();
-           Document document = db.parse(new ByteArrayInputStream(result));
-           this._subNode=document.getDocumentElement().getFirstChild().getFirstChild();
+            byte result[] = baos.toByteArray();
+            Document document = db.parse(new ByteArrayInputStream(result));
+            this._subNode=document.getDocumentElement().getFirstChild().getFirstChild();
         }
         this._inputOctetStreamProxy=null;
         this.bytes=null;
-        }
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInputDebugger.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInputDebugger.java	Wed Jul 05 16:42:37 2017 +0200
@@ -39,7 +39,8 @@
 /**
  * Class XMLSignatureInputDebugger
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
+ * @version $Revision: 1.3 $
  */
 public class XMLSignatureInputDebugger {
 
@@ -599,23 +600,23 @@
 
                 length = data.length();
 
-                if ((data != null) && (length > 0)) {
-                        this._writer.write(" ");
+                if (length > 0) {
+                    this._writer.write(" ");
 
-                        for (int i = 0; i < length; i++) {
-                                char c = data.charAt(i);
+                    for (int i = 0; i < length; i++) {
+                        char c = data.charAt(i);
 
-                                switch (c) {
+                        switch (c) {
 
-                                case 0x0D:
-                                        this._writer.write("&amp;#xD;");
-                                        break;
+                            case 0x0D:
+                                this._writer.write("&amp;#xD;");
+                                break;
 
-                                default:
-                                        this._writer.write(c);
-                                        break;
-                                }
+                            default:
+                                this._writer.write(c);
+                                break;
                         }
+                    }
                 }
 
                 this._writer.write("?&gt;");
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/InvalidTransformException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/InvalidTransformException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,14 +20,11 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms;
 
-
-
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.HashMap;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-
+import java.util.HashMap;
 import javax.xml.parsers.ParserConfigurationException;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
@@ -38,17 +35,17 @@
 import com.sun.org.apache.xml.internal.security.utils.Constants;
 import com.sun.org.apache.xml.internal.security.utils.HelperNodeList;
 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
-
 /**
  * Implements the behaviour of the <code>ds:Transform</code> element.
  *
- * This <code>Transform</code>(Factory) class role as the Factory and Proxy of
- * implemanting class that have the functionality of <a
+ * This <code>Transform</code>(Factory) class acts as the Factory and Proxy of
+ * the implementing class that supports the functionality of <a
  * href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>a Transform
  * algorithm</a>.
  * Implements the Factory and Proxy pattern for ds:Transform algorithms.
@@ -60,326 +57,314 @@
  */
 public final class Transform extends SignatureElementProxy {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(Transform.class.getName());
 
-   /** Field _alreadyInitialized */
-   static boolean _alreadyInitialized = false;
+    /** Field _alreadyInitialized */
+    private static boolean alreadyInitialized = false;
 
-   /** All available Transform classes are registered here */
-   static HashMap _transformHash = null;
+    /** All available Transform classes are registered here */
+    private static HashMap transformClassHash = null;
 
-   /** Field transformSpi */
-   protected TransformSpi transformSpi = null;
+    private static HashMap transformSpiHash = new HashMap();
+
+    private TransformSpi transformSpi = null;
 
-   /**
-    * Constructs {@link Transform}
-    *
-    * @param doc the {@link Document} in which <code>Transform</code> will be placed
-    * @param algorithmURI URI representation of
-    * <code>Transform algorithm</code> will be specified as parameter of
-    * {@link #getInstance(Document, String)}, when generate. </br>
-    * @param contextNodes the child node list of <code>Transform</code> element
-    * @throws InvalidTransformException
-    */
-   public Transform(Document doc, String algorithmURI, NodeList contextNodes)
-           throws InvalidTransformException {
+    /**
+     * Constructs {@link Transform}
+     *
+     * @param doc the {@link Document} in which <code>Transform</code> will be
+     * placed
+     * @param algorithmURI URI representation of
+     * <code>Transform algorithm</code> which will be specified as parameter of
+     * {@link #getInstance(Document, String)}, when generated. </br>
+     * @param contextNodes the child node list of <code>Transform</code> element
+     * @throws InvalidTransformException
+     */
+    public Transform(Document doc, String algorithmURI, NodeList contextNodes)
+        throws InvalidTransformException {
 
-      super(doc);
-
-      try {
-         this._constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM,
-                                                algorithmURI);
+        super(doc);
 
-         Class implementingClass =
-            Transform.getImplementingClass(algorithmURI);
+        this._constructionElement.setAttributeNS
+            (null, Constants._ATT_ALGORITHM, algorithmURI);
 
-         if(implementingClass == null) {
+        transformSpi = getTransformSpi(algorithmURI);
+        if (transformSpi == null) {
              Object exArgs[] = { algorithmURI };
-
              throw new InvalidTransformException(
                 "signature.Transform.UnknownTransform", exArgs);
-         }
-         if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
-                   + implementingClass + "\"");
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "The NodeList is " + contextNodes);
-         }
+        }
 
-         // create the custom Transform object
-         this.transformSpi =
-            (TransformSpi) implementingClass.newInstance();
-
-         this.transformSpi.setTransform(this);
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
+            log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
+                   + transformSpi.getClass() + "\"");
+            log.log(java.util.logging.Level.FINE, "The NodeList is " + contextNodes);
+        }
 
-         // give it to the current document
-         if (contextNodes != null) {
-            /*
-            while (contextNodes.getLength() > 0) {
-               this._constructionElement.appendChild(contextNodes.item(0));
+        // give it to the current document
+        if (contextNodes != null) {
+            for (int i = 0; i < contextNodes.getLength(); i++) {
+               this._constructionElement.appendChild
+                   (contextNodes.item(i).cloneNode(true));
             }
-            */
-
-            for (int i = 0; i < contextNodes.getLength(); i++) {
-               this._constructionElement.appendChild(contextNodes.item(i).cloneNode(true));
-            }
-
-         }
-      } catch (IllegalAccessException ex) {
-         Object exArgs[] = { algorithmURI };
+        }
+    }
 
-         throw new InvalidTransformException(
-            "signature.Transform.UnknownTransform", exArgs, ex);
-      } catch (InstantiationException ex) {
-         Object exArgs[] = { algorithmURI };
+    /**
+     * This constructor can only be called from the {@link Transforms} object,
+     * so it's protected.
+     *
+     * @param element <code>ds:Transform</code> element
+     * @param BaseURI the URI of the resource where the XML instance was stored
+     * @throws InvalidTransformException
+     * @throws TransformationException
+     * @throws XMLSecurityException
+     */
+    public Transform(Element element, String BaseURI)
+        throws InvalidTransformException, TransformationException,
+               XMLSecurityException {
 
-         throw new InvalidTransformException(
-            "signature.Transform.UnknownTransform", exArgs, ex);
-      }
-   }
+        super(element, BaseURI);
 
-   /**
-    * This constructor can only be called from the {@link Transforms} object, so
-    * it's protected.
-    *
-    * @param element <code>ds:Transform</code> element
-    * @param BaseURI the URI of the resource where the XML instance was stored
-    * @throws InvalidTransformException
-    * @throws TransformationException
-    * @throws XMLSecurityException
-    */
-   public Transform(Element element, String BaseURI)
-           throws InvalidTransformException, TransformationException,
-                  XMLSecurityException {
+        // retrieve Algorithm Attribute from ds:Transform
+        String algorithmURI = element.getAttributeNS(null, Constants._ATT_ALGORITHM);
 
-      super(element, BaseURI);
-
-      // retrieve Algorithm Attribute from ds:Transform
-      String AlgorithmURI = element.getAttributeNS(null, Constants._ATT_ALGORITHM);
+        if (algorithmURI == null || algorithmURI.length() == 0) {
+            Object exArgs[] = { Constants._ATT_ALGORITHM,
+                                Constants._TAG_TRANSFORM };
+            throw new TransformationException("xml.WrongContent", exArgs);
+        }
 
-      if ((AlgorithmURI == null) || (AlgorithmURI.length() == 0)) {
-         Object exArgs[] = { Constants._ATT_ALGORITHM,
-                             Constants._TAG_TRANSFORM };
-
-         throw new TransformationException("xml.WrongContent", exArgs);
-      }
-
-      try {
-         Class implementingClass = (Class) _transformHash.get(AlgorithmURI);
-         this.transformSpi =
-            (TransformSpi) implementingClass.newInstance();
+        transformSpi = getTransformSpi(algorithmURI);
+        if (transformSpi == null) {
+            Object exArgs[] = { algorithmURI };
+            throw new InvalidTransformException(
+                "signature.Transform.UnknownTransform", exArgs);
+        }
+    }
 
-         this.transformSpi.setTransform(this);
-      } catch (IllegalAccessException e) {
-         Object exArgs[] = { AlgorithmURI };
-
-         throw new InvalidTransformException(
-            "signature.Transform.UnknownTransform", exArgs);
-      } catch (InstantiationException e) {
-         Object exArgs[] = { AlgorithmURI };
-
-         throw new InvalidTransformException(
-            "signature.Transform.UnknownTransform", exArgs);
-      } catch (NullPointerException e) {
-                  Object exArgs[] = { AlgorithmURI };
+    /**
+     * Generates a Transform object that implements the specified
+     * <code>Transform algorithm</code> URI.
+     *
+     * @param algorithmURI <code>Transform algorithm</code> URI representation,
+     * such as specified in
+     * <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
+     * @param doc the proxy {@link Document}
+     * @return <code>{@link Transform}</code> object
+     * @throws InvalidTransformException
+     */
+    public static Transform getInstance(
+        Document doc, String algorithmURI) throws InvalidTransformException {
+        return getInstance(doc, algorithmURI, (NodeList) null);
+    }
 
-                 throw new InvalidTransformException(
-                    "signature.Transform.UnknownTransform", exArgs);
-        }
-   }
-
-   /**
-    * Generates a Transform object that implements the specified <code>Transform algorithm</code> URI.
-    *
-    * @param algorithmURI <code>Transform algorithm</code> URI representation, such as specified in <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
-    * @param doc the proxy {@link Document}
-    * @return <code>{@link Transform}</code> object
-    * @throws InvalidTransformException
-    */
-   public static final Transform getInstance(
-           Document doc, String algorithmURI) throws InvalidTransformException {
-      return Transform.getInstance(doc, algorithmURI, (NodeList) null);
-   }
+    /**
+     * Generates a Transform object that implements the specified
+     * <code>Transform algorithm</code> URI.
+     *
+     * @param algorithmURI <code>Transform algorithm</code> URI representation,
+     * such as specified in
+     * <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
+     * @param contextChild the child element of <code>Transform</code> element
+     * @param doc the proxy {@link Document}
+     * @return <code>{@link Transform}</code> object
+     * @throws InvalidTransformException
+     */
+    public static Transform getInstance(
+        Document doc, String algorithmURI, Element contextChild)
+        throws InvalidTransformException {
 
-   /**
-    * Generates a Transform object that implements the specified <code>Transform algorithm</code> URI.
-    *
-    * @param algorithmURI <code>Transform algorithm</code> URI representation, such as specified in <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
-    * @param contextChild the child element of <code>Transform</code> element
-    * @param doc the proxy {@link Document}
-    * @return <code>{@link Transform}</code> object
-    * @throws InvalidTransformException
-    */
-   public static final Transform getInstance(
-           Document doc, String algorithmURI, Element contextChild)
-              throws InvalidTransformException {
+        HelperNodeList contextNodes = new HelperNodeList();
 
-      HelperNodeList contextNodes = new HelperNodeList();
+        XMLUtils.addReturnToElement(doc, contextNodes);
+        contextNodes.appendChild(contextChild);
+        XMLUtils.addReturnToElement(doc, contextNodes);
 
-      contextNodes.appendChild(doc.createTextNode("\n"));
-      contextNodes.appendChild(contextChild);
-      contextNodes.appendChild(doc.createTextNode("\n"));
-
-      return Transform.getInstance(doc, algorithmURI, contextNodes);
-   }
+        return getInstance(doc, algorithmURI, contextNodes);
+    }
 
-   /**
-    * Generates a Transform object that implements the specified <code>Transform algorithm</code> URI.
-    *
-    * @param algorithmURI <code>Transform algorithm</code> URI form, such as specified in <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
-    * @param contextNodes the child node list of <code>Transform</code> element
-    * @param doc the proxy {@link Document}
-    * @return <code>{@link Transform}</code> object
-    * @throws InvalidTransformException
-    */
-   public static final Transform getInstance(
-           Document doc, String algorithmURI, NodeList contextNodes)
-              throws InvalidTransformException {
-      return new Transform(doc, algorithmURI, contextNodes);
-   }
-
-   /**
-    * Initalizes for this {@link Transform}
-    *
-    */
-   public static void init() {
+    /**
+     * Generates a Transform object that implements the specified
+     * <code>Transform algorithm</code> URI.
+     *
+     * @param algorithmURI <code>Transform algorithm</code> URI form, such as
+     * specified in <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>
+     * Transform algorithm </a>
+     * @param contextNodes the child node list of <code>Transform</code> element
+     * @param doc the proxy {@link Document}
+     * @return <code>{@link Transform}</code> object
+     * @throws InvalidTransformException
+     */
+    public static Transform getInstance(
+        Document doc, String algorithmURI, NodeList contextNodes)
+        throws InvalidTransformException {
+        return new Transform(doc, algorithmURI, contextNodes);
+    }
 
-      if (!_alreadyInitialized) {
-         _transformHash = new HashMap(10);
-         _alreadyInitialized = true;
-      }
-   }
+    /**
+     * Initalizes for this {@link Transform}.
+     */
+    public static void init() {
+        if (!alreadyInitialized) {
+            transformClassHash = new HashMap(10);
+            alreadyInitialized = true;
+        }
+    }
 
-   /**
-    * Registers implementing class of the Transform algorithm with algorithmURI
-    *
-    * @param algorithmURI algorithmURI URI representation of <code>Transform algorithm</code>
-    *  will be specified as parameter of {@link #getInstance(Document, String)}, when generate. </br>
-    * @param implementingClass <code>implementingClass</code> the implementing class of {@link TransformSpi}
-    * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered
-    */
-   public static void register(String algorithmURI, String implementingClass)
-           throws AlgorithmAlreadyRegisteredException {
+    /**
+     * Registers implementing class of the Transform algorithm with algorithmURI
+     *
+     * @param algorithmURI algorithmURI URI representation of
+     * <code>Transform algorithm</code> will be specified as parameter of
+     * {@link #getInstance(Document, String)}, when generate. </br>
+     * @param implementingClass <code>implementingClass</code> the implementing
+     * class of {@link TransformSpi}
+     * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
+     * is already registered
+     */
+    public static void register(String algorithmURI, String implementingClass)
+        throws AlgorithmAlreadyRegisteredException {
 
-      {
-
-         // are we already registered?
-         Class registeredClass = Transform.getImplementingClass(algorithmURI);
-
-         if ((registeredClass != null) ) {
+        // are we already registered?
+        Class registeredClass = getImplementingClass(algorithmURI);
+        if ((registeredClass != null) ) {
             Object exArgs[] = { algorithmURI, registeredClass };
-
             throw new AlgorithmAlreadyRegisteredException(
                "algorithm.alreadyRegistered", exArgs);
-         }
+        }
 
-         ClassLoader cl = (ClassLoader) AccessController.doPrivileged(
-             new PrivilegedAction() {
-                 public Object run() {
-                     return Thread.currentThread().getContextClassLoader();
-                 }
-             });
+        ClassLoader cl = (ClassLoader) AccessController.doPrivileged(
+            new PrivilegedAction() {
+                public Object run() {
+                    return Thread.currentThread().getContextClassLoader();
+                }
+            });
 
-         try {
-             Transform._transformHash.put
-                 (algorithmURI, Class.forName(implementingClass, true, cl));
-         } catch (ClassNotFoundException e) {
-             // TODO Auto-generated catch block
-             e.printStackTrace();
-         }
-      }
-   }
+        try {
+            transformClassHash.put
+                (algorithmURI, Class.forName(implementingClass, true, cl));
+        } catch (ClassNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns the URI representation of Transformation algorithm
+     *
+     * @return the URI representation of Transformation algorithm
+     */
+    public String getURI() {
+        return this._constructionElement.getAttributeNS
+            (null, Constants._ATT_ALGORITHM);
+    }
 
-   /**
-    * Returns the URI representation of Transformation algorithm
-    *
-    * @return the URI representation of Transformation algorithm
-    */
-   public final String getURI() {
-      return this._constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM);
-   }
+    /**
+     * Transforms the input, and generates {@link XMLSignatureInput} as output.
+     *
+     * @param input input {@link XMLSignatureInput} which can supplied Octet
+     * Stream and NodeSet as Input of Transformation
+     * @return the {@link XMLSignatureInput} class as the result of
+     * transformation
+     * @throws CanonicalizationException
+     * @throws IOException
+     * @throws InvalidCanonicalizerException
+     * @throws TransformationException
+     */
+    public XMLSignatureInput performTransform(XMLSignatureInput input)
+         throws IOException, CanonicalizationException,
+                InvalidCanonicalizerException, TransformationException {
 
-   /**
-    * Transforms the input, and generats {@link XMLSignatureInput} as output.
-    * @param input input {@link XMLSignatureInput} which can supplied Octect Stream and NodeSet as Input of Transformation
-    *
-    * @return the {@link XMLSignatureInput} class as the result of transformation
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws InvalidCanonicalizerException
-    * @throws TransformationException
-    */
-   public XMLSignatureInput performTransform(XMLSignatureInput input)
-           throws IOException, CanonicalizationException,
-                  InvalidCanonicalizerException, TransformationException {
+        XMLSignatureInput result = null;
 
-      XMLSignatureInput result = null;
+        try {
+            result = transformSpi.enginePerformTransform(input, this);
+        } catch (ParserConfigurationException ex) {
+            Object exArgs[] = { this.getURI(), "ParserConfigurationException" };
+            throw new CanonicalizationException(
+                "signature.Transform.ErrorDuringTransform", exArgs, ex);
+        } catch (SAXException ex) {
+            Object exArgs[] = { this.getURI(), "SAXException" };
+            throw new CanonicalizationException(
+                "signature.Transform.ErrorDuringTransform", exArgs, ex);
+        }
 
-      try {
-         result = transformSpi.enginePerformTransform(input);
-      } catch (ParserConfigurationException ex) {
-         Object exArgs[] = { this.getURI(), "ParserConfigurationException" };
-
-         throw new CanonicalizationException(
-            "signature.Transform.ErrorDuringTransform", exArgs, ex);
-      } catch (SAXException ex) {
-         Object exArgs[] = { this.getURI(), "SAXException" };
+        return result;
+    }
 
-         throw new CanonicalizationException(
-            "signature.Transform.ErrorDuringTransform", exArgs, ex);
-      }
-
-      return result;
-   }
+    /**
+     * Transforms the input, and generates {@link XMLSignatureInput} as output.
+     *
+     * @param input input {@link XMLSignatureInput} which can supplied Octet
+     * Stream and NodeSet as Input of Transformation
+     * @param os where to output the result of the last transformation
+     * @return the {@link XMLSignatureInput} class as the result of
+     * transformation
+     * @throws CanonicalizationException
+     * @throws IOException
+     * @throws InvalidCanonicalizerException
+     * @throws TransformationException
+     */
+    public XMLSignatureInput performTransform(XMLSignatureInput input,
+        OutputStream os) throws IOException, CanonicalizationException,
+        InvalidCanonicalizerException, TransformationException {
 
-   /**
-    * Transforms the input, and generats {@link XMLSignatureInput} as output.
-    * @param input input {@link XMLSignatureInput} which can supplied Octect Stream and NodeSet as Input of Transformation
-    * @param os where to output the result of the last transformation
-    *
-    * @return the {@link XMLSignatureInput} class as the result of transformation
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws InvalidCanonicalizerException
-    * @throws TransformationException
-    */
-   public XMLSignatureInput performTransform(XMLSignatureInput input, OutputStream os)
-   throws IOException, CanonicalizationException,
-          InvalidCanonicalizerException, TransformationException {
+        XMLSignatureInput result = null;
 
-            XMLSignatureInput result = null;
+        try {
+            result = transformSpi.enginePerformTransform(input, os, this);
+        } catch (ParserConfigurationException ex) {
+            Object exArgs[] = { this.getURI(), "ParserConfigurationException" };
+            throw new CanonicalizationException(
+                "signature.Transform.ErrorDuringTransform", exArgs, ex);
+        } catch (SAXException ex) {
+            Object exArgs[] = { this.getURI(), "SAXException" };
+            throw new CanonicalizationException(
+                "signature.Transform.ErrorDuringTransform", exArgs, ex);
+        }
 
-            try {
-                result = transformSpi.enginePerformTransform(input,os);
-            } catch (ParserConfigurationException ex) {
-                Object exArgs[] = { this.getURI(), "ParserConfigurationException" };
+        return result;
+    }
 
-                throw new CanonicalizationException(
-                                "signature.Transform.ErrorDuringTransform", exArgs, ex);
-            } catch (SAXException ex) {
-                Object exArgs[] = { this.getURI(), "SAXException" };
-
-                throw new CanonicalizationException(
-                                "signature.Transform.ErrorDuringTransform", exArgs, ex);
-            }
-
-            return result;
-   }
+    /**
+     * Method getImplementingClass
+     *
+     * @param URI
+     * @return The name of the class implementing the URI.
+     */
+    private static Class getImplementingClass(String URI) {
+        return (Class) transformClassHash.get(URI);
+    }
 
-   /**
-    * Method getImplementingClass
-    *
-    * @param URI
-    * @return The name of the class implementing the URI.
-    */
-   private static Class getImplementingClass(String URI) {
-       return (Class)Transform._transformHash.get(URI);
-   }
+    private static TransformSpi getTransformSpi(String URI)
+        throws InvalidTransformException {
+        try {
+            Object value = transformSpiHash.get(URI);
+            if (value != null) {
+                return (TransformSpi) value;
+            }
+            Class cl = (Class) transformClassHash.get(URI);
+            if (cl != null) {
+                TransformSpi tr = (TransformSpi) cl.newInstance();
+                transformSpiHash.put(URI, tr);
+                return tr;
+            }
+        } catch (InstantiationException ex) {
+            Object exArgs[] = { URI };
+            throw new InvalidTransformException(
+                "signature.Transform.UnknownTransform", exArgs, ex);
+        } catch (IllegalAccessException ex) {
+            Object exArgs[] = { URI };
+            throw new InvalidTransformException(
+                "signature.Transform.UnknownTransform", exArgs, ex);
+        }
+        return null;
+    }
 
-
-   /** @inheritDoc */
-   public String getBaseLocalName() {
-      return Constants._TAG_TRANSFORM;
-   }
+    /** @inheritDoc */
+    public String getBaseLocalName() {
+        return Constants._TAG_TRANSFORM;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformParam.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformParam.java	Wed Jul 05 16:42:37 2017 +0200
@@ -23,7 +23,7 @@
 
 /**
  *
- * @author $Author: blautenb $
+ * @author $Author: mullan $
  */
 
 public interface TransformParam {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformSpi.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformSpi.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,11 +20,8 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms;
 
-
-
 import java.io.IOException;
 import java.io.OutputStream;
-
 import javax.xml.parsers.ParserConfigurationException;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
@@ -33,68 +29,109 @@
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
 import org.xml.sax.SAXException;
 
-
 /**
  * Base class which all Transform algorithms extend. The common methods that
- * have to be overridden are the {@link #enginePerformTransform(XMLSignatureInput)} method.
+ * have to be overridden are the
+ * {@link #enginePerformTransform(XMLSignatureInput, Transform)} method.
  *
  * @author Christian Geuer-Pollmann
  */
 public abstract class TransformSpi {
-
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(TransformSpi.class.getName());
-
-   protected Transform _transformObject = null;
-   protected void setTransform(Transform transform) {
-      this._transformObject = transform;
-   }
+    /**
+     * For API compatibility not thread safe.
+     * @deprecated
+     */
+    protected Transform _transformObject = null;
+    /**
+     * Set the transform object.
+     * Depeprecated For API compatibility.
+     * @param transform the Transform
+     * @deprecated
+     */
+    protected void setTransform(Transform transform) {
+        this._transformObject = transform;
+    }
+    /**
+     * The mega method which MUST be implemented by the Transformation Algorithm.
+     *
+     * @param input {@link XMLSignatureInput} as the input of transformation
+     * @param os where to output this transformation.
+     * @param _transformObject the Transform
+     * @return {@link XMLSignatureInput} as the result of transformation
+     * @throws CanonicalizationException
+     * @throws IOException
+     * @throws InvalidCanonicalizerException
+     * @throws ParserConfigurationException
+     * @throws SAXException
+     * @throws TransformationException
+     */
+    protected XMLSignatureInput enginePerformTransform(
+        XMLSignatureInput input, OutputStream os, Transform _transformObject)
+        throws IOException,
+               CanonicalizationException, InvalidCanonicalizerException,
+               TransformationException, ParserConfigurationException,
+               SAXException {
+        return enginePerformTransform(input, _transformObject);
+    }
+    /**
+     * The mega method which MUST be implemented by the Transformation Algorithm.
+     * In order to be compatible with preexisting Transform implementations,
+     * by default this implementation invokes the deprecated, thread-unsafe
+     * methods. Subclasses should override this with a thread-safe
+     * implementation.
+     *
+     * @param input {@link XMLSignatureInput} as the input of transformation
+     * @param _transformObject the Transform
+     * @return {@link XMLSignatureInput} as the result of transformation
+     * @throws CanonicalizationException
+     * @throws IOException
+     * @throws InvalidCanonicalizerException
+     * @throws ParserConfigurationException
+     * @throws SAXException
+     * @throws TransformationException
+     */
+    protected XMLSignatureInput enginePerformTransform(
+        XMLSignatureInput input, Transform _transformObject)
+        throws IOException,
+               CanonicalizationException, InvalidCanonicalizerException,
+               TransformationException, ParserConfigurationException,
+               SAXException {
+        //Default implementation overide with a much better
+        try {
+                TransformSpi tmp = (TransformSpi) getClass().newInstance();
+            tmp.setTransform(_transformObject);
+            return tmp.enginePerformTransform(input);
+        } catch (InstantiationException e) {
+            throw new TransformationException("",e);
+        } catch (IllegalAccessException e) {
+            throw new TransformationException("",e);
+        }
+    }
 
-   /**
-    * The mega method which MUST be implemented by the Transformation Algorithm.
-    *
-    * @param input {@link XMLSignatureInput} as the input of transformation
-    * @param os where to output this transformation.
-    * @return {@link XMLSignatureInput} as the result of transformation
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws InvalidCanonicalizerException
-    * @throws ParserConfigurationException
-    * @throws SAXException
-    * @throws TransformationException
-    */
-   protected XMLSignatureInput enginePerformTransform(
-      XMLSignatureInput input, OutputStream os)
-         throws IOException,
-                CanonicalizationException, InvalidCanonicalizerException,
-                TransformationException, ParserConfigurationException,
-                SAXException {
-            return enginePerformTransform(input);
-   }
-   /**
-    * The mega method which MUST be implemented by the Transformation Algorithm.
-    *
-    * @param input {@link XMLSignatureInput} as the input of transformation
-    * @return {@link XMLSignatureInput} as the result of transformation
-    * @throws CanonicalizationException
-    * @throws IOException
-    * @throws InvalidCanonicalizerException
-    * @throws ParserConfigurationException
-    * @throws SAXException
-    * @throws TransformationException
-    */
-   protected abstract XMLSignatureInput enginePerformTransform(
-      XMLSignatureInput input)
-         throws IOException,
-                CanonicalizationException, InvalidCanonicalizerException,
-                TransformationException, ParserConfigurationException,
-                SAXException;
-
-   /**
-    * Returns the URI representation of <code>Transformation algorithm</code>
-    *
-    * @return the URI representation of <code>Transformation algorithm</code>
-    */
-   protected abstract String engineGetURI();
+    /**
+     * The mega method which MUST be implemented by the Transformation Algorithm.
+     * @deprecated
+     * @param input {@link XMLSignatureInput} as the input of transformation
+     * @return {@link XMLSignatureInput} as the result of transformation
+     * @throws CanonicalizationException
+     * @throws IOException
+     * @throws InvalidCanonicalizerException
+     * @throws ParserConfigurationException
+     * @throws SAXException
+     * @throws TransformationException
+     */
+    protected XMLSignatureInput enginePerformTransform(
+        XMLSignatureInput input)
+        throws IOException,
+               CanonicalizationException, InvalidCanonicalizerException,
+               TransformationException, ParserConfigurationException,
+               SAXException {
+        throw new UnsupportedOperationException();
+    }
+    /**
+     * Returns the URI representation of <code>Transformation algorithm</code>
+     *
+     * @return the URI representation of <code>Transformation algorithm</code>
+     */
+    protected abstract String engineGetURI();
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformationException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformationException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transforms.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transforms.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright  1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms;
 
-
-
 import java.io.IOException;
 import java.io.OutputStream;
 
@@ -39,11 +37,13 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
-
 /**
- * Holder of the {@link com.sun.org.apache.xml.internal.security.transforms.Transform} steps to be performed on the data.
- * The input to the first Transform is the result of dereferencing the <code>URI</code> attribute of the <code>Reference</code> element.
- * The output from the last Transform is the input for the <code>DigestMethod algorithm</code>
+ * Holder of the {@link com.sun.org.apache.xml.internal.security.transforms.Transform} steps to
+ * be performed on the data.
+ * The input to the first Transform is the result of dereferencing the
+ * <code>URI</code> attribute of the <code>Reference</code> element.
+ * The output from the last Transform is the input for the
+ * <code>DigestMethod algorithm</code>
  *
  * @author Christian Geuer-Pollmann
  * @see Transform
@@ -51,252 +51,273 @@
  */
 public class Transforms extends SignatureElementProxy {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(Transforms.class.getName());
-   //J-
-   /** Canonicalization - Required Canonical XML (omits comments) */
-   public static final String TRANSFORM_C14N_OMIT_COMMENTS = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
-   /** Canonicalization - Recommended Canonical XML with Comments */
-   public static final String TRANSFORM_C14N_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS;
-   /** Canonicalization - Required Exclusive Canonicalization (omits comments) */
-   public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS = Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS;
-   /** Canonicalization - Recommended Exclusive Canonicalization with Comments */
-   public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS = Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS;
-   /** Transform - Optional XSLT */
-   public static final String TRANSFORM_XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
-   /** Transform - Required base64 decoding */
-   public static final String TRANSFORM_BASE64_DECODE = Constants.SignatureSpecNS + "base64";
-   /** Transform - Recommended XPath */
-   public static final String TRANSFORM_XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
-   /** Transform - Required Enveloped Signature */
-   public static final String TRANSFORM_ENVELOPED_SIGNATURE = Constants.SignatureSpecNS + "enveloped-signature";
-   /** Transform - XPointer */
-   public static final String TRANSFORM_XPOINTER = "http://www.w3.org/TR/2001/WD-xptr-20010108";
-   /** Transform - XPath Filter v2.0 */
-   public static final String TRANSFORM_XPATH2FILTER04 = "http://www.w3.org/2002/04/xmldsig-filter2";
-   /** Transform - XPath Filter */
-   public static final String TRANSFORM_XPATH2FILTER = "http://www.w3.org/2002/06/xmldsig-filter2";
-   /** Transform - XPath Filter  CHGP private*/
-   public static final String TRANSFORM_XPATHFILTERCHGP = "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter";
-   //J+
-   Element []transforms;
-   /**
-    * Consturcts {@link Transforms}
-    *
-    * @param doc the {@link Document} in which <code>XMLsignature</code> will be placed
-    */
-   public Transforms(Document doc) {
+    /** Canonicalization - Required Canonical XML (omits comments) */
+    public static final String TRANSFORM_C14N_OMIT_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
+    /** Canonicalization - Recommended Canonical XML with Comments */
+    public static final String TRANSFORM_C14N_WITH_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS;
+    /** Canonicalization - Required Canonical XML 1.1 (omits comments) */
+    public static final String TRANSFORM_C14N11_OMIT_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
+    /** Canonicalization - Recommended Canonical XML 1.1 with Comments */
+    public static final String TRANSFORM_C14N11_WITH_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS;
+    /** Canonicalization - Required Exclusive Canonicalization (omits comments) */
+    public static final String TRANSFORM_C14N_EXCL_OMIT_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS;
+    /** Canonicalization - Recommended Exclusive Canonicalization with Comments */
+    public static final String TRANSFORM_C14N_EXCL_WITH_COMMENTS
+        = Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS;
+    /** Transform - Optional XSLT */
+    public static final String TRANSFORM_XSLT
+        = "http://www.w3.org/TR/1999/REC-xslt-19991116";
+    /** Transform - Required base64 decoding */
+    public static final String TRANSFORM_BASE64_DECODE
+        = Constants.SignatureSpecNS + "base64";
+    /** Transform - Recommended XPath */
+    public static final String TRANSFORM_XPATH
+        = "http://www.w3.org/TR/1999/REC-xpath-19991116";
+    /** Transform - Required Enveloped Signature */
+    public static final String TRANSFORM_ENVELOPED_SIGNATURE
+        = Constants.SignatureSpecNS + "enveloped-signature";
+    /** Transform - XPointer */
+    public static final String TRANSFORM_XPOINTER
+        = "http://www.w3.org/TR/2001/WD-xptr-20010108";
+    /** Transform - XPath Filter v2.0 */
+    public static final String TRANSFORM_XPATH2FILTER04
+        = "http://www.w3.org/2002/04/xmldsig-filter2";
+    /** Transform - XPath Filter */
+    public static final String TRANSFORM_XPATH2FILTER
+        = "http://www.w3.org/2002/06/xmldsig-filter2";
+    /** Transform - XPath Filter  CHGP private */
+    public static final String TRANSFORM_XPATHFILTERCHGP
+        = "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter";
 
-      super(doc);
+    Element []transforms;
 
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+    protected Transforms() { };
 
-   /**
-    * Consturcts {@link Transforms} from {@link Element} which is <code>Transforms</code> Element
-    *
-    * @param element  is <code>Transforms</code> element
-    * @param BaseURI the URI where the XML instance was stored
-    * @throws DOMException
-    * @throws InvalidTransformException
-    * @throws TransformationException
-    * @throws XMLSecurityException
-    * @throws XMLSignatureException
-    */
-   public Transforms(Element element, String BaseURI)
+    /**
+     * Constructs {@link Transforms}.
+     *
+     * @param doc the {@link Document} in which <code>XMLSignature</code> will
+     * be placed
+     */
+    public Transforms(Document doc) {
+        super(doc);
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
+
+    /**
+     * Constructs {@link Transforms} from {@link Element} which is
+     * <code>Transforms</code> Element
+     *
+     * @param element  is <code>Transforms</code> element
+     * @param BaseURI the URI where the XML instance was stored
+     * @throws DOMException
+     * @throws InvalidTransformException
+     * @throws TransformationException
+     * @throws XMLSecurityException
+     * @throws XMLSignatureException
+     */
+    public Transforms(Element element, String BaseURI)
            throws DOMException, XMLSignatureException,
                   InvalidTransformException, TransformationException,
                   XMLSecurityException {
 
-      super(element, BaseURI);
+        super(element, BaseURI);
 
-      int numberOfTransformElems = this.getLength();
+        int numberOfTransformElems = this.getLength();
 
-      if (numberOfTransformElems == 0) {
+        if (numberOfTransformElems == 0) {
 
-         // At least ont Transform element must be present. Bad.
-         Object exArgs[] = { Constants._TAG_TRANSFORM,
-                             Constants._TAG_TRANSFORMS };
+            // At least one Transform element must be present. Bad.
+            Object exArgs[] = { Constants._TAG_TRANSFORM,
+                                Constants._TAG_TRANSFORMS };
 
-         throw new TransformationException("xml.WrongContent", exArgs);
-      }
-   }
+            throw new TransformationException("xml.WrongContent", exArgs);
+        }
+    }
 
-   /**
-    * Adds the <code>Transform</code> with the specified <code>Transform algorithm URI</code>
-    *
-    * @param transformURI the URI form of transform that indicates which transformation is applied to data
-    * @throws TransformationException
-    */
-   public void addTransform(String transformURI)
+    /**
+     * Adds the <code>Transform</code> with the specified <code>Transform
+     * algorithm URI</code>
+     *
+     * @param transformURI the URI form of transform that indicates which
+     * transformation is applied to data
+     * @throws TransformationException
+     */
+    public void addTransform(String transformURI)
            throws TransformationException {
 
-      try {
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transformURI + ")");
+        try {
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transformURI + ")");
 
-         Transform transform = Transform.getInstance(this._doc, transformURI);
+            Transform transform =
+                Transform.getInstance(this._doc, transformURI);
 
-         this.addTransform(transform);
-      } catch (InvalidTransformException ex) {
-         throw new TransformationException("empty", ex);
-      }
-   }
+            this.addTransform(transform);
+        } catch (InvalidTransformException ex) {
+            throw new TransformationException("empty", ex);
+        }
+    }
 
-   /**
-    * Adds the <code>Transform</code> with the specified <code>Transform algorithm URI</code>
-    *
-    * @param transformURI the URI form of transform that indicates which transformation is applied to data
-    * @param contextElement
-    * @throws TransformationException
-    * @see Transform#getInstance(Document doc, String algorithmURI, Element childElement)
-    */
-   public void addTransform(String transformURI, Element contextElement)
+    /**
+     * Adds the <code>Transform</code> with the specified <code>Transform
+     * algorithm URI</code>
+     *
+     * @param transformURI the URI form of transform that indicates which
+     * transformation is applied to data
+     * @param contextElement
+     * @throws TransformationException
+     * @see Transform#getInstance(Document doc, String algorithmURI, Element childElement)
+     */
+    public void addTransform(String transformURI, Element contextElement)
            throws TransformationException {
 
-      try {
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transformURI + ")");
+        try {
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transformURI + ")");
 
-         Transform transform = Transform.getInstance(this._doc, transformURI,
-                                                     contextElement);
+            Transform transform =
+                Transform.getInstance(this._doc, transformURI, contextElement);
 
-         this.addTransform(transform);
-      } catch (InvalidTransformException ex) {
-         throw new TransformationException("empty", ex);
-      }
-   }
+            this.addTransform(transform);
+        } catch (InvalidTransformException ex) {
+            throw new TransformationException("empty", ex);
+        }
+    }
 
-   /**
-    * Adds the <code>Transform</code> with the specified <code>Transform algorithm URI</code>
-    *
-    * @param transformURI the URI form of transform that indicates which transformation is applied to data
-    * @param contextNodes
-    * @throws TransformationException
-    * @see Transform#getInstance(Document doc, String algorithmURI, NodeList contextNodes)
-    */
-   public void addTransform(String transformURI, NodeList contextNodes)
+    /**
+     * Adds the <code>Transform</code> with the specified <code>Transform
+     * algorithm URI</code>.
+     *
+     * @param transformURI the URI form of transform that indicates which
+     * transformation is applied to data
+     * @param contextNodes
+     * @throws TransformationException
+     * @see Transform#getInstance(Document doc, String algorithmURI, NodeList contextNodes)
+     */
+    public void addTransform(String transformURI, NodeList contextNodes)
            throws TransformationException {
 
-      try {
-         Transform transform = Transform.getInstance(this._doc, transformURI,
-                                                     contextNodes);
-
-         this.addTransform(transform);
-      } catch (InvalidTransformException ex) {
-         throw new TransformationException("empty", ex);
-      }
-   }
+        try {
+            Transform transform =
+                Transform.getInstance(this._doc, transformURI, contextNodes);
+            this.addTransform(transform);
+        } catch (InvalidTransformException ex) {
+            throw new TransformationException("empty", ex);
+        }
+    }
 
-   /**
-    * Adds a user-provided Transform step.
-    *
-    * @param transform {@link Transform} object
-    */
-   private void addTransform(Transform transform) {
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transform.getURI() + ")");
+    /**
+     * Adds a user-provided Transform step.
+     *
+     * @param transform {@link Transform} object
+     */
+    private void addTransform(Transform transform) {
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transform.getURI() + ")");
 
-      Element transformElement = transform.getElement();
+        Element transformElement = transform.getElement();
 
-      this._constructionElement.appendChild(transformElement);
-      XMLUtils.addReturnToElement(this._constructionElement);
-   }
+        this._constructionElement.appendChild(transformElement);
+        XMLUtils.addReturnToElement(this._constructionElement);
+    }
 
-   /**
-    * Applies all included <code>Transform</code>s to xmlSignatureInput and returns the result of these transformations.
-    *
-    * @param xmlSignatureInput the input for the <code>Transform</code>s
-    * @return the result of the <code>Transforms</code>
-    * @throws TransformationException
-    */
-   public XMLSignatureInput performTransforms(
-           XMLSignatureInput xmlSignatureInput) throws TransformationException {
-             return performTransforms(xmlSignatureInput,null);
-   }
+    /**
+     * Applies all included <code>Transform</code>s to xmlSignatureInput and
+     * returns the result of these transformations.
+     *
+     * @param xmlSignatureInput the input for the <code>Transform</code>s
+     * @return the result of the <code>Transforms</code>
+     * @throws TransformationException
+     */
+    public XMLSignatureInput performTransforms(
+        XMLSignatureInput xmlSignatureInput) throws TransformationException {
+        return performTransforms(xmlSignatureInput, null);
+    }
 
-   /**
-    * Applies all included <code>Transform</code>s to xmlSignatureInput and returns the result of these transformations.
-    *
-    * @param xmlSignatureInput the input for the <code>Transform</code>s
-    * @param os where to output the last transformation.
-    * @return the result of the <code>Transforms</code>
-    * @throws TransformationException
-    */
+    /**
+     * Applies all included <code>Transform</code>s to xmlSignatureInput and
+     * returns the result of these transformations.
+     *
+     * @param xmlSignatureInput the input for the <code>Transform</code>s
+     * @param os where to output the last transformation.
+     * @return the result of the <code>Transforms</code>
+     * @throws TransformationException
+     */
     public XMLSignatureInput performTransforms(
-            XMLSignatureInput xmlSignatureInput,OutputStream os) throws TransformationException {
+        XMLSignatureInput xmlSignatureInput, OutputStream os)
+        throws TransformationException {
 
-      try {
-        int last=this.getLength()-1;
-         for (int i = 0; i < last; i++) {
-            Transform t = this.item(i);
-            if (true) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Preform the (" + i + ")th " + t.getURI() + " transform");
+        try {
+            int last=this.getLength()-1;
+            for (int i = 0; i < last; i++) {
+                Transform t = this.item(i);
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "Perform the (" + i + ")th " + t.getURI()
+                        + " transform");
+                }
+                xmlSignatureInput = t.performTransform(xmlSignatureInput);
             }
-                        xmlSignatureInput = t.performTransform(xmlSignatureInput);
-         }
-         if (last>=0) {
-                        Transform t = this.item(last);
-            xmlSignatureInput = t.performTransform(xmlSignatureInput, os);
-         }
-
+            if (last>=0) {
+                Transform t = this.item(last);
+                xmlSignatureInput = t.performTransform(xmlSignatureInput, os);
+            }
 
-         return xmlSignatureInput;
-      } catch (IOException ex) {
-         throw new TransformationException("empty", ex);
-      // } catch (ParserConfigurationException ex) { throw new TransformationException("empty", ex);
-      // } catch (SAXException ex) { throw new TransformationException("empty", ex);
-      } catch (CanonicalizationException ex) {
-         throw new TransformationException("empty", ex);
-      } catch (InvalidCanonicalizerException ex) {
-         throw new TransformationException("empty", ex);
-      }
-   }
+            return xmlSignatureInput;
+        } catch (IOException ex) {
+            throw new TransformationException("empty", ex);
+        } catch (CanonicalizationException ex) {
+            throw new TransformationException("empty", ex);
+        } catch (InvalidCanonicalizerException ex) {
+            throw new TransformationException("empty", ex);
+        }
+    }
 
-   /**
-    * Return the nonnegative number of transformations.
-    *
-    * @return the number of transformations
-    */
-   public int getLength()
-   {
-                /*Element nscontext = XMLUtils.createDSctx(this._doc, "ds",
-                                                      Constants.SignatureSpecNS);
-             NodeList transformElems =
-                XPathAPI.selectNodeList(this._constructionElement,
-                                        "./ds:Transform", nscontext);
-             return transformElems.getLength();*/
-       if (transforms==null) {
-        transforms=XMLUtils.selectDsNodes(this._constructionElement.getFirstChild(),
-           "Transform");
-       }
-       return transforms.length;
-  }
+    /**
+     * Return the nonnegative number of transformations.
+     *
+     * @return the number of transformations
+     */
+    public int getLength()
+    {
+        if (transforms == null) {
+            transforms = XMLUtils.selectDsNodes
+                (this._constructionElement.getFirstChild(), "Transform");
+        }
+        return transforms.length;
+    }
 
-   /**
-    * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>.
-    * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>.
-    *
-    * @param i index of {@link Transform} to return
-    * @return the <it>i</it><sup>th</sup> transforms
-    * @throws TransformationException
-    */
-   public Transform item(int i) throws TransformationException {
+    /**
+     * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>.
+     * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>.
+     *
+     * @param i index of {@link Transform} to return
+     * @return the <it>i</it><sup>th</sup> Transform
+     * @throws TransformationException
+     */
+    public Transform item(int i) throws TransformationException {
 
-                try {
-                        if (transforms==null) {
-                                transforms=XMLUtils.selectDsNodes(this._constructionElement.getFirstChild(),
-                                "Transform");
-                        }
-                        return new Transform(transforms[i], this._baseURI);
-                } catch (XMLSecurityException ex) {
-                        throw new TransformationException("empty", ex);
-                }
-   }
+        try {
+            if (transforms == null) {
+                transforms = XMLUtils.selectDsNodes
+                    (this._constructionElement.getFirstChild(), "Transform");
+            }
+            return new Transform(transforms[i], this._baseURI);
+        } catch (XMLSecurityException ex) {
+            throw new TransformationException("empty", ex);
+        }
+    }
 
-   /** @inheritDoc */
-   public String getBaseLocalName() {
-      return Constants._TAG_TRANSFORMS;
-   }
+    /** @inheritDoc */
+    public String getBaseLocalName() {
+        return Constants._TAG_TRANSFORMS;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.java	Wed Jul 05 16:42:37 2017 +0200
@@ -62,7 +62,7 @@
  * -scott
  * </PRE>
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * @see com.sun.org.apache.xml.internal.security.transforms.implementations.FuncHere
  * @see com.sun.org.apache.xml.internal.security.utils.XPathFuncHereAPI
  * @see <A HREF="http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html#function-here">XML Signature - The here() function</A>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformBase64Decode.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformBase64Decode.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -33,6 +32,7 @@
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -43,7 +43,6 @@
 import org.w3c.dom.Text;
 import org.xml.sax.SAXException;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/2000/09/xmldsig#base64</CODE> decoding
  * transform.
@@ -95,13 +94,15 @@
     * @throws IOException
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
            throws IOException, CanonicalizationException,
                   TransformationException {
-        return enginePerformTransform(input,null);
+        return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,
-            OutputStream os)
+            OutputStream os, Transform _transformObject)
     throws IOException, CanonicalizationException,
            TransformationException {
          try {
@@ -116,7 +117,7 @@
                 byte[] decodedBytes = Base64.decode(sb.toString());
                 return new XMLSignatureInput(decodedBytes);
          }
-                Base64.decode(sb.toString().getBytes(),os);
+                Base64.decode(sb.toString(),os);
             XMLSignatureInput output=new XMLSignatureInput((byte[])null);
             output.setOutputStream(os);
             return output;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,17 +20,15 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</CODE>
  * transform.
@@ -54,18 +52,19 @@
    /**
     *  @inheritDoc
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-            return enginePerformTransform(input,null);
+            return enginePerformTransform(input, null, _transformObject);
    }
-    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os)
+
+    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {
          Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments();
          if (os!=null) {
                 c14n.setWriter(os);
          }
          byte[] result = null;
-         input.setNeedsToBeExpanded(true);
          result=c14n.engineCanonicalize(input);
          XMLSignatureInput output=new XMLSignatureInput(result);
          if (os!=null) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,65 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.transforms.implementations;
+
+import java.io.OutputStream;
+
+import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
+import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_OmitComments;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
+import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
+import com.sun.org.apache.xml.internal.security.transforms.Transforms;
+
+/**
+ * Implements the <CODE>http://www.w3.org/2006/12/xml-c14n11</CODE>
+ * (C14N 1.1) transform.
+ *
+ * @author Sean Mullan
+ */
+public class TransformC14N11 extends TransformSpi {
+
+    protected String engineGetURI() {
+        return Transforms.TRANSFORM_C14N11_OMIT_COMMENTS;
+    }
+
+    protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform transform)
+        throws CanonicalizationException {
+        return enginePerformTransform(input, null, transform);
+    }
+
+    protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, OutputStream os, Transform transform)
+        throws CanonicalizationException {
+        Canonicalizer11_OmitComments c14n = new Canonicalizer11_OmitComments();
+        if (os != null) {
+            c14n.setWriter(os);
+        }
+        byte[] result = null;
+        result = c14n.engineCanonicalize(input);
+        XMLSignatureInput output = new XMLSignatureInput(result);
+        if (os != null) {
+            output.setOutputStream(os);
+        }
+        return output;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11_WithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,67 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package com.sun.org.apache.xml.internal.security.transforms.implementations;
+
+import java.io.OutputStream;
+
+import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
+import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_WithComments;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
+import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
+import com.sun.org.apache.xml.internal.security.transforms.Transforms;
+
+/**
+ * Implements the <CODE>http://www.w3.org/2006/12/xml-c14n-11#WithComments</CODE>
+ * (C14N 1.1 With Comments) transform.
+ *
+ * @author Sean Mullan
+ */
+public class TransformC14N11_WithComments extends TransformSpi {
+
+    protected String engineGetURI() {
+        return Transforms.TRANSFORM_C14N11_WITH_COMMENTS;
+    }
+
+    protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform transform)
+        throws CanonicalizationException {
+        return enginePerformTransform(input, null, transform);
+    }
+
+    protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, OutputStream os, Transform transform)
+        throws CanonicalizationException {
+
+        Canonicalizer11_WithComments c14n = new Canonicalizer11_WithComments();
+        if (os != null) {
+            c14n.setWriter(os);
+        }
+
+        byte[] result = null;
+        result = c14n.engineCanonicalize(input);
+        XMLSignatureInput output = new XMLSignatureInput(result);
+        if (os != null) {
+            output.setOutputStream(os);
+        }
+        return output;
+    }
+}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,25 +20,24 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments;
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
 import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces;
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Class TransformC14NExclusive
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
+ * @version $Revision: 1.5 $
  */
 public class TransformC14NExclusive extends TransformSpi {
 
@@ -46,7 +45,6 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS;
 
-
    /**
     * Method engineGetURI
     *
@@ -63,27 +61,29 @@
     * @return the transformed of the input
     * @throws CanonicalizationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-            return enginePerformTransform(input,null);
+            return enginePerformTransform(input, null, _transformObject);
    }
-    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os)
+
+    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {
       try {
          String inclusiveNamespaces = null;
 
-         if (this._transformObject
+         if (_transformObject
                  .length(InclusiveNamespaces
                     .ExclusiveCanonicalizationNamespace, InclusiveNamespaces
                     ._TAG_EC_INCLUSIVENAMESPACES) == 1) {
             Element inclusiveElement =
                 XMLUtils.selectNode(
-               this._transformObject.getElement().getFirstChild(),
+               _transformObject.getElement().getFirstChild(),
                   InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
                   InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);
 
             inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
-                    this._transformObject.getBaseURI()).getInclusiveNamespaces();
+                    _transformObject.getBaseURI()).getInclusiveNamespaces();
          }
 
          Canonicalizer20010315ExclOmitComments c14n =
@@ -92,7 +92,6 @@
             c14n.setWriter(os);
          }
          byte []result;
-         input.setNeedsToBeExpanded(true);
          result =c14n.engineCanonicalize(input, inclusiveNamespaces);
 
          XMLSignatureInput output=new XMLSignatureInput(result);
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,21 +20,19 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments;
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
 import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces;
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</CODE>
  * transform.
@@ -47,7 +45,6 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS;
 
-
    /**
     * Method engineGetURI
     *@inheritDoc
@@ -60,27 +57,29 @@
    /**
     * @inheritDoc
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-            return enginePerformTransform(input,null);
+            return enginePerformTransform(input, null, _transformObject);
    }
-    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os)
+
+    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {
      try {
         String inclusiveNamespaces = null;
 
-        if (this._transformObject
+        if (_transformObject
                 .length(InclusiveNamespaces
                    .ExclusiveCanonicalizationNamespace, InclusiveNamespaces
                    ._TAG_EC_INCLUSIVENAMESPACES) == 1) {
            Element inclusiveElement =
                XMLUtils.selectNode(
-              this._transformObject.getElement().getFirstChild(),
+              _transformObject.getElement().getFirstChild(),
                  InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
                  InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);
 
            inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
-                   this._transformObject.getBaseURI()).getInclusiveNamespaces();
+                   _transformObject.getBaseURI()).getInclusiveNamespaces();
         }
 
         Canonicalizer20010315ExclWithComments c14n =
@@ -88,7 +87,6 @@
         if (os!=null) {
            c14n.setWriter( os);
         }
-        input.setNeedsToBeExpanded(true);
         byte []result;
         result =c14n.engineCanonicalize(input, inclusiveNamespaces);
         XMLSignatureInput output=new XMLSignatureInput(result);
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NWithComments.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NWithComments.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,17 +20,15 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
 import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</CODE>
  * transform.
@@ -43,18 +41,20 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_WITH_COMMENTS;
 
-
    /** @inheritDoc */
    protected String engineGetURI() {
       return implementedTransformURI;
    }
+
    /** @inheritDoc */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
-   throws CanonicalizationException {
-            return enginePerformTransform(input,null);
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
+        throws CanonicalizationException {
+            return enginePerformTransform(input, null, _transformObject);
    }
+
    /** @inheritDoc */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os)
+   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
            throws CanonicalizationException {
 
         Canonicalizer20010315WithComments c14n = new Canonicalizer20010315WithComments();
@@ -63,7 +63,6 @@
         }
 
          byte[] result = null;
-         input.setNeedsToBeExpanded(true);
          result=c14n.engineCanonicalize(input);
          XMLSignatureInput output=new XMLSignatureInput(result);
          if (os!=null) {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,10 +20,9 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import com.sun.org.apache.xml.internal.security.signature.NodeFilter;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -32,7 +31,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/2000/09/xmldsig#enveloped-signature</CODE>
  * transform.
@@ -57,7 +55,7 @@
    /**
     * @inheritDoc
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
            throws TransformationException {
 
 
@@ -74,14 +72,7 @@
           * (including comments) in the node-set representing the octet stream.
           */
 
-         /*
-         if (input.isOctetStream()) {
-            input.setNodesetXPath(Canonicalizer.XPATH_C14N_WITH_COMMENTS);
-         }
-         */
-
-         Element transformElement = this._transformObject.getElement();
-         Node signatureElement = transformElement;
+         Node signatureElement = _transformObject.getElement();
 
 
          signatureElement = searchSignatureElement(signatureElement);
@@ -124,18 +115,24 @@
             }
             return signatureElement;
     }
-    class EnvelopedNodeFilter implements NodeFilter {
+    static class EnvelopedNodeFilter implements NodeFilter {
         Node exclude;
         EnvelopedNodeFilter(Node n) {
-                exclude=n;
+            exclude=n;
         }
-                /**
-                 * @see com.sun.org.apache.xml.internal.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
-                 */
-                public boolean isNodeInclude(Node n) {
-                        // TODO Optimize me.
-                        return !XMLUtils.isDescendantOrSelf(exclude,n);
-                }
-
+    public int isNodeIncludeDO(Node n, int level) {
+        if ((n==exclude))
+                        return -1;
+        return 1;
+    }
+        /**
+         * @see com.sun.org.apache.xml.internal.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
+         */
+        public int isNodeInclude(Node n) {
+                if ((n==exclude) || XMLUtils.isDescendantOrSelf(exclude,n))
+                        return -1;
+                return 1;
+            //return !XMLUtils.isDescendantOrSelf(exclude,n);
+        }
     }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,13 +20,12 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import javax.xml.transform.TransformerException;
 
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityRuntimeException;
 import com.sun.org.apache.xml.internal.security.signature.NodeFilter;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -40,7 +39,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-
 /**
  * Class TransformXPath
  *
@@ -53,15 +51,10 @@
  */
 public class TransformXPath extends TransformSpi {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(TransformXPath.class.getName());
-
    /** Field implementedTransformURI */
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_XPATH;
 
-
    /**
     * Method engineGetURI
     *
@@ -78,7 +71,7 @@
     *
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
            throws TransformationException {
 
       try {
@@ -94,12 +87,12 @@
           * The evaluation of this expression includes all of the document's nodes
           * (including comments) in the node-set representing the octet stream.
           */
-                  CachedXPathAPIHolder.setDoc(this._transformObject.getElement().getOwnerDocument());
+                  CachedXPathAPIHolder.setDoc(_transformObject.getElement().getOwnerDocument());
 
 
 
          Element xpathElement =XMLUtils.selectDsNode(
-            this._transformObject.getElement().getFirstChild(),
+            _transformObject.getElement().getFirstChild(),
                Constants._TAG_XPATH,0);
 
          if (xpathElement == null) {
@@ -129,42 +122,47 @@
     * @return true if needs to be circunvent for bug.
     */
     private boolean needsCircunvent(String str) {
-        return true;
-        //return str.contains("namespace");
-
+        //return true;
+        //return false;
+        return (str.indexOf("namespace") != -1) || (str.indexOf("name()") != -1);
     }
-    class XPathNodeFilter implements NodeFilter {
-         PrefixResolverDefault prefixResolver;
-         CachedXPathFuncHereAPI xPathFuncHereAPI =
-             new CachedXPathFuncHereAPI(CachedXPathAPIHolder.getCachedXPathAPI());
-          ;
+
+    static class XPathNodeFilter implements NodeFilter {
+        PrefixResolverDefault prefixResolver;
+        CachedXPathFuncHereAPI xPathFuncHereAPI =
+            new CachedXPathFuncHereAPI(CachedXPathAPIHolder.getCachedXPathAPI());
         Node xpathnode;
         String str;
         XPathNodeFilter(Element xpathElement,
                         Node xpathnode, String str) {
-                this.xpathnode=xpathnode;
-                this.str=str;
-                prefixResolver =new PrefixResolverDefault(xpathElement);
+            this.xpathnode=xpathnode;
+            this.str=str;
+            prefixResolver =new PrefixResolverDefault(xpathElement);
         }
 
-
-                /**
-                 * @see com.sun.org.apache.xml.internal.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
-                 */
-                public boolean isNodeInclude(Node currentNode) {
-                        XObject includeInResult;
-                        try {
-                                includeInResult = xPathFuncHereAPI.eval(currentNode,
-                                        xpathnode, str,prefixResolver);
-                                return includeInResult.bool();
-                        } catch (TransformerException e) {
+        /**
+         * @see com.sun.org.apache.xml.internal.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
+         */
+        public int isNodeInclude(Node currentNode) {
+            XObject includeInResult;
+            try {
+                includeInResult = xPathFuncHereAPI.eval(currentNode,
+                                xpathnode, str,prefixResolver);
+                if (includeInResult.bool())
+                        return 1;
+                return 0;
+            } catch (TransformerException e) {
                 Object[] eArgs = {currentNode};
-                                throw new XMLSecurityRuntimeException("signature.Transform.node", eArgs, e);
-                        }
-                        catch (Exception e) {
+                throw new XMLSecurityRuntimeException
+                    ("signature.Transform.node", eArgs, e);
+            } catch (Exception e) {
                 Object[] eArgs = {currentNode, new Short(currentNode.getNodeType())};
-                                throw new XMLSecurityRuntimeException("signature.Transform.nodeAndType",eArgs, e);
-                        }
-                }
+                throw new XMLSecurityRuntimeException
+                    ("signature.Transform.nodeAndType",eArgs, e);
+            }
+        }
+        public int isNodeIncludeDO(Node n, int level) {
+                return isNodeInclude(n);
+        }
     }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath2Filter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath2Filter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -24,7 +24,10 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
@@ -34,6 +37,7 @@
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.signature.NodeFilter;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -88,9 +92,9 @@
     *
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
            throws TransformationException {
-          CachedXPathAPIHolder.setDoc(this._transformObject.getElement().getOwnerDocument());
+          CachedXPathAPIHolder.setDoc(_transformObject.getElement().getOwnerDocument());
       try {
           List unionNodes=new ArrayList();
            List substractNodes=new ArrayList();
@@ -101,7 +105,7 @@
 
 
          Element []xpathElements =XMLUtils.selectNodes(
-                this._transformObject.getElement().getFirstChild(),
+                _transformObject.getElement().getFirstChild(),
                    XPath2FilterContainer.XPathFilter2NS,
                    XPath2FilterContainer._TAG_XPATH2);
          int noOfSteps = xpathElements.length;
@@ -122,7 +126,7 @@
 
          for (int i = 0; i < noOfSteps; i++) {
             Element xpathElement =XMLUtils.selectNode(
-               this._transformObject.getElement().getFirstChild(),
+               _transformObject.getElement().getFirstChild(),
                   XPath2FilterContainer.XPathFilter2NS,
                   XPath2FilterContainer._TAG_XPATH2,i);
             XPath2FilterContainer xpathContainer =
@@ -143,9 +147,9 @@
              }
          }
 
-         input.setNeedsToBeExpanded(true);
 
-         input.addNodeFilter(new XPath2NodeFilter(unionNodes,substractNodes,intersectNodes));
+         input.addNodeFilter(new XPath2NodeFilter(convertNodeListToSet(unionNodes),
+                         convertNodeListToSet(substractNodes),convertNodeListToSet(intersectNodes)));
          input.setNodeSet(true);
          return input;
       } catch (TransformerException ex) {
@@ -166,37 +170,110 @@
          throw new TransformationException("empty", ex);
       }
    }
+   static Set convertNodeListToSet(List l){
+           Set result=new HashSet();
+           for (int j=0;j<l.size();j++) {
+                   NodeList rootNodes=(NodeList) l.get(j);
+               int length = rootNodes.getLength();
+
+               for (int i = 0; i < length; i++) {
+                    Node rootNode = rootNodes.item(i);
+                    result.add(rootNode);
+
+                 }
+
+           }
+           return result;
+   }
 }
 
 class XPath2NodeFilter implements NodeFilter {
-        XPath2NodeFilter(List unionNodes, List substractNodes,
-                        List intersectNodes) {
+        boolean hasUnionNodes;
+        boolean hasSubstractNodes;
+        boolean hasIntersectNodes;
+        XPath2NodeFilter(Set unionNodes, Set substractNodes,
+                        Set intersectNodes) {
                 this.unionNodes=unionNodes;
+                hasUnionNodes=!unionNodes.isEmpty();
                 this.substractNodes=substractNodes;
+                hasSubstractNodes=!substractNodes.isEmpty();
                 this.intersectNodes=intersectNodes;
+                hasIntersectNodes=!intersectNodes.isEmpty();
         }
-        List unionNodes=new ArrayList();
-        List substractNodes=new ArrayList();
-        List intersectNodes=new ArrayList();
+        Set unionNodes;
+        Set substractNodes;
+        Set intersectNodes;
 
 
    /**
     * @see com.sun.org.apache.xml.internal.security.signature.NodeFilter#isNodeInclude(org.w3c.dom.Node)
     */
-   public boolean isNodeInclude(Node currentNode) {
-           boolean notIncluded=false;
-           if (rooted(currentNode,substractNodes)) {
-                   notIncluded=true;
-           } else if (!rooted(currentNode,intersectNodes)) {
-                   notIncluded=true;
-           }
-           if (notIncluded && rooted(currentNode,unionNodes)) {
-                   notIncluded=false;
+   public int isNodeInclude(Node currentNode) {
+           int result=1;
+
+           if (hasSubstractNodes && rooted(currentNode, substractNodes)) {
+                      result = -1;
+           } else if (hasIntersectNodes && !rooted(currentNode, intersectNodes)) {
+                   result = 0;
            }
 
-      return !notIncluded;
+          //TODO OPTIMIZE
+      if (result==1)
+          return 1;
+      if (hasUnionNodes) {
+          if (rooted(currentNode, unionNodes)) {
+                   return 1;
+          }
+          result=0;
+      }
+      return result;
 
    }
+   int inSubstract=-1;
+   int inIntersect=-1;
+   int inUnion=-1;
+   public int isNodeIncludeDO(Node n, int level) {
+           int result=1;
+           if (hasSubstractNodes) {
+                   if ((inSubstract==-1) || (level<=inSubstract)) {
+                           if (inList(n,  substractNodes)) {
+                                   inSubstract=level;
+                           } else {
+                                   inSubstract=-1;
+                           }
+                   }
+                   if (inSubstract!=-1){
+                           result=-1;
+                   }
+           }
+           if (result!=-1){
+                   if (hasIntersectNodes) {
+                   if ((inIntersect==-1) || (level<=inIntersect)) {
+                           if (!inList(n,  intersectNodes)) {
+                                   inIntersect=-1;
+                                   result=0;
+                           } else {
+                                   inIntersect=level;
+                           }
+                   }
+                   }
+           }
+
+          if (level<=inUnion)
+                   inUnion=-1;
+      if (result==1)
+          return 1;
+      if (hasUnionNodes) {
+          if ((inUnion==-1) && inList(n,  unionNodes)) {
+                  inUnion=level;
+          }
+          if (inUnion!=-1)
+                  return 1;
+          result=0;
+      }
+
+      return result;
+   }
 
    /**
     * Method rooted
@@ -205,20 +282,28 @@
     *
     * @return if rooted bye the rootnodes
     */
-   boolean rooted(Node currentNode, List nodeList ) {
-           for (int j=0;j<nodeList.size();j++) {
-                   NodeList rootNodes=(NodeList) nodeList.get(j);
-      int length = rootNodes.getLength();
-
-      for (int i = 0; i < length; i++) {
-         Node rootNode = rootNodes.item(i);
-
-         if (XMLUtils.isDescendantOrSelf(rootNode,currentNode)) {
-            return true;
-         }
-      }
-
+   static boolean  rooted(Node currentNode, Set nodeList ) {
+           if (nodeList.contains(currentNode)) {
+                   return true;
+           }
+           Iterator it=nodeList.iterator();
+           while (it.hasNext()) {
+                        Node rootNode = (Node) it.next();
+                        if (XMLUtils.isDescendantOrSelf(rootNode,currentNode)) {
+                                   return true;
+                        }
            }
            return false;
    }
+
+      /**
+       * Method rooted
+       * @param currentNode
+       * @param nodeList
+       *
+       * @return if rooted bye the rootnodes
+       */
+      static boolean  inList(Node currentNode, Set nodeList ) {
+              return nodeList.contains(currentNode);
+      }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPointer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPointer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -25,6 +24,7 @@
 
 
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
@@ -56,7 +56,7 @@
     * @throws TransformationException
     *
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
            throws  TransformationException {
 
       Object exArgs[] = { implementedTransformURI };
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXSLT.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXSLT.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,9 +2,8 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2007 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -21,14 +20,12 @@
  */
 package com.sun.org.apache.xml.internal.security.transforms.implementations;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.lang.reflect.Method;
 
-import javax.xml.XMLConstants;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
@@ -40,13 +37,13 @@
 
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
 import com.sun.org.apache.xml.internal.security.transforms.TransformSpi;
 import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
 import com.sun.org.apache.xml.internal.security.transforms.Transforms;
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Class TransformXSLT
  *
@@ -65,6 +62,17 @@
    static final String defaultXSLTSpecNSprefix = "xslt";
    static final String XSLTSTYLESHEET          = "stylesheet";
 
+   // check for secure processing feature
+   private static Class xClass = null;
+   static {
+      try {
+         xClass = Class.forName("javax.xml.XMLConstants");
+      } catch (Exception e) {}
+   }
+
+   static java.util.logging.Logger log =
+      java.util.logging.Logger.getLogger(
+         TransformXSLT.class.getName());
 
    /**
     * Method engineGetURI
@@ -83,16 +91,22 @@
     * @throws IOException
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
+   protected XMLSignatureInput enginePerformTransform
+        (XMLSignatureInput input, Transform _transformObject)
            throws IOException,
                   TransformationException {
-        return enginePerformTransform(input,null);
+        return enginePerformTransform(input, null, _transformObject);
    }
-    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream baos)
+
+    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream baos, Transform _transformObject)
     throws IOException,
            TransformationException {
+      if (xClass == null) {
+         Object exArgs[] = { "SECURE_PROCESSING_FEATURE not supported" };
+         throw new TransformationException("generic.EmptyMessage", exArgs);
+      }
       try {
-         Element transformElement = this._transformObject.getElement();
+         Element transformElement = _transformObject.getElement();
 
          Element _xsltElement =
             XMLUtils.selectNode(transformElement.getFirstChild(),
@@ -105,8 +119,10 @@
          }
 
          TransformerFactory tFactory = TransformerFactory.newInstance();
+         Class c = tFactory.getClass();
+         Method m = c.getMethod("setFeature", new Class[] {String.class, boolean.class});
          // Process XSLT stylesheets in a secure manner
-         tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+         m.invoke(tFactory, new Object[] {"http://javax.xml.XMLConstants/feature/secure-processing", Boolean.TRUE});
 
          /*
           * This transform requires an octet stream as input. If the actual
@@ -139,12 +155,25 @@
          }
 
          Transformer transformer = tFactory.newTransformer(stylesheet);
+
+         // Force Xalan to use \n as line separator on all OSes. This
+         // avoids OS specific signature validation failures due to line
+         // separator differences in the transformed output. Unfortunately,
+         // this is not a standard JAXP property so will not work with non-Xalan
+         // implementations.
+         try {
+            transformer.setOutputProperty
+               ("{http://xml.apache.org/xalan}line-separator", "\n");
+         } catch (Exception e) {
+            log.log(java.util.logging.Level.WARNING, "Unable to set Xalan line-separator property: "
+               + e.getMessage());
+         }
+
          if (baos==null) {
-                    ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
-               StreamResult outputTarget = new StreamResult(baos1);
-               transformer.transform(xmlSource, outputTarget);
-               return new XMLSignatureInput(baos1.toByteArray());
-
+            ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
+            StreamResult outputTarget = new StreamResult(baos1);
+            transformer.transform(xmlSource, outputTarget);
+            return new XMLSignatureInput(baos1.toByteArray());
          }
          StreamResult outputTarget = new StreamResult(baos);
 
@@ -164,6 +193,18 @@
          Object exArgs[] = { ex.getMessage() };
 
          throw new TransformationException("generic.EmptyMessage", exArgs, ex);
+      } catch (NoSuchMethodException ex) {
+         Object exArgs[] = { ex.getMessage() };
+
+         throw new TransformationException("generic.EmptyMessage", exArgs, ex);
+      } catch (IllegalAccessException ex) {
+         Object exArgs[] = { ex.getMessage() };
+
+         throw new TransformationException("generic.EmptyMessage", exArgs, ex);
+      } catch (java.lang.reflect.InvocationTargetException ex) {
+         Object exArgs[] = { ex.getMessage() };
+
+         throw new TransformationException("generic.EmptyMessage", exArgs, ex);
       }
    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -26,6 +26,7 @@
 import com.sun.org.apache.xml.internal.security.transforms.TransformParam;
 import com.sun.org.apache.xml.internal.security.utils.ElementProxy;
 import com.sun.org.apache.xml.internal.security.utils.HelperNodeList;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -36,7 +37,7 @@
  * Implements the parameters for the <A
  * HREF="http://www.w3.org/TR/xmldsig-filter2/">XPath Filter v2.0</A>.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * @see <A HREF="http://www.w3.org/TR/xmldsig-filter2/">XPath Filter v2.0 (TR)</A>
  * @see <A HREF="http://www.w3.org/Signature/Drafts/xmldsig-xfilter2/">XPath Filter v2.0 (editors copy)</A>
  */
@@ -188,7 +189,7 @@
 
       HelperNodeList nl = new HelperNodeList();
 
-      nl.appendChild(doc.createTextNode("\n"));
+      XMLUtils.addReturnToElement(doc, nl);
 
       for (int i = 0; i < params.length; i++) {
          String type = params[i][0];
@@ -207,7 +208,7 @@
          XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);
 
          nl.appendChild(c.getElement());
-         nl.appendChild(doc.createTextNode("\n"));
+         XMLUtils.addReturnToElement(doc, nl);
       }
 
       return nl;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer04.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer04.java	Wed Jul 05 16:42:37 2017 +0200
@@ -25,6 +25,7 @@
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 import com.sun.org.apache.xml.internal.security.transforms.TransformParam;
 import com.sun.org.apache.xml.internal.security.utils.ElementProxy;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -35,7 +36,7 @@
  * Implements the parameters for the <A
  * HREF="http://www.w3.org/TR/xmldsig-filter2/">XPath Filter v2.0</A>.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * @see <A HREF="http://www.w3.org/TR/xmldsig-filter2/">XPath Filter v2.0 (TR)</A>
  * @see <A HREF="http://www.w3.org/Signature/Drafts/xmldsig-xfilter2/">XPath Filter v2.0 (editors copy)</A>
  */
@@ -87,8 +88,9 @@
 
       if ((xpath2filter.length() > 2)
               && (!Character.isWhitespace(xpath2filter.charAt(0)))) {
-         this._constructionElement.appendChild(doc.createTextNode("\n"
-                 + xpath2filter + "\n"));
+         XMLUtils.addReturnToElement(this._constructionElement);
+         this._constructionElement.appendChild(doc.createTextNode(xpath2filter));
+         XMLUtils.addReturnToElement(this._constructionElement);
       } else {
          this._constructionElement
             .appendChild(doc.createTextNode(xpath2filter));
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPathFilterCHGPContainer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPathFilterCHGPContainer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -36,7 +36,7 @@
  * Implements the parameters for a custom Transform which has a better performance
  * thatn the xfilter2.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class XPathFilterCHGPContainer extends ElementProxy
         implements TransformParam {
@@ -104,7 +104,7 @@
          includeButSearchElem
             .appendChild(this._doc
                .createTextNode(indentXPathText(includeButSearch)));
-         this._constructionElement.appendChild(doc.createTextNode("\n"));
+         XMLUtils.addReturnToElement(this._constructionElement);
          this._constructionElement.appendChild(includeButSearchElem);
       }
 
@@ -118,7 +118,7 @@
          excludeButSearchElem
             .appendChild(this._doc
                .createTextNode(indentXPathText(excludeButSearch)));
-         this._constructionElement.appendChild(doc.createTextNode("\n"));
+         XMLUtils.addReturnToElement(this._constructionElement);
          this._constructionElement.appendChild(excludeButSearchElem);
       }
 
@@ -129,11 +129,11 @@
 
          excludeElem
             .appendChild(this._doc.createTextNode(indentXPathText(exclude)));
-         this._constructionElement.appendChild(doc.createTextNode("\n"));
+         XMLUtils.addReturnToElement(this._constructionElement);
          this._constructionElement.appendChild(excludeElem);
       }
 
-      this._constructionElement.appendChild(doc.createTextNode("\n"));
+      XMLUtils.addReturnToElement(this._constructionElement);
    }
 
    /**
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,24 +20,17 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.StringReader;
 import java.math.BigInteger;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.Text;
-import org.xml.sax.InputSource;
 
 
 /**
@@ -53,17 +46,10 @@
  */
 public class Base64 {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(Base64.class.getName());
-
 
    /** Field BASE64DEFAULTLENGTH */
    public static final int BASE64DEFAULTLENGTH = 76;
 
-   /** Field _base64length */
-   static int _base64length = Base64.BASE64DEFAULTLENGTH;
-
    private Base64() {
      // we don't allow instantiation
    }
@@ -79,7 +65,7 @@
     * @param bitlen <code>int<code> the desired length in bits of the representation
     * @return a byte array with <code>bitlen</code> bits of <code>big</code>
     */
-   static byte[] getBytes(BigInteger big, int bitlen) {
+   static final byte[] getBytes(BigInteger big, int bitlen) {
 
       //round bitlen
       bitlen = ((bitlen + 7) >> 3) << 3;
@@ -121,7 +107,7 @@
     * @param big
     * @return String with Base64 encoding
     */
-   public static String encode(BigInteger big) {
+   public static final String encode(BigInteger big) {
       return encode(getBytes(big, big.bitLength()));
    }
 
@@ -136,7 +122,7 @@
     * @param bitlen <code>int<code> the desired length in bits of the representation
     * @return a byte array with <code>bitlen</code> bits of <code>big</code>
     */
-   public static byte[] encode(BigInteger big, int bitlen) {
+   public static final  byte[] encode(BigInteger big, int bitlen) {
 
       //round bitlen
       bitlen = ((bitlen + 7) >> 3) << 3;
@@ -179,7 +165,7 @@
     * @return the biginter obtained from the node
     * @throws Base64DecodingException
     */
-   public static BigInteger decodeBigIntegerFromElement(Element element) throws Base64DecodingException
+   public static final BigInteger decodeBigIntegerFromElement(Element element) throws Base64DecodingException
    {
       return new BigInteger(1, Base64.decode(element));
    }
@@ -191,7 +177,7 @@
     * @return the biginter obtained from the text node
     * @throws Base64DecodingException
     */
-   public static BigInteger decodeBigIntegerFromText(Text text) throws Base64DecodingException
+   public static final BigInteger decodeBigIntegerFromText(Text text) throws Base64DecodingException
    {
       return new BigInteger(1, Base64.decode(text.getData()));
    }
@@ -203,7 +189,7 @@
     * @param element
     * @param biginteger
     */
-   public static void fillElementWithBigInteger(Element element,
+   public static final void fillElementWithBigInteger(Element element,
            BigInteger biginteger) {
 
       String encodedInt = encode(biginteger);
@@ -229,7 +215,7 @@
     * $todo$ not tested yet
     * @throws Base64DecodingException
     */
-   public static byte[] decode(Element element) throws Base64DecodingException {
+   public static final byte[] decode(Element element) throws Base64DecodingException {
 
       Node sibling = element.getFirstChild();
       StringBuffer sb = new StringBuffer();
@@ -255,7 +241,7 @@
     * @return an Element with the base64 encoded in the text.
     *
     */
-   public static Element encodeToElement(Document doc, String localName,
+   public static final Element encodeToElement(Document doc, String localName,
                                          byte[] bytes) {
 
       Element el = XMLUtils.createElementInSignatureSpace(doc, localName);
@@ -275,20 +261,23 @@
     * @throws Base64DecodingException
     *
     */
-   public static byte[] decode(byte[] base64) throws Base64DecodingException  {
-         return decodeInternal(base64);
+   public final static byte[] decode(byte[] base64) throws Base64DecodingException  {
+         return decodeInternal(base64, -1);
    }
 
 
 
    /**
-    * Encode a byte array and fold lines at the standard 76th character.
+    * Encode a byte array and fold lines at the standard 76th character unless
+    * ignore line breaks property is set.
     *
     * @param binaryData <code>byte[]<code> to be base64 encoded
     * @return the <code>String<code> with encoded data
     */
-   public static String encode(byte[] binaryData) {
-        return encode(binaryData,BASE64DEFAULTLENGTH);
+   public static final String encode(byte[] binaryData) {
+      return XMLUtils.ignoreLineBreaks()
+         ? encode(binaryData, Integer.MAX_VALUE)
+         : encode(binaryData, BASE64DEFAULTLENGTH);
    }
 
    /**
@@ -302,7 +291,7 @@
     * @throws IOException
     * @throws Base64DecodingException
     */
-   public static byte[] decode(BufferedReader reader)
+   public final static byte[] decode(BufferedReader reader)
            throws IOException, Base64DecodingException {
 
       UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream();
@@ -317,28 +306,6 @@
       return baos.toByteArray();
    }
 
-   /**
-    * Method main
-    *
-    *
-    * @param args
-    *
-    * @throws Exception
-    */
-   public static void main(String[] args) throws Exception {
-
-      DocumentBuilderFactory docBuilderFactory =
-         DocumentBuilderFactory.newInstance();
-      DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-      String testString1 =
-         "<container><base64 value=\"Should be 'Hallo'\">SGFsbG8=</base64></container>";
-      InputSource inputSource = new InputSource(new StringReader(testString1));
-      Document doc = docBuilder.parse(inputSource);
-      Element base64Elem =
-         (Element) doc.getDocumentElement().getChildNodes().item(0);
-
-      System.out.println(new String(decode(base64Elem)));
-   }
    static private final int  BASELENGTH         = 255;
    static private final int  LOOKUPLENGTH       = 64;
    static private final int  TWENTYFOURBITGROUP = 24;
@@ -347,7 +314,6 @@
    static private final int  FOURBYTE           = 4;
    static private final int  SIGN               = -128;
    static private final char PAD                = '=';
-   static private final boolean fDebug          = false;
    static final private byte [] base64Alphabet        = new byte[BASELENGTH];
    static final private char [] lookUpBase64Alphabet  = new char[LOOKUPLENGTH];
 
@@ -406,7 +372,7 @@
     * @param length <code>int<code> length of wrapped lines; No wrapping if less than 4.
     * @return a <code>String</code> with encoded data
     */
-    public static String encode(byte[] binaryData,int length) {
+    public static final String  encode(byte[] binaryData,int length) {
 
         if (length<4) {
                 length=Integer.MAX_VALUE;
@@ -434,9 +400,7 @@
        int encodedIndex = 0;
        int dataIndex   = 0;
        int i           = 0;
-       if (fDebug) {
-           System.out.println("number of triplets = " + numberTriplets );
-       }
+
 
        for (int line = 0; line < numberLines; line++) {
            for (int quartet = 0; quartet < 19; quartet++) {
@@ -444,9 +408,6 @@
                b2 = binaryData[dataIndex++];
                b3 = binaryData[dataIndex++];
 
-               if (fDebug) {
-                   System.out.println( "b1= " + b1 +", b2= " + b2 + ", b3= " + b3 );
-               }
 
                l  = (byte)(b2 & 0x0f);
                k  = (byte)(b1 & 0x03);
@@ -456,11 +417,6 @@
                byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
                byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);
 
-               if (fDebug) {
-                   System.out.println( "val2 = " + val2 );
-                   System.out.println( "k4   = " + (k<<4));
-                   System.out.println( "vak  = " + (val2 | (k<<4)));
-               }
 
                encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
                encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
@@ -477,9 +433,6 @@
            b2 = binaryData[dataIndex++];
            b3 = binaryData[dataIndex++];
 
-           if (fDebug) {
-               System.out.println( "b1= " + b1 +", b2= " + b2 + ", b3= " + b3 );
-           }
 
            l  = (byte)(b2 & 0x0f);
            k  = (byte)(b1 & 0x03);
@@ -489,11 +442,6 @@
            byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
            byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);
 
-           if (fDebug) {
-               System.out.println( "val2 = " + val2 );
-               System.out.println( "k4   = " + (k<<4));
-               System.out.println( "vak  = " + (val2 | (k<<4)));
-           }
 
            encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
            encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
@@ -505,11 +453,7 @@
        if (fewerThan24bits == EIGHTBIT) {
            b1 = binaryData[dataIndex];
            k = (byte) ( b1 &0x03 );
-           if (fDebug) {
-               System.out.println("b1=" + b1);
-               System.out.println("b1<<2 = " + (b1>>2) );
-           }
-           byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
+          byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
            encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
            encodedData[encodedIndex++] = lookUpBase64Alphabet[ k<<4 ];
            encodedData[encodedIndex++] = PAD;
@@ -534,23 +478,38 @@
        return new String(encodedData);
    }
 
-   /**
-    * Decodes Base64 data into octects
-    *
-    * @param encoded Byte array containing Base64 data
-    * @return Array containind decoded data.
-    * @throws Base64DecodingException
-    */
-   public final static byte[] decode(String encoded) throws Base64DecodingException {
+    /**
+     * Decodes Base64 data into octects
+     *
+     * @param encoded String containing base64 encoded data
+     * @return byte array containing the decoded data
+     * @throws Base64DecodingException if there is a problem decoding the data
+     */
+    public final static byte[] decode(String encoded) throws Base64DecodingException {
+
+        if (encoded == null)
+                return null;
+        byte []bytes=new byte[encoded.length()];
+        int len=getBytesInternal(encoded, bytes);
+        return decodeInternal(bytes, len);
+        }
 
-       if (encoded == null)
-           return null;
+    protected static final int getBytesInternal(String s,byte[] result) {
+        int length=s.length();
 
-       return decodeInternal(encoded.getBytes());
-   }
-   protected final static byte[] decodeInternal(byte[] base64Data) throws Base64DecodingException {
+        int newSize=0;
+        for (int i = 0; i < length; i++) {
+            byte dataS=(byte)s.charAt(i);
+            if (!isWhiteSpace(dataS))
+                result[newSize++] = dataS;
+        }
+        return newSize;
+
+    }
+   protected final static byte[] decodeInternal(byte[] base64Data, int len) throws Base64DecodingException {
        // remove white spaces
-       int len = removeWhiteSpace(base64Data);
+           if (len==-1)
+          len = removeWhiteSpace(base64Data);
 
        if (len%FOURBYTE != 0) {
            throw new Base64DecodingException("decoding.divisible.four");
@@ -629,7 +588,20 @@
        }
        return decodedData;
    }
-
+   /**
+    * Decodes Base64 data into  outputstream
+    *
+    * @param base64Data String containing Base64 data
+    * @param os the outputstream
+    * @throws IOException
+    * @throws Base64DecodingException
+    */
+   public final static void decode(String base64Data,
+        OutputStream os) throws Base64DecodingException, IOException {
+           byte[] bytes=new byte[base64Data.length()];
+           int len=getBytesInternal(base64Data, bytes);
+           decode(bytes,os,len);
+   }
    /**
     * Decodes Base64 data into  outputstream
     *
@@ -640,8 +612,14 @@
     */
    public final static void decode(byte[] base64Data,
         OutputStream os) throws Base64DecodingException, IOException {
-    // remove white spaces
-    int len = removeWhiteSpace(base64Data);
+            decode(base64Data,os,-1);
+   }
+   protected final static void decode(byte[] base64Data,
+                        OutputStream os,int len) throws Base64DecodingException, IOException {
+
+        // remove white spaces
+    if (len==-1)
+       len = removeWhiteSpace(base64Data);
 
     if (len%FOURBYTE != 0) {
         throw new Base64DecodingException("decoding.divisible.four");
@@ -798,7 +776,7 @@
     * @param data  the byte array of base64 data (with WS)
     * @return      the new length
     */
-   protected static int removeWhiteSpace(byte[] data) {
+   protected static final int removeWhiteSpace(byte[] data) {
        if (data == null)
            return 0;
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.java	Wed Jul 05 16:42:37 2017 +0200
@@ -23,35 +23,33 @@
 import com.sun.org.apache.xpath.internal.CachedXPathAPI;
 import org.w3c.dom.Document;
 
-
 /**
  * @author Raul Benito
  */
 public class CachedXPathAPIHolder {
-         static java.util.logging.Logger log =
-                java.util.logging.Logger.getLogger(CachedXPathAPIHolder.class.getName());
 
     static ThreadLocal  local=new ThreadLocal();
     static ThreadLocal localDoc=new ThreadLocal();
 
-        /**
-         * Sets the doc for the xpath transformation. Resets the cache if needed
-         * @param doc
-         */
-        public static void setDoc(Document doc) {
-       if (localDoc.get()!=doc) {
+    /**
+     * Sets the doc for the xpath transformation. Resets the cache if needed
+     * @param doc
+     */
+    public static void setDoc(Document doc) {
+        if (localDoc.get()!=doc) {
             CachedXPathAPI cx=(CachedXPathAPI)local.get();
             if (cx==null) {
-               cx=new CachedXPathAPI();
-               local.set(cx);
-               localDoc.set(doc);
-               return;
+                cx=new CachedXPathAPI();
+                local.set(cx);
+                localDoc.set(doc);
+                return;
             }
             //Different docs reset.
             cx.getXPathContext().reset();
             localDoc.set(doc);
         }
-        }
+    }
+
     /**
      * @return the cachexpathapi for this thread
      */
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -45,7 +45,7 @@
 
 /**
  *
- * @author $Author: dims $
+ * @author $Author: mullan $
  */
 public class CachedXPathFuncHereAPI {
 
@@ -291,6 +291,7 @@
                                       .getDocumentElement()
                                    : namespaceNode);
 
+      // only check if string points to different object (for performance)
       if (str!=xpathStr) {
         if (str.indexOf("here()")>0) {
             _context.reset();
@@ -340,6 +341,7 @@
       //    XPathContext should be done away with.)
       // Create the XPath object.
       //String str = CachedXPathFuncHereAPI.getStrFromNode(xpathnode);
+    // only check if string points to different object (for performance)
     if (str!=xpathStr) {
         if (str.indexOf("here()")>0) {
             _context.reset();
@@ -421,7 +423,7 @@
 
     private static void fixupFunctionTable() {
         boolean installed = false;
-        if (log.isLoggable(java.util.logging.Level.INFO))                                  log.log(java.util.logging.Level.INFO, "Registering Here function");
+        log.log(java.util.logging.Level.INFO, "Registering Here function");
         /**
          * Try to register our here() implementation as internal function.
          */
@@ -434,7 +436,7 @@
                 installed = true;
             }
         } catch (Throwable t) {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Error installing function using the static installFunction method", t);
+            log.log(java.util.logging.Level.FINE, "Error installing function using the static installFunction method", t);
         }
         if(!installed) {
             try {
@@ -445,15 +447,15 @@
                 installFunction.invoke(_funcTable, params);
                 installed = true;
             } catch (Throwable t) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Error installing function using the static installFunction method", t);
+                log.log(java.util.logging.Level.FINE, "Error installing function using the static installFunction method", t);
             }
         }
-        if (true) {
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
             if (installed) {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Registered class " + FuncHere.class.getName()
+                log.log(java.util.logging.Level.FINE, "Registered class " + FuncHere.class.getName()
                         + " for XPath function 'here()' function in internal table");
             } else {
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Unable to register class " + FuncHere.class.getName()
+                log.log(java.util.logging.Level.FINE, "Unable to register class " + FuncHere.class.getName()
                         + " for XPath function 'here()' function in internal table");
             }
         }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,11 +20,8 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
 
-
 /**
  * Provides all constants and some translation functions for i18n.
  *
@@ -32,14 +29,10 @@
  * <A HREF="http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg">XML
  * Signature specification</A>.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class Constants {
 
-   /** {@link java.util.logging} logging facility */
-   static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(Constants.class.getName());
-
    /** Field configurationFile */
    public static final String configurationFile = "data/websig.conf";
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -29,34 +29,40 @@
  *
  */
 public class DigesterOutputStream extends ByteArrayOutputStream {
-    final static byte none[]="error".getBytes();
     final MessageDigestAlgorithm mda;
-        /**
-         * @param mda
-         */
-        public DigesterOutputStream(MessageDigestAlgorithm mda) {
+    static java.util.logging.Logger log =
+        java.util.logging.Logger.getLogger
+        (DigesterOutputStream.class.getName());
+
+    /**
+     * @param mda
+     */
+    public DigesterOutputStream(MessageDigestAlgorithm mda) {
         this.mda=mda;
-        }
+    }
 
     /** @inheritDoc */
-        public byte[] toByteArray() {
-                return none;
-        }
+    public void write(byte[] arg0) {
+        write(arg0, 0, arg0.length);
+    }
 
-        /** @inheritDoc */
-        public void write(byte[] arg0) {
-                mda.update(arg0);
-        }
+    /** @inheritDoc */
+    public void write(int arg0) {
+        mda.update((byte)arg0);
+    }
 
     /** @inheritDoc */
-        public void write(int arg0) {
-                mda.update((byte)arg0);
+    public void write(byte[] arg0, int arg1, int arg2) {
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
+            log.log(java.util.logging.Level.FINE, "Pre-digested input:");
+            StringBuffer sb = new StringBuffer(arg2);
+            for (int i=arg1; i<(arg1+arg2); i++) {
+                sb.append((char) arg0[i]);
+            }
+            log.log(java.util.logging.Level.FINE, sb.toString());
         }
-
-    /** @inheritDoc */
-        public void write(byte[] arg0, int arg1, int arg2) {
-                mda.update(arg0, arg1, arg2);
-        }
+        mda.update(arg0, arg1, arg2);
+    }
 
     /**
      * @return the digest value
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementChecker.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,17 @@
+package com.sun.org.apache.xml.internal.security.utils;
+
+import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public interface ElementChecker {
+         /**
+          * Check that the elemnt is the one expect
+          *
+          * @throws XMLSecurityException
+          */
+           public void guaranteeThatElementInCorrectSpace(ElementProxy expected, Element actual)
+                   throws XMLSecurityException;
+
+           public boolean isNamespaceElement(Node el, String type, String ns);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementCheckerImpl.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,60 @@
+package com.sun.org.apache.xml.internal.security.utils;
+
+import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public abstract class ElementCheckerImpl implements ElementChecker {
+        public boolean isNamespaceElement(Node el, String type, String ns) {
+                if ((el == null) ||
+                   ns!=el.getNamespaceURI() || !el.getLocalName().equals(type)){
+                   return false;
+                }
+
+                return true;
+        }
+        /** A checker for DOM that interns NS */
+        public static class InternedNsChecker extends ElementCheckerImpl{
+                public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
+                                Element actual) throws XMLSecurityException {
+
+                      String localnameSHOULDBE = expected.getBaseLocalName();
+                      String namespaceSHOULDBE = expected.getBaseNamespace();
+
+                      String localnameIS = actual.getLocalName();
+                      String namespaceIS = actual.getNamespaceURI();
+                      if ((namespaceSHOULDBE!=namespaceIS) ||
+                       !localnameSHOULDBE.equals(localnameIS) ) {
+                         Object exArgs[] = { namespaceIS +":"+ localnameIS,
+                           namespaceSHOULDBE +":"+ localnameSHOULDBE};
+                         throw new XMLSecurityException("xml.WrongElement", exArgs);
+                      }
+                }
+        }
+
+        /** A checker for DOM that interns NS */
+        public static class FullChecker extends ElementCheckerImpl {
+                public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
+                                Element actual) throws XMLSecurityException {
+
+                      String localnameSHOULDBE = expected.getBaseLocalName();
+                      String namespaceSHOULDBE = expected.getBaseNamespace();
+
+                      String localnameIS = actual.getLocalName();
+                      String namespaceIS = actual.getNamespaceURI();
+                      if ((!namespaceSHOULDBE.equals(namespaceIS)) ||
+                       !localnameSHOULDBE.equals(localnameIS) ) {
+                         Object exArgs[] = { namespaceIS +":"+ localnameIS,
+                           namespaceSHOULDBE +":"+ localnameSHOULDBE};
+                         throw new XMLSecurityException("xml.WrongElement", exArgs);
+                      }
+                }
+        }
+
+        /** An empty checker if schema checking is used */
+        public static class EmptyChecker extends ElementCheckerImpl {
+                public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
+                                Element actual) throws XMLSecurityException {
+                }
+        }
+}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -46,26 +46,6 @@
    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(ElementProxy.class.getName());
-   //J-
-    /** The element has been created by the code **/
-   public static final int MODE_CREATE  = 0;
-   /** The element has been readed from a DOM tree by the code **/
-   public static final int MODE_PROCESS = 1;
-   /** The element isn't known if it is readen or created **/
-   public static final int MODE_UNKNOWN = 2;
-
-   /** The element is going to be signed **/
-   public static final int MODE_SIGN    = MODE_CREATE;
-   /** The element is going to be verified **/
-   public static final int MODE_VERIFY  = MODE_PROCESS;
-
-   /** The element is going to be encrypted **/
-   public static final int MODE_ENCRYPT = MODE_CREATE;
-   /** The element is going to be decrypted **/
-   public static final int MODE_DECRYPT = MODE_PROCESS;
-
-   protected int _state = MODE_UNKNOWN;
-   //J+
 
    /**
     * Returns the namespace of the Elements of the sub-class.
@@ -95,11 +75,6 @@
     *
     */
    public ElementProxy() {
-
-      this._doc = null;
-      this._state = ElementProxy.MODE_UNKNOWN;
-      this._baseURI = null;
-      this._constructionElement = null;
    }
 
    /**
@@ -108,18 +83,43 @@
     * @param doc
     */
    public ElementProxy(Document doc) {
-
-      this();
-
       if (doc == null) {
          throw new RuntimeException("Document is null");
       }
 
       this._doc = doc;
-      this._state = ElementProxy.MODE_CREATE;
-      this._constructionElement = ElementProxy.createElementForFamily(this._doc,
-              this.getBaseNamespace(), this.getBaseLocalName());
+      this._constructionElement = createElementForFamilyLocal(this._doc,
+                  this.getBaseNamespace(), this.getBaseLocalName());
    }
+   protected Element createElementForFamilyLocal(Document doc, String namespace,
+           String localName) {
+                  Element result = null;
+              if (namespace == null) {
+                 result = doc.createElementNS(null, localName);
+              } else {
+                  String baseName=this.getBaseNamespace();
+                  String prefix=ElementProxy.getDefaultPrefix(baseName);
+                 if ((prefix == null) || (prefix.length() == 0)) {
+                    result = doc.createElementNS(namespace, localName);
+
+                    result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns",
+                                          namespace);
+                 } else {
+                         String tagName=null;
+                         String defaultPrefixNaming=ElementProxy.getDefaultPrefixBindings(baseName);
+                         StringBuffer sb=new StringBuffer(prefix);
+                         sb.append(':');
+                         sb.append(localName);
+                         tagName=sb.toString();
+                    result = doc.createElementNS(namespace, tagName );
+
+                    result.setAttributeNS(Constants.NamespaceSpecNS,  defaultPrefixNaming,
+                                          namespace);
+                 }
+              }
+              return result;
+}
+
 
    /**
     * This method creates an Element in a given namespace with a given localname.
@@ -150,7 +150,7 @@
          } else {
             result = doc.createElementNS(namespace, prefix + ":" + localName);
 
-            result.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix,
+            result.setAttributeNS(Constants.NamespaceSpecNS,  ElementProxy.getDefaultPrefixBindings(namespace),
                                   namespace);
          }
       }
@@ -171,15 +171,12 @@
       if (element == null) {
          throw new XMLSecurityException("ElementProxy.nullElement");
       }
-      if (true) {
-      }
 
-      if (true) {
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "setElement(" + element.getTagName() + ", \"" + BaseURI + "\"");
+      if (log.isLoggable(java.util.logging.Level.FINE)) {
+        log.log(java.util.logging.Level.FINE, "setElement(" + element.getTagName() + ", \"" + BaseURI + "\"");
       }
 
       this._doc = element.getOwnerDocument();
-      this._state = ElementProxy.MODE_PROCESS;
       this._constructionElement = element;
       this._baseURI = BaseURI;
    }
@@ -193,20 +190,16 @@
     */
    public ElementProxy(Element element, String BaseURI)
            throws XMLSecurityException {
-
-      this();
-
       if (element == null) {
          throw new XMLSecurityException("ElementProxy.nullElement");
       }
 
-      if (true) {
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "setElement(\"" + element.getTagName() + "\", \"" + BaseURI
+      if (log.isLoggable(java.util.logging.Level.FINE)) {
+        log.log(java.util.logging.Level.FINE, "setElement(\"" + element.getTagName() + "\", \"" + BaseURI
                 + "\")");
       }
 
       this._doc = element.getOwnerDocument();
-      this._state = ElementProxy.MODE_PROCESS;
       this._constructionElement = element;
       this._baseURI = BaseURI;
 
@@ -256,25 +249,18 @@
       return this._baseURI;
    }
 
+   static ElementChecker checker = new ElementCheckerImpl.InternedNsChecker();
+
    /**
     * Method guaranteeThatElementInCorrectSpace
     *
     * @throws XMLSecurityException
     */
-   public void guaranteeThatElementInCorrectSpace()
+   void guaranteeThatElementInCorrectSpace()
            throws XMLSecurityException {
 
-      String localnameSHOULDBE = this.getBaseLocalName();
-      String namespaceSHOULDBE = this.getBaseNamespace();
+          checker.guaranteeThatElementInCorrectSpace(this,this._constructionElement);
 
-      String localnameIS = this._constructionElement.getLocalName();
-      String namespaceIS = this._constructionElement.getNamespaceURI();
-      if ( !localnameSHOULDBE.equals(localnameIS) ||
-        !namespaceSHOULDBE.equals(namespaceIS)) {
-         Object exArgs[] = { namespaceIS +":"+ localnameIS,
-           namespaceSHOULDBE +":"+ localnameSHOULDBE};
-         throw new XMLSecurityException("xml.WrongElement", exArgs);
-      }
    }
 
    /**
@@ -308,7 +294,9 @@
          Element e = Base64.encodeToElement(this._doc, localname, bytes);
 
          this._constructionElement.appendChild(e);
-         this._constructionElement.appendChild(this._doc.createTextNode("\n"));
+         if (!XMLUtils.ignoreLineBreaks()) {
+            this._constructionElement.appendChild(this._doc.createTextNode("\n"));
+         }
       }
    }
 
@@ -336,8 +324,9 @@
    public void addBase64Text(byte[] bytes) {
 
       if (bytes != null) {
-         Text t = this._doc.createTextNode("\n" + Base64.encode(bytes) + "\n");
-
+         Text t = XMLUtils.ignoreLineBreaks()
+             ? this._doc.createTextNode(Base64.encode(bytes))
+             : this._doc.createTextNode("\n" + Base64.encode(bytes) + "\n");
          this._constructionElement.appendChild(t);
       }
    }
@@ -375,7 +364,7 @@
 
    /**
     * Method getBytesFromChildElement
-    *
+    * @deprecated
     * @param localname
     * @param namespace
     * @return the bytes
@@ -416,28 +405,24 @@
    /**
     * Method getBytesFromTextChild
     *
-    * @return The base64 bytes from the first text child of this element
+    * @return The base64 bytes from the text children of this element
     * @throws XMLSecurityException
     */
    public byte[] getBytesFromTextChild() throws XMLSecurityException {
-
-         Text t = (Text)this._constructionElement.getFirstChild();
-
-
-         return Base64.decode(t.getData());
+      return Base64.decode
+         (XMLUtils.getFullTextChildrenFromElement(this._constructionElement));
    }
 
    /**
     * Method getTextFromTextChild
     *
-    * @return the Text obtained concatening all the the text nodes of this element
+    * @return the Text obtained by concatenating all the text nodes of this
+    *    element
     */
    public String getTextFromTextChild() {
       return XMLUtils.getFullTextChildrenFromElement(this._constructionElement);
    }
 
-
-
    /**
     * Method length
     *
@@ -451,7 +436,7 @@
             while (sibling!=null) {
                 if (localname.equals(sibling.getLocalName())
                                 &&
-                                        namespace.equals(sibling.getNamespaceURI())) {
+                                        namespace==sibling.getNamespaceURI() ) {
                         number++;
                 }
                 sibling=sibling.getNextSibling();
@@ -509,39 +494,49 @@
 
    /** Field _prefixMappings */
    static HashMap _prefixMappings = new HashMap();
+   static HashMap _prefixMappingsBindings = new HashMap();
 
-   /**
-    * Method setDefaultPrefix
-    *
-    * @param namespace
-    * @param prefix
-    * @throws XMLSecurityException
-    */
-   public static void setDefaultPrefix(String namespace, String prefix)
-           throws XMLSecurityException {
+    /**
+     * Method setDefaultPrefix
+     *
+     * @param namespace
+     * @param prefix
+     * @throws XMLSecurityException
+     */
+    public static void setDefaultPrefix(String namespace, String prefix)
+        throws XMLSecurityException {
 
         if (ElementProxy._prefixMappings.containsValue(prefix)) {
 
-                Object storedNamespace=ElementProxy._prefixMappings.get(namespace);
-         if (!storedNamespace.equals(prefix)) {
+            Object storedNamespace=ElementProxy._prefixMappings.get(namespace);
+            if (!storedNamespace.equals(prefix)) {
                 Object exArgs[] = { prefix, namespace, storedNamespace };
 
                 throw new XMLSecurityException("prefix.AlreadyAssigned", exArgs);
-         }
-    }
-      ElementProxy._prefixMappings.put(namespace, prefix);
+            }
+        }
+        if (Constants.SignatureSpecNS.equals(namespace)) {
+            XMLUtils.dsPrefix=prefix;
+        }
+        ElementProxy._prefixMappings.put(namespace, prefix.intern());
+        if (prefix.length() == 0) {
+            ElementProxy._prefixMappingsBindings.put(namespace, "xmlns");
+        } else {
+            ElementProxy._prefixMappingsBindings.put(namespace, ("xmlns:"+prefix).intern());
+        }
    }
 
-   /**
-    * Method getDefaultPrefix
-    *
-    * @param namespace
-    * @return the default prefix bind to this element.
-    */
-   public static String getDefaultPrefix(String namespace) {
+    /**
+     * Method getDefaultPrefix
+     *
+     * @param namespace
+     * @return the default prefix bind to this element.
+     */
+    public static String getDefaultPrefix(String namespace) {
+        return (String) ElementProxy._prefixMappings.get(namespace);
+    }
 
-      String prefix = (String) ElementProxy._prefixMappings.get(namespace);
-
-      return prefix;
-   }
+    public static String getDefaultPrefixBindings(String namespace) {
+        return (String) ElementProxy._prefixMappingsBindings.get(namespace);
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionConstants.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionConstants.java	Wed Jul 05 16:42:37 2017 +0200
@@ -27,7 +27,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class EncryptionConstants {
    //J-
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionElementProxy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionElementProxy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -31,7 +31,7 @@
  * This is the base object for all objects which map directly to an Element from
  * the xenc spec.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class EncryptionElementProxy extends ElementProxy {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,30 +20,21 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
 import java.util.ArrayList;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-
 /**
  *
- *
  * @author Christian Geuer-Pollmann
  *
  */
 public class HelperNodeList implements NodeList {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-    java.util.logging.Logger.getLogger(HelperNodeList.class.getName());
-
    /** Field nodes */
    ArrayList nodes = new ArrayList(20);
-
    boolean _allNodesMustHaveSameParent = false;
 
    /**
@@ -70,7 +60,7 @@
     */
    public Node item(int index) {
 
-      // if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "item(" + index + ") of " + this.getLength() + " nodes");
+      // log.log(java.util.logging.Level.FINE, "item(" + index + ") of " + this.getLength() + " nodes");
 
       return (Node) nodes.get(index);
    }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,18 +20,13 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
 import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-
 /**
  * The Internationalization (I18N) pack.
  *
- *
- *
  * @author Christian Geuer-Pollmann
  */
 public class I18n {
@@ -50,8 +45,8 @@
 
    /** Field resourceBundle */
    private static ResourceBundle resourceBundle =
-      ResourceBundle.getBundle
-        (Constants.exceptionMessagesResourceBundleBase, Locale.US);
+       ResourceBundle.getBundle
+         (Constants.exceptionMessagesResourceBundleBase, Locale.US);
 
    /** Field alreadyInitialized */
    private static boolean alreadyInitialized = false;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,18 +20,16 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
+import java.lang.ref.WeakReference;
+import java.util.Arrays;
+import java.util.WeakHashMap;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
-import java.util.Arrays;
-import java.util.WeakHashMap;
-import java.lang.ref.WeakReference;
-
 
 /**
  * Purpose of this class is to enable the XML Parser to keep track of ID
@@ -45,193 +43,242 @@
  * ID: We know that all <CODE>@Id</CODE> attributes in an Element from the XML
  * Signature namespace are of type <CODE>ID</CODE>.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * @see <A HREF="http://www.xml.com/lpt/a/2001/11/07/id.html">"Identity Crisis" on xml.com</A>
  */
 public class IdResolver {
 
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
+    /** {@link java.util.logging} logging facility */
+    private static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(IdResolver.class.getName());
 
-   static WeakHashMap docMap = new WeakHashMap();
+    private static WeakHashMap docMap = new WeakHashMap();
 
-   /**
-    * Constructor IdResolver
-    *
-    */
-   private IdResolver() {
-
-      // we don't allow instantiation
-   }
+    /**
+     * Constructor IdResolver
+     *
+     */
+    private IdResolver() {
+       // we don't allow instantiation
+    }
 
-   /**
-    * Method registerElementById
-    *
-    * @param element
-    * @param idValue
-    */
-   public static void registerElementById(Element element, String idValue) {
-      Document doc = element.getOwnerDocument();
-      WeakHashMap elementMap = (WeakHashMap) docMap.get(doc);
-      if(elementMap == null) {
-          elementMap = new WeakHashMap();
-          docMap.put(doc, elementMap);
-      }
-      elementMap.put(idValue, new WeakReference(element));
-   }
+    /**
+     * Method registerElementById
+     *
+     * @param element the element to register
+     * @param idValue the value of the ID attribute
+     */
+    public static void registerElementById(Element element, String idValue) {
+        Document doc = element.getOwnerDocument();
+        WeakHashMap elementMap = (WeakHashMap) docMap.get(doc);
+        if(elementMap == null) {
+            elementMap = new WeakHashMap();
+            docMap.put(doc, elementMap);
+        }
+        elementMap.put(idValue, new WeakReference(element));
+    }
 
-   /**
-    * Method registerElementById
-    *
-    * @param element
-    * @param id
-    */
-   public static void registerElementById(Element element, Attr id) {
-      IdResolver.registerElementById(element, id.getNodeValue());
-   }
+    /**
+     * Method registerElementById
+     *
+     * @param element the element to register
+     * @param id the ID attribute
+     */
+    public static void registerElementById(Element element, Attr id) {
+        IdResolver.registerElementById(element, id.getNodeValue());
+    }
 
-   /**
-    * Method getElementById
-    *
-    * @param doc
-    * @param id
-    * @return the element obtained by the Id, or null if it is not found.
-    */
-   public static Element getElementById(Document doc, String id) {
+    /**
+     * Method getElementById
+     *
+     * @param doc the document
+     * @param id the value of the ID
+     * @return the element obtained by the id, or null if it is not found.
+     */
+    public static Element getElementById(Document doc, String id) {
 
-      Element result = null;
+        Element result = IdResolver.getElementByIdType(doc, id);
 
-      result = IdResolver.getElementByIdType(doc, id);
-
-      if (result != null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+        if (result != null) {
+            log.log(java.util.logging.Level.FINE,
             "I could find an Element using the simple getElementByIdType method: "
             + result.getTagName());
 
-         return result;
-      }
+            return result;
+        }
 
-       result = IdResolver.getElementByIdUsingDOM(doc, id);
+        result = IdResolver.getElementByIdUsingDOM(doc, id);
 
-       if (result != null) {
-          if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE,
+        if (result != null) {
+            log.log(java.util.logging.Level.FINE,
              "I could find an Element using the simple getElementByIdUsingDOM method: "
             + result.getTagName());
 
-         return result;
-      }
-       // this must be done so that Xalan can catch ALL namespaces
-       //XMLUtils.circumventBug2650(doc);
-      result = IdResolver.getElementBySearching(doc, id);
+            return result;
+        }
+        // this must be done so that Xalan can catch ALL namespaces
+        //XMLUtils.circumventBug2650(doc);
+        result = IdResolver.getElementBySearching(doc, id);
 
-      if (result != null) {
-                  IdResolver.registerElementById(result, id);
+        if (result != null) {
+            IdResolver.registerElementById(result, id);
 
-         return result;
-      }
+            return result;
+        }
 
-      return null;
-   }
+        return null;
+    }
 
 
     /**
      * Method getElementByIdUsingDOM
      *
-     * @param doc
-     * @param id
-     * @return the element obtained by the Id, or null if it is not found.
+     * @param doc the document
+     * @param id the value of the ID
+     * @return the element obtained by the id, or null if it is not found.
      */
     private static Element getElementByIdUsingDOM(Document doc, String id) {
-        if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "getElementByIdUsingDOM() Search for ID " + id);
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "getElementByIdUsingDOM() Search for ID " + id);
         return doc.getElementById(id);
     }
 
-   /**
-    * Method getElementByIdType
-    *
-    * @param doc
-    * @param id
-    * @return the element obtained by the Id, or null if it is not found.
-    */
-   private static Element getElementByIdType(Document doc, String id) {
-          if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "getElementByIdType() Search for ID " + id);
-       WeakHashMap elementMap = (WeakHashMap) docMap.get(doc);
-       if (elementMap != null) {
-           WeakReference weakReference = (WeakReference) elementMap.get(id);
-           if (weakReference != null)
-           {
+    /**
+     * Method getElementByIdType
+     *
+     * @param doc the document
+     * @param id the value of the ID
+     * @return the element obtained by the id, or null if it is not found.
+     */
+    private static Element getElementByIdType(Document doc, String id) {
+        if (log.isLoggable(java.util.logging.Level.FINE))
+            log.log(java.util.logging.Level.FINE, "getElementByIdType() Search for ID " + id);
+        WeakHashMap elementMap = (WeakHashMap) docMap.get(doc);
+        if (elementMap != null) {
+            WeakReference weakReference = (WeakReference) elementMap.get(id);
+            if (weakReference != null) {
                 return (Element) weakReference.get();
-           }
-       }
-       return null;
-   }
+            }
+        }
+        return null;
+    }
+
+    private static java.util.List names;
+    private static int namesLength;
+    static {
+        String namespaces[]={
+            Constants.SignatureSpecNS,
+            EncryptionConstants.EncryptionSpecNS,
+            "http://schemas.xmlsoap.org/soap/security/2000-12",
+            "http://www.w3.org/2002/03/xkms#",
+            "urn:oasis:names:tc:SAML:1.0:assertion",
+            "urn:oasis:names:tc:SAML:1.0:protocol"
+        };
+        names = Arrays.asList(namespaces);
+        namesLength = names.size();
+    }
 
 
-   static java.util.List names;
-   static {
-           String namespaces[]={ Constants.SignatureSpecNS,
-                           EncryptionConstants.EncryptionSpecNS,
-                           "http://schemas.xmlsoap.org/soap/security/2000-12",
-                           "http://www.w3.org/2002/03/xkms#"
-                   };
-           names=Arrays.asList(namespaces);
-   }
+    private static Element getElementBySearching(Node root,String id) {
+        Element []els=new Element[namesLength + 1];
+        getEl(root,id,els);
+        for (int i=0;i<els.length;i++) {
+            if (els[i]!=null) {
+                return els[i];
+            }
+        }
+        return null;
+    }
+
+    private static int getEl(Node currentNode,String id,Element []els) {
+        Node sibling=null;
+        Node parentNode=null;
+        do {
+                switch (currentNode.getNodeType()) {
+                case Node.DOCUMENT_FRAGMENT_NODE :
+                case Node.DOCUMENT_NODE :
+                        sibling= currentNode.getFirstChild();
+                        break;
 
 
-   private static Element getElementBySearching(Node root,String id) {
-           Element []els=new Element[5];
-           getElementBySearching(root,id,els);
-           for (int i=0;i<els.length;i++) {
-                   if (els[i]!=null) {
-                           return els[i];
-                   }
-           }
-           return null;
+                case Node.ELEMENT_NODE :
+                        Element currentElement = (Element) currentNode;
+                        if (isElement(currentElement, id, els)==1)
+                                return 1;
+                        sibling= currentNode.getFirstChild();
+                        if (sibling==null) {
+                            if (parentNode != null) {
+                                        sibling= currentNode.getNextSibling();
+                                    }
+                        } else {
+                                parentNode=currentElement;
+                        }
+                        break;
+        } while (sibling==null  && parentNode!=null) {
+                        sibling=parentNode.getNextSibling();
+                        parentNode=parentNode.getParentNode();
+                        if (!(parentNode instanceof Element)) {
+                                parentNode=null;
+                        }
+                }
+                if (sibling==null)
+                        return 1;
+                currentNode=sibling;
+                sibling=currentNode.getNextSibling();
+        } while(true);
+
+    }
+    public static int isElement(Element el, String id,Element[] els) {
+        if (!el.hasAttributes()) {
+                return 0;
+        }
+        NamedNodeMap ns=el.getAttributes();
+        int elementIndex=names.indexOf(el.getNamespaceURI());
+            elementIndex=(elementIndex<0) ? namesLength : elementIndex;
+        for (int length=ns.getLength(), i=0; i<length; i++) {
+                Attr n=(Attr)ns.item(i);
+                String s=n.getNamespaceURI();
 
-   }
-   private static int getElementBySearching(Node root,String id,Element []els) {
-           switch (root.getNodeType()) {
-           case Node.ELEMENT_NODE:
-                   Element el=(Element)root;
-                   if (el.hasAttributes()) {
-                           int index=names.indexOf(el.getNamespaceURI());
-                           if (index<0) {
-                                   index=4;
-                           }
-                           if (el.getAttribute("Id").equals(id)) {
-                                   els[index]=el;
-                                   if (index==0) {
-                                           return 1;
-                                   }
-                           } else if ( el.getAttribute("id").equals(id) ) {
-                                   if (index!=2) {
-                                           index=4;
-                                   }
-                                   els[index]=el;
-                           } else if ( el.getAttribute("ID").equals(id) ) {
-                                   if (index!=3) {
-                                           index=4;
-                                   }
-                                   els[index]=el;
-                           } else if ((index==3)&&(
-                                   el.getAttribute("OriginalRequestID").equals(id) ||
-                                   el.getAttribute("RequestID").equals(id) ||
-                                   el.getAttribute("ResponseID" ).equals(id))) {
-                                   els[3]=el;
-                           }
-                   }
-                case Node.DOCUMENT_NODE:
-                        Node sibling=root.getFirstChild();
-                        while (sibling!=null) {
-                                if (getElementBySearching(sibling,id,els)==1)
+                    int index=s==null ? elementIndex : names.indexOf(n.getNamespaceURI());
+                    index=(index<0) ? namesLength : index;
+                    String name=n.getLocalName();
+                    if (name.length()>2)
+                        continue;
+                    String value=n.getNodeValue();
+                    if (name.charAt(0)=='I') {
+                        char ch=name.charAt(1);
+                        if (ch=='d' && value.equals(id)) {
+                                els[index]=el;
+                                if (index==0) {
                                         return 1;
-                                sibling=sibling.getNextSibling();
+                                }
+                        } else if (ch=='D' &&value.endsWith(id)) {
+                                if (index!=3) {
+                                    index=namesLength;
+                                }
+                                els[index]=el;
+                        }
+                    } else if ( "id".equals(name) && value.equals(id) ) {
+                        if (index!=2) {
+                                index=namesLength;
                         }
-           }
-           return 0;
-   }
-
+                        els[index]=el;
+                    }
+        }
+        //For an element namespace search for importants
+        if ((elementIndex==3)&&(
+                    el.getAttribute("OriginalRequestID").equals(id) ||
+                    el.getAttribute("RequestID").equals(id) ||
+                    el.getAttribute("ResponseID").equals(id))) {
+                    els[3]=el;
+        } else if ((elementIndex==4)&&(
+                    el.getAttribute("AssertionID").equals(id))) {
+                    els[4]=el;
+        } else if ((elementIndex==5)&&(
+                    el.getAttribute("RequestID").equals(id) ||
+                    el.getAttribute("ResponseID").equals(id))) {
+                    els[5]=el;
+                 }
+        return 0;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -29,99 +27,105 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-
 /**
  * A collection of different, general-purpose methods for JAVA-specific things
  * @author Christian Geuer-Pollmann
- *
  */
 public class JavaUtils {
 
-   /** {@link java.util.logging} logging facility */
+    /** {@link java.util.logging} logging facility */
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(JavaUtils.class.getName());
 
-   private JavaUtils() {
-     // we don't allow instantiation
-   }
-   /**
-    * Method getBytesFromFile
-    *
-    * @param fileName
-    * @return the bytes readed from the file
-    *
-    * @throws FileNotFoundException
-    * @throws IOException
-    */
-   public static byte[] getBytesFromFile(String fileName)
-           throws FileNotFoundException, IOException {
+    private JavaUtils() {
+        // we don't allow instantiation
+    }
 
-      byte refBytes[] = null;
+    /**
+     * Method getBytesFromFile
+     *
+     * @param fileName
+     * @return the bytes readed from the file
+     *
+     * @throws FileNotFoundException
+     * @throws IOException
+     */
+    public static byte[] getBytesFromFile(String fileName)
+        throws FileNotFoundException, IOException {
+
+        byte refBytes[] = null;
 
-      {
-         FileInputStream fisRef = new FileInputStream(fileName);
-         UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream();
-         byte buf[] = new byte[1024];
-         int len;
+        FileInputStream fisRef = new FileInputStream(fileName);
+        try {
+            UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream();
+            byte buf[] = new byte[1024];
+            int len;
 
-         while ((len = fisRef.read(buf)) > 0) {
-            baos.write(buf, 0, len);
-         }
+            while ((len = fisRef.read(buf)) > 0) {
+                baos.write(buf, 0, len);
+            }
 
-         refBytes = baos.toByteArray();
-      }
+            refBytes = baos.toByteArray();
+        } finally {
+            fisRef.close();
+        }
 
-      return refBytes;
-   }
+        return refBytes;
+    }
 
-   /**
-    * Method writeBytesToFilename
-    *
-    * @param filename
-    * @param bytes
-    */
-   public static void writeBytesToFilename(String filename, byte[] bytes) {
+    /**
+     * Method writeBytesToFilename
+     *
+     * @param filename
+     * @param bytes
+     */
+    public static void writeBytesToFilename(String filename, byte[] bytes) {
 
-      try {
-         if (filename != null && bytes != null) {
-            File f = new File(filename);
+        FileOutputStream fos = null;
+        try {
+            if (filename != null && bytes != null) {
+                File f = new File(filename);
 
-            FileOutputStream fos = new FileOutputStream(f);
+                fos = new FileOutputStream(f);
 
-            fos.write(bytes);
-            fos.close();
-         } else {
-            if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "writeBytesToFilename got null byte[] pointed");
-         }
-      } catch (Exception ex) {}
-   }
+                fos.write(bytes);
+                fos.close();
+            } else {
+                log.log(java.util.logging.Level.FINE, "writeBytesToFilename got null byte[] pointed");
+            }
+        } catch (IOException ex) {
+            if (fos != null) {
+                try {
+                    fos.close();
+                } catch (IOException ioe) {}
+            }
+        }
+    }
 
-   /**
-    * This method reads all bytes from the given InputStream till EOF and returns
-    * them as a byte array.
-    *
-    * @param inputStream
-    * @return the bytes readed from the stream
-    *
-    * @throws FileNotFoundException
-    * @throws IOException
-    */
-   public static byte[] getBytesFromStream(InputStream inputStream) throws IOException {
-
-      byte refBytes[] = null;
+    /**
+     * This method reads all bytes from the given InputStream till EOF and
+     * returns them as a byte array.
+     *
+     * @param inputStream
+     * @return the bytes readed from the stream
+     *
+     * @throws FileNotFoundException
+     * @throws IOException
+     */
+    public static byte[] getBytesFromStream(InputStream inputStream)
+        throws IOException {
 
-      {
-         UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream();
-         byte buf[] = new byte[1024];
-         int len;
+        byte refBytes[] = null;
 
-         while ((len = inputStream.read(buf)) > 0) {
+        UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream();
+        byte buf[] = new byte[1024];
+        int len;
+
+        while ((len = inputStream.read(buf)) > 0) {
             baos.write(buf, 0, len);
-         }
+        }
 
-         refBytes = baos.toByteArray();
-      }
-
-      return refBytes;
-   }
+        refBytes = baos.toByteArray();
+        return refBytes;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java	Wed Jul 05 16:42:37 2017 +0200
@@ -28,7 +28,7 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class RFC2253Parser {
 
@@ -158,7 +158,13 @@
          return str;
       }
       String attrType = normalizeAT(str.substring(0, i));
-      String attrValue = normalizeV(str.substring(i + 1));
+      // only normalize if value is a String
+      String attrValue = null;
+      if (attrType.charAt(0) >= '0' && attrType.charAt(0) <= '9') {
+          attrValue = str.substring(i + 1);
+      } else {
+          attrValue = normalizeV(str.substring(i + 1));
+      }
 
       return attrType + "=" + attrValue;
 
@@ -474,7 +480,7 @@
    static String trim(String str) {
 
       String trimed = str.trim();
-      int i = str.indexOf(trimed.substring(0)) + trimed.length();
+      int i = str.indexOf(trimed) + trimed.length();
 
       if ((str.length() > i) && trimed.endsWith("\\")
               &&!trimed.endsWith("\\\\")) {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -30,19 +30,25 @@
 /**
  * Class SignatureElementProxy
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
+ * @version $Revision: 1.5 $
  */
 public abstract class SignatureElementProxy extends ElementProxy {
-
+        protected SignatureElementProxy() {
+        };
    /**
     * Constructor SignatureElementProxy
     *
     * @param doc
     */
    public SignatureElementProxy(Document doc) {
-      super(doc);
-      //this._constructionElement.setAttributeNS(Constants.NamespaceSpecNS,"xmlns:ds",
-        //          Constants.SignatureSpecNS);
+              if (doc == null) {
+                 throw new RuntimeException("Document is null");
+              }
+
+              this._doc = doc;
+              this._constructionElement =  XMLUtils.createElementInSignatureSpace(this._doc,
+                           this.getBaseLocalName());
    }
 
    /**
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2008 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,8 +30,11 @@
  *
  */
 public class SignerOutputStream extends ByteArrayOutputStream {
-    final static byte none[]="error".getBytes();
     final SignatureAlgorithm sa;
+    static java.util.logging.Logger log =
+        java.util.logging.Logger.getLogger
+        (SignerOutputStream.class.getName());
+
     /**
      * @param sa
      */
@@ -40,21 +43,18 @@
     }
 
     /** @inheritDoc */
-    public byte[] toByteArray() {
-        return none;
-    }
-
-    /** @inheritDoc */
     public void write(byte[] arg0)  {
+        super.write(arg0, 0, arg0.length);
         try {
-                        sa.update(arg0);
-                } catch (XMLSignatureException e) {
+            sa.update(arg0);
+        } catch (XMLSignatureException e) {
             throw new RuntimeException(""+e);
-                }
+        }
     }
 
     /** @inheritDoc */
     public void write(int arg0) {
+        super.write(arg0);
         try {
             sa.update((byte)arg0);
         } catch (XMLSignatureException e) {
@@ -64,12 +64,19 @@
 
     /** @inheritDoc */
     public void write(byte[] arg0, int arg1, int arg2) {
+        super.write(arg0, arg1, arg2);
+        if (log.isLoggable(java.util.logging.Level.FINE)) {
+            log.log(java.util.logging.Level.FINE, "Canonicalized SignedInfo:");
+            StringBuffer sb = new StringBuffer(arg2);
+            for (int i=arg1; i<(arg1+arg2); i++) {
+                sb.append((char) arg0[i]);
+            }
+            log.log(java.util.logging.Level.FINE, sb.toString());
+        }
         try {
             sa.update(arg0,arg1,arg2);
         } catch (XMLSignatureException e) {
             throw new RuntimeException(""+e);
         }
     }
-
-
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncBufferedOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncBufferedOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -30,14 +30,21 @@
  */
 public class UnsyncBufferedOutputStream extends OutputStream {
         final OutputStream out;
+
+        final byte[] buf;
         static final int size=8*1024;
-        final byte[] buf=new byte[size];
+        private static ThreadLocal bufCahce = new ThreadLocal() {
+        protected synchronized Object initialValue() {
+            return new byte[size];
+        }
+    };
         int pointer=0;
         /**
          * Creates a buffered output stream without synchronization
          * @param out the outputstream to buffer
          */
         public UnsyncBufferedOutputStream(OutputStream out) {
+                buf=(byte[])bufCahce.get();
                 this.out=out;
         }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,17 +20,25 @@
  */
 package com.sun.org.apache.xml.internal.security.utils;
 
-import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
 
 /**
  * A simple Unsynced ByteArryOutputStream
  * @author raul
  *
  */
-public class UnsyncByteArrayOutputStream extends ByteArrayOutputStream {
-        int size=4*1024;
-        byte []buf=new byte[size];
-        int pos;
+public class UnsyncByteArrayOutputStream extends OutputStream  {
+        private static ThreadLocal bufCahce = new ThreadLocal() {
+        protected synchronized Object initialValue() {
+            return new byte[8*1024];
+        }
+    };
+    byte[] buf;
+        int size=8*1024;//buf.length;
+        int pos=0;
+        public UnsyncByteArrayOutputStream() {
+                buf=(byte[])bufCahce.get();
+        }
         /** @inheritDoc */
         public void write(byte[] arg0) {
                 int newPos=pos+arg0.length;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -25,8 +24,12 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Set;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
@@ -49,6 +52,14 @@
  */
 public class XMLUtils {
 
+   private static boolean ignoreLineBreaks =
+      AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+         public Boolean run() {
+            return Boolean.getBoolean
+               ("com.sun.org.apache.xml.internal.security.ignoreLineBreaks");
+         }
+      });
+
    /**
     * Constructor XMLUtils
     *
@@ -57,7 +68,13 @@
 
       // we don't allow instantiation
    }
+   public static Element getNextElement(Node el) {
+           while ((el!=null) && (el.getNodeType()!=Node.ELEMENT_NODE)) {
+                   el=el.getNextSibling();
+           }
+           return (Element)el;
 
+   }
 
    /**
     * @param rootNode
@@ -212,6 +229,8 @@
    }
 
 
+   static  String dsPrefix=null;
+   static Map namePrefixes=new HashMap();
    /**
     * Creates an Element in the XML Signature specification namespace.
     *
@@ -226,28 +245,20 @@
          throw new RuntimeException("Document is null");
       }
 
-      String ds = Constants.getSignatureSpecNSprefix();
-
-      if ((ds == null) || (ds.length() == 0)) {
-         Element element = doc.createElementNS(Constants.SignatureSpecNS,
-                                               elementName);
-
-         element.setAttributeNS(Constants.NamespaceSpecNS, "xmlns",
-                                Constants.SignatureSpecNS);
-
-         return element;
+      if ((dsPrefix == null) || (dsPrefix.length() == 0)) {
+         return doc.createElementNS(Constants.SignatureSpecNS, elementName);
       }
-         Element element = doc.createElementNS(Constants.SignatureSpecNS,
-                                               ds + ":" + elementName);
-
-         element.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + ds,
-                                Constants.SignatureSpecNS);
-
-         return element;
-
+      String namePrefix=(String) namePrefixes.get(elementName);
+      if (namePrefix==null) {
+          StringBuffer tag=new StringBuffer(dsPrefix);
+          tag.append(':');
+          tag.append(elementName);
+          namePrefix=tag.toString();
+          namePrefixes.put(elementName,namePrefix);
+      }
+      return doc.createElementNS(Constants.SignatureSpecNS, namePrefix);
    }
 
-
    /**
     * Returns true if the element is in XML Signature namespace and the local
     * name equals the supplied one.
@@ -258,17 +269,7 @@
     */
    public static boolean elementIsInSignatureSpace(Element element,
            String localName) {
-
-      if ((element == null) ||
-          !Constants.SignatureSpecNS.equals(element.getNamespaceURI()) ){
-         return false;
-      }
-
-      if (!element.getLocalName().equals(localName)) {
-         return false;
-      }
-
-      return true;
+      return ElementProxy.checker.isNamespaceElement(element, localName, Constants.SignatureSpecNS);
    }
 
    /**
@@ -281,18 +282,7 @@
     */
    public static boolean elementIsInEncryptionSpace(Element element,
            String localName) {
-
-      if ((element == null) ||
-            !EncryptionConstants.EncryptionSpecNS.equals(element.getNamespaceURI())
-          ){
-         return false;
-      }
-
-      if (!element.getLocalName().equals(localName)) {
-         return false;
-      }
-
-      return true;
+           return ElementProxy.checker.isNamespaceElement(element, localName, EncryptionConstants.EncryptionSpecNS);
    }
 
    /**
@@ -352,32 +342,28 @@
                                        + (npe == null ? "" : npe.getMessage()) + "\"");
     }
 
-
-
-   /**
-    * Method createDSctx
-    *
-    * @param doc
-    * @param prefix
-    * @param namespace
-    * @return the element.
-    */
-   public static Element createDSctx(Document doc, String prefix,
-                                     String namespace) {
+    /**
+     * Method createDSctx
+     *
+     * @param doc
+     * @param prefix
+     * @param namespace
+     * @return the element.
+     */
+    public static Element createDSctx(Document doc, String prefix,
+                                      String namespace) {
 
-      if ((prefix == null) || (prefix.trim().length() == 0)) {
-         throw new IllegalArgumentException("You must supply a prefix");
-      }
+       if ((prefix == null) || (prefix.trim().length() == 0)) {
+          throw new IllegalArgumentException("You must supply a prefix");
+       }
 
-      Element ctx = doc.createElementNS(null, "namespaceContext");
+       Element ctx = doc.createElementNS(null, "namespaceContext");
 
-      ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(),
-                         namespace);
+       ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(),
+                          namespace);
 
-      return ctx;
-   }
-
-
+       return ctx;
+    }
 
    /**
     * Method addReturnToElement
@@ -386,9 +372,23 @@
     */
    public static void addReturnToElement(Element e) {
 
-      Document doc = e.getOwnerDocument();
+      if (!ignoreLineBreaks) {
+         Document doc = e.getOwnerDocument();
+         e.appendChild(doc.createTextNode("\n"));
+      }
+   }
 
-      e.appendChild(doc.createTextNode("\n"));
+   public static void addReturnToElement(Document doc, HelperNodeList nl) {
+      if (!ignoreLineBreaks) {
+         nl.appendChild(doc.createTextNode("\n"));
+      }
+   }
+
+   public static void addReturnBeforeChild(Element e, Node child) {
+      if (!ignoreLineBreaks) {
+         Document doc = e.getOwnerDocument();
+         e.insertBefore(doc.createTextNode("\n"), child);
+      }
    }
 
    /**
@@ -470,7 +470,7 @@
 
                 for (int i = 0; i < attributesLength; i++) {
                         Attr currentAttr = (Attr) attributes.item(i);
-                        if (!namespaceNs.equals(currentAttr.getNamespaceURI()))
+                        if (namespaceNs!=currentAttr.getNamespaceURI())
                                 continue;
                         if (childElement.hasAttributeNS(namespaceNs,
                                                         currentAttr.getLocalName())) {
@@ -511,8 +511,7 @@
     */
    public static Element selectDsNode(Node sibling, String nodeName, int number) {
         while (sibling!=null) {
-                if (nodeName.equals(sibling.getLocalName())
-                                && Constants.SignatureSpecNS.equals(sibling.getNamespaceURI())) {
+                if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, Constants.SignatureSpecNS )) {
                         if (number==0){
                                 return (Element)sibling;
                         }
@@ -532,8 +531,7 @@
 
    public static Element selectXencNode(Node sibling, String nodeName, int number) {
         while (sibling!=null) {
-                if (nodeName.equals(sibling.getLocalName())
-                                && EncryptionConstants.EncryptionSpecNS.equals(sibling.getNamespaceURI())) {
+                if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, EncryptionConstants.EncryptionSpecNS )) {
                         if (number==0){
                                 return (Element)sibling;
                         }
@@ -591,8 +589,7 @@
     */
    public static Element selectNode(Node sibling, String uri,String nodeName, int number) {
         while (sibling!=null) {
-                if (nodeName.equals(sibling.getLocalName())
-                                && uri.equals(sibling.getNamespaceURI())) {
+                if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, uri)) {
                         if (number==0){
                                 return (Element)sibling;
                         }
@@ -611,7 +608,6 @@
    public static Element[] selectDsNodes(Node sibling,String nodeName) {
      return selectNodes(sibling,Constants.SignatureSpecNS,nodeName);
    }
-
    /**
     * @param sibling
     * @param uri
@@ -624,8 +620,7 @@
         int curr=0;
         //List list=new ArrayList();
         while (sibling!=null) {
-                if (nodeName.equals(sibling.getLocalName())
-                                && uri.equals(sibling.getNamespaceURI())) {
+                if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, uri)) {
                         a[curr++]=(Element)sibling;
                         if (size<=curr) {
                                 int cursize= size<<2;
@@ -694,4 +689,8 @@
          }
       }
    }
+
+    public static boolean ignoreLineBreaks() {
+        return ignoreLineBreaks;
+    }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -53,7 +52,7 @@
  * XPaths using the low-level API, and then just use the XPaths
  * over and over.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  * @see <a href="http://www.w3.org/TR/xpath">XPath Specification</a>
  */
 public class XPathFuncHereAPI {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -21,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.utils.resolver;
 
-
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -30,7 +27,6 @@
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
 import org.w3c.dom.Attr;
 
-
 /**
  * During reference validation, we have to retrieve resources from somewhere.
  * This is done by retrieving a Resolver. The resolver needs two arguments: The
@@ -48,7 +44,7 @@
  * <LI> Die erste Implementierung, die die Aufgabe erf??llt, f??hrt die Aufl??sung durch.
  * </UL>
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class ResourceResolver {
 
@@ -62,8 +58,7 @@
    /** these are the system-wide resolvers */
    static List _resolverVector = null;
 
-   /** Field _individualResolverVector */
-   List _individualResolverVector = null;
+   static boolean allThreadSafeInList=true;
 
    /** Field transformSpi */
    protected ResourceResolverSpi _resolverSpi = null;
@@ -92,6 +87,7 @@
       this._resolverSpi = resourceResolver;
    }
 
+
    /**
     * Method getInstance
     *
@@ -107,13 +103,32 @@
       for (int i = 0; i < length; i++) {
                   ResourceResolver resolver =
             (ResourceResolver) ResourceResolver._resolverVector.get(i);
+                  ResourceResolver resolverTmp=null;
+                  try {
+                        resolverTmp =  allThreadSafeInList || resolver._resolverSpi.engineIsThreadSafe() ? resolver :
+                                        new ResourceResolver((ResourceResolverSpi)resolver._resolverSpi.getClass().newInstance());
+                  } catch (InstantiationException e) {
+                          throw new ResourceResolverException("",e,uri,BaseURI);
+                  } catch (IllegalAccessException e) {
+                          throw new ResourceResolverException("",e,uri,BaseURI);
+                  }
 
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "check resolvability by class " + resolver._resolverSpi.getClass().getName());
 
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "check resolvability by class " + resolver.getClass().getName());
+         if ((resolver != null) && resolverTmp.canResolve(uri, BaseURI)) {
+                 if (i!=0) {
+                 //update resolver.
+                         //System.out.println("Swaping");
+                         List resolverVector=(List)((ArrayList)_resolverVector).clone();
+                         resolverVector.remove(i);
+                         resolverVector.add(0,resolver);
+                         _resolverVector=resolverVector;
+                 } else {
+                         //System.out.println("hitting");
+                 }
 
-         if ((resolver != null) && resolver.canResolve(uri, BaseURI)) {
-            return resolver;
+            return resolverTmp;
          }
       }
 
@@ -137,9 +152,10 @@
    public static final ResourceResolver getInstance(
            Attr uri, String BaseURI, List individualResolvers)
               throws ResourceResolverException {
-      if (true) {
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I was asked to create a ResourceResolver and got " + individualResolvers.size());
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, " extra resolvers to my existing " + ResourceResolver._resolverVector.size() + " system-wide resolvers");
+      if (log.isLoggable(java.util.logging.Level.FINE)) {
+
+        log.log(java.util.logging.Level.FINE, "I was asked to create a ResourceResolver and got " + (individualResolvers==null? 0 : individualResolvers.size()) );
+        log.log(java.util.logging.Level.FINE, " extra resolvers to my existing " + ResourceResolver._resolverVector.size() + " system-wide resolvers");
       }
 
       // first check the individual Resolvers
@@ -151,8 +167,8 @@
 
             if (resolver != null) {
                String currentClass = resolver._resolverSpi.getClass().getName();
-               if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "check resolvability by class " + currentClass);
+               if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "check resolvability by class " + currentClass);
 
                if (resolver.canResolve(uri, BaseURI)) {
                   return resolver;
@@ -175,39 +191,46 @@
       }
    }
 
-   /**
-    * Method register
-    *
-    * @param className
-    */
-   public static void register(String className) {
-            ResourceResolver resolver = null;
+    /**
+     * Registers a ResourceResolverSpi class. This method logs a warning if
+     * the class cannot be registered.
+     *
+     * @param className the name of the ResourceResolverSpi class to be
+     *    registered
+     */
+    public static void register(String className) {
+        register(className, false);
+    }
 
+    /**
+     * Registers a ResourceResolverSpi class at the beginning of the provider
+     * list. This method logs a warning if the class cannot be registered.
+     *
+     * @param className the name of the ResourceResolverSpi class to be
+     *    registered
+     */
+    public static void registerAtStart(String className) {
+        register(className, true);
+    }
+
+    private static void register(String className, boolean start) {
         try {
-           resolver = new ResourceResolver(className);
-                   ResourceResolver._resolverVector.add(resolver);
+            ResourceResolver resolver = new ResourceResolver(className);
+            if (start) {
+                ResourceResolver._resolverVector.add(0, resolver);
+                log.log(java.util.logging.Level.FINE, "registered resolver");
+            } else {
+                ResourceResolver._resolverVector.add(resolver);
+            }
+            if (!resolver._resolverSpi.engineIsThreadSafe()) {
+                allThreadSafeInList=false;
+        }
         } catch (Exception e) {
-//                      Object exArgs[] = { ((uri != null)
-//                    ? uri.getNodeValue()
-//                    : "null"), BaseURI };
-//
-//                      throw new ResourceResolverException("utils.resolver.noClass",
-//                                   exArgs, e, uri, BaseURI);
-                        log.log(java.util.logging.Level.WARNING, "Error loading resolver " + className +" disabling it");
+            log.log(java.util.logging.Level.WARNING, "Error loading resolver " + className +" disabling it");
         } catch (NoClassDefFoundError e) {
-                        log.log(java.util.logging.Level.WARNING, "Error loading resolver " + className +" disabling it");
+            log.log(java.util.logging.Level.WARNING, "Error loading resolver " + className +" disabling it");
         }
-
-   }
-
-   /**
-    * Method registerAtStart
-    *
-    * @param className
-    */
-   public static void registerAtStart(String className) {
-      ResourceResolver._resolverVector.add(0, className);
-   }
+    }
 
    /**
     * Method resolve
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -31,7 +30,7 @@
  * This Exception is thrown if something related to the
  * {@link com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver} goes wrong.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class ResourceResolverException extends XMLSecurityException {
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverSpi.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverSpi.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -22,6 +21,7 @@
 package com.sun.org.apache.xml.internal.security.utils.resolver;
 
 
+import java.util.HashMap;
 import java.util.Map;
 
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
@@ -31,7 +31,7 @@
 /**
  * During reference validation, we have to retrieve resources from somewhere.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public abstract class ResourceResolverSpi {
 
@@ -41,7 +41,7 @@
                     ResourceResolverSpi.class.getName());
 
    /** Field _properties */
-   protected java.util.Map _properties = new java.util.HashMap(10);
+   protected java.util.Map _properties = null;
 
    /**
     * This is the workhorse method used to resolve resources.
@@ -62,19 +62,9 @@
     * @param value
     */
    public void engineSetProperty(String key, String value) {
-
-      java.util.Iterator i = this._properties.keySet().iterator();
-
-      while (i.hasNext()) {
-         String c = (String) i.next();
-
-         if (c.equals(key)) {
-            key = c;
-
-            break;
-         }
-      }
-
+          if (_properties==null) {
+                  _properties=new HashMap();
+          }
       this._properties.put(key, value);
    }
 
@@ -85,19 +75,9 @@
     * @return the value of the property
     */
    public String engineGetProperty(String key) {
-
-      java.util.Iterator i = this._properties.keySet().iterator();
-
-      while (i.hasNext()) {
-         String c = (String) i.next();
-
-         if (c.equals(key)) {
-            key = c;
-
-            break;
-         }
-      }
-
+          if (_properties==null) {
+                        return null;
+          }
       return (String) this._properties.get(key);
    }
 
@@ -106,9 +86,22 @@
     * @param properties
     */
    public void engineAddProperies(Map properties) {
-      this._properties.putAll(properties);
+          if (properties!=null) {
+                  if (_properties==null) {
+                          _properties=new HashMap();
+                  }
+                  this._properties.putAll(properties);
+          }
    }
-
+   /**
+    * Tells if the implementation does can be reused by several threads safely.
+    * It normally means that the implemantation does not have any member, or there is
+    * member change betwen engineCanResolve & engineResolve invocations. Or it mantians all
+    * member info in ThreadLocal methods.
+    */
+   public boolean engineIsThreadSafe() {
+           return false;
+   }
    /**
     * This method helps the {@link ResourceResolver} to decide whether a
     * {@link ResourceResolverSpi} is able to perform the requested action.
@@ -174,8 +167,8 @@
                                   && (ch3 != '/'));
 
          if (isDosFilename) {
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Found DOS filename: " + str);
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Found DOS filename: " + str);
          }
       }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverAnonymous.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverAnonymous.java	Wed Jul 05 16:42:37 2017 +0200
@@ -32,14 +32,10 @@
 
 /**
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 
 public class ResolverAnonymous extends ResourceResolverSpi {
-   /** {@link java.util.logging} logging facility */
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger(
-                        ResolverAnonymous.class.getName());
 
    private XMLSignatureInput _input = null;
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2,7 +2,6 @@
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-
 /*
  * Copyright  1999-2004 The Apache Software Foundation.
  *
@@ -67,11 +66,12 @@
                             ResolverDirectHTTP.class.getName());
 
    /** Field properties[] */
-   static final String properties[] = { "http.proxy.host", "http.proxy.port",
-                                        "http.proxy.username",
-                                        "http.proxy.password",
-                                        "http.basic.username",
-                                        "http.basic.password" };
+   private static final String properties[] =
+        { "http.proxy.host", "http.proxy.port",
+          "http.proxy.username",
+          "http.proxy.password",
+          "http.basic.username",
+          "http.basic.password" };
 
    /** Field HttpProxyHost */
    private static final int HttpProxyHost = 0;
@@ -91,6 +91,9 @@
    /** Field HttpProxyPass */
    private static final int HttpBasicPass = 5;
 
+   public boolean engineIsThreadSafe() {
+           return true;
+   }
    /**
     * Method resolve
     *
@@ -117,15 +120,14 @@
             useProxy = true;
          }
 
-         // switch on proxy usage
          String oldProxySet = null;
          String oldProxyHost = null;
          String oldProxyPort = null;
+         // switch on proxy usage
          if (useProxy) {
             if (log.isLoggable(java.util.logging.Level.FINE)) {
-               log.log(java.util.logging.Level.FINE,
-                  "Use of HTTP proxy enabled: " + proxyHost + ":"
-                  + proxyPort);
+                log.log(java.util.logging.Level.FINE, "Use of HTTP proxy enabled: " + proxyHost + ":"
+                      + proxyPort);
             }
             oldProxySet = System.getProperty("http.proxySet");
             oldProxyHost = System.getProperty("http.proxyHost");
@@ -215,11 +217,8 @@
             summarized += read;
          }
 
-         if (log.isLoggable(java.util.logging.Level.FINE)) {
-            log.log(java.util.logging.Level.FINE,
-               "Fetched " + summarized + " bytes from URI "
-               + uriNew.toString());
-         }
+         log.log(java.util.logging.Level.FINE, "Fetched " + summarized + " bytes from URI "
+                   + uriNew.toString());
 
          XMLSignatureInput result = new XMLSignatureInput(baos.toByteArray());
 
@@ -253,39 +252,36 @@
     */
    public boolean engineCanResolve(Attr uri, String BaseURI) {
       if (uri == null) {
-         if (log.isLoggable(java.util.logging.Level.FINE)) {
-            log.log(java.util.logging.Level.FINE, "quick fail, uri == null");
-         }
+         log.log(java.util.logging.Level.FINE, "quick fail, uri == null");
+
          return false;
       }
 
       String uriNodeValue = uri.getNodeValue();
 
       if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#')) {
-         if (log.isLoggable(java.util.logging.Level.FINE)) {
-            log.log(java.util.logging.Level.FINE,
-               "quick fail for empty URIs and local ones");
-         }
+         log.log(java.util.logging.Level.FINE, "quick fail for empty URIs and local ones");
+
          return false;
       }
 
       if (log.isLoggable(java.util.logging.Level.FINE)) {
-         log.log(java.util.logging.Level.FINE,
-               "I was asked whether I can resolve " + uriNodeValue);
+         log.log(java.util.logging.Level.FINE, "I was asked whether I can resolve " + uriNodeValue);
       }
+
       if ( uriNodeValue.startsWith("http:") ||
-                                 BaseURI.startsWith("http:")) {
+                                (BaseURI!=null && BaseURI.startsWith("http:") )) {
          if (log.isLoggable(java.util.logging.Level.FINE)) {
-            log.log(java.util.logging.Level.FINE,
-                  "I state that I can resolve " + uriNodeValue);
+            log.log(java.util.logging.Level.FINE, "I state that I can resolve " + uriNodeValue);
          }
+
          return true;
       }
 
       if (log.isLoggable(java.util.logging.Level.FINE)) {
-         log.log(java.util.logging.Level.FINE,
-            "I state that I can't resolve " + uriNodeValue);
+         log.log(java.util.logging.Level.FINE, "I state that I can't resolve " + uriNodeValue);
       }
+
       return false;
    }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java	Wed Jul 05 16:42:37 2017 +0200
@@ -34,7 +34,7 @@
 /**
  * This resolver is used for resolving same-document URIs like URI="" of URI="#id".
  *
- * @author $Author: dims $
+ * @author $Author: mullan $
  * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#sec-ReferenceProcessingModel">The Reference processing model in the XML Signature spec</A>
  * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#sec-Same-Document">Same-Document URI-References in the XML Signature spec</A>
  * @see <A HREF="http://www.ietf.org/rfc/rfc2396.txt">Section 4.2 of RFC 2396</A>
@@ -45,7 +45,9 @@
     static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(
                             ResolverFragment.class.getName());
-
+   public boolean engineIsThreadSafe() {
+           return true;
+   }
    /**
     * Method engineResolve
     *
@@ -72,7 +74,7 @@
           * resource containing the signature
           */
 
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "ResolverFragment with empty URI (means complete document)");
+         log.log(java.util.logging.Level.FINE, "ResolverFragment with empty URI (means complete document)");
          selectedElem = doc;
       } else {
 
@@ -93,14 +95,14 @@
             throw new ResourceResolverException(
                "signature.Verification.MissingID", exArgs, uri, BaseURI);
          }
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Try to catch an Element with ID " + id + " and Element was " + selectedElem);
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Try to catch an Element with ID " + id + " and Element was " + selectedElem);
       }
 
       XMLSignatureInput result = new XMLSignatureInput(selectedElem);
       result.setExcludeComments(true);
 
-      //if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "We return a nodeset with " + resultSet.size() + " nodes");
+      //log.log(java.util.logging.Level.FINE, "We return a nodeset with " + resultSet.size() + " nodes");
       result.setMIMEType("text/xml");
           result.setSourceURI((BaseURI != null) ? BaseURI.concat(uri.getNodeValue()) :
                   uri.getNodeValue());
@@ -117,21 +119,24 @@
    public boolean engineCanResolve(Attr uri, String BaseURI) {
 
       if (uri == null) {
-         if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Quick fail for null uri");
+         log.log(java.util.logging.Level.FINE, "Quick fail for null uri");
          return false;
       }
 
       String uriNodeValue = uri.getNodeValue();
 
-      if (uriNodeValue.equals("")
-              || ((uriNodeValue.charAt(0)=='#')
-                  &&!uriNodeValue.startsWith("#xpointer("))) {
-         if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "State I can resolve reference: \"" + uriNodeValue + "\"");
+      if  (uriNodeValue.equals("") ||
+             (
+            (uriNodeValue.charAt(0)=='#')
+              && !((uriNodeValue.charAt(1)=='x') && uriNodeValue.startsWith("#xpointer("))
+              )
+           ){
+         if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "State I can resolve reference: \"" + uriNodeValue + "\"");
          return true;
       }
-      if (true)
-        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Do not seem to be able to resolve reference: \"" + uriNodeValue + "\"");
+      if (log.isLoggable(java.util.logging.Level.FINE))
+        log.log(java.util.logging.Level.FINE, "Do not seem to be able to resolve reference: \"" + uriNodeValue + "\"");
       return false;
    }
 
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java	Wed Jul 05 16:42:37 2017 +0200
@@ -20,8 +20,6 @@
  */
 package com.sun.org.apache.xml.internal.security.utils.resolver.implementations;
 
-
-
 import java.io.FileInputStream;
 
 import com.sun.org.apache.xml.internal.utils.URI;
@@ -30,11 +28,10 @@
 import com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverSpi;
 import org.w3c.dom.Attr;
 
-
 /**
  * A simple ResourceResolver for requests into the local filesystem.
  *
- * @author $Author: raul $
+ * @author $Author: mullan $
  */
 public class ResolverLocalFilesystem extends ResourceResolverSpi {
 
@@ -43,6 +40,9 @@
         java.util.logging.Logger.getLogger(
                     ResolverLocalFilesystem.class.getName());
 
+    public boolean engineIsThreadSafe() {
+           return true;
+   }
    /**
     * @inheritDoc
     */
@@ -50,7 +50,7 @@
            throws ResourceResolverException {
 
      try {
-        URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
+        URI uriNew = getNewURI(uri.getNodeValue(), BaseURI);
 
         // if the URI contains a fragment, ignore it
         URI uriNewNoFrag = new URI(uriNew);
@@ -72,6 +72,7 @@
       }
    }
 
+   private static int FILE_URI_LENGTH="file:/".length();
    /**
     * Method translateUriToFilename
     *
@@ -80,7 +81,7 @@
     */
    private static String translateUriToFilename(String uri) {
 
-      String subStr = uri.substring("file:/".length());
+      String subStr = uri.substring(FILE_URI_LENGTH);
 
       if (subStr.indexOf("%20") > -1)
       {
@@ -121,26 +122,36 @@
 
       String uriNodeValue = uri.getNodeValue();
 
-      if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#')) {
+      if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#') ||
+          uriNodeValue.startsWith("http:")) {
          return false;
       }
 
       try {
                  //URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
-                 if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I was asked whether I can resolve " + uriNodeValue/*uriNew.toString()*/);
+                 if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "I was asked whether I can resolve " + uriNodeValue/*uriNew.toString()*/);
 
                  if ( uriNodeValue.startsWith("file:") ||
                                          BaseURI.startsWith("file:")/*uriNew.getScheme().equals("file")*/) {
-                    if (true)
-                        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "I state that I can resolve " + uriNodeValue/*uriNew.toString()*/);
+                    if (log.isLoggable(java.util.logging.Level.FINE))
+                        log.log(java.util.logging.Level.FINE, "I state that I can resolve " + uriNodeValue/*uriNew.toString()*/);
 
                     return true;
                  }
       } catch (Exception e) {}
 
-      if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "But I can't");
+      log.log(java.util.logging.Level.FINE, "But I can't");
 
       return false;
    }
+
+   private static URI getNewURI(String uri, String BaseURI)
+           throws URI.MalformedURIException {
+
+      if ((BaseURI == null) || "".equals(BaseURI)) {
+         return new URI(uri);
+      }
+      return new URI(new URI(BaseURI), uri);
+   }
 }
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -44,7 +44,7 @@
  * nodes of the parse tree (all descendants, plus all attributes,
  * plus all namespaces nodes).
  *
- * @author $Author: dims $
+ * @author $Author: mullan $
  */
 public class ResolverXPointer extends ResourceResolverSpi {
 
@@ -53,6 +53,9 @@
         java.util.logging.Logger.getLogger(
                             ResolverXPointer.class.getName());
 
+    public boolean engineIsThreadSafe() {
+           return true;
+   }
    /**
     * @inheritDoc
     */
@@ -70,7 +73,7 @@
             String id = getXPointerId(uriStr);
             resultNode =IdResolver.getElementById(doc, id);
 
-            // if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Use #xpointer(id('" + id + "')) on element " + selectedElem);
+            // log.log(java.util.logging.Level.FINE, "Use #xpointer(id('" + id + "')) on element " + selectedElem);
 
             if (resultNode == null) {
                Object exArgs[] = { id };
@@ -148,14 +151,14 @@
                                                      uri.length()
                                                      - 2);
 
-         // if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "idPlusDelim=" + idPlusDelim);
+         // log.log(java.util.logging.Level.FINE, "idPlusDelim=" + idPlusDelim);
                  int idLen=idPlusDelim.length() -1;
          if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim
                  .charAt(idLen) == '"')) || ((idPlusDelim
                  .charAt(0) == '\'') && (idPlusDelim
                  .charAt(idLen) == '\''))) {
-            if (true)
-                if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "Id="
+            if (log.isLoggable(java.util.logging.Level.FINE))
+                log.log(java.util.logging.Level.FINE, "Id="
                       + idPlusDelim.substring(1, idLen));
 
             return true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/BrowserSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,199 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.io.IOException;
+import java.net.URI;
+
+/**
+ * BrowserSupport class.
+ *
+ * The implementation of the com.sun.servicetag API needs to be
+ * compiled with JDK 5 as well since the consumer of this API
+ * may require to support JDK 5 (e.g. NetBeans).
+ *
+ * The Desktop.browse() method can be backported in this class
+ * if needed.  The current implementation only supports JDK 6.
+ */
+class BrowserSupport {
+    private static boolean isBrowseSupported = false;
+    private static Method browseMethod = null;
+    private static Object desktop = null;
+    private static volatile Boolean result = false;
+
+
+    private static void initX() {
+        if  (desktop != null) {
+            return;
+        }
+        boolean supported = false;
+        Method browseM = null;
+        Object desktopObj = null;
+        try {
+            // Determine if java.awt.Desktop is supported
+            Class<?> desktopCls = Class.forName("java.awt.Desktop", true, null);
+            Method getDesktopM = desktopCls.getMethod("getDesktop");
+            browseM = desktopCls.getMethod("browse", URI.class);
+
+            Class<?> actionCls = Class.forName("java.awt.Desktop$Action", true, null);
+            final Method isDesktopSupportedMethod = desktopCls.getMethod("isDesktopSupported");
+            Method isSupportedMethod = desktopCls.getMethod("isSupported", actionCls);
+            Field browseField = actionCls.getField("BROWSE");
+            // isDesktopSupported calls getDefaultToolkit which can block
+            // infinitely, see 6636099 for details, to workaround we call
+            // in a  thread and time it out, noting that the issue is specific
+            // to X11, it does not hurt for Windows.
+            Thread xthread = new Thread() {
+                public void run() {
+                    try {
+                        // support only if Desktop.isDesktopSupported() and
+                        // Desktop.isSupported(Desktop.Action.BROWSE) return true.
+                        result = (Boolean) isDesktopSupportedMethod.invoke(null);
+                    } catch (IllegalAccessException e) {
+                        // should never reach here
+                        InternalError x =
+                            new InternalError("Desktop.getDesktop() method not found");
+                        x.initCause(e);
+                    } catch (InvocationTargetException e) {
+                        // browser not supported
+                        if (Util.isVerbose()) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            };
+            // set it to daemon, so that the vm will exit.
+            xthread.setDaemon(true);
+            xthread.start();
+            try {
+                xthread.join(5 * 1000);
+            } catch (InterruptedException ie) {
+                // ignore the exception
+            }
+            if (result.booleanValue()) {
+                desktopObj = getDesktopM.invoke(null);
+                result = (Boolean) isSupportedMethod.invoke(desktopObj, browseField.get(null));
+                supported = result.booleanValue();
+            }
+        } catch (ClassNotFoundException e) {
+            // browser not supported
+            if (Util.isVerbose()) {
+                e.printStackTrace();
+            }
+        } catch (NoSuchMethodException e) {
+            // browser not supported
+            if (Util.isVerbose()) {
+                e.printStackTrace();
+            }
+        } catch (NoSuchFieldException e) {
+            // browser not supported
+            if (Util.isVerbose()) {
+                e.printStackTrace();
+            }
+        } catch (IllegalAccessException e) {
+            // should never reach here
+            InternalError x =
+                    new InternalError("Desktop.getDesktop() method not found");
+            x.initCause(e);
+            throw x;
+        } catch (InvocationTargetException e) {
+            // browser not supported
+            if (Util.isVerbose()) {
+                e.printStackTrace();
+            }
+        }
+        isBrowseSupported = supported;
+        browseMethod = browseM;
+        desktop = desktopObj;
+    }
+
+    static boolean isSupported() {
+        initX();
+        return isBrowseSupported;
+    }
+
+    /**
+     * Launches the default browser to display a {@code URI}.
+     * If the default browser is not able to handle the specified
+     * {@code URI}, the application registered for handling
+     * {@code URIs} of the specified type is invoked. The application
+     * is determined from the protocol and path of the {@code URI}, as
+     * defined by the {@code URI} class.
+     * <p>
+     * This method calls the Desktop.getDesktop().browse() method.
+     * <p>
+     * @param uri the URI to be displayed in the user default browser
+     *
+     * @throws NullPointerException if {@code uri} is {@code null}
+     * @throws UnsupportedOperationException if the current platform
+     * does not support the {@link Desktop.Action#BROWSE} action
+     * @throws IOException if the user default browser is not found,
+     * or it fails to be launched, or the default handler application
+     * failed to be launched
+     * @throws IllegalArgumentException if the necessary permissions
+     * are not available and the URI can not be converted to a {@code URL}
+     */
+    static void browse(URI uri) throws IOException {
+        if (uri == null) {
+            throw new NullPointerException("null uri");
+        }
+        if (!isSupported()) {
+            throw new UnsupportedOperationException("Browse operation is not supported");
+        }
+
+        // Call Desktop.browse() method
+        try {
+            if (Util.isVerbose()) {
+                System.out.println("desktop: " + desktop + ":browsing..." + uri);
+            }
+            browseMethod.invoke(desktop, uri);
+        } catch (IllegalAccessException e) {
+            // should never reach here
+            InternalError x =
+                new InternalError("Desktop.getDesktop() method not found");
+            x.initCause(e);
+                throw x;
+        } catch (InvocationTargetException e) {
+            Throwable x = e.getCause();
+            if (x != null) {
+                if (x instanceof UnsupportedOperationException) {
+                    throw (UnsupportedOperationException) x;
+                } else if (x instanceof IllegalArgumentException) {
+                    throw (IllegalArgumentException) x;
+                } else if (x instanceof IOException) {
+                    throw (IOException) x;
+                } else if (x instanceof SecurityException) {
+                    throw (SecurityException) x;
+                } else {
+                    // ignore
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/Installer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,965 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import static com.sun.servicetag.Util.*;
+
+/**
+ * Service Tag Installer for Java SE.
+ */
+public class Installer {
+    // System properties for testing
+    private static String SVCTAG_DIR_PATH =
+        "servicetag.dir.path";
+    private static String SVCTAG_ENABLE_REGISTRATION =
+        "servicetag.registration.enabled";
+    private final static String SUN_VENDOR = "Sun Microsystems";
+    private final static String REGISTRATION_XML = "registration.xml";
+    private final static String SERVICE_TAG_FILE = "servicetag";
+    private final static String REGISTRATION_HTML_NAME = "register";
+
+    private final static Locale[] knownSupportedLocales =
+        new Locale[] { Locale.ENGLISH,
+                       Locale.JAPANESE,
+                       Locale.SIMPLIFIED_CHINESE};
+
+    private final static String javaHome = System.getProperty("java.home");
+    private static File svcTagDir;
+    private static File serviceTagFile;
+    private static File regXmlFile;
+    private static RegistrationData registration;
+    private static boolean supportRegistration;
+    private static String registerHtmlParent;
+    private static Set<Locale> supportedLocales = new HashSet<Locale>();
+    private static Properties swordfishProps = null;
+    private static String[] jreArchs = null;
+    static {
+        String dir = System.getProperty(SVCTAG_DIR_PATH);
+        if (dir == null) {
+            svcTagDir = new File(getJrePath(), "lib" + File.separator + SERVICE_TAG_FILE);
+        } else {
+            svcTagDir = new File(dir);
+        }
+        serviceTagFile = new File(svcTagDir, SERVICE_TAG_FILE);
+        regXmlFile = new File(svcTagDir, REGISTRATION_XML);
+        if (System.getProperty(SVCTAG_ENABLE_REGISTRATION) == null) {
+            supportRegistration = isJdk();
+        } else {
+            supportRegistration = true;
+        }
+    }
+
+    private Installer() {
+    }
+
+    // Implementation of ServiceTag.getJavaServiceTag(String) method
+    static ServiceTag getJavaServiceTag(String source) throws IOException {
+        if (!System.getProperty("java.vendor").startsWith(SUN_VENDOR)) {
+            // Products bundling this implementation may run on
+            // Mac OS which is not a Sun JDK
+            return null;
+        }
+        boolean cleanup = false;
+        try {
+            // Check if we have the swordfish entries for this JRE version
+            if (loadSwordfishEntries() == null) {
+                return null;
+            }
+
+            ServiceTag st = getJavaServiceTag();
+            // Check if the service tag created by this bundle owner
+            if (st != null && st.getSource().equals(source)) {
+                // Install the system service tag if supported
+                // stclient may be installed after the service tag creation
+                if (Registry.isSupported()) {
+                    installSystemServiceTag();
+                }
+                return st;
+            }
+
+            // in case any exception thrown during the cleanup
+            cleanup = true;
+
+            // re-create a new one for this bundle owner
+            // first delete the registration data
+            deleteRegistrationData();
+            cleanup = false;
+
+            // create service tag and generate new register.html pages
+            return createServiceTag(source);
+        } finally {
+            if (cleanup) {
+                if (regXmlFile.exists()) {
+                    regXmlFile.delete();
+                }
+                if (serviceTagFile.exists()) {
+                    serviceTagFile.delete();
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns the Java SE registration data located in
+     * the <JRE>/lib/servicetag/registration.xml by default.
+     *
+     * @throws IllegalArgumentException if the registration data
+     *         is of invalid format.
+     */
+    private static synchronized RegistrationData getRegistrationData()
+            throws IOException {
+        if (registration != null) {
+            return registration;
+        }
+        if (regXmlFile.exists()) {
+            BufferedInputStream in = null;
+            try {
+                in = new BufferedInputStream(new FileInputStream(regXmlFile));
+                registration = RegistrationData.loadFromXML(in);
+            } catch (IllegalArgumentException ex) {
+                System.err.println("Error: Bad registration data \"" +
+                                    regXmlFile + "\":" + ex.getMessage());
+                throw ex;
+            } finally {
+                if (in != null) {
+                    in.close();
+                }
+            }
+        } else {
+            registration = new RegistrationData();
+        }
+        return registration;
+    }
+
+    /**
+     * Write the registration data to the registration.xml file.
+     *
+     * The offline registration page has to be regenerated with
+     * the new registration data.
+     *
+     * @throws java.io.IOException
+     */
+    private static synchronized void writeRegistrationXml()
+            throws IOException {
+        if (!svcTagDir.exists()) {
+            // This check is for NetBeans or other products that
+            // bundles this com.sun.servicetag implementation for
+            // pre-6u5 release.
+            if (!svcTagDir.mkdir()) {
+                throw new IOException("Failed to create directory: " + svcTagDir);
+            }
+        }
+
+        // regenerate the new offline registration page
+        deleteRegistrationHtmlPage();
+        getRegistrationHtmlPage();
+
+        BufferedOutputStream out = null;
+        try {
+            out = new BufferedOutputStream(new FileOutputStream(regXmlFile));
+            getRegistrationData().storeToXML(out);
+        } catch (IllegalArgumentException ex) {
+            System.err.println("Error: Bad registration data \"" +
+                                regXmlFile + "\":" + ex.getMessage());
+            throw ex;
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    /**
+     * Returns the instance urn(s) stored in the servicetag file
+     * or empty set if file not exists.
+     */
+    private static Set<String> getInstalledURNs() throws IOException {
+        Set<String> urnSet = new HashSet<String>();
+        if (serviceTagFile.exists()) {
+            BufferedReader in = null;
+            try {
+                in = new BufferedReader(new FileReader(serviceTagFile));
+                String urn;
+                while ((urn = in.readLine()) != null) {
+                    urn = urn.trim();
+                    if (urn.length() > 0) {
+                        urnSet.add(urn);
+                    }
+                }
+            } finally {
+                if (in != null) {
+                    in.close();
+                }
+            }
+        }
+        return urnSet;
+    }
+
+    /**
+     * Return the Java SE service tag(s) if it exists.
+     * Typically only one Java SE service tag but it could have two for
+     * Solaris 32-bit and 64-bit on the same install directory.
+     *
+     * @return the service tag(s) for Java SE
+     */
+    private static ServiceTag[] getJavaServiceTagArray() throws IOException {
+        RegistrationData regData = getRegistrationData();
+        Set<ServiceTag> svcTags = regData.getServiceTags();
+        Set<ServiceTag> result = new HashSet<ServiceTag>();
+
+        Properties props = loadSwordfishEntries();
+        String jdkUrn = props.getProperty("servicetag.jdk.urn");
+        String jreUrn = props.getProperty("servicetag.jre.urn");
+        for (ServiceTag st : svcTags) {
+            if (st.getProductURN().equals(jdkUrn) ||
+                st.getProductURN().equals(jreUrn)) {
+                result.add(st);
+            }
+        }
+        return result.toArray(new ServiceTag[0]);
+    }
+
+    /**
+     * Returns the Java SE service tag for this running platform;
+     * or null if not exist.
+     * This method will return the 64-bit service tag if the JDK
+     * supports both 32-bit and 64-bit if already created.
+     */
+    private static ServiceTag getJavaServiceTag() throws IOException {
+        String definedId = getProductDefinedId();
+        for (ServiceTag st : getJavaServiceTagArray()) {
+            if (st.getProductDefinedInstanceID().equals(definedId)) {
+                return st;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Create a service tag for Java SE and install in the system
+     * service tag registry if supported.
+     *
+     * A registration data <JRE>/lib/servicetag/registration.xml
+     * will be created to storeToXML the XML entry for Java SE service tag.
+     * If the system supports service tags, this method will install
+     * the Java SE service tag in the system service tag registry and
+     * its <tt>instance_urn</tt> will be stored to <JRE>/lib/servicetag/servicetag.
+     *
+     * If <JRE>/lib/servicetag/registration.xml exists but is not installed
+     * in the system service tag registry (i.e. servicetag doesn't exist),
+     * this method will install it as described above.
+     *
+     * If the system supports service tag, stclient will be used
+     * to create the Java SE service tag.
+     *
+     * A Solaris 32-bit and 64-bit JDK will be installed in the same
+     * directory but the registration.xml will have 2 service tags.
+     * The servicetag file will also contain 2 instance_urns for that case.
+     */
+    private static ServiceTag createServiceTag(String svcTagSource)
+            throws IOException {
+        // determine if a new service tag is needed to be created
+        ServiceTag newSvcTag = null;
+        if (getJavaServiceTag() == null) {
+            newSvcTag = newServiceTag(svcTagSource);
+        }
+
+        // Add the new service tag in the registration data
+        if (newSvcTag != null) {
+            RegistrationData regData = getRegistrationData();
+
+            // Add the service tag to the registration data in JDK/JRE
+            newSvcTag = regData.addServiceTag(newSvcTag);
+
+            // add if there is a service tag for the OS
+            ServiceTag osTag = SolarisServiceTag.getServiceTag();
+            if (osTag != null && regData.getServiceTag(osTag.getInstanceURN()) == null) {
+                regData.addServiceTag(osTag);
+            }
+            // write to the registration.xml
+            writeRegistrationXml();
+        }
+
+        // Install the system service tag if supported
+        if (Registry.isSupported()) {
+            installSystemServiceTag();
+        }
+        return newSvcTag;
+    }
+
+    private static void installSystemServiceTag() throws IOException {
+        // only install the service tag in the registry if
+        // it has permission to write the servicetag file.
+        if ((!serviceTagFile.exists() && !svcTagDir.canWrite()) ||
+                (serviceTagFile.exists() && !serviceTagFile.canWrite())) {
+            return;
+        }
+
+        Set<String> urns = getInstalledURNs();
+        ServiceTag[] javaSvcTags = getJavaServiceTagArray();
+        if (urns.size() < javaSvcTags.length) {
+            for (ServiceTag st : javaSvcTags) {
+                // Add the service tag in the system service tag registry
+                // if not installed
+                String instanceURN = st.getInstanceURN();
+                if (!urns.contains(instanceURN)) {
+                    Registry.getSystemRegistry().addServiceTag(st);
+                }
+            }
+        }
+        writeInstalledUrns();
+    }
+
+    private static ServiceTag newServiceTag(String svcTagSource) throws IOException {
+        // Load the swoRDFish information for the service tag creation
+        Properties props = loadSwordfishEntries();
+
+        // Determine the product URN and name
+        String productURN;
+        String productName;
+
+        if (isJdk()) {
+            // <HOME>/jre exists which implies it's a JDK
+            productURN = props.getProperty("servicetag.jdk.urn");
+            productName = props.getProperty("servicetag.jdk.name");
+        } else {
+            // Otherwise, it's a JRE
+            productURN = props.getProperty("servicetag.jre.urn");
+            productName = props.getProperty("servicetag.jre.name");
+        }
+
+        return ServiceTag.newInstance(ServiceTag.generateInstanceURN(),
+                                      productName,
+                                      System.getProperty("java.version"),
+                                      productURN,
+                                      props.getProperty("servicetag.parent.name"),
+                                      props.getProperty("servicetag.parent.urn"),
+                                      getProductDefinedId(),
+                                      SUN_VENDOR,
+                                      System.getProperty("os.arch"),
+                                      getZoneName(),
+                                      svcTagSource);
+    }
+
+    /**
+     * Delete the registration data, the offline registration pages and
+     * the service tags in the system service tag registry if installed.
+     *
+     * The registration.xml and servicetag file will be removed.
+     */
+    private static synchronized void deleteRegistrationData()
+            throws IOException {
+        try {
+            // delete the offline registration page
+            deleteRegistrationHtmlPage();
+
+            // Remove the service tag from the system ST registry if exists
+            Set<String> urns = getInstalledURNs();
+            if (urns.size() > 0 && Registry.isSupported()) {
+                for (String u : urns) {
+                    Registry.getSystemRegistry().removeServiceTag(u);
+                }
+            }
+            registration = null;
+        } finally {
+            // Delete the registration.xml and servicetag files if exists
+            if (regXmlFile.exists()) {
+                if (!regXmlFile.delete()) {
+                    throw new IOException("Failed to delete " + regXmlFile);
+                }
+            }
+            if (serviceTagFile.exists()) {
+                if (!serviceTagFile.delete()) {
+                    throw new IOException("Failed to delete " + serviceTagFile);
+                }
+            }
+        }
+    }
+
+    /**
+     * Updates the registration data to contain one single service tag
+     * for the running Java runtime.
+     */
+    private static synchronized void updateRegistrationData(String svcTagSource)
+            throws IOException {
+        RegistrationData regData = getRegistrationData();
+        ServiceTag curSvcTag = newServiceTag(svcTagSource);
+
+        ServiceTag[] javaSvcTags = getJavaServiceTagArray();
+        Set<String> urns = getInstalledURNs();
+        for (ServiceTag st : javaSvcTags) {
+            if (!st.getProductDefinedInstanceID().equals(curSvcTag.getProductDefinedInstanceID())) {
+                String instanceURN = st.getInstanceURN();
+                regData.removeServiceTag(instanceURN);
+
+                // remove it from the system service tag registry if exists
+                if (urns.contains(instanceURN) && Registry.isSupported()) {
+                    Registry.getSystemRegistry().removeServiceTag(instanceURN);
+                }
+            }
+        }
+        writeRegistrationXml();
+        writeInstalledUrns();
+    }
+
+    private static void writeInstalledUrns() throws IOException {
+        // if the Registry is not supported,
+        // remove the servicetag file
+        if (!Registry.isSupported() && serviceTagFile.exists()) {
+            serviceTagFile.delete();
+            return;
+        }
+
+        PrintWriter out = null;
+        try {
+            out = new PrintWriter(serviceTagFile);
+
+            ServiceTag[] javaSvcTags = getJavaServiceTagArray();
+            for (ServiceTag st : javaSvcTags) {
+                // Write the instance_run to the servicetag file
+                String instanceURN = st.getInstanceURN();
+                out.println(instanceURN);
+            }
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    /**
+     * Load the values associated with the swoRDFish metadata entries
+     * for Java SE. The swoRDFish metadata entries are different for
+     * different release.
+     *
+     * @param version Version of Java SE
+     */
+    private static synchronized Properties loadSwordfishEntries() throws IOException {
+        if (swordfishProps != null) {
+            return swordfishProps;
+        }
+
+        // The version string for Java SE 6 is 1.6.0
+        // We just need the minor number in the version string
+        int version = Util.getJdkVersion();
+
+        String filename = "/com/sun/servicetag/resources/javase_" +
+                version + "_swordfish.properties";
+        InputStream in = Installer.class.getClass().getResourceAsStream(filename);
+        if (in == null) {
+            return null;
+        }
+        swordfishProps = new Properties();
+        try {
+            swordfishProps.load(in);
+        } finally {
+            in.close();
+        }
+        return swordfishProps;
+    }
+
+    /**
+     * Returns the product defined instance ID for Java SE.
+     * It is a list of comma-separated name/value pairs:
+     *    "id=<full-version>  <arch> [<arch>]*"
+     *    "dir=<java.home system property value>"
+     *
+     * where <full-version> is the full version string of the JRE,
+     *       <arch> is the architecture that the runtime supports
+     *       (i.e. "sparc", "sparcv9", "i386", "amd64" (ISA list))
+     *
+     * For Solaris, it can be dual mode that can support both
+     * 32-bit and 64-bit. the "id" will be set to
+     *     "1.6.0_03-b02 sparc sparcv9"
+     *
+     * The "dir" property is included in the service tag to enable
+     * the Service Tag software to determine if a service tag for
+     * Java SE is invalid and perform appropriate service tag
+     * cleanup if necessary.  See RFE# 6574781 Service Tags Enhancement.
+     *
+     */
+    private static String getProductDefinedId() {
+        StringBuilder definedId = new StringBuilder();
+        definedId.append("id=");
+        definedId.append(System.getProperty("java.runtime.version"));
+
+        String[] archs = getJreArchs();
+        for (String name : archs) {
+            definedId.append(" " + name);
+        }
+
+        String location = ",dir=" + javaHome;
+        if ((definedId.length() + location.length()) < 256) {
+            definedId.append(",dir=");
+            definedId.append(javaHome);
+        } else {
+            // if it exceeds the limit, we will not include the location
+            if (isVerbose()) {
+                System.err.println("Warning: Product defined instance ID exceeds the field limit:");
+            }
+        }
+
+        return definedId.toString();
+    }
+
+    /**
+     * Returns the architectures that the runtime supports
+     *  (i.e. "sparc", "sparcv9", "i386", "amd64" (ISA list))
+     * The directory name where libjava.so is located.
+     *
+     * On Windows, returns the "os.arch" system property value.
+     */
+    private synchronized static String[] getJreArchs() {
+        if (jreArchs != null) {
+            return jreArchs;
+        }
+
+        Set<String> archs = new HashSet<String>();
+
+        String os = System.getProperty("os.name");
+        if (os.equals("SunOS") || os.equals("Linux")) {
+            // Traverse the directories under <JRE>/lib.
+            // If <JRE>/lib/<arch>/libjava.so exists, add <arch>
+            // to the product defined ID
+            File dir = new File(getJrePath() + File.separator + "lib");
+            if (dir.isDirectory()) {
+                String[] children = dir.list();
+                for (String name : children) {
+                    File f = new File(dir, name + File.separator + "libjava.so");
+                    if (f.exists()) {
+                        archs.add(name);
+                    }
+                }
+            }
+        } else {
+            // Windows - append the os.arch
+            archs.add(System.getProperty("os.arch"));
+        }
+        jreArchs = archs.toArray(new String[0]);
+        return jreArchs;
+    }
+
+    /**
+     * Return the zonename if zone is supported; otherwise, return
+     * "global".
+     */
+    private static String getZoneName() throws IOException {
+        String zonename = "global";
+
+        String command = "/usr/bin/zonename";
+        File f = new File(command);
+        // com.sun.servicetag package has to be compiled with JDK 5 as well
+        // JDK 5 doesn't support the File.canExecute() method.
+        // Risk not checking isExecute() for the zonename command is very low.
+        if (f.exists()) {
+            ProcessBuilder pb = new ProcessBuilder(command);
+            Process p = pb.start();
+            String output = commandOutput(p);
+            if (p.exitValue() == 0) {
+                zonename = output.trim();
+            }
+
+        }
+        return zonename;
+    }
+
+    private synchronized static String getRegisterHtmlParent() throws IOException {
+        if (registerHtmlParent == null) {
+            File htmlDir;    // register.html is put under the JDK directory
+            if (getJrePath().endsWith(File.separator + "jre")) {
+                htmlDir = new File(getJrePath(), "..");
+            } else {
+                // j2se non-image build
+                htmlDir = new File(getJrePath());
+            }
+
+            // initialize the supported locales
+            initSupportedLocales(htmlDir);
+
+            // Determine the location of the offline registration page
+            String path = System.getProperty(SVCTAG_DIR_PATH);
+            if (path == null) {
+                // Default is <JDK>/register.html
+                registerHtmlParent = htmlDir.getCanonicalPath();
+            } else {
+                File f = new File(path);
+                registerHtmlParent = f.getCanonicalPath();
+                if (!f.isDirectory()) {
+                    throw new InternalError("Path " + path + " set in \"" +
+                            SVCTAG_DIR_PATH + "\" property is not a directory");
+                }
+            }
+        }
+        return registerHtmlParent;
+    }
+
+    /**
+     * Returns the File object of the offline registration page localized
+     * for the default locale in the JDK directory.
+     */
+    static synchronized File getRegistrationHtmlPage() throws IOException {
+        if (!supportRegistration) {
+            // No register.html page generated if JRE
+            return null;
+        }
+
+        String parent = getRegisterHtmlParent();
+
+        // check if the offline registration page is already generated
+        File f = new File(parent, REGISTRATION_HTML_NAME + ".html");
+        if (!f.exists()) {
+            // Generate the localized version of the offline registration Page
+            generateRegisterHtml(parent);
+        }
+
+        String name = REGISTRATION_HTML_NAME;
+        Locale locale = getDefaultLocale();
+        if (!locale.equals(Locale.ENGLISH) && supportedLocales.contains(locale)) {
+            // if the locale is not English and is supported by JDK
+            // set to the appropriate offline registration page;
+            // otherwise,set to register.html.
+            name = REGISTRATION_HTML_NAME + "_" + locale.toString();
+        }
+        File htmlFile = new File(parent, name + ".html");
+        if (isVerbose()) {
+            System.out.print("Offline registration page: " + htmlFile);
+            System.out.println((htmlFile.exists() ?
+                               "" : " not exist. Use register.html"));
+        }
+        if (htmlFile.exists()) {
+            return htmlFile;
+        } else {
+            return new File(parent,
+                            REGISTRATION_HTML_NAME + ".html");
+        }
+    }
+
+    private static Locale getDefaultLocale() {
+        List<Locale> candidateLocales = getCandidateLocales(Locale.getDefault());
+        for (Locale l : candidateLocales) {
+            if (supportedLocales.contains(l)) {
+                return l;
+            }
+        }
+        return Locale.getDefault();
+    }
+
+    private static List<Locale> getCandidateLocales(Locale locale) {
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
+
+        List<Locale> locales = new ArrayList<Locale>(3);
+        if (variant.length() > 0) {
+            locales.add(locale);
+        }
+        if (country.length() > 0) {
+            locales.add((locales.size() == 0) ?
+                        locale : new Locale(language, country, ""));
+        }
+        if (language.length() > 0) {
+            locales.add((locales.size() == 0) ?
+                        locale : new Locale(language, "", ""));
+        }
+        return locales;
+    }
+
+    // Remove the offline registration pages
+    private static void deleteRegistrationHtmlPage() throws IOException {
+        String parent = getRegisterHtmlParent();
+        if (parent == null) {
+            return;
+        }
+
+        for (Locale locale : supportedLocales) {
+            String name = REGISTRATION_HTML_NAME;
+            if (!locale.equals(Locale.ENGLISH)) {
+                name += "_" + locale.toString();
+            }
+            File f = new File(parent, name + ".html");
+            if (f.exists()) {
+                if (!f.delete()) {
+                    throw new IOException("Failed to delete " + f);
+                }
+            }
+        }
+    }
+
+    private static void initSupportedLocales(File jdkDir) {
+        if (supportedLocales.isEmpty()) {
+            // initialize with the known supported locales
+            for (Locale l : knownSupportedLocales) {
+                supportedLocales.add(l);
+            }
+        }
+
+        // Determine unknown supported locales if any
+        // by finding the localized version of README.html
+        // This prepares if a new locale in JDK is supported in
+        // e.g. in the OpenSource world
+        FilenameFilter ff = new FilenameFilter() {
+            public boolean accept(File dir, String name) {
+                String fname = name.toLowerCase();
+                if (fname.startsWith("readme") && fname.endsWith(".html")) {
+                    return true;
+                }
+                return false;
+            }
+        };
+
+        String[] readmes = jdkDir.list(ff);
+        for (String name : readmes) {
+            String basename = name.substring(0, name.length() - ".html".length());
+            String[] ss = basename.split("_");
+            switch (ss.length) {
+                case 1:
+                    // English version
+                    break;
+                case 2:
+                    supportedLocales.add(new Locale(ss[1]));
+                    break;
+                case 3:
+                    supportedLocales.add(new Locale(ss[1], ss[2]));
+                    break;
+                default:
+                    // ignore
+                    break;
+            }
+        }
+        if (isVerbose()) {
+            System.out.println("Supported locales: ");
+            for (Locale l : supportedLocales) {
+                System.out.println(l);
+            }
+        }
+    }
+
+    private static final String JDK_HEADER_PNG_KEY = "@@JDK_HEADER_PNG@@";
+    private static final String JDK_VERSION_KEY = "@@JDK_VERSION@@";
+    private static final String REGISTRATION_URL_KEY = "@@REGISTRATION_URL@@";
+    private static final String REGISTRATION_PAYLOAD_KEY = "@@REGISTRATION_PAYLOAD@@";
+
+    @SuppressWarnings("unchecked")
+    private static void generateRegisterHtml(String parent) throws IOException {
+        int version = Util.getJdkVersion();
+        int update = Util.getUpdateVersion();
+        String jdkVersion = "Version " + version;
+        if (update > 0) {
+            // product name is not translated
+            jdkVersion += " Update " + update;
+        }
+        RegistrationData regData = getRegistrationData();
+        // Make sure it uses the canonical path before getting the URI.
+        File img = new File(svcTagDir.getCanonicalPath(), "jdk_header.png");
+        String headerImageSrc = img.toURI().toString();
+
+        // Format the registration data in one single line
+        StringBuilder payload = new StringBuilder();
+        String xml = regData.toString().replaceAll("\"", "%22");
+        BufferedReader reader = new BufferedReader(new StringReader(xml));
+        try {
+            String line = null;
+            while ((line = reader.readLine()) != null) {
+                payload.append(line.trim());
+            }
+        } finally {
+            reader.close();
+        }
+
+        String resourceFilename = "/com/sun/servicetag/resources/register";
+        for (Locale locale : supportedLocales) {
+            String name = REGISTRATION_HTML_NAME;
+            String resource = resourceFilename;
+            if (!locale.equals(Locale.ENGLISH)) {
+                name += "_" + locale.toString();
+                resource += "_" + locale.toString();
+            }
+            File f = new File(parent, name + ".html");
+            InputStream in = null;
+            BufferedReader br = null;
+            PrintWriter pw = null;
+            String registerURL = SunConnection.
+                getRegistrationURL(regData.getRegistrationURN(),
+                                   locale,
+                                   String.valueOf(version)).toString();
+            try {
+                in = Installer.class.getClass().getResourceAsStream(resource + ".html");
+                if (in == null) {
+                    // if the resource file is missing
+                    if (isVerbose()) {
+                        System.out.println("Missing resouce file: " + resource + ".html");
+                    }
+                    continue;
+                }
+                if (isVerbose()) {
+                    System.out.println("Generating " + f + " from " + resource + ".html");
+                }
+
+                br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+                pw = new PrintWriter(f, "UTF-8");
+                String line = null;
+                while ((line = br.readLine()) != null) {
+                    String output = line;
+                    if (line.contains(JDK_VERSION_KEY)) {
+                        output = line.replace(JDK_VERSION_KEY, jdkVersion);
+                    } else if (line.contains(JDK_HEADER_PNG_KEY)) {
+                        output = line.replace(JDK_HEADER_PNG_KEY, headerImageSrc);
+                    } else if (line.contains(REGISTRATION_URL_KEY)) {
+                        output = line.replace(REGISTRATION_URL_KEY, registerURL);
+                    } else if (line.contains(REGISTRATION_PAYLOAD_KEY)) {
+                        output = line.replace(REGISTRATION_PAYLOAD_KEY, payload.toString());
+                    }
+                    pw.println(output);
+                }
+                f.setReadOnly();
+                pw.flush();
+            } finally {
+                if (pw != null) {
+                    pw.close();
+                }
+                if (in != null) {
+                    in.close();
+                }
+                if (br!= null) {
+                    br.close();
+                }
+            }
+        }
+    }
+
+    private static final int MAX_SOURCE_LEN = 63;
+
+    /**
+     * A utility class to create a service tag for Java SE.
+     * <p>
+     * <b>Usage:</b><br>
+     * <blockquote><tt>
+     * &lt;JAVA_HOME&gt;/bin/java com.sun.servicetag.Installer
+     * </tt></blockquote>
+     * <p>
+     */
+    public static void main(String[] args) {
+        String source = "Manual ";
+        String runtimeName = System.getProperty("java.runtime.name");
+        if (runtimeName.startsWith("OpenJDK")) {
+            source = "OpenJDK ";
+        }
+        source += System.getProperty("java.runtime.version");
+        if (source.length() > MAX_SOURCE_LEN) {
+            source = source.substring(0, MAX_SOURCE_LEN);
+        }
+
+        // Parse the options (arguments starting with "-" )
+        boolean delete = false;
+        boolean update = false;
+        boolean register = false;
+        int count = 0;
+        while (count < args.length) {
+            String arg = args[count];
+            if (arg.trim().length() == 0) {
+                // skip empty arguments
+                count++;
+                continue;
+            }
+
+            if (arg.equals("-source")) {
+                source = args[++count];
+            } else if (arg.equals("-delete")) {
+                delete = true;
+            } else if (arg.equals("-register")) {
+                register = true;
+            } else {
+                usage();
+                return;
+            }
+            count++;
+        }
+        try {
+            if (delete) {
+                deleteRegistrationData();
+            } else {
+                ServiceTag[] javaSvcTags = getJavaServiceTagArray();
+                String[] archs = getJreArchs();
+                if (javaSvcTags.length > archs.length) {
+                    // 64-bit has been uninstalled
+                    // so remove the service tag
+                    updateRegistrationData(source);
+                } else {
+                    // create the service tag
+                    createServiceTag(source);
+                }
+            }
+
+            if (register) {
+                // Registration is only supported by JDK
+                // For testing purpose, override with a "servicetag.enable.registration" property
+
+                RegistrationData regData = getRegistrationData();
+                if (supportRegistration && !regData.getServiceTags().isEmpty()) {
+                    SunConnection.register(regData,
+                                           getDefaultLocale(),
+                                           String.valueOf(Util.getJdkVersion()));
+                }
+            }
+            System.exit(0);
+        } catch (IOException e) {
+            System.err.println("I/O Error: " + e.getMessage());
+            if (isVerbose()) {
+                e.printStackTrace();
+            }
+        } catch (IllegalArgumentException ex) {
+            if (isVerbose()) {
+                ex.printStackTrace();
+            }
+        } catch (Exception e) {
+            System.err.println("Error: " + e.getMessage());
+            if (isVerbose()) {
+                e.printStackTrace();
+            }
+        }
+        System.exit(1);
+    }
+
+    private static void usage() {
+        System.out.println("Usage:");
+        System.out.print("    " + Installer.class.getName());
+        System.out.println(" [-delete|-source <source>|-register]");
+        System.out.println("       to create a service tag for the Java platform");
+        System.out.println("");
+        System.out.println("Internal Options:");
+        System.out.println("    -source: to specify the source of the service tag to be created");
+        System.out.println("    -delete: to delete the service tag ");
+        System.out.println("    -register: to register the JDK");
+        System.out.println("    -help:   to print this help message");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/LinuxSystemEnvironment.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+// This class is a copy of the com.sun.scn.servicetags.LinuxSystemEnvironment
+// class from the Sun Connection source.
+//
+// The Service Tags team maintains the latest version of the implementation
+// for system environment data collection.  JDK will include a copy of
+// the most recent released version for a JDK release. We rename
+// the package to com.sun.servicetag so that the Sun Connection
+// product always uses the latest version from the com.sun.scn.servicetags
+// package. JDK and users of the com.sun.servicetag API
+// (e.g. NetBeans and SunStudio) will use the version in JDK.
+//
+// So we keep this class in src/share/classes instead of src/<os>/classes.
+
+import java.io.*;
+
+/**
+ * Linux implementation of the SystemEnvironment class.
+ */
+class LinuxSystemEnvironment extends SystemEnvironment {
+    LinuxSystemEnvironment() {
+        setHostId(getLinuxHostId());
+        setSystemModel(getCommandOutput("/bin/uname", "-i"));
+        setSystemManufacturer(getLinuxSystemManufacturer());
+        setCpuManufacturer(getLinuxCpuManufacturer());
+        setSerialNumber(getLinuxSN());
+    }
+    private String dmiInfo = null;
+
+    private static final int SN  = 1;
+    private static final int SYS = 2;
+    private static final int CPU = 3;
+
+    private String getLinuxHostId() {
+        String output = getCommandOutput("/usr/bin/hostid");
+        // trim off the leading 0x
+        if (output.startsWith("0x")) {
+            output = output.substring(2);
+        }
+        return output;
+    }
+
+    /**
+     * Tries to obtain and return the cpu manufacturer.
+     * @return The cpu manufacturer (an empty string if not found or an error occurred)
+     */
+    private String getLinuxCpuManufacturer() {
+        String tmp = getLinuxPSNInfo(CPU);
+        if (tmp.length() > 0) {
+            return tmp;
+        }
+
+        String contents = getFileContent("/proc/cpuinfo");
+        for (String line : contents.split("\n")) {
+            if (line.contains("vendor_id")) {
+                String[] ss = line.split(":", 2);
+                if (ss.length > 1) {
+                    return ss[1].trim();
+                }
+            }
+        }
+
+        // returns an empty string if it can't be found or an error happened
+        return getLinuxDMIInfo("dmi type 4", "manufacturer");
+    }
+
+
+    /**
+     * Tries to obtain and return the system manufacturer.
+     * @return The system manufacturer (an empty string if not found or an error occurred)
+     */
+    private String getLinuxSystemManufacturer() {
+        String tmp = getLinuxPSNInfo(SYS);
+        if (tmp.length() > 0) {
+            return tmp;
+        }
+
+        // returns an empty string if it can't be found or an error happened
+        return getLinuxDMIInfo("dmi type 1", "manufacturer");
+    }
+
+    /**
+     * Tries to obtain and return the serial number of the system.
+     * @return The serial number (an empty string if not found or an error occurred)
+     */
+    private String getLinuxSN() {
+        String tmp = getLinuxPSNInfo(SN);
+        if (tmp.length() > 0) {
+            return tmp;
+        }
+
+        // returns an empty string if it can't be found or an error happened
+        return getLinuxDMIInfo("dmi type 1", "serial number");
+    }
+
+    private String getLinuxPSNInfo(int target) {
+        // try to read from the psn file if it exists
+        String contents = getFileContent("/var/run/psn");
+        String[] ss = contents.split("\n");
+        if (target <= ss.length) {
+            return ss[target-1];
+        }
+
+        // default case is to return ""
+        return "";
+    }
+
+    // reads from dmidecode with the given type and target
+    // returns an empty string if nothing was found or an error occurred
+    //
+    // Sample output segment:
+    // Handle 0x0001
+    //         DMI type 1, 25 bytes.
+    //         System Information
+    //                 Manufacturer: System manufacturer
+    //                 Product Name: System Product Name
+    //                 Version: System Version
+    //                 Serial Number: System Serial Number
+    //                 UUID: 3091D719-B25B-D911-959D-6D1B12C7686E
+    //                 Wake-up Type: Power Switch
+
+    private synchronized String getLinuxDMIInfo(String dmiType, String target) {
+        // only try to get dmidecode information once, after that, we can
+        // reuse the output
+        if (dmiInfo == null) {
+            Thread dmidecodeThread = new Thread() {
+                public void run() {
+                    dmiInfo = getCommandOutput("/usr/sbin/dmidecode");
+                }
+            };
+            dmidecodeThread.start();
+
+            try {
+                dmidecodeThread.join(2000);
+                if (dmidecodeThread.isAlive()) {
+                    dmidecodeThread.interrupt();
+                    dmiInfo = "";
+                }
+            } catch (InterruptedException ie) {
+                dmidecodeThread.interrupt();
+            }
+        }
+
+        if (dmiInfo.length() == 0) {
+            return "";
+        }
+        boolean dmiFlag = false;
+        for (String s : dmiInfo.split("\n")) {
+            String line = s.toLowerCase();
+            if (dmiFlag) {
+                if (line.contains(target)) {
+                    String key = target + ":";
+                    int indx = line.indexOf(key) + key.length();
+                    if (line.contains(key) && indx < line.length()) {
+                        return line.substring(indx).trim();
+                    }
+                    String[] ss = line.split(":");
+                    return ss[ss.length-1];
+                }
+            } else if (line.contains(dmiType)) {
+                dmiFlag = true;
+            }
+        }
+        return "";
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/RegistrationData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,475 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.net.UnknownHostException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import static com.sun.servicetag.RegistrationDocument.*;
+
+/**
+ * A {@code RegistrationData} object is a container of one or more
+ * {@link #getServiceTags service tags} that identify the
+ * components for product registration.
+ * Each {@code RegistrationData} object has a {@link #getRegistrationURN
+ * uniform resource name} (URN) as its identifier.
+ * <a name="EnvMap"></a>
+ * It also has an <i>environment map</i> with
+ * the following elements:
+ * <blockquote>
+ *       <table border=0>
+ *       <tr>
+ *          <td><tt>hostname</tt></td>
+ *          <td>Hostname of the system</td>
+ *          <td>e.g. woody</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>hostId</tt></td>
+ *          <td>Host ID of the system</td>
+ *          <td>e.g. 83abc1ab</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>osName</tt></td>
+ *          <td>Operating system name</td>
+ *          <td> e.g. SunOS</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>osVersion</tt></td>
+ *          <td>Operating system version</td>
+ *          <td> e.g. 5.10</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>osArchitecture</tt></td>
+ *          <td>Operating system architecture</td>
+ *          <td> e.g. sparc</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>systemModel</tt></td>
+ *          <td>System model</td>
+ *          <td> e.g. SUNW,Sun-Fire-V440</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>systemManufacturer</tt></td>
+ *          <td>System manufacturer</td>
+ *          <td> e.g. Sun Microsystems</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>cpuManufacturer</tt></td>
+ *          <td>CPU manufacturer</td>
+ *          <td> e.g. Sun Microsystems</td>
+ *       </tr>
+ *       <tr>
+ *          <td><tt>serialNumber</tt></td>
+ *          <td>System serial number</td>
+ *          <td> e.g. BEL078932</td>
+ *       </tr>
+ *       </table>
+ *  </blockquote>
+ * The <tt>hostname</tt> and <tt>osName</tt> element must have a non-empty value.
+ * If an element is not available on a system and their value will be
+ * empty.
+ * <p>
+ * <a name="XMLSchema">
+ * <b>Registration XML Schema</b></a>
+ * <p>
+ * A {@code RegistrationData} object can be {@link #loadFromXML loaded} from
+ * and {@link #storeToXML stored} into an XML file in the format described
+ * by the
+ * <a href="https://sn-tools.central.sun.com/twiki/pub/ServiceTags/RegistrationRelayService/product_registration.xsd">
+ * registration data schema</a>.  The registration data schema is defined by the
+ * Service Tags Technology.
+ * <p>
+ * Typically the registration data is constructed at installation time
+ * and stored in an XML file for later service tag lookup or registration.
+ *
+ * <p>
+ * <b>Example Usage</b>
+ * <p>
+ * The examples below show how the {@code RegistrationData} can be
+ * used for product registration.
+ * Exception handling is not shown in these examples for clarity.
+ * <ol>
+ * <li>This example shows how the JDK creates a JDK service tag, installs it
+ * in the system service tag registry and adds it to the registration data.
+ * <br>
+ * <blockquote><pre>
+ *   // create a service tag object with an instance_urn
+ *   ServiceTag st = ServiceTag.newInstance(ServiceTag.generateInstanceURN(),
+ *                                          ....);
+ *   // Adds to the system service tag registry if supported
+ *   if (Registry.isSupported()) {
+ *       Registry.getSystemRegistry().addServiceTag(st);
+ *   }
+ *
+ *   // add to the registration data
+ *   RegistrationData registration  = new RegistrationData();
+ *   registration.addServiceTag(st);
+ * </pre></blockquote>
+ * </li>
+ * <li>At this point, the registration data is ready to
+ * send to Sun Connection for registration. This example shows how to register
+ * the JDK via the <i>Registration Relay Service</i>.
+ * <p>
+ * There are several registration services for Sun Connection. For example,
+ * the <a href="https://sn-tools.central.sun.com/twiki/bin/view/ServiceTags/RegistrationRelayService">
+ * Registration Relay Service</a> is a web application interface that
+ * processes the registration data payload sent via HTTP post
+ * and hosts the registration user interface for a specified
+ * registration URL.  Refer to the
+ * Registration Relay Service Specification for details.
+ * <p>
+ * <blockquote><pre>
+ *   // Open the connection to the URL of the registration service
+ *   HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
+ *   con.setDoInput(true);
+ *   con.setDoOutput(true);
+ *   con.setUseCaches(false);
+ *   con.setAllowUserInteraction(false);
+ *   con.setRequestMethod("POST");
+ *   con.setRequestProperty("Content-Type", "text/xml;charset=\"utf-8\"");
+ *   con.connect();
+ *
+ *   // send the registration data to the registration service
+ *   OutputStream out = con.getOutputStream();
+ *   registration.storeToXML(out);
+ *   out.close();
+ * </pre></blockquote>
+ * </li>
+ * <li>This example shows how to store the registration data in an XML file.
+ *     for later service tag lookup or registration.
+ * <br>
+ * <blockquote><pre>
+ *   BufferedOutputStream out = new BufferedOutputStream(
+ *       new FileOutputStream(""&lt;JAVA_HOME&gt;/lib/servicetag/registration.xml"));
+ *   registration.storeToXML(out);
+ *   out.close();
+ * </pre></blockquote>
+ * </li>
+ * <li>This example shows how to install service tags that are in the
+ * registration data in the system service tag registry when determined
+ * to be available.  The system service tag registry might not have existed
+ * when the registration data was constructed.
+ * <br>
+ * <blockquote><pre>
+ *   if (Registry.isSupported()) {
+ *       Set&lt;ServiceTag&gt; svctags = registration.getServiceTags();
+ *       for (ServiceTag st : svctags) {
+ *           Registry.getSystemRegistry().addServiceTag(st);
+ *       }
+ *   }
+ * </pre></blockquote>
+ * </li>
+ * </ol>
+ *
+ * @see <a href="https://sunconnection.sun.com/inventory">Sun Connection Inventory Channel</a>
+ */
+public class RegistrationData {
+    private final Map<String, String> environment = initEnvironment();
+    private final Map<String, ServiceTag> svcTagMap =
+        new LinkedHashMap<String, ServiceTag>();
+    private final String urn;
+
+    /**
+     * Creates a {@code RegistrationData} object with a generated
+     * {@link #getRegistrationURN registration URN}.
+     * The following keys in the {@link #getEnvironmentMap environment map}
+     * will be initialized for the configuration of the
+     * running system:
+     * <blockquote>
+     * <tt>hostname</tt>, <tt>osName</tt>,  <tt>osVersion</tt> and
+     * <tt>osArchitecture</tt>
+     * </blockquote>
+     * and the value of other keys may be empty.
+     */
+    public RegistrationData() {
+        this(Util.generateURN());
+        SystemEnvironment sysEnv = SystemEnvironment.getSystemEnvironment();
+        setEnvironment(ST_NODE_HOSTNAME, sysEnv.getHostname());
+        setEnvironment(ST_NODE_HOST_ID, sysEnv.getHostId());
+        setEnvironment(ST_NODE_OS_NAME, sysEnv.getOsName());
+        setEnvironment(ST_NODE_OS_VERSION, sysEnv.getOsVersion());
+        setEnvironment(ST_NODE_OS_ARCH, sysEnv.getOsArchitecture());
+        setEnvironment(ST_NODE_SYSTEM_MODEL, sysEnv.getSystemModel());
+        setEnvironment(ST_NODE_SYSTEM_MANUFACTURER, sysEnv.getSystemManufacturer());
+        setEnvironment(ST_NODE_CPU_MANUFACTURER, sysEnv.getCpuManufacturer());
+        setEnvironment(ST_NODE_SERIAL_NUMBER, sysEnv.getSerialNumber());
+    }
+
+    // package private
+    RegistrationData(String urn) {
+        this.urn = urn;
+    }
+
+    private Map<String, String> initEnvironment() {
+        Map<String, String> map = new LinkedHashMap<String, String>();
+        map.put(ST_NODE_HOSTNAME, "");
+        map.put(ST_NODE_HOST_ID, "");
+        map.put(ST_NODE_OS_NAME, "");
+        map.put(ST_NODE_OS_VERSION, "");
+        map.put(ST_NODE_OS_ARCH, "");
+        map.put(ST_NODE_SYSTEM_MODEL, "");
+        map.put(ST_NODE_SYSTEM_MANUFACTURER, "");
+        map.put(ST_NODE_CPU_MANUFACTURER, "");
+        map.put(ST_NODE_SERIAL_NUMBER, "");
+        return map;
+    }
+
+    /**
+     * Returns the uniform resource name of this registration data
+     * in this format:
+     * <tt>urn:st:&lt;32-char {@link java.util.UUID uuid}&gt;</tt>
+     *
+     * @return the URN of this registration data.
+     */
+    public String getRegistrationURN() {
+        return urn;
+    }
+
+    /**
+     * Returns a map containing the environment information for this
+     * registration data.  See the set of <a href="#EnvMap">keys</a>
+     * in the environment map. Subsequent update to the environment
+     * map via the {@link #setEnvironment setEnvironment} method will not be reflected
+     * in the returned map.
+     *
+     * @return an environment map for this registration data.
+     */
+    public Map<String, String> getEnvironmentMap() {
+        return new LinkedHashMap<String,String>(environment);
+    }
+
+    /**
+     * Sets an element of the specified {@code name} in the environment map
+     * with the given {@code value}.
+     *
+     * @throws IllegalArgumentException if {@code name} is not a valid key
+     * in the environment map, or {@code value} is not valid.
+     */
+    public void setEnvironment(String name, String value) {
+        if (name == null) {
+            throw new NullPointerException("name is null");
+        }
+        if (value == null) {
+            throw new NullPointerException("value is null");
+        }
+        if (environment.containsKey(name)) {
+            if (name.equals(ST_NODE_HOSTNAME) || name.equals(ST_NODE_OS_NAME)) {
+                if (value.length() == 0) {
+                    throw new IllegalArgumentException("\"" +
+                        name + "\" requires non-empty value.");
+                }
+            }
+            environment.put(name, value);
+        } else {
+            throw new IllegalArgumentException("\"" +
+                 name + "\" is not an environment element.");
+        }
+    }
+
+    /**
+     * Returns all service tags in this registration data.
+     *
+     * @return  a {@link Set Set} of the service tags
+     * in this registration data.
+     */
+    public Set<ServiceTag> getServiceTags() {
+        return new HashSet<ServiceTag>(svcTagMap.values());
+    }
+
+    /**
+     * Adds a service tag to this registration data.
+     * If the given service tag has an empty <tt>instance_urn</tt>,
+     * this method will generate a URN and place it in the copy
+     * of the service tag in this registration data.
+     * This method will return the {@code ServiceTag} object
+     * added to this registration data.
+     *
+     * @param st {@code ServiceTag} object to be added.
+     * @return a {@code ServiceTag} object added to this registration data.
+     *
+     * @throws IllegalArgumentException if
+     *   a service tag of the same {@link ServiceTag#getInstanceURN
+     *   <tt>instance_urn</tt>} already exists in the registry.
+     */
+    public synchronized ServiceTag addServiceTag(ServiceTag st) {
+        ServiceTag svcTag = ServiceTag.newInstanceWithUrnTimestamp(st);
+
+        String instanceURN = svcTag.getInstanceURN();
+        if (svcTagMap.containsKey(instanceURN)) {
+            throw new IllegalArgumentException("Instance_urn = " + instanceURN +
+                    " already exists in the registration data.");
+        } else {
+            svcTagMap.put(instanceURN, svcTag);
+        }
+        return svcTag;
+    }
+
+    /**
+     * Returns a service tag of the given <tt>instance_urn</tt> in this registration
+     * data.
+     *
+     * @param instanceURN the <tt>instance_urn</tt> of the service tag
+     * @return the {@code ServiceTag} object of the given  <tt>instance_urn</tt>
+     *         if exists; otherwise return {@code null}.
+     */
+    public synchronized ServiceTag getServiceTag(String instanceURN) {
+        if (instanceURN == null) {
+            throw new NullPointerException("instanceURN is null");
+        }
+        return svcTagMap.get(instanceURN);
+    }
+
+    /**
+     * Removes a service tag of the given <tt>instance_urn</tt> from this
+     * registration data.
+     *
+     * @param instanceURN the <tt>instance_urn</tt> of
+     * the service tag to be removed.
+     *
+     * @return the removed {@code ServiceTag} object;
+     * or {@code null} if the service tag does not exist in this
+     * registration data.
+     */
+    public synchronized ServiceTag removeServiceTag(String instanceURN) {
+        if (instanceURN == null) {
+            throw new NullPointerException("instanceURN is null");
+        }
+
+        ServiceTag svcTag = null;
+        if (svcTagMap.containsKey(instanceURN)) {
+            svcTag = svcTagMap.remove(instanceURN);
+        }
+        return svcTag;
+    }
+
+     /**
+     * Updates the <tt>product_defined_instance_id</tt> in the service tag
+     * of the given <tt>instance_urn</tt> in this registration data.
+     *
+     * @param instanceURN the <tt>instance_urn</tt> of the service tag to be updated.
+     * @param productDefinedInstanceID the value of the
+     * <tt>product_defined_instance_id</tt> to be set.
+     *
+     * @return the updated {@code ServiceTag} object;
+     * or {@code null} if the service tag does not exist in this
+     * registration data.
+     */
+    public synchronized ServiceTag updateServiceTag(String instanceURN,
+                                                    String productDefinedInstanceID) {
+        ServiceTag svcTag = getServiceTag(instanceURN);
+        if (svcTag == null) {
+            return null;
+        }
+
+        svcTag = ServiceTag.newInstanceWithUrnTimestamp(svcTag);
+        // update the product defined instance ID field
+        svcTag.setProductDefinedInstanceID(productDefinedInstanceID);
+        svcTagMap.put(instanceURN, svcTag);
+        return svcTag;
+    }
+
+    /**
+     * Reads the registration data from the XML document on the
+     * specified input stream.  The XML document must be
+     * in the format described by the <a href="#XMLSchema">
+     * registration data schema</a>.
+     * The specified stream is closed after this method returns.
+     *
+     * @param in the input stream from which to read the XML document.
+     * @return a {@code RegistrationData} object read from the input
+     * stream.
+     *
+     * @throws IllegalArgumentException if the input stream
+     * contains an invalid registration data.
+     *
+     * @throws IOException if an error occurred when reading from the input stream.
+     */
+    public static RegistrationData loadFromXML(InputStream in) throws IOException {
+        try {
+            return RegistrationDocument.load(in);
+        } finally {
+            in.close();
+        }
+    }
+
+    /**
+     * Writes the registration data to the specified output stream
+     * in the format described by the <a href="#XMLSchema">
+     * registration data schema</a> with "UTF-8" encoding.
+     * The specified stream remains open after this method returns.
+     *
+     * @param os the output stream on which to write the XML document.
+     *
+     * @throws IOException if an error occurred when writing to the output stream.
+     */
+    public void storeToXML(OutputStream os) throws IOException {
+        RegistrationDocument.store(os, this);
+        os.flush();
+    }
+
+    /**
+     * Returns a newly allocated byte array containing the registration
+     * data in XML format.
+     *
+     * @return a newly allocated byte array containing the registration
+     * data in XML format.
+     */
+    public byte[] toXML() {
+        try {
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            storeToXML(out);
+            return out.toByteArray();
+        } catch (IOException e) {
+            // should not reach here
+            return new byte[0];
+        }
+    }
+
+    /**
+     * Returns a string representation of this registration data in XML
+     * format.
+     *
+     * @return a string representation of this registration data in XML
+     *         format.
+     */
+    @Override
+    public String toString() {
+        try {
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            storeToXML(out);
+            return out.toString("UTF-8");
+        } catch (IOException e) {
+            // should not reach here
+            return "Error creating the return string.";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/RegistrationDocument.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,368 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import org.xml.sax.InputSource;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+// For write operation
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+/**
+ * XML Support Class for Product Registration.
+ */
+class RegistrationDocument {
+
+    private static final String REGISTRATION_DATA_SCHEMA =
+            "/com/sun/servicetag/resources/product_registration.xsd";
+    private static final String REGISTRATION_DATA_VERSION = "1.0";
+    private static final String SERVICE_TAG_VERSION = "1.0";
+    final static String ST_NODE_REGISTRATION_DATA = "registration_data";
+    final static String ST_ATTR_REGISTRATION_VERSION = "version";
+    final static String ST_NODE_ENVIRONMENT = "environment";
+    final static String ST_NODE_HOSTNAME = "hostname";
+    final static String ST_NODE_HOST_ID = "hostId";
+    final static String ST_NODE_OS_NAME = "osName";
+    final static String ST_NODE_OS_VERSION = "osVersion";
+    final static String ST_NODE_OS_ARCH = "osArchitecture";
+    final static String ST_NODE_SYSTEM_MODEL = "systemModel";
+    final static String ST_NODE_SYSTEM_MANUFACTURER = "systemManufacturer";
+    final static String ST_NODE_CPU_MANUFACTURER = "cpuManufacturer";
+    final static String ST_NODE_SERIAL_NUMBER = "serialNumber";
+    final static String ST_NODE_REGISTRY = "registry";
+    final static String ST_ATTR_REGISTRY_URN = "urn";
+    final static String ST_ATTR_REGISTRY_VERSION = "version";
+    final static String ST_NODE_SERVICE_TAG = "service_tag";
+    final static String ST_NODE_INSTANCE_URN = "instance_urn";
+    final static String ST_NODE_PRODUCT_NAME = "product_name";
+    final static String ST_NODE_PRODUCT_VERSION = "product_version";
+    final static String ST_NODE_PRODUCT_URN = "product_urn";
+    final static String ST_NODE_PRODUCT_PARENT_URN = "product_parent_urn";
+    final static String ST_NODE_PRODUCT_PARENT = "product_parent";
+    final static String ST_NODE_PRODUCT_DEFINED_INST_ID = "product_defined_inst_id";
+    final static String ST_NODE_PRODUCT_VENDOR = "product_vendor";
+    final static String ST_NODE_PLATFORM_ARCH = "platform_arch";
+    final static String ST_NODE_TIMESTAMP = "timestamp";
+    final static String ST_NODE_CONTAINER = "container";
+    final static String ST_NODE_SOURCE = "source";
+    final static String ST_NODE_INSTALLER_UID = "installer_uid";
+
+    static RegistrationData load(InputStream in) throws IOException {
+        Document document = initializeDocument(in);
+
+        // Gets the registration URN
+        Element root = getRegistrationDataRoot(document);
+        Element registryRoot =
+                getSingletonElementFromRoot(root, ST_NODE_REGISTRY);
+        String urn = registryRoot.getAttribute(ST_ATTR_REGISTRY_URN);
+
+        // Construct a new RegistrationData object from the DOM tree
+        // Initialize the environment map and service tags
+        RegistrationData regData = new RegistrationData(urn);
+        addServiceTags(registryRoot, regData);
+
+        Element envRoot = getSingletonElementFromRoot(root, ST_NODE_ENVIRONMENT);
+        buildEnvironmentMap(envRoot, regData);
+        return regData;
+    }
+
+    static void store(OutputStream os, RegistrationData registration)
+            throws IOException {
+        // create a new document with the root node
+        Document document = initializeDocument();
+
+        // create the nodes for the environment map and the service tags
+        // in the registration data
+        addEnvironmentNodes(document,
+                            registration.getEnvironmentMap());
+        addServiceTagRegistry(document,
+                              registration.getRegistrationURN(),
+                              registration.getServiceTags());
+        transform(document, os);
+    }
+
+    // initialize a document from an input stream
+    private static Document initializeDocument(InputStream in) throws IOException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        try {
+            // XML schema for validation
+            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            URL xsdUrl = RegistrationDocument.class.getResource(REGISTRATION_DATA_SCHEMA);
+            Schema schema = sf.newSchema(xsdUrl);
+            Validator validator = schema.newValidator();
+
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document doc = builder.parse(new InputSource(in));
+            validator.validate(new DOMSource(doc));
+            return doc;
+        } catch (SAXException sxe) {
+            IllegalArgumentException e = new IllegalArgumentException("Error generated in parsing");
+            e.initCause(sxe);
+            throw e;
+        } catch (ParserConfigurationException pce) {
+            // Parser with specific options can't be built
+            // should not reach here
+            InternalError x = new InternalError("Error in creating the new document");
+            x.initCause(pce);
+            throw x;
+        }
+    }
+
+    // initialize a new document for the registration data
+    private static Document initializeDocument() throws IOException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        try {
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document doc = builder.newDocument();
+
+            // initialize the document with the registration_data root
+            Element root = doc.createElement(ST_NODE_REGISTRATION_DATA);
+            doc.appendChild(root);
+            root.setAttribute(ST_ATTR_REGISTRATION_VERSION, REGISTRATION_DATA_VERSION);
+
+            return doc;
+        } catch (ParserConfigurationException pce) {
+            // Parser with specified options can't be built
+            // should not reach here
+            InternalError x = new InternalError("Error in creating the new document");
+            x.initCause(pce);
+            throw x;
+        }
+    }
+
+    // Transform the current DOM tree with the given output stream.
+    private static void transform(Document document, OutputStream os) {
+        try {
+            // Use a Transformer for output
+            TransformerFactory tFactory = TransformerFactory.newInstance();
+            tFactory.setAttribute("indent-number", new Integer(3));
+
+            Transformer transformer = tFactory.newTransformer();
+
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
+            transformer.transform(new DOMSource(document),
+                new StreamResult(new BufferedWriter(new OutputStreamWriter(os, "UTF-8"))));
+        } catch (UnsupportedEncodingException ue) {
+            // Should not reach here
+            InternalError x = new InternalError("Error generated during transformation");
+            x.initCause(ue);
+            throw x;
+        } catch (TransformerConfigurationException tce) {
+            // Error generated by the parser
+            // Should not reach here
+            InternalError x = new InternalError("Error in creating the new document");
+            x.initCause(tce);
+            throw x;
+        } catch (TransformerException te) {
+            // Error generated by the transformer
+            InternalError x = new InternalError("Error generated during transformation");
+            x.initCause(te);
+            throw x;
+        }
+    }
+
+    private static void addServiceTagRegistry(Document document,
+                                              String registryURN,
+                                              Set<ServiceTag> svcTags) {
+        // add service tag registry node and its attributes
+        Element reg = document.createElement(ST_NODE_REGISTRY);
+        reg.setAttribute(ST_ATTR_REGISTRY_URN, registryURN);
+        reg.setAttribute(ST_ATTR_REGISTRY_VERSION, SERVICE_TAG_VERSION);
+
+        Element root = getRegistrationDataRoot(document);
+        root.appendChild(reg);
+
+        // adds the elements for the service tags
+        for (ServiceTag st : svcTags) {
+            addServiceTagElement(document, reg, st);
+        }
+    }
+
+    private static void addServiceTagElement(Document document,
+                                             Element registryRoot,
+                                             ServiceTag st) {
+        Element svcTag = document.createElement(ST_NODE_SERVICE_TAG);
+        registryRoot.appendChild(svcTag);
+        addChildElement(document, svcTag,
+                        ST_NODE_INSTANCE_URN, st.getInstanceURN());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_NAME, st.getProductName());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_VERSION, st.getProductVersion());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_URN, st.getProductURN());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_PARENT_URN, st.getProductParentURN());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_PARENT, st.getProductParent());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_DEFINED_INST_ID,
+                        st.getProductDefinedInstanceID());
+        addChildElement(document, svcTag,
+                        ST_NODE_PRODUCT_VENDOR, st.getProductVendor());
+        addChildElement(document, svcTag,
+                        ST_NODE_PLATFORM_ARCH, st.getPlatformArch());
+        addChildElement(document, svcTag,
+                        ST_NODE_TIMESTAMP, Util.formatTimestamp(st.getTimestamp()));
+        addChildElement(document, svcTag,
+                        ST_NODE_CONTAINER, st.getContainer());
+        addChildElement(document, svcTag,
+                        ST_NODE_SOURCE, st.getSource());
+        addChildElement(document, svcTag,
+                        ST_NODE_INSTALLER_UID,
+                        String.valueOf(st.getInstallerUID()));
+    }
+
+    private static void addChildElement(Document document, Element root,
+                                        String element, String text) {
+        Element node = document.createElement(element);
+        node.appendChild(document.createTextNode(text));
+        root.appendChild(node);
+    }
+
+    // Constructs service tags from the document
+    private static void addServiceTags(Element registryRoot,
+                                       RegistrationData registration) {
+        NodeList children = registryRoot.getElementsByTagName(ST_NODE_SERVICE_TAG);
+        int length = (children == null ? 0 : children.getLength());
+        for (int i = 0; i < length; i++) {
+            Element svcTagElement = (Element) children.item(i);
+            ServiceTag st = getServiceTag(svcTagElement);
+            registration.addServiceTag(st);
+        }
+    }
+
+    // build environment map from the document
+    private static void buildEnvironmentMap(Element envRoot,
+                                         RegistrationData registration) {
+        registration.setEnvironment(ST_NODE_HOSTNAME, getTextValue(envRoot, ST_NODE_HOSTNAME));
+        registration.setEnvironment(ST_NODE_HOST_ID, getTextValue(envRoot, ST_NODE_HOST_ID));
+        registration.setEnvironment(ST_NODE_OS_NAME, getTextValue(envRoot, ST_NODE_OS_NAME));
+        registration.setEnvironment(ST_NODE_OS_VERSION, getTextValue(envRoot, ST_NODE_OS_VERSION));
+        registration.setEnvironment(ST_NODE_OS_ARCH, getTextValue(envRoot, ST_NODE_OS_ARCH));
+        registration.setEnvironment(ST_NODE_SYSTEM_MODEL, getTextValue(envRoot, ST_NODE_SYSTEM_MODEL));
+        registration.setEnvironment(ST_NODE_SYSTEM_MANUFACTURER, getTextValue(envRoot, ST_NODE_SYSTEM_MANUFACTURER));
+        registration.setEnvironment(ST_NODE_CPU_MANUFACTURER, getTextValue(envRoot, ST_NODE_CPU_MANUFACTURER));
+        registration.setEnvironment(ST_NODE_SERIAL_NUMBER, getTextValue(envRoot, ST_NODE_SERIAL_NUMBER));
+    }
+
+    // add the nodes representing the environment map in the document
+    private static void addEnvironmentNodes(Document document,
+                                            Map<String, String> envMap) {
+        Element root = getRegistrationDataRoot(document);
+        Element env = document.createElement(ST_NODE_ENVIRONMENT);
+        root.appendChild(env);
+        Set<Map.Entry<String, String>> keys = envMap.entrySet();
+        for (Map.Entry<String, String> entry : keys) {
+            addChildElement(document, env, entry.getKey(), entry.getValue());
+        }
+    }
+
+    private static Element getRegistrationDataRoot(Document doc) {
+        Element root = doc.getDocumentElement();
+        if (!root.getNodeName().equals(ST_NODE_REGISTRATION_DATA)) {
+            throw new IllegalArgumentException("Not a " +
+                    ST_NODE_REGISTRATION_DATA +
+                    " node \"" + root.getNodeName() + "\"");
+        }
+        return root;
+    }
+
+    private static Element getSingletonElementFromRoot(Element root, String name) {
+        NodeList children = root.getElementsByTagName(name);
+        int length = (children == null ? 0 : children.getLength());
+        if (length != 1) {
+            throw new IllegalArgumentException("Invalid number of " + name +
+                    " nodes = " + length);
+        }
+        Element e = (Element) children.item(0);
+        if (!e.getNodeName().equals(name)) {
+            throw new IllegalArgumentException("Not a  " + name +
+                    " node \"" + e.getNodeName() + "\"");
+        }
+        return e;
+    }
+
+    // Constructs one ServiceTag instance from a service tag element root
+    private static ServiceTag getServiceTag(Element svcTagElement) {
+        return new ServiceTag(
+            getTextValue(svcTagElement, ST_NODE_INSTANCE_URN),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_NAME),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_VERSION),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_URN),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_PARENT),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_PARENT_URN),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_DEFINED_INST_ID),
+            getTextValue(svcTagElement, ST_NODE_PRODUCT_VENDOR),
+            getTextValue(svcTagElement, ST_NODE_PLATFORM_ARCH),
+            getTextValue(svcTagElement, ST_NODE_CONTAINER),
+            getTextValue(svcTagElement, ST_NODE_SOURCE),
+            Util.getIntValue(getTextValue(svcTagElement, ST_NODE_INSTALLER_UID)),
+            Util.parseTimestamp(getTextValue(svcTagElement, ST_NODE_TIMESTAMP))
+        );
+    }
+
+    private static String getTextValue(Element e, String tagName) {
+        String value = "";
+        NodeList nl = e.getElementsByTagName(tagName);
+        if (nl != null && nl.getLength() > 0) {
+            Element el = (Element) nl.item(0);
+            Node node = el.getFirstChild();
+            if (node != null) {
+                value = node.getNodeValue();
+            }
+        }
+        return value;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/Registry.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,552 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.sun.servicetag.Util.*;
+import static com.sun.servicetag.RegistrationDocument.*;
+
+/**
+ * A service tag registry is a XML-based registry containing
+ * the list of {@link ServiceTag service tags} installed in the system.
+ * The {@code Registry} class provides interfaces
+ * to add, remove, update, and get a service tag from a service tag
+ * registry.
+ * This {@code Registry} class may not be supported
+ * on all systems. The {@link #isSupported} method
+ * can be called to determine if it is supported.
+ * <p>
+ * A registry may implement restrictions to only allow certain users
+ * to {@link #updateServiceTag update} and
+ * to {@link #removeServiceTag remove} a service tag record. Typically,
+ * only the owner of the service tag, the owner of the registry
+ * and superuser are authorized to update or remove a service tag in
+ * the registry.
+ *
+ * @see <a href="https://sn-tools.central.sun.com/twiki/bin/view/ServiceTags/ServiceTagDevGuideHelper">
+ * Service Tag User Guide</a>
+ */
+public class Registry {
+
+    private static final String STCLIENT_SOLARIS = "/usr/bin/stclient";
+    private static final String STCLIENT_LINUX = "/opt/sun/servicetag/bin/stclient";
+    // stclient exit value (see sthelper.h)
+    private static final int ST_ERR_NOT_AUTH = 245;
+    private static final int ST_ERR_REC_NOT_FOUND = 225;
+
+    // The stclient output has to be an exported interface
+    private static final String INSTANCE_URN_DESC = "Product instance URN=";
+    private static boolean initialized = false;
+    private static boolean supportsHelperClass = true; // default
+    private static File stclient = null;
+    private static String stclientPath = null;
+    private static Registry registry = new Registry();
+
+    // System properties for testing
+    private static String SVCTAG_STCLIENT_CMD = "servicetag.stclient.cmd";
+    private static String SVCTAG_STHELPER_SUPPORTED = "servicetag.sthelper.supported";
+
+    private Registry() {
+    }
+
+    private synchronized static String getSTclient() {
+        if (!initialized) {
+            // the system property always overrides the default setting
+            if (System.getProperty(SVCTAG_STHELPER_SUPPORTED) != null) {
+                supportsHelperClass = Boolean.getBoolean(SVCTAG_STHELPER_SUPPORTED);
+            }
+
+            // This is only used for testing
+            stclientPath = System.getProperty(SVCTAG_STCLIENT_CMD);
+            if (stclientPath != null) {
+                return stclientPath;
+            }
+
+            // Initialization to determine the platform's stclient pathname
+            String os = System.getProperty("os.name");
+            if (os.equals("SunOS")) {
+                stclient = new File(STCLIENT_SOLARIS);
+            } else if (os.equals("Linux")) {
+                stclient = new File(STCLIENT_LINUX);
+            } else if (os.startsWith("Windows")) {
+                stclient = getWindowsStClientFile();
+            } else {
+                if (isVerbose()) {
+                    System.out.println("Running on non-Sun JDK");
+                }
+            }
+            initialized = true;
+        }
+
+        // com.sun.servicetag package has to be compiled with JDK 5 as well
+        // JDK 5 doesn't support the File.canExecute() method.
+        // Risk not checking isExecute() for the stclient command is very low.
+
+        if (stclientPath == null && stclient != null && stclient.exists()) {
+            stclientPath = stclient.getAbsolutePath();
+        }
+        return stclientPath;
+    }
+
+    /**
+     * Returns the system service tag registry. The {@code Registry} class
+     * may not be supported on some platforms; use the {@link #isSupported}
+     * method to determine if it is supported.
+     *
+     * @return the {@code Registry} object for the system service tag registry.
+     *
+     * @throws UnsupportedOperationException if the {@code Registry} class is
+     * not supported.
+     */
+    public static Registry getSystemRegistry() {
+        if (isSupported()) {
+            return registry;
+        } else {
+            throw new UnsupportedOperationException("Registry class is not supported");
+        }
+    }
+
+    /**
+     * Returns {@code true} if the {@code Registry} class is supported on this system.
+     *
+     * @return {@code true} if the {@code Registry} class is supported;
+     * otherwise, return {@code false}.
+     */
+    public static boolean isSupported() {
+        return (getSTclient() != null && supportsHelperClass);
+    }
+
+    private static List<String> getCommandList() {
+        // Set up the arguments to call stclient
+        List<String> command = new ArrayList<String>();
+        if (System.getProperty(SVCTAG_STCLIENT_CMD) != null) {
+            // This is for jtreg testing use. This will be set to something
+            // like:
+            // $JAVA_HOME/bin/java -cp $TEST_DIR \
+            //    -Dstclient.registry.path=$TEST_DIR/registry.xml \
+            //    SvcTagClient
+            //
+            // On Windows, the JAVA_HOME and TEST_DIR path could contain
+            // space e.g. c:\Program Files\Java\jdk1.6.0_05\bin\java.
+            // The SVCTAG_STCLIENT_CMD must be set with a list of
+            // space-separated parameters.  If a parameter contains spaces,
+            // it must be quoted with '"'.
+
+            String cmd = getSTclient();
+            int len = cmd.length();
+            int i = 0;
+            while (i < len) {
+                char separator = ' ';
+                if (cmd.charAt(i) == '"') {
+                    separator = '"';
+                    i++;
+                }
+                // look for the separator or matched the closing '"'
+                int j;
+                for (j = i+1; j < len; j++) {
+                    if (cmd.charAt(j) == separator) {
+                        break;
+                    }
+                }
+
+                if (i == j-1) {
+                    // add an empty parameter
+                    command.add("\"\"");
+                } else {
+                    // double quotes and space are not included
+                    command.add(cmd.substring(i,j));
+                }
+
+                // skip spaces
+                for (i = j+1; i < len; i++) {
+                    if (!Character.isSpaceChar(cmd.charAt(i))) {
+                        break;
+                    }
+                }
+            }
+            if (isVerbose()) {
+                System.out.println("Command list:");
+                for (String s : command) {
+                    System.out.println(s);
+                }
+            }
+        } else {
+            command.add(getSTclient());
+        }
+        return command;
+    }
+
+    // Returns null if the service tag record not found;
+    // or throw UnauthorizedAccessException or IOException
+    // based on the exitValue.
+    private static ServiceTag checkReturnError(int exitValue,
+                                               String output,
+                                               ServiceTag st) throws IOException {
+        switch (exitValue) {
+            case ST_ERR_REC_NOT_FOUND:
+                return null;
+            case ST_ERR_NOT_AUTH:
+                if (st != null) {
+                    throw new UnauthorizedAccessException(
+                        "Not authorized to access " + st.getInstanceURN() +
+                        " installer_uid=" + st.getInstallerUID());
+                } else  {
+                    throw new UnauthorizedAccessException(
+                        "Not authorized:" + output);
+                }
+            default:
+                throw new IOException("stclient exits with error" +
+                     " (" + exitValue + ")\n" + output);
+        }
+    }
+
+    /**
+     * Adds a service tag to this registry.
+     * If the given service tag has an empty <tt>instance_urn</tt>,
+     * this helper class will generate a URN and place it in the
+     * copy of the service tag in this registry.
+     * This method will return the {@code ServiceTag} representing
+     * the service tag entry to this registry.
+     *
+     * @param st {@code ServiceTag} object
+     * @return a {@code ServiceTag} object representing the service tag
+     *         entry to this registry.
+     *
+     * @throws IllegalArgumentException if a service tag of the same
+     * <tt>instance_urn</tt> already exists in this registry.
+     *
+     * @throws java.io.IOException if an I/O error occurs in this operation.
+     */
+    public ServiceTag addServiceTag(ServiceTag st) throws IOException {
+        List<String> command = getCommandList();
+        command.add("-a");
+        if (st.getInstanceURN().length() > 0) {
+            ServiceTag sysSvcTag = getServiceTag(st.getInstanceURN());
+            if (sysSvcTag != null) {
+                throw new IllegalArgumentException("Instance_urn = " +
+                    st.getInstanceURN() + " already exists");
+            }
+            command.add("-i");
+            command.add(st.getInstanceURN());
+        }
+        command.add("-p");
+        command.add(st.getProductName());
+        command.add("-e");
+        command.add(st.getProductVersion());
+        command.add("-t");
+        command.add(st.getProductURN());
+        if (st.getProductParentURN().length() > 0) {
+            command.add("-F");
+            command.add(st.getProductParentURN());
+        }
+        command.add("-P");
+        command.add(st.getProductParent());
+        if (st.getProductDefinedInstanceID().length() > 0) {
+            command.add("-I");
+            command.add(st.getProductDefinedInstanceID());
+        }
+        command.add("-m");
+        command.add(st.getProductVendor());
+        command.add("-A");
+        command.add(st.getPlatformArch());
+        command.add("-z");
+        command.add(st.getContainer());
+        command.add("-S");
+        command.add(st.getSource());
+
+        BufferedReader in = null;
+        try {
+            ProcessBuilder pb = new ProcessBuilder(command);
+            Process p = pb.start();
+            String output = commandOutput(p);
+            if (isVerbose()) {
+                System.out.println("Output from stclient -a command:");
+                System.out.println(output);
+            }
+            String urn = "";
+            if (p.exitValue() == 0) {
+                // Obtain the instance urn from the stclient output
+                in = new BufferedReader(new StringReader(output));
+                String line = null;
+                while ((line = in.readLine()) != null) {
+                    line = line.trim();
+                    if (line.startsWith(INSTANCE_URN_DESC)) {
+                        urn = line.substring(INSTANCE_URN_DESC.length());
+                        break;
+                    }
+                }
+                if (urn.length() == 0) {
+                    throw new IOException("Error in creating service tag:\n" +
+                        output);
+                }
+                return getServiceTag(urn);
+            } else {
+                return checkReturnError(p.exitValue(), output, st);
+            }
+        } finally {
+            if (in != null) {
+                in.close();
+            }
+        }
+    }
+
+    /**
+     * Removes a service tag of the given <tt>instance_urn</tt> from this
+     * registry.
+     *
+     * @param instanceURN the <tt>instance_urn</tt> of the service tag
+     *        to be removed.
+     *
+     * @return the {@code ServiceTag} object removed from this registry;
+     * or {@code null} if the service tag does not exist in this registry.
+     *
+     * @throws UnauthorizedAccessException if the user is not authorized to
+     * remove the service tag of the given <tt>instance_urn</tt>
+     * from this registry.
+     *
+     * @throws java.io.IOException if an I/O error occurs in this operation.
+     */
+    public ServiceTag removeServiceTag(String instanceURN) throws IOException {
+        ServiceTag st = getServiceTag(instanceURN);
+        if (st == null) {
+            return null;
+        }
+
+        List<String> command = getCommandList();
+        command.add("-d");
+        command.add("-i");
+        command.add(instanceURN);
+
+        ProcessBuilder pb = new ProcessBuilder(command);
+        Process p = pb.start();
+        String output = commandOutput(p);
+        if (isVerbose()) {
+            System.out.println("Output from stclient -d command:");
+            System.out.println(output);
+        }
+        if (p.exitValue() == 0) {
+            return st;
+        } else {
+            return checkReturnError(p.exitValue(), output, st);
+        }
+    }
+
+    /**
+     * Updates the <tt>product_defined_instance_id</tt> in the service tag
+     * of the specified <tt>instance_urn</tt> in this registry.
+     *
+     * @param instanceURN the <tt>instance_urn</tt> of the service tag to be updated.
+     * @param productDefinedInstanceID the value of the
+     * <tt>product_defined_instance_id</tt> to be set.
+     *
+     * @return the updated {@code ServiceTag} object;
+     * or {@code null} if the service tag does not exist in this
+     * registry.
+     *
+     * @throws UnauthorizedAccessException if the user is not authorized to
+     * update the service tag from this registry.
+     *
+     * @throws IOException if an I/O error occurs in this operation.
+     */
+    public ServiceTag updateServiceTag(String instanceURN,
+                                       String productDefinedInstanceID)
+            throws IOException {
+        ServiceTag svcTag = getServiceTag(instanceURN);
+        if (svcTag == null) {
+            return null;
+        }
+
+        List<String> command = getCommandList();
+        command.add("-u");
+        command.add("-i");
+        command.add(instanceURN);
+        command.add("-I");
+        if (productDefinedInstanceID.length() > 0) {
+            command.add(productDefinedInstanceID);
+        } else {
+            command.add("\"\"");
+        }
+
+        ProcessBuilder pb = new ProcessBuilder(command);
+        Process p = pb.start();
+        String output = commandOutput(p);
+        if (isVerbose()) {
+            System.out.println("Output from stclient -u command:");
+            System.out.println(output);
+        }
+
+        if (p.exitValue() == 0) {
+            return getServiceTag(instanceURN);
+        } else {
+            return checkReturnError(p.exitValue(), output, svcTag);
+        }
+    }
+
+    /**
+     * Returns a {@code ServiceTag} object of the given  <tt>instance_urn</tt>
+     * in this registry.
+     *
+     * @param instanceURN the  <tt>instance_urn</tt> of the service tag
+     * @return a {@code ServiceTag} object of the given <tt>instance_urn</tt>
+     * in this registry; or {@code null} if not found.
+     *
+     * @throws java.io.IOException if an I/O error occurs in this operation.
+     */
+    public ServiceTag getServiceTag(String instanceURN) throws IOException {
+        if (instanceURN == null) {
+            throw new NullPointerException("instanceURN is null");
+        }
+
+        List<String> command = getCommandList();
+        command.add("-g");
+        command.add("-i");
+        command.add(instanceURN);
+
+        ProcessBuilder pb = new ProcessBuilder(command);
+        Process p = pb.start();
+        String output = commandOutput(p);
+        if (isVerbose()) {
+            System.out.println("Output from stclient -g command:");
+            System.out.println(output);
+        }
+        if (p.exitValue() == 0) {
+            return parseServiceTag(output);
+        } else {
+            return checkReturnError(p.exitValue(), output, null);
+        }
+    }
+
+    private ServiceTag parseServiceTag(String output) throws IOException {
+        BufferedReader in = null;
+        try {
+            Properties props = new Properties();
+            // parse the service tag output from stclient
+            in = new BufferedReader(new StringReader(output));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                if ((line = line.trim()).length() > 0) {
+                    String[] ss = line.trim().split("=", 2);
+                    if (ss.length == 2) {
+                        props.setProperty(ss[0].trim(), ss[1].trim());
+                    } else {
+                        props.setProperty(ss[0].trim(), "");
+                    }
+                }
+            }
+
+            String urn = props.getProperty(ST_NODE_INSTANCE_URN);
+            String productName = props.getProperty(ST_NODE_PRODUCT_NAME);
+            String productVersion = props.getProperty(ST_NODE_PRODUCT_VERSION);
+            String productURN = props.getProperty(ST_NODE_PRODUCT_URN);
+            String productParent = props.getProperty(ST_NODE_PRODUCT_PARENT);
+            String productParentURN = props.getProperty(ST_NODE_PRODUCT_PARENT_URN);
+            String productDefinedInstanceID =
+                props.getProperty(ST_NODE_PRODUCT_DEFINED_INST_ID);
+            String productVendor = props.getProperty(ST_NODE_PRODUCT_VENDOR);
+            String platformArch = props.getProperty(ST_NODE_PLATFORM_ARCH);
+            String container = props.getProperty(ST_NODE_CONTAINER);
+            String source = props.getProperty(ST_NODE_SOURCE);
+            int installerUID =
+                Util.getIntValue(props.getProperty(ST_NODE_INSTALLER_UID));
+            Date timestamp =
+                Util.parseTimestamp(props.getProperty(ST_NODE_TIMESTAMP));
+
+            return new ServiceTag(urn,
+                                  productName,
+                                  productVersion,
+                                  productURN,
+                                  productParent,
+                                  productParentURN,
+                                  productDefinedInstanceID,
+                                  productVendor,
+                                  platformArch,
+                                  container,
+                                  source,
+                                  installerUID,
+                                  timestamp);
+        } finally {
+            if (in != null) {
+                in.close();
+            }
+        }
+
+    }
+
+    /**
+     * Returns the service tags of the specified
+     * <tt>product_urn</tt> in this registry.
+     *
+     * @param productURN the  <tt>product_urn</tt> to look up
+     * @return a {@code Set} of {@code ServiceTag} objects
+     * of the specified <tt>product_urn</tt> in this registry.
+     *
+     * @throws java.io.IOException if an I/O error occurs in this operation.
+     */
+    public Set<ServiceTag> findServiceTags(String productURN) throws IOException {
+        if (productURN == null) {
+            throw new NullPointerException("productURN is null");
+        }
+
+        List<String> command = getCommandList();
+        command.add("-f");
+        command.add("-t");
+        command.add(productURN);
+
+        BufferedReader in = null;
+        try {
+            ProcessBuilder pb = new ProcessBuilder(command);
+            Process p = pb.start();
+            String output = commandOutput(p);
+
+            Set<ServiceTag> instances = new HashSet<ServiceTag>();
+            if (p.exitValue() == 0) {
+                // parse the service tag output from stclient
+                in = new BufferedReader(new StringReader(output));
+                String line = null;
+                while ((line = in.readLine()) != null) {
+                    String s = line.trim();
+                    if (s.startsWith("urn:st:")) {
+                        instances.add(getServiceTag(s));
+                    }
+                }
+            } else {
+                checkReturnError(p.exitValue(), output, null);
+            }
+            return instances;
+        } finally {
+            if (in != null) {
+                in.close();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/ServiceTag.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,634 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.util.Date;
+import java.io.IOException;
+import static com.sun.servicetag.RegistrationDocument.*;
+
+/**
+ * A service tag is an XML-based data structure that identifies a product or
+ * a component on a system. The service tag schema is defined by the
+ * Service Tags Technology. The location of the DTD file is platform dependent.
+ * On Solaris, see <tt>/usr/share/lib/xml/dtd/servicetag.dtd</tt>.
+ * <p>
+ * A valid {@code ServiceTag} instance must comply to the service tag schema
+ * and contain the following fields:
+ * <ul>
+ *   <li>{@link #getInstanceURN <tt>instance_urn</tt>}</li>
+ *   <li>{@link #getProductName <tt>product_name</tt>}</li>
+ *   <li>{@link #getProductVersion <tt>product_version</tt>}</li>
+ *   <li>{@link #getProductURN <tt>product_urn</tt>}</li>
+ *   <li>{@link #getProductParent <tt>product_parent</tt>}</li>
+ *   <li>{@link #getProductParentURN <tt>product_parent_urn</tt>}</li>
+ *   <li>{@link #getProductDefinedInstanceID <tt>product_defined_inst_id</tt>}</li>
+ *   <li>{@link #getProductVendor <tt>product_vendor</tt>}</li>
+ *   <li>{@link #getPlatformArch <tt>platform_arch</tt>}</li>
+ *   <li>{@link #getContainer <tt>container</tt>}</li>
+ *   <li>{@link #getSource <tt>source</tt>}</li>
+ *   <li>{@link #getInstallerUID <tt>installer_uid</tt>}</li>
+ *   <li>{@link #getTimestamp <tt>timestamp</tt>}</li>
+ * </ul>
+ *
+ * The <tt>instance_urn</tt> can be specified when a {@code ServiceTag}
+ * object is created, or it can be generated when it is added to
+ * a {@link RegistrationData} object, or {@link Registry
+ * system service tag registry}. The <tt>installer_uid</tt> and
+ * <tt>timestamp</tt> are set when a {@code ServiceTag} object
+ * is added to a {@link RegistrationData} object, or {@link Registry
+ * system service tag registry}.
+ *
+ * @see <a href="https://sunconnection.sun.com/FAQ/sc_faq.html">Service Tags FAQ</a>
+ */
+public class ServiceTag {
+
+    private String instanceURN;
+    private String productName;
+    private String productVersion;
+    private String productURN;
+    private String productParent;
+    private String productParentURN;
+    private String productDefinedInstanceID;
+    private String productVendor;
+    private String platformArch;
+    private String container;
+    private String source;
+    private int installerUID;
+    private Date timestamp;
+
+    // Service Tag Field Lengths (defined in sthelper.h)
+    // Since the constants defined in sthelper.h includes the null-terminated
+    // character, so minus 1 from the sthelper.h defined values.
+    private final int MAX_URN_LEN             = 256 - 1;
+    private final int MAX_PRODUCT_NAME_LEN    = 256 - 1;
+    private final int MAX_PRODUCT_VERSION_LEN = 64 - 1;
+    private final int MAX_PRODUCT_PARENT_LEN  = 256 - 1;
+    private final int MAX_PRODUCT_VENDOR_LEN  = 64 - 1;
+    private final int MAX_PLATFORM_ARCH_LEN   = 64 - 1;
+    private final int MAX_CONTAINER_LEN       = 64 - 1;
+    private final int MAX_SOURCE_LEN          = 64 - 1;
+
+    // private constructors
+    private ServiceTag() {
+    }
+    // package private
+    ServiceTag(String instanceURN,
+               String productName,
+               String productVersion,
+               String productURN,
+               String productParent,
+               String productParentURN,
+               String productDefinedInstanceID,
+               String productVendor,
+               String platformArch,
+               String container,
+               String source,
+               int installerUID,
+               Date timestamp) {
+        setInstanceURN(instanceURN);
+        setProductName(productName);
+        setProductVersion(productVersion);
+        setProductURN(productURN);
+        setProductParentURN(productParentURN);
+        setProductParent(productParent);
+        setProductDefinedInstanceID(productDefinedInstanceID);
+        setProductVendor(productVendor);
+        setPlatformArch(platformArch);
+        setContainer(container);
+        setSource(source);
+        setInstallerUID(installerUID);
+        setTimestamp(timestamp);
+    }
+
+    /**
+     * Creates a service tag object with no <tt>instance_urn</tt>.
+     *
+     * @param productName               the name of the product.
+     * @param productVersion            the version of the product.
+     * @param productURN                the uniform resource name of the product
+     * @param productParent             the name of the product's parent.
+     * @param productParentURN          the uniform resource name of the product's parent.
+     * @param productDefinedInstanceID  the instance identifier.
+     * @param productVendor             the vendor of the product.
+     * @param platformArch              the operating system architecture.
+     * @param container                 the container of the product.
+     * @param source                    the source of the product.
+     *
+     * @throws IllegalArgumentException if any value of the input fields
+     *    does not conform to the service tag XML schema.
+     */
+    public static ServiceTag newInstance(String productName,
+                                         String productVersion,
+                                         String productURN,
+                                         String productParent,
+                                         String productParentURN,
+                                         String productDefinedInstanceID,
+                                         String productVendor,
+                                         String platformArch,
+                                         String container,
+                                         String source) {
+          return new ServiceTag("", /* empty instance_urn */
+                                productName,
+                                productVersion,
+                                productURN,
+                                productParent,
+                                productParentURN,
+                                productDefinedInstanceID,
+                                productVendor,
+                                platformArch,
+                                container,
+                                source,
+                                -1,
+                                null);
+    }
+
+    /**
+     * Creates a service tag object with a specified <tt>instance_urn</tt>.
+     *
+     * @param instanceURN               the uniform resource name of this instance.
+     * @param productName               the name of the product.
+     * @param productVersion            the version of the product.
+     * @param productURN                the uniform resource name of the product
+     * @param productParent             the name of the product's parent.
+     * @param productParentURN          the uniform resource name of the product's parent.
+     * @param productDefinedInstanceID  the instance identifier.
+     * @param productVendor             the vendor of the product.
+     * @param platformArch              the operating system architecture.
+     * @param container                 the container of the product.
+     * @param source                    the source of the product.
+     *
+     * @throws IllegalArgumentException if any value of the input fields
+     *    does not conform to the service tag XML schema.
+     */
+    public static ServiceTag newInstance(String instanceURN,
+                                         String productName,
+                                         String productVersion,
+                                         String productURN,
+                                         String productParent,
+                                         String productParentURN,
+                                         String productDefinedInstanceID,
+                                         String productVendor,
+                                         String platformArch,
+                                         String container,
+                                         String source) {
+          return new ServiceTag(instanceURN,
+                                productName,
+                                productVersion,
+                                productURN,
+                                productParent,
+                                productParentURN,
+                                productDefinedInstanceID,
+                                productVendor,
+                                platformArch,
+                                container,
+                                source,
+                                -1,
+                                null);
+    }
+
+    // Creates a copy of the ServiceTag instance
+    // with instance_urn and timestamp initialized
+    static ServiceTag newInstanceWithUrnTimestamp(ServiceTag st) {
+        String instanceURN =
+            (st.getInstanceURN().length() == 0 ? Util.generateURN() :
+                                                 st.getInstanceURN());
+        ServiceTag svcTag = new ServiceTag(instanceURN,
+                                           st.getProductName(),
+                                           st.getProductVersion(),
+                                           st.getProductURN(),
+                                           st.getProductParent(),
+                                           st.getProductParentURN(),
+                                           st.getProductDefinedInstanceID(),
+                                           st.getProductVendor(),
+                                           st.getPlatformArch(),
+                                           st.getContainer(),
+                                           st.getSource(),
+                                           st.getInstallerUID(),
+                                           new Date());
+        return svcTag;
+    }
+
+    /**
+     * Returns a uniform resource name (URN) in this format:
+     * <blockquote>
+     * "<tt>urn:st:<32-char {@link java.util.UUID uuid}></tt>"
+     * </blockquote>
+     * @return a URN.
+     */
+    public static String generateInstanceURN() {
+        return Util.generateURN();
+    }
+
+    /**
+     * Returns the uniform resource name of this service tag instance.
+     *
+     * @return  the <tt>instance_urn</tt> of this service tag.
+     */
+    public String getInstanceURN() {
+        return instanceURN;
+    }
+
+    /**
+     * Returns the name of the product.
+     *
+     * @return the product name.
+     */
+    public String getProductName() {
+        return productName;
+    }
+
+    /**
+     * Returns the version of the product.
+     *
+     * @return the product version.
+     */
+    public String getProductVersion() {
+        return productVersion;
+    }
+
+    /**
+     * Returns the uniform resource name of the product.
+     *
+     * @return the product URN.
+     */
+    public String getProductURN() {
+        return productURN;
+    }
+
+    /**
+     * Returns the uniform resource name of the product's parent.
+     *
+     * @return the product's parent URN.
+     */
+    public String getProductParentURN() {
+        return productParentURN;
+    }
+
+    /**
+     * Returns the name of the product's parent.
+     *
+     * @return the product's parent name.
+     */
+    public String getProductParent() {
+        return productParent;
+    }
+
+    /**
+     * Returns the identifier defined for this product instance.
+     *
+     * @return  the identifier defined for this product instance.
+     */
+    public String getProductDefinedInstanceID() {
+        return productDefinedInstanceID;
+    }
+
+    /**
+     * Returns the vendor of the product.
+     *
+     * @return the product vendor.
+     */
+    public String getProductVendor() {
+        return productVendor;
+    }
+
+    /**
+     * Returns the platform architecture on which the product
+     * is running on.
+     *
+     * @return the platform architecture on which the product is running on.
+     */
+    public String getPlatformArch() {
+        return platformArch;
+    }
+
+    /**
+     * Returns the timestamp.  This timestamp is set when this service tag
+     * is added to or updated in a {@code RegistrationData} object or
+     * the system service tag registry.
+     * This method may return {@code null}.
+     *
+     * @return timestamp when this service tag
+     * is added to or updated in a {@code RegistrationData} object or
+     * the system service tag registry, or {@code null}.
+     */
+    public Date getTimestamp() {
+        if (timestamp != null) {
+            return (Date) timestamp.clone();
+        } else {
+            return null;
+        }
+    }
+
+
+    /**
+     * Returns the container of the product.
+     *
+     * @return the container of the product.
+     */
+    public String getContainer() {
+        return container;
+    }
+
+    /**
+     * Returns the source of this service tag.
+     *
+     * @return  source of this service tag.
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Returns the UID. The UID is set when this service tag
+     * is added to or updated in the system service tag registry.
+     * This is platform dependent whose default value is {@code -1}.
+     * When this service tag is added to a {@code RegistrationData},
+     * the UID is not set.
+     *
+     * @return the UID of whom this service tag
+     * is added to or updated in the system service tag registry,
+     * or {@code -1}.
+     */
+    public int getInstallerUID() {
+        return installerUID;
+    }
+
+    // The following setter methods are used to validate the
+    // input field when constructing a ServiceTag instance
+
+    private void setInstanceURN(String instanceURN) {
+        if (instanceURN == null) {
+            throw new NullPointerException("Parameter instanceURN cannot be null");
+        }
+        if (instanceURN.length() > MAX_URN_LEN) {
+            throw new IllegalArgumentException("instanceURN \"" + instanceURN +
+                "\" exceeds maximum length " + MAX_URN_LEN);
+        }
+        this.instanceURN = instanceURN;
+    }
+
+    private void setProductName(String productName) {
+        if (productName == null) {
+            throw new NullPointerException("Parameter productName cannot be null");
+        }
+        if (productName.length() == 0) {
+            throw new IllegalArgumentException("product name cannot be empty");
+        }
+        if (productName.length() > MAX_PRODUCT_NAME_LEN) {
+            throw new IllegalArgumentException("productName \"" + productName +
+                "\" exceeds maximum length " + MAX_PRODUCT_NAME_LEN);
+        }
+        this.productName = productName;
+    }
+
+    private void setProductVersion(String productVersion) {
+        if (productVersion == null) {
+            throw new NullPointerException("Parameter productVersion cannot be null");
+        }
+
+        if (productVersion.length() == 0) {
+            throw new IllegalArgumentException("product version cannot be empty");
+        }
+        if (productVersion.length() > MAX_PRODUCT_VERSION_LEN) {
+            throw new IllegalArgumentException("productVersion \"" +
+                productVersion + "\" exceeds maximum length " +
+                MAX_PRODUCT_VERSION_LEN);
+        }
+        this.productVersion = productVersion;
+    }
+
+    private void setProductURN(String productURN) {
+        if (productURN == null) {
+            throw new NullPointerException("Parameter productURN cannot be null");
+        }
+        if (productURN.length() == 0) {
+            throw new IllegalArgumentException("product URN cannot be empty");
+        }
+        if (productURN.length() > MAX_URN_LEN) {
+            throw new IllegalArgumentException("productURN \"" + productURN +
+                "\" exceeds maximum length " + MAX_URN_LEN);
+        }
+        this.productURN = productURN;
+    }
+
+    private void setProductParentURN(String productParentURN) {
+        if (productParentURN == null) {
+            throw new NullPointerException("Parameter productParentURN cannot be null");
+        }
+        // optional field - can be empty
+        if (productParentURN.length() > MAX_URN_LEN) {
+            throw new IllegalArgumentException("productParentURN \"" +
+                productParentURN + "\" exceeds maximum length " +
+                MAX_URN_LEN);
+        }
+        this.productParentURN = productParentURN;
+    }
+
+    private void setProductParent(String productParent) {
+        if (productParent == null) {
+            throw new NullPointerException("Parameter productParent cannot be null");
+        }
+        if (productParent.length() == 0) {
+            throw new IllegalArgumentException("product parent cannot be empty");
+        }
+        if (productParent.length() > MAX_PRODUCT_PARENT_LEN) {
+            throw new IllegalArgumentException("productParent \"" +
+                productParent + "\" exceeds maximum length " +
+                MAX_PRODUCT_PARENT_LEN);
+        }
+        this.productParent = productParent;
+    }
+
+    void setProductDefinedInstanceID(String productDefinedInstanceID) {
+        if (productDefinedInstanceID == null) {
+            throw new NullPointerException("Parameter productDefinedInstanceID cannot be null");
+        }
+        if (productDefinedInstanceID.length() > MAX_URN_LEN) {
+            throw new IllegalArgumentException("productDefinedInstanceID \"" +
+                productDefinedInstanceID + "\" exceeds maximum length " +
+                MAX_URN_LEN);
+        }
+        // optional field - can be empty
+        this.productDefinedInstanceID = productDefinedInstanceID;
+    }
+
+    private void setProductVendor(String productVendor) {
+        if (productVendor == null) {
+            throw new NullPointerException("Parameter productVendor cannot be null");
+        }
+        if (productVendor.length() == 0) {
+            throw new IllegalArgumentException("product vendor cannot be empty");
+        }
+        if (productVendor.length() > MAX_PRODUCT_VENDOR_LEN) {
+            throw new IllegalArgumentException("productVendor \"" +
+                productVendor + "\" exceeds maximum length " +
+                MAX_PRODUCT_VENDOR_LEN);
+        }
+        this.productVendor = productVendor;
+    }
+
+    private void setPlatformArch(String platformArch) {
+        if (platformArch == null) {
+            throw new NullPointerException("Parameter platformArch cannot be null");
+        }
+        if (platformArch.length() == 0) {
+            throw new IllegalArgumentException("platform architecture cannot be empty");
+        }
+        if (platformArch.length() > MAX_PLATFORM_ARCH_LEN) {
+            throw new IllegalArgumentException("platformArch \"" +
+                platformArch + "\" exceeds maximum length " +
+                MAX_PLATFORM_ARCH_LEN);
+        }
+        this.platformArch = platformArch;
+    }
+
+    private void setTimestamp(Date timestamp) {
+        // can be null
+        this.timestamp = timestamp;
+    }
+
+    private void setContainer(String container) {
+        if (container == null) {
+            throw new NullPointerException("Parameter container cannot be null");
+        }
+        if (container.length() == 0) {
+            throw new IllegalArgumentException("container cannot be empty");
+        }
+        if (container.length() > MAX_CONTAINER_LEN) {
+            throw new IllegalArgumentException("container \"" +
+                container + "\" exceeds maximum length " +
+                MAX_CONTAINER_LEN);
+        }
+        this.container = container;
+    }
+
+    private void setSource(String source) {
+        if (source == null) {
+            throw new NullPointerException("Parameter source cannot be null");
+        }
+        if (source.length() == 0) {
+            throw new IllegalArgumentException("source cannot be empty");
+        }
+        if (source.length() > MAX_SOURCE_LEN) {
+            throw new IllegalArgumentException("source \"" + source +
+                "\" exceeds maximum length " + MAX_SOURCE_LEN);
+        }
+        this.source = source;
+    }
+
+    private void setInstallerUID(int installerUID) {
+        this.installerUID = installerUID;
+    }
+
+    /**
+     * Compares this service tag to the specified object.
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and is a {@code ServiceTag} object whose
+     * <tt>instance_urn</tt> is the same as the
+     * <tt>instance_urn</tt> of this service tag.
+     *
+     * @return {@code true} if this service tag is the same as
+     * the specified object.
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null || !(obj instanceof ServiceTag)) {
+            return false;
+        }
+        ServiceTag st = (ServiceTag) obj;
+        if (st == this) {
+            return true;
+        }
+        return st.getInstanceURN().equals(getInstanceURN());
+    }
+
+    /**
+     * Returns the hash code value for this service tag.
+     * @return the hash code value for this service tag.
+     */
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 19 * hash + (this.instanceURN != null ? this.instanceURN.hashCode() : 0);
+        return hash;
+    }
+
+    /**
+     * Returns the string representation of this service tag.
+     * The format is implementation specific.
+     *
+     * @return the string representation of this service tag.
+     */
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(ST_NODE_INSTANCE_URN).append("=").append(instanceURN).append("\n");
+        sb.append(ST_NODE_PRODUCT_NAME).append("=").append(productName).append("\n");
+        sb.append(ST_NODE_PRODUCT_VERSION).append("=").append(productVersion).append("\n");
+        sb.append(ST_NODE_PRODUCT_URN).append("=").append(productURN).append("\n");
+        sb.append(ST_NODE_PRODUCT_PARENT_URN).append("=").append(productParentURN).append("\n");
+        sb.append(ST_NODE_PRODUCT_PARENT).append("=").append(productParent).append("\n");
+        sb.append(ST_NODE_PRODUCT_DEFINED_INST_ID).append("=").append(productDefinedInstanceID).append("\n");
+        sb.append(ST_NODE_PRODUCT_VENDOR).append("=").append(productVendor).append("\n");
+        sb.append(ST_NODE_PLATFORM_ARCH).append("=").append(platformArch).append("\n");
+        sb.append(ST_NODE_TIMESTAMP).append("=").append(Util.formatTimestamp(timestamp)).append("\n");
+        sb.append(ST_NODE_CONTAINER).append("=").append(container).append("\n");
+        sb.append(ST_NODE_SOURCE).append("=").append(source).append("\n");
+        sb.append(ST_NODE_INSTALLER_UID).append("=").append(String.valueOf(installerUID)).append("\n");
+        return sb.toString();
+    }
+
+
+    /**
+     * Returns the {@link ServiceTag} instance for the running Java
+     * platform. The {@link ServiceTag#setSource source} field
+     * of the {@code ServiceTag} will be set to the given {@code source}.
+     * This method will return {@code null} if there is no service tag
+     * for the running Java platform.
+     * <p>
+     * This method is designed for Sun software that bundles the JDK
+     * or the JRE to use. It is recommended that the {@code source}
+     * string contains information about the bundling software
+     * such as the name and the version of the software bundle,
+     * for example,
+     * <blockquote>
+     * <tt>NetBeans IDE 6.0 with JDK 6 Update 5 Bundle</tt>
+     * </blockquote>
+     * in a NetBeans/JDK bundle.
+     * <p>
+     * At the first time to call this method the application
+     * is required to have the write permission to the installed
+     * directory of this running JDK or JRE instance.
+     *
+     * @param source the source that bundles the JDK or the JRE.
+     * @return a {@code ServiceTag} object for the Java platform,
+     *         or {@code null} if not supported.
+     * @throws IOException if an error occurs in this operation.
+     */
+    public static ServiceTag getJavaServiceTag(String source) throws IOException {
+        return Installer.getJavaServiceTag(source);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/SolarisServiceTag.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * Utility class to obtain the service tag for the Solaris Operating System.
+ */
+class SolarisServiceTag {
+    private final static String[] SolarisProductURNs = new String[] {
+        "urn:uuid:a7a38948-2bd5-11d6-98ce-9d3ac1c0cfd7", /* Solaris 8 */
+        "urn:uuid:4f82caac-36f3-11d6-866b-85f428ef944e", /* Solaris 9 */
+        "urn:uuid:a19de03b-48bc-11d9-9607-080020a9ed93", /* Solaris 9 sparc */
+        "urn:uuid:4c35c45b-4955-11d9-9607-080020a9ed93", /* Solaris 9 x86 */
+        "urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113", /* Solaris 10 */
+        "urn:uuid:6df19e63-7ef5-11db-a4bd-080020a9ed93"  /* Solaris 11 */
+    };
+
+    /**
+     * Returns null if not found.
+     *
+     * There is only one service tag for the operating system.
+     */
+    static ServiceTag getServiceTag() throws IOException {
+        if (Registry.isSupported()) {
+            Registry streg = Registry.getSystemRegistry();
+            for (String parentURN : SolarisProductURNs) {
+                Set<ServiceTag> instances = streg.findServiceTags(parentURN);
+                for (ServiceTag st : instances) {
+                    // there should have only one service tag for the OS
+                    return st;
+                }
+            }
+        }
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/SolarisSystemEnvironment.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+// This class is a copy of the com.sun.scn.servicetags.SolarisSystemEnvironment
+// class from the Sun Connection source.
+//
+// The Service Tags team maintains the latest version of the implementation
+// for system environment data collection.  JDK will include a copy of
+// the most recent released version for a JDK release. We rename
+// the package to com.sun.servicetag so that the Sun Connection
+// product always uses the latest version from the com.sun.scn.servicetags
+// package. JDK and users of the com.sun.servicetag API
+// (e.g. NetBeans and SunStudio) will use the version in JDK.
+//
+// So we keep this class in src/share/classes instead of src/<os>/classes.
+
+import java.io.*;
+
+/**
+ * Solaris implementation of the SystemEnvironment class.
+ */
+class SolarisSystemEnvironment extends SystemEnvironment {
+    SolarisSystemEnvironment() {
+        setHostId(getCommandOutput("/usr/bin/hostid"));
+        setSystemModel(getCommandOutput("/usr/bin/uname", "-i"));
+        setSystemManufacturer(getSolarisSystemManufacturer());
+        setCpuManufacturer(getSolarisCpuManufacturer());
+        setSerialNumber(getSolarisSN());
+    }
+
+    /**
+     * Tries to obtain the cpu manufacturer.
+     * @return The cpu manufacturer (an empty string if not found or an error occurred)
+     */
+    private String getSolarisCpuManufacturer() {
+        // not fully accurate, this could be another manufacturer (fujitsu for example)
+        if ("sparc".equalsIgnoreCase(System.getProperty("os.arch"))) {
+            return "Sun Microsystems, Inc";
+        }
+
+        // if we're here, then we'll try smbios (type 3)
+        return getSmbiosData("3", "Manufacturer: ");
+    }
+
+    /**
+     * Tries to obtain the system manufacturer.
+     * @return The system manufacturer (an empty string if not found or an error occurred)
+     */
+    private String getSolarisSystemManufacturer() {
+        // not fully accurate, this could be another manufacturer (fujitsu for example)
+        if ("sparc".equalsIgnoreCase(System.getProperty("os.arch"))) {
+            return "Sun Microsystems, Inc";
+        }
+
+        // if we're here, then we'll try smbios (type 1)
+        return getSmbiosData("1", "Manufacturer: ");
+    }
+
+    /**
+     * Tries to obtain the serial number.
+     * @return The serial number (empty string if not found or an error occurred)
+     */
+    private String getSolarisSN() {
+        // try to read from the psn file if it exists
+        String tmp = getFileContent("/var/run/psn");
+        if (tmp.length() > 0) {
+            return tmp.trim();
+        }
+
+        // if we're here, then we'll try sneep
+        String tmpSN = getSneepSN();
+        if (tmpSN.length() > 0) {
+            return tmpSN;
+        }
+
+        // if we're here, then we'll try smbios (type 1)
+        tmpSN = getSmbiosData("1", "Serial Number: ");
+        if (tmpSN.length() > 0) {
+            return tmpSN;
+        }
+
+        // if we're here, then we'll try smbios (type 3)
+        tmpSN = getSmbiosData("3", "Serial Number: ");
+        if (tmpSN.length() > 0) {
+            return tmpSN;
+        }
+
+        // give up and return
+        return "";
+    }
+
+    // Sample smbios output segment:
+    // ID    SIZE TYPE
+    // 1     150  SMB_TYPE_SYSTEM (system information)
+    //
+    //   Manufacturer: Sun Microsystems
+    //   Product: Sun Fire X4600
+    //   Version: To Be Filled By O.E.M.
+    //   Serial Number: 00:14:4F:45:0C:2A
+    private String getSmbiosData(String type, String target) {
+        String output = getCommandOutput("/usr/sbin/smbios", "-t", type);
+        for (String s : output.split("\n")) {
+            if (s.contains(target)) {
+                int indx = s.indexOf(target) + target.length();
+                if (indx < s.length()) {
+                    String tmp = s.substring(indx).trim();
+                    String lowerCaseStr = tmp.toLowerCase();
+                    if (!lowerCaseStr.startsWith("not available")
+                            && !lowerCaseStr.startsWith("to be filled by o.e.m")) {
+                        return tmp;
+                    }
+                }
+            }
+        }
+
+        return "";
+    }
+
+    private String getSneepSN() {
+        String basedir = getCommandOutput("pkgparam","SUNWsneep","BASEDIR");
+        File f = new File(basedir + "/bin/sneep");
+        if (f.exists()) {
+            String sneepSN = getCommandOutput(basedir + "/bin/sneep");
+            if (sneepSN.equalsIgnoreCase("unknown")) {
+                return "";
+            } else {
+                return sneepSN;
+            }
+        } else {
+            return "";
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/SunConnection.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,299 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.io.OutputStreamWriter;
+import java.util.Locale;
+import javax.net.ssl.HttpsURLConnection;
+
+/**
+ * Sun Connection Class for Product Registration.
+ *
+ * Registration Web Application Interface
+ * 1) POST the product registry to the output stream of the registration
+ *    relay service.
+ * 2) Open the webapp URL from a browser with the following parameters:
+ *    registry-urn
+ *    product=jdk
+ *    locale=<default-locale>
+ *    version=<version>
+ *
+ * @see https://sn-tools.central.sun.com/twiki/pub/ServiceTags/RegistrationRelayService/
+ *
+ */
+class SunConnection {
+
+    private static String JDK_REGISTRATION_URL = "https://inventory.sun.com/";
+    private static String SANDBOX_TESTING_URL = "https://inventory-beta.sun.com/";
+    private static String REGISTRATION_WEB_PATH = "RegistrationWeb/register";
+
+    // System properties for testing
+    private static String SVCTAG_REGISTER_TESTING = "servicetag.register.testing";
+    private static String SVCTAG_REGISTRATION_URL = "servicetag.registration.url";
+    private static String SVCTAG_CONNECTION_TIMEOUT = "servicetag.connection.timeout";
+
+    private SunConnection() {
+    }
+
+    /**
+     * Returns a URL for JDK registration interfacing with the Sun Connection
+     * registration relay service in this form:
+     *   <registration-url>/<registry_urn>?product=jdk&locale=<locale>
+     *
+     * The <registration-url> can be overridden by an environment
+     * variable or a system property.
+     *
+     * 1) "servicetag.register.testing" system property to switch to the
+     *    Sun Connection registration sandbox testing.
+     * 2) "servicetag.registration.url" system property to override
+     *    the URL
+     * 3) Default production URL
+     *
+     */
+    static URL getRegistrationURL(String registrationURN, Locale locale, String version) {
+        String url = System.getProperty(SVCTAG_REGISTRATION_URL);
+        if (url == null) {
+            if (System.getProperty(SVCTAG_REGISTER_TESTING) != null) {
+                url = SANDBOX_TESTING_URL;
+            } else {
+                url = JDK_REGISTRATION_URL;
+            }
+        }
+        url += REGISTRATION_WEB_PATH;
+
+        // trim whitespaces
+        url = url.trim();
+        if (url.length() == 0) {
+            throw new InternalError("Empty registration url set");
+        }
+
+        // Add the registry_urn in the URL's query
+        String registerURL = rewriteURL(url, registrationURN, locale, version);
+        try {
+            return new URL(registerURL);
+        } catch (MalformedURLException ex) {
+            // should never reach here
+            InternalError x =
+                new InternalError(ex.getMessage());
+            x.initCause(ex);
+            throw x;
+        }
+    }
+
+    private static String rewriteURL(String url, String registryURN, Locale locale, String version) {
+        StringBuilder sb = new StringBuilder(url.trim());
+        int len = sb.length();
+        if (sb.charAt(len-1) != '/') {
+            sb.append('/');
+        }
+        sb.append(registryURN);
+        sb.append("?");
+        sb.append("product=jdk");
+        sb.append("&");
+        sb.append("locale=").append(locale.toString());
+        sb.append("&");
+        sb.append("version=").append(version);
+        return sb.toString();
+    }
+
+    /**
+     * Registers all products in the given product registry.  If it fails
+     * to post the service tag registry, open the browser with the offline
+     * registration page.
+     *
+     * @param regData registration data to be posted to the Sun Connection
+     *             for registration.
+     * @param locale Locale
+     * @param version JDK version
+     *
+     * @throws IOException if I/O error occurs in this operation
+     */
+    public static void register(RegistrationData regData,
+                                Locale locale,
+                                String version) throws IOException {
+        // Gets the URL for SunConnection registration relay service
+        URL url = getRegistrationURL(regData.getRegistrationURN(),
+                                     locale,
+                                     version);
+
+        // Post the Product Registry to Sun Connection
+        boolean succeed = postRegistrationData(url, regData);
+        if (succeed) {
+            // service tags posted successfully
+            // now prompt for registration
+            openBrowser(url);
+        } else {
+            // open browser with the offline registration page
+            openOfflineRegisterPage();
+        }
+    }
+
+    /**
+     * Opens a browser for JDK product registration.
+     * @param url Registration Webapp URL
+     */
+    private static void openBrowser(URL url) throws IOException {
+        if (!BrowserSupport.isSupported()) {
+            if (Util.isVerbose()) {
+                System.out.println("Browser is not supported");
+            }
+            return;
+        }
+
+        try {
+            BrowserSupport.browse(url.toURI());
+        } catch (URISyntaxException ex) {
+            InternalError x = new InternalError("Error in registering: " + ex.getMessage());
+            x.initCause(ex);
+            throw x;
+        } catch (IllegalArgumentException ex) {
+            if (Util.isVerbose()) {
+                ex.printStackTrace();
+            }
+        } catch (UnsupportedOperationException ex) {
+            // ignore if not supported
+            if (Util.isVerbose()) {
+                ex.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * POST service tag registry to Sun Connection
+     * @param loc the URL of the webapp to handle the POST request
+     * @param streg the Service Tag registry
+     * @return true if posting succeeds; otherwise, false.
+     */
+    private static boolean postRegistrationData(URL url,
+                                                RegistrationData registration) {
+        try {
+            HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
+            con.setDoInput(true);
+            con.setDoOutput(true);
+            con.setUseCaches(false);
+            con.setAllowUserInteraction(false);
+
+            // default 10 seconds timeout
+            String timeout = System.getProperty(SVCTAG_CONNECTION_TIMEOUT, "10");
+            con.setConnectTimeout(Util.getIntValue(timeout) * 1000);
+
+            if (Util.isVerbose()) {
+                System.out.println("Connecting to post registration data at " + url);
+            }
+
+            con.setRequestMethod("POST");
+            con.setRequestProperty("Content-Type", "text/xml;charset=\"utf-8\"");
+            con.connect();
+
+            OutputStream out = con.getOutputStream();
+            registration.storeToXML(out);
+            out.flush();
+            out.close();
+
+            int returnCode = con.getResponseCode();
+            if (Util.isVerbose()) {
+                System.out.println("POST return status = " + returnCode);
+                printReturnData(con, returnCode);
+            }
+            return (returnCode == HttpURLConnection.HTTP_OK);
+        } catch (MalformedURLException me) {
+            // should never reach here
+            InternalError x = new InternalError("Error in registering: " + me.getMessage());
+            x.initCause(me);
+            throw x;
+        } catch (Exception ioe) {
+            // SocketTimeoutException, IOException or UnknownHostException
+            if (Util.isVerbose()) {
+                ioe.printStackTrace();
+            }
+            return false;
+        }
+    }
+
+    /**
+     * Opens the offline registratioin page in the browser.
+     *
+     */
+    private static void openOfflineRegisterPage()
+            throws IOException {
+        if (!BrowserSupport.isSupported()) {
+            if (Util.isVerbose()) {
+                System.out.println("Browser is not supported");
+            }
+            return;
+        }
+
+        File registerPage = Installer.getRegistrationHtmlPage();
+        try {
+            BrowserSupport.browse(registerPage.toURI());
+        } catch (FileNotFoundException ex) {
+            // should never reach here
+            InternalError x =
+                new InternalError("Error in launching " + registerPage + ": " + ex.getMessage());
+            x.initCause(ex);
+            throw x;
+        } catch (IllegalArgumentException ex) {
+            if (Util.isVerbose()) {
+                ex.printStackTrace();
+            }
+        } catch (UnsupportedOperationException ex) {
+            // ignore if not supported
+            if (Util.isVerbose()) {
+                ex.printStackTrace();
+            }
+        }
+    }
+
+    private static void printReturnData(HttpURLConnection con, int returnCode)
+            throws IOException {
+        BufferedReader reader = null;
+        try {
+            if (returnCode < 400) {
+                reader = new BufferedReader(
+                             new InputStreamReader(con.getInputStream()));
+            } else {
+                reader = new BufferedReader(
+                             new InputStreamReader(con.getErrorStream()));
+            }
+            StringBuilder sb = new StringBuilder();
+            String line;
+            while ((line = reader.readLine()) != null) {
+                sb.append(line).append("\n");
+            }
+            System.out.println("Response is : ");
+            System.out.println(sb.toString());
+        } finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/SystemEnvironment.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,338 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+// This class is a copy of the com.sun.scn.servicetags.SystemEnvironment
+// class from the Sun Connection source.
+//
+// The Service Tags team maintains the latest version of the implementation
+// for system environment data collection.  JDK will include a copy of
+// the most recent released version for a JDK release. We rename
+// the package to com.sun.servicetag so that the Sun Connection
+// product always uses the latest version from the com.sun.scn.servicetags
+// package. JDK and users of the com.sun.servicetag API
+// (e.g. NetBeans and SunStudio) will use the version in JDK.
+
+import java.io.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+/**
+ * SystemEnvironment class collects the environment data with the
+ * best effort from the underlying platform.
+ */
+public class SystemEnvironment {
+    private String hostname;
+    private String hostId;
+    private String osName;
+    private String osVersion;
+    private String osArchitecture;
+    private String systemModel;
+    private String systemManufacturer;
+    private String cpuManufacturer;
+    private String serialNumber;
+    private static SystemEnvironment sysEnv = null;
+
+    public static synchronized SystemEnvironment getSystemEnvironment() {
+        if (sysEnv == null) {
+            String os = System.getProperty("os.name");
+            if (os.equals("SunOS")) {
+                sysEnv = new SolarisSystemEnvironment();
+            } else if (os.equals("Linux")) {
+                sysEnv = new LinuxSystemEnvironment();
+            } else if (os.startsWith("Windows")) {
+                sysEnv = new WindowsSystemEnvironment();
+            } else {
+                sysEnv = new SystemEnvironment();
+            }
+        }
+        return sysEnv;
+    }
+
+    // package-private
+    SystemEnvironment() {
+        try {
+            this.hostname = InetAddress.getLocalHost().getHostName();
+        } catch (UnknownHostException ex) {
+            this.hostname = "Unknown host";
+        }
+        this.hostId = "";
+        this.osName = System.getProperty("os.name");
+        this.osVersion = System.getProperty("os.version");
+        this.osArchitecture = System.getProperty("os.arch");
+        this.systemModel = "";
+        this.systemManufacturer = "";
+        this.cpuManufacturer = "";
+        this.serialNumber = "";
+    }
+
+
+    /**
+     * Sets the hostname.
+     * @param hostname The hostname to set.
+     */
+    public void setHostname(String hostname) {
+        this.hostname = hostname;
+    }
+
+    /**
+     * Sets the OS name.
+     * @param osName The osName to set.
+     */
+    public void setOsName(String osName) {
+        this.osName = osName;
+    }
+
+    /**
+     * Sets the OS version.
+     * @param osVersion The osVersion to set.
+     */
+    public void setOsVersion(String osVersion) {
+        this.osVersion = osVersion;
+    }
+
+    /**
+     * Sets the OS architecture.
+     * @param osArchitecture The osArchitecture to set.
+     */
+    public void setOsArchitecture(String osArchitecture) {
+        this.osArchitecture = osArchitecture;
+    }
+
+    /**
+     * Sets the system model.
+     * @param systemModel The systemModel to set.
+     */
+    public void setSystemModel(String systemModel) {
+        this.systemModel = systemModel;
+    }
+
+    /**
+     * Sets the system manufacturer.
+     * @param systemManufacturer The systemManufacturer to set.
+     */
+    public void setSystemManufacturer(String systemManufacturer) {
+        this.systemManufacturer = systemManufacturer;
+    }
+
+    /**
+     * Sets the cpu manufacturer.
+     * @param cpuManufacturer The cpuManufacturer to set.
+     */
+    public void setCpuManufacturer(String cpuManufacturer) {
+        this.cpuManufacturer = cpuManufacturer;
+    }
+
+    /**
+     * Sets the serial number.
+     * @param serialNumber The serialNumber to set.
+     */
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    /**
+     * Sets the hostid.  Truncates to a max length of 16 chars.
+     * @param hostId The hostid to set.
+     */
+    public void setHostId(String hostId) {
+        if (hostId == null || hostId.equals("null")) {
+            hostId = "";
+        }
+        if (hostId.length() > 16) {
+            hostId = hostId.substring(0,16);
+        }
+        this.hostId = hostId;
+    }
+
+    /**
+     * Returns the hostname.
+     * @return The hostname.
+     */
+    public String getHostname() {
+        return hostname;
+    }
+
+    /**
+     * Returns the osName.
+     * @return The osName.
+     */
+    public String getOsName() {
+        return osName;
+    }
+
+    /**
+     * Returns the osVersion.
+     * @return The osVersion.
+     */
+    public String getOsVersion() {
+        return osVersion;
+    }
+
+    /**
+     * Returns the osArchitecture.
+     * @return The osArchitecture.
+     */
+    public String getOsArchitecture() {
+        return osArchitecture;
+    }
+
+    /**
+     * Returns the systemModel.
+     * @return The systemModel.
+     */
+    public String getSystemModel() {
+        return systemModel;
+    }
+
+    /**
+     * Returns the systemManufacturer.
+     * @return The systemManufacturer.
+     */
+    public String getSystemManufacturer() {
+        return systemManufacturer;
+    }
+
+    /**
+     * Returns the serialNumber.
+     * @return The serialNumber.
+     */
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+
+    /**
+     * Returns the hostId.
+     * @return The hostId.
+     */
+    public String getHostId() {
+        return hostId;
+    }
+
+    /**
+     * Returns the cpuManufacturer.
+     * @return The cpuManufacturer.
+     */
+    public String getCpuManufacturer() {
+        return cpuManufacturer;
+    }
+
+    protected String getCommandOutput(String... command) {
+        StringBuilder sb = new StringBuilder();
+        BufferedReader br = null;
+        Process p = null;
+        try {
+            ProcessBuilder pb = new ProcessBuilder(command);
+            p = pb.start();
+            p.waitFor();
+
+            if (p.exitValue() == 0) {
+                br = new BufferedReader(new InputStreamReader(p.getInputStream()));
+                String line = null;
+                while ((line = br.readLine()) != null) {
+                    line = line.trim();
+                    if (line.length() > 0) {
+                        if (sb.length() > 0) {
+                            sb.append("\n");
+                        }
+                        sb.append(line);
+                    }
+                }
+            }
+            return sb.toString();
+        } catch (InterruptedException ie) {
+            // in case the command hangs
+            if (p != null) {
+                p.destroy();
+            }
+            return "";
+        } catch (Exception e) {
+            // ignore exception
+            return "";
+        } finally {
+            if (p != null) {
+                try {
+                    p.getErrorStream().close();
+                } catch (IOException e) {
+                    // ignore
+                }
+                try {
+                    p.getInputStream().close();
+                } catch (IOException e) {
+                    // ignore
+                }
+                try {
+                    p.getOutputStream().close();
+                } catch (IOException e) {
+                    // ignore
+                }
+                p = null;
+            }
+            if (br != null) {
+                try {
+                    br.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+    }
+
+    protected String getFileContent(String filename) {
+        File f = new File(filename);
+        if (!f.exists()) {
+            return "";
+        }
+
+        StringBuilder sb = new StringBuilder();
+        BufferedReader br = null;
+        try {
+            br = new BufferedReader(new FileReader(f));
+            String line = null;
+            while ((line = br.readLine()) != null) {
+                line = line.trim();
+                if (line.length() > 0) {
+                    if (sb.length() > 0) {
+                        sb.append("\n");
+                    }
+                    sb.append(line);
+                }
+            }
+            return sb.toString();
+        } catch (Exception e) {
+            // ignore exception
+            return "";
+        } finally {
+            if (br != null) {
+                try {
+                    br.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/UnauthorizedAccessException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+/**
+ * Thrown if the user is not authorized to
+ * {@link Registry#updateServiceTag update} or
+ * {@link Registry#removeServiceTag remove}
+ * a service tag from a {@link Registry}.
+ */
+public class UnauthorizedAccessException extends RuntimeException {
+
+    /**
+     * Constructs an <code>UnauthorizedAccessException</code> object
+     * without detail message.
+     */
+    public UnauthorizedAccessException() {
+    }
+
+
+    /**
+     * Constructs an <code>UnauthorizedAccessException</code> object
+     * with the specified detail message.
+     *
+     * @param msg the detail message.
+     */
+    public UnauthorizedAccessException(String msg) {
+        super(msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/Util.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,336 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+import java.io.*;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.text.ParseException;
+import java.util.TimeZone;
+import java.util.UUID;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+// Utility class for com.sun.servicetag package
+class Util {
+    private static boolean verbose = (System.getProperty("servicetag.verbose") != null);
+    private static String jrepath = null;
+    private static final String REGKEY_TAIL =
+        "microsoft\\windows\\currentversion\\app paths\\stclient.exe";
+    private static final String STCLIENT_TAIL =  "sun\\servicetag\\stclient.exe";
+    private static final String WIN32_STCLIENT =
+        "c:\\Program Files (x86)\\" + STCLIENT_TAIL;
+
+    // for debugging and tracing
+    static boolean isVerbose() {
+        return verbose;
+    }
+
+    /**
+     * Gets the pathname of JRE in the running platform
+     * This can be a JDK or JRE.
+     */
+    static synchronized String getJrePath() {
+        if (jrepath == null) {
+            // Determine the JRE path by checking the existence of
+            // <HOME>/jre/lib and <HOME>/lib.
+            String javaHome = System.getProperty("java.home");
+            jrepath = javaHome + File.separator + "jre";
+            File f = new File(jrepath, "lib");
+            if (!f.exists()) {
+                // java.home usually points to the JRE path
+                jrepath = javaHome;
+            }
+        }
+        return jrepath;
+    }
+
+    /**
+     * Tests if the running platform is a JDK.
+     */
+    static boolean isJdk() {
+        // <HOME>/jre exists which implies it's a JDK
+        return getJrePath().endsWith(File.separator + "jre");
+    }
+
+    /**
+     * Generates the URN string of "urn:st" namespace
+     */
+    static String generateURN() {
+        return "urn:st:" + UUID.randomUUID().toString();
+    }
+
+    static int getIntValue(String value) {
+        try {
+            return Integer.parseInt(value);
+        } catch (NumberFormatException e) {
+            throw new IllegalArgumentException("\"" + value + "\"" +
+                " expected to be an integer");
+        }
+    }
+
+    /**
+     * Formats the Date into a timestamp string in YYYY-MM-dd HH:mm:ss GMT.
+     * @param timestamp Date
+     * @return a string representation of the timestamp
+     *         in the YYYY-MM-dd HH:mm:ss GMT format.
+     */
+    static String formatTimestamp(Date timestamp) {
+        if (timestamp == null) {
+            return "[No timestamp]";
+        }
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
+        df.setTimeZone(TimeZone.getTimeZone("GMT"));
+        return df.format(timestamp);
+    }
+
+    /**
+     * Parses a timestamp string in YYYY-MM-dd HH:mm:ss GMT format.
+     * @param timestamp Timestamp in the YYYY-MM-dd HH:mm:ss GMT format.
+     * @return Date
+     */
+    static Date parseTimestamp(String timestamp) {
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
+        df.setTimeZone(TimeZone.getTimeZone("GMT"));
+        try {
+            return df.parse(timestamp);
+        } catch (ParseException e) {
+            // should not reach here
+            e.printStackTrace();
+            return new Date();
+        }
+    }
+
+    static String commandOutput(Process p) throws IOException {
+        Reader r = null;
+        Reader err = null;
+        try {
+            r = new InputStreamReader(p.getInputStream());
+            err = new InputStreamReader(p.getErrorStream());
+            String output = commandOutput(r);
+            String errorMsg = commandOutput(err);
+            p.waitFor();
+            return output + errorMsg.trim();
+        } catch (InterruptedException e) {
+            if (isVerbose()) {
+                e.printStackTrace();
+            }
+            return e.getMessage();
+        } finally {
+            if (r != null) {
+                r.close();
+            }
+            if (err != null) {
+                err.close();
+            }
+        }
+    }
+
+    static String commandOutput(Reader r) throws IOException {
+        StringBuilder sb = new StringBuilder();
+        int c;
+        while ((c = r.read()) > 0) {
+            if (c != '\r') {
+                sb.append((char) c);
+            }
+        }
+        return sb.toString();
+    }
+
+    static int getJdkVersion() {
+        parseVersion();
+        return jdkVersion;
+    }
+
+    static int getUpdateVersion() {
+        parseVersion();
+        return jdkUpdate;
+    }
+
+    private static int jdkVersion = 0;
+    private static int jdkUpdate = 0;
+    private static synchronized void parseVersion() {
+        if (jdkVersion > 0) {
+            return;
+        }
+
+        // parse java.runtime.version
+        // valid format of the version string is:
+        // n.n.n[_uu[c]][-<identifer>]-bxx
+        String cs = System.getProperty("java.runtime.version");
+        if (cs.length() >= 5 &&
+            Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' &&
+            Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' &&
+            Character.isDigit(cs.charAt(4))) {
+            jdkVersion = Character.digit(cs.charAt(2), 10);
+            cs = cs.substring(5, cs.length());
+            if (cs.charAt(0) == '_' && cs.length() >= 3 &&
+                Character.isDigit(cs.charAt(1)) &&
+                Character.isDigit(cs.charAt(2))) {
+                int nextChar = 3;
+                try {
+                    String uu = cs.substring(1, 3);
+                    jdkUpdate = Integer.valueOf(uu).intValue();
+                } catch (NumberFormatException e) {
+                    // not conforming to the naming convention
+                    return;
+                }
+            }
+        } else {
+            throw new InternalError("Invalid java.runtime.version" + cs);
+        }
+    }
+
+    /**
+     * Returns this java string as a null-terminated byte array
+     */
+    private static byte[] stringToByteArray(String str) {
+        return (str + "\u0000").getBytes();
+    }
+
+    /**
+     * Converts a null-terminated byte array to java string
+     */
+    private static String byteArrayToString(byte[] array) {
+        return new String(array, 0, array.length -1);
+    }
+
+    /**
+     * Gets the stclient path using a well known location from
+     * the Windows platform Registry, ensuring the path returned
+     * by the registry is really the one we are looking for,
+     * otherwise it will return null.
+     */
+    private static File getWindowsStClientFile(boolean wow64) {
+        File out = null;
+        String regKey = (wow64 == true)
+            ? "software\\Wow6432Node\\" + REGKEY_TAIL
+            : "software\\" + REGKEY_TAIL;
+        String keyName = "" ; // use the default  key
+        String path = getRegistryKey(regKey, keyName);
+        if (path != null
+                && (new File(path)).exists()
+                && path.toLowerCase().endsWith(STCLIENT_TAIL.toLowerCase())) {
+            out = new File(path);
+        }
+        if (isVerbose()) {
+            System.out.println("stclient=" + out);
+        }
+        return out;
+    }
+
+    /**
+     * Finds a stclient in 32 and 64 bit environments, first by querying
+     * the windows registry, if not then get the well known paths for
+     * 64bit see http://support.microsoft.com/kb/896459
+     */
+
+    static File getWindowsStClientFile() {
+        File stclient = null;
+        if (System.getProperty("os.arch").equals("x86")) {
+            // try to get the default entry
+            stclient = getWindowsStClientFile(false);
+            if (stclient != null) {
+                return stclient;
+            }
+        } else { // we are on 64-bit system
+            // try the wow64 area
+            stclient = getWindowsStClientFile(true);
+            if (stclient != null) {
+                return stclient;
+            }
+            // try the default hard coded path, maybe wow64 registry is missing
+            stclient = new File(WIN32_STCLIENT);
+            if (stclient.canExecute()) {
+                if (isVerbose()) {
+                    System.out.println("stclient(default)=" + stclient);
+                }
+                return stclient;
+            }
+        }
+        if (isVerbose()) {
+            System.out.println("stclient not found");
+        }
+        return null;
+    }
+
+    /**
+     * This uses reflection to access a private java windows registry
+     * interface, any changes to that Class must be appropriately adjusted.
+     * Returns a null if unsuccessful.
+     */
+    private static String getRegistryKey(String regKey, String keyName) {
+        String out = null;
+        try {
+            Class<?> clazz = Class.forName("java.util.prefs.WindowsPreferences");
+
+            // Get the registry methods
+            Method winRegOpenKeyM = clazz.getDeclaredMethod("WindowsRegOpenKey",
+                    int.class, byte[].class, int.class);
+            winRegOpenKeyM.setAccessible(true);
+
+            Method winRegCloseKeyM = clazz.getDeclaredMethod("WindowsRegCloseKey",
+                    int.class);
+            winRegCloseKeyM.setAccessible(true);
+
+            Method winRegQueryValueM = clazz.getDeclaredMethod("WindowsRegQueryValueEx",
+                    int.class, byte[].class);
+            winRegQueryValueM.setAccessible(true);
+
+            // Get all the constants we need
+            int HKLM = getValueFromStaticField("HKEY_LOCAL_MACHINE", clazz);
+            int KEY_READ = getValueFromStaticField("KEY_READ", clazz);
+            int ERROR_CODE = getValueFromStaticField("ERROR_CODE", clazz);
+            int NATIVE_HANDLE = getValueFromStaticField("NATIVE_HANDLE", clazz);
+            int ERROR_SUCCESS = getValueFromStaticField("ERROR_SUCCESS", clazz);
+
+            // Convert keys
+            byte[] reg = stringToByteArray(regKey);
+            byte[] key = stringToByteArray(keyName);
+
+            // Open the registry
+            int[] result = (int[]) winRegOpenKeyM.invoke(null, HKLM, reg, KEY_READ);
+
+            if (result[ERROR_CODE] == ERROR_SUCCESS) {
+                byte[] stvalue = (byte[]) winRegQueryValueM.invoke(null,
+                    result[NATIVE_HANDLE], key);
+                out = byteArrayToString(stvalue);
+                winRegCloseKeyM.invoke(null, result[NATIVE_HANDLE]);
+            }
+        } catch (Exception ex) {
+            if (isVerbose()) {
+                ex.printStackTrace();
+            }
+        }
+        return out;
+    }
+
+    private static int getValueFromStaticField(String fldName, Class<?> klass) throws Exception {
+        Field f = klass.getDeclaredField(fldName);
+        f.setAccessible(true);
+        return f.getInt(null);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/WindowsSystemEnvironment.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.servicetag;
+
+// This class is a copy of the com.sun.scn.servicetags.WindowsSystemEnvironment
+// class from the Sun Connection source.
+//
+// The Service Tags team maintains the latest version of the implementation
+// for system environment data collection.  JDK will include a copy of
+// the most recent released version for a JDK release. We rename
+// the package to com.sun.servicetag so that the Sun Connection
+// product always uses the latest version from the com.sun.scn.servicetags
+// package. JDK and users of the com.sun.servicetag API
+// (e.g. NetBeans and SunStudio) will use the version in JDK.
+//
+// So we keep this class in src/share/classes instead of src/<os>/classes.
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Windows implementation of the SystemEnvironment class.
+ */
+class WindowsSystemEnvironment extends SystemEnvironment {
+    WindowsSystemEnvironment() {
+        super();
+
+        // run a call to make sure things are initialized
+        // ignore the first call result as the system may
+        // give inconsistent data on the first invocation ever
+        getWmicResult("computersystem", "get", "model");
+
+        setSystemModel(getWmicResult("computersystem", "get", "model"));
+        setSystemManufacturer(getWmicResult("computersystem", "get", "manufacturer"));
+        setSerialNumber(getWmicResult("bios", "get", "serialnumber"));
+
+        String cpuMfr = getWmicResult("cpu", "get", "manufacturer");
+        // this isn't as good an option, but if we couldn't get anything
+        // from wmic, try the processor_identifier
+        if (cpuMfr.length() == 0) {
+            String procId = System.getenv("processor_identifer");
+            if (procId != null) {
+                String[] s = procId.split(",");
+                cpuMfr = s[s.length - 1].trim();
+            }
+        }
+        setCpuManufacturer(cpuMfr);
+
+        // try to remove the temp file that gets created from running wmic cmds
+        try {
+            // look in the current working directory
+            File f = new File("TempWmicBatchFile.bat");
+            if (f.exists()) {
+                f.delete();
+            }
+        } catch (Exception e) {
+            // ignore the exception
+        }
+    }
+
+
+    /**
+     * This method invokes wmic outside of the normal environment
+     * collection routines.
+     *
+     * An initial call to wmic can be costly in terms of time.
+     *
+     * <code>
+     * Details of why the first call is costly can be found at:
+     *
+     * http://support.microsoft.com/kb/290216/en-us
+     *
+     * "When you run the Wmic.exe utility for the first time, the utility
+     * compiles its .mof files into the repository. To save time during
+     * Windows installation, this operation takes place as necessary."
+     * </code>
+     */
+    private String getWmicResult(String alias, String verb, String property) {
+        String res = "";
+        BufferedReader in = null;
+        try {
+            ProcessBuilder pb = new ProcessBuilder("cmd", "/C", "WMIC", alias, verb, property);
+            Process p = pb.start();
+            // need this for executing windows commands (at least
+            // needed for executing wmic command)
+            BufferedWriter bw = new BufferedWriter(
+                new OutputStreamWriter(p.getOutputStream()));
+            bw.write(13);
+            bw.flush();
+            bw.close();
+
+            p.waitFor();
+            if (p.exitValue() == 0) {
+                in = new BufferedReader(new InputStreamReader(p.getInputStream()));
+                String line = null;
+                while ((line = in.readLine()) != null) {
+                    line = line.trim();
+                    if (line.length() == 0) {
+                        continue;
+                    }
+                    res = line;
+                }
+                // return the *last* line read
+                return res;
+            }
+
+        } catch (Exception e) {
+            // ignore the exception
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+        return res.trim();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/package.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,71 @@
+CTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+CA 95054 USA or visit www.sun.com if you need additional information or
+have any questions.
+
+-->
+
+</head>
+<body bgcolor="white">
+
+This package contains classes that allow the creation
+and manipulation of service tags.
+This com.sun.servicetag package is intended for
+<b>Sun internal use</b> only.
+<p>
+<dl>
+<dt><b>Service Tag</b></dt>
+<dd>A service tag is an XML-based data structure that contains identifying
+information about an instance of a product or component on a system.
+</dd>
+</dl>
+<dl>
+<dt><b>Service Tag Registry</b></dt>
+<dd>A service tag registry is a XML-based registry that contains
+the service tags of all the tagged components on a system.  The
+service tag registry is present on systems that have the
+Service Tags software installed.
+</dd>
+</dl>
+<dl>
+<dt><b>Registration Data</b></dt>
+<dd>A registration data is a container of one or more
+service tags that identify the
+components for product registration and will be used to interface
+with the Sun Connection registration services.
+</dd>
+</dl>
+
+This package contains the methods to create service tags, set up the
+registration data for product registration, add service tags to and
+remove them from the system service tag registry.
+<p>
+All methods defined in this package will throw {@code NullPointerException}
+if {@code null} is passed in any input parameter unless it is stated otherwise.
+In addition, they are multi-thread safe.
+</body>
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/Putback-Notes.txt	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,25 @@
+README for auto-generating of the offline registration page.
+
+1. register.html is defined by the xDesign team.
+
+2. Before putback in the workspace, we need to modify the 
+   register.html to contain the following:
+
+   (a) replace the pathname of the jdk_header.png image to
+       <img src="@@JDK_HEADER_PNG@@" ....>
+
+   (b) replace the product name from:
+           Java Development Kit Version 6 Update 5 (e.g.)
+       to:
+           Java Development Kit @@JDK_VERSION@@ 
+
+   (c) replace the form action for the "Register My JDK" button with:
+
+       <form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
+
+   (d) Add this input in the form for posting data after 
+       the <form name=....> line:
+ 
+       <input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
+
+3. The jdk_header.png is located under <JRE>/lib/servicetag directory.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/javase_5_swordfish.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,29 @@
+# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+
+servicetag.jdk.urn     = urn:uuid:d5bed446-05f2-42ed-ba0a-153105a52413
+servicetag.jdk.name    = J2SE 5.0 Development Kit
+servicetag.jre.urn     = urn:uuid:5c6686aa-fd05-46a6-ba3e-700e2d5f7043
+servicetag.jre.name    = J2SE 5.0 Runtime Environment
+servicetag.parent.urn  = urn:uuid:f3c20172-557a-11d7-93d0-d6a41ea318df
+servicetag.parent.name = Java 2 Platform, Standard Edition 5.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/javase_6_swordfish.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,29 @@
+# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+
+servicetag.jdk.urn     = urn:uuid:b58ef9a8-5ae8-11db-a023-080020a9ed93
+servicetag.jdk.name    = Java SE 6 Development Kit
+servicetag.jre.urn     = urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc
+servicetag.jre.name    = Java SE 6 Runtime Environment
+servicetag.parent.urn  = urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3
+servicetag.parent.name = Java Platform Standard Edition 6 (Java SE 6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/javase_7_swordfish.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,29 @@
+# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+
+servicetag.jdk.urn     = JSEZ9-007-ZZZZ
+servicetag.jdk.name    = Java SE 7 Development Kit
+servicetag.jre.urn     = JSERE-007-ZZZZ
+servicetag.jre.name    = Java SE 7 Runtime Environment
+servicetag.parent.urn  = urn:uuid:dc1704fe-264f-11dc-9482-080020a9ed93
+servicetag.parent.name = Java Platform Standard Edition 7 (Java SE 7)
Binary file jdk/src/share/classes/com/sun/servicetag/resources/jdk_header.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/product_registration.xsd	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,301 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+<xs:element name="registration_data">
+  <xs:complexType>
+    <xs:sequence>
+      <xs:element name="environment"
+                  minOccurs="1"
+                  maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element ref="hostname"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="hostId"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="osName"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="osVersion"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="osArchitecture"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="systemModel"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="systemManufacturer"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="cpuManufacturer"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+            <xs:element ref="serialNumber"
+                        minOccurs='1'
+                        maxOccurs='1'/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="registry"
+                  minOccurs="1"
+                  maxOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="service_tag"
+                        minOccurs="0"
+                        maxOccurs="1024">
+              <xs:complexType>
+                <xs:sequence>
+                  <xs:element ref="instance_urn"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_name"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_version"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_urn"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_parent_urn"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_parent"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_defined_inst_id"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="product_vendor"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="platform_arch"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="timestamp"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="container"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="source"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                  <xs:element ref="installer_uid"
+                              minOccurs='1'
+                              maxOccurs='1'/>
+                </xs:sequence>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+          <xs:attribute name="urn"
+                        type="xs:string"
+                        use="required"/>
+          <xs:attribute name="version"
+                        type="xs:string"
+                        use="required"/>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="version"
+                  type="xs:string"
+                  use="required"/>
+  </xs:complexType>
+</xs:element>
+
+  <!-- definition of simple elements -->
+  <xs:element name="hostname">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="hostId">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="16"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="osName">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="256"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="osVersion">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="50"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="osArchitecture">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="256"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="systemModel">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="50"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="systemManufacturer">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="50"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="cpuManufacturer">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="50"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="serialNumber">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="256"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="instance_urn">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+   </xs:element>
+
+  <xs:element name="product_name">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_version">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:maxLength value="63"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_urn">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_parent_urn">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="0"/>
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_parent">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="255"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_defined_inst_id">
+      <xs:simpleType>
+          <xs:restriction base="xs:string">
+              <xs:minLength value="0"/>
+              <xs:maxLength value="255"/>
+          </xs:restriction>
+      </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="product_vendor">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="63"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="platform_arch">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:minLength value="1"/>
+        <xs:maxLength value="63"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="timestamp">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:maxLength value="24"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="container">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:maxLength value="63"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="source">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:maxLength value="63"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+  <xs:element name="installer_uid">
+    <xs:simpleType>
+      <xs:restriction base="xs:integer">
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
+</xs:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/register.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Register your JDK</title>
+
+<!--
+Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+CA 95054 USA or visit www.sun.com if you need additional information or
+have any questions.
+-->
+
+<style type="text/css">
+<!--
+.style1 {font-family: Arial, Helvetica, sans-serif}
+.style3 {font-family: Arial, Helvetica, sans-serif; font-size: small; }
+input.buttonblue,input.defbutton{ background: #3F6580;border-right:1px solid #304C60;border-bottom:1px solid #304C60;border-left:1px solid #BACDD9;border-top:1px solid #BACDD9; font-weight:bold; color:#FFFFFF; font-size:.8em; height:1.9em}
+input.buttonblue:hover{color:#fbe249;}
+a:link,a.named:visited{color:#3E6B8A}
+a:hover{text-decoration:underline}
+a{text-decoration:none}
+a:visited,a:visited code{color:#917E9C}
+-->
+</style>
+</head>
+
+<body>
+<table width="813" border="0" cellpadding="3" cellspacing="0">
+  <tr>
+    <td width="7" height="78">&nbsp;</td>
+    <td width="794" align="left" valign="top">
+        <img src="@@JDK_HEADER_PNG@@" width="783" height="63"></td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td><p class="style1">Thank you for installing the
+        <strong> Java Development Kit @@JDK_VERSION@@ </strong>
+        from Sun Microsystems. </p>
+        <p class="style1">Registering your product will give you the following benefits:</p>
+        <ul class="style1">
+          <li> Notification of new versions, patches, and updates</li>
+          <li> Special offers on Sun developer products, services and training </li>
+          <li> Access to early releases and documentation </li>
+        </ul>
+        <p class="style1">Product registration is FREE, quick and easy!</p>
+        <blockquote>
+          <p class="style1">All you need is a Sun Developer Network or other Sun Online account. If you don't already have one, you will be prompted to create one. </p>
+          <table width="708" border="0" cellspacing="0" cellpadding="3">
+            <tr valign="top">
+              <td width="126" height="35">
+              <form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
+                <input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
+                <input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"  value="Register My JDK">
+              </form></td>
+              <td width="570"><span class="style3">You need to be connected to the Internet to register this Sun product. </span></td>
+            </tr>
+          </table>
+        </blockquote>
+        </td>
+        </tr>
+    <tr>
+       <td>&nbsp;</td>
+       <td bgcolor="#f1f7df">
+       <p class="style3">Sun Microsystems, Inc. respects your privacy.
+    We will use your personal information for communications
+    and management of your Sun Online Account, the services
+    and applications you access using your Sun Online Account,
+    and the products and systems you register with your Sun Online Account.</p>
+                <p class="style3">For more information on the data that will be collected as
+          part of the registration process and how it will be managed <br>
+          see <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>. <br>
+          <br>
+          For more information on Sun's Privacy Policy see <a href="http://www.sun.com/privacy/">http://www.sun.com/privacy/</a> or contact <a class="moz-txt-link-rfc2396E" href="mailto:privacy@sun.com">privacy@sun.com.</a></p></td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/register_ja.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
+g/TR/html4/loose.dtd">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>JDK 製品登録</title>
+
+<!--
+Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+CA 95054 USA or visit www.sun.com if you need additional information or
+have any questions.
+-->
+
+<style type="text/css">
+<!--
+.style1 {font-family: Arial, Helvetica, sans-serif}
+.style3 {font-family: Arial, Helvetica, sans-serif; font-size: small; }
+input.buttonblue,input.defbutton{ background: #3F6580;border-right:1px solid #304C60;border-bottom:1px solid #304C60;border-left:1px solid #BACDD9;border-top:1px solid #BACDD9; font-weight:bold; color:#FFFFFF; font-size:.8em; height:1.9em}
+input.buttonblue:hover{color:#fbe249;}
+a:link,a.named:visited{color:#3E6B8A}
+a:hover{text-decoration:underline}
+a{text-decoration:none}
+a:visited,a:visited code{color:#917E9C}
+-->
+</style></head><body>
+<table border="0" cellpadding="3" cellspacing="0" width="813">
+  <tbody><tr>
+    <td height="78" width="7">&nbsp;</td>
+    <td align="left" valign="top" width="794"><img src="@@JDK_HEADER_PNG@@" height="63" width="783"></td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+
+    <td><p class="style1">Sun Microsystems の<strong> Java Development Kit @@JDK_VERSION@@ </strong>をインストールしていただき、ありがとうございます。 </p>
+        <p class="style1">製品登録をすると、次のような特典を受けることができます。</p>
+        <ul class="style1">
+          <li> 最新のバージョン、パッチ、および更新についての通知</li>
+          <li> Sun の開発者向け製品、サービス、およびトレーニングの特別販売 </li>
+          <li> アーリーリリースおよびドキュメントへのアクセス </li>
+        </ul>
+        <p class="style1">製品登録は無料であり、迅速で簡単です。</p>
+        <blockquote>
+          <p class="style1">必要になるのは、Sun 開発者向けネットワークアカウントまたはその他の Sun オンラインアカウントだけです。 まだアカウントがない場合は、アカウントの作成が求められます。 </p>
+          <table width="708" border="0" cellspacing="0" cellpadding="3">
+            <tr valign="top">
+              <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
+			  <input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
+                <input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"  value="JDK 製品登録">
+              </form></td>
+              <td width="570"><span class="style3">この Sun 製品を登録するには、インターネットに接続している必要があります。 </span></td>
+            </tr>
+	  </table>
+	</blockquote>
+	</td>
+	</tr>
+   <tr>
+       <td>&nbsp;</td>
+	<td bgcolor="#f1f7df">
+        <p class="style3">Sun Microsystems, Inc. は、お客様のプライバシーを尊重します。 お客様の個人情報は、お客様の Sun オンラインアカウント、お客様が Sun オンラインアカウントを使用してアクセスするサービスとアプリケーション、およびお客様が Sun オンラインアカウントで登録する製品とシステムの通信と管理に使用します。</p>
+                <p class="style3">登録の際に収集されるデータや、それらがどのように管理されるかについての詳細は、<br><a href="http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html</a> を参照してください。 <br> <br> Sun のプライバシーポリシーについての詳細は、<a href="http://jp.sun.com/privacy/">http://jp.sun.com/privacy/</a> を参照するか、<a class="moz-txt-link-rfc2396E" href="http://jp.sun.com/cgi-bin/contact/comment.cgi?url=http://jp.sun.com/privacy/">お問い合わせフォーム</a>からお問い合わせください。</p></td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>注册您的 JDK</title>
+
+<!--
+Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+CA 95054 USA or visit www.sun.com if you need additional information or
+have any questions.
+-->
+
+<style type="text/css">
+<!--
+.style1 {font-family: Arial, Helvetica, sans-serif}
+.style3 {font-family: Arial, Helvetica, sans-serif; font-size: small; }
+input.buttonblue,input.defbutton{ background: #3F6580;border-right:1px solid #304C60;border-bottom:1px solid #304C60;border-left:1px solid #BACDD9;border-top:1px solid #BACDD9; font-weight:bold; color:#FFFFFF; font-size:.8em; height:1.9em}
+input.buttonblue:hover{color:#fbe249;}
+a:link,a.named:visited{color:#3E6B8A}
+a:hover{text-decoration:underline}
+a{text-decoration:none}
+a:visited,a:visited code{color:#917E9C}
+-->
+</style></head><body>
+<table border="0" cellpadding="3" cellspacing="0" width="813">
+  <tbody><tr>
+    <td height="78" width="7">&nbsp;</td>
+    <td align="left" valign="top" width="794"><img src="@@JDK_HEADER_PNG@@" height="63" width="783"></td>
+  </tr>
+
+  <tr>
+    <td>&nbsp;</td>
+
+<td><p class="style1">感谢您安装 Sun Microsystems 的 <strong>Java Development Kit @@JDK_VERSION@@</strong>。 </p>
+<p class="style1">注册产品后您将获得如下增值服务:</p>
+        <ul class="style1">
+<li> 获得新版本、修补程序和更新的通知服务</li>
+<li> 获得有关 Sun 开发者产品、服务和培训的优惠 </li>
+<li> 获得对早期版本和文档的访问权限 </li>
+        </ul>
+<p class="style1">产品注册是免费的,即快速又轻松!</p>
+        <blockquote>
+<p class="style1">您需要具有 Sun 开发者网络或其他 Sun 联机帐户。如果您没有,系统将提示您创建一个。 </p>
+          <table width="708" border="0" cellspacing="0" cellpadding="3">
+            <tr valign="top">
+              <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
+			  <input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
+<input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"  value="注册我的 JDK">
+              </form></td>
+<td width="570"><span class="style3">您需要连接到 Internet 来注册此 Sun 产品。 </span></td>
+            </tr>
+	  </table>
+	</blockquote>
+	</td>
+	</tr>
+    <tr>
+       <td>&nbsp;</td>
+	<td bgcolor="#f1f7df">
+        <p class="style3">Sun Microsystems, Inc. 尊重您的隐私。我们会将您的个人信息用于通信和 Sun 联机帐户的管理、Sun 联机帐户访问的服务和应用程序以及用于使用 Sun 联机帐户注册的产品和系统。</p>
+<p class="style3">有关注册过程中收集的数据以及这些数据的管理方式的更多信息,<br>请访问 <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>。<br> <br>有关 Sun 隐私政策的更多信息,请访问 <a href="http://www.sun.com/privacy/">http://www.sun.com/privacy/</a> 或与 <a class="moz-txt-link-rfc2396E" href="mailto:privacy@sun.com">privacy@sun.com</a> 联系。</p></td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+    <td>&nbsp;</td>
+  </tr>
+</table>
+</body>
+</html>
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Sample Text  Sample Text
 ColorChooser.swatchesNameText=Swatches
 ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Recent:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=Red
 ColorChooser.rgbRedMnemonic=68
 ColorChooser.rgbGreenText=Green
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=Blue
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Beispieltext  Beispieltext
 ColorChooser.swatchesNameText=Muster
 ColorChooser.swatchesMnemonic=77
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Aktuell:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=Rot
 ColorChooser.rgbRedMnemonic=82
 ColorChooser.rgbGreenText=Gr\u00fcn
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=Blau
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Texto de ejemplo  Texto de ejemplo
 ColorChooser.swatchesNameText=Muestras
 ColorChooser.swatchesMnemonic=77
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Reciente:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=V
-ColorChooser.hsbBlueText=A
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=Rojo
 ColorChooser.rgbRedMnemonic=74
 ColorChooser.rgbGreenText=Verde
 ColorChooser.rgbGreenMnemonic=86
 ColorChooser.rgbBlueText=Azul
 ColorChooser.rgbBlueMnemonic=76
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Echantillon de texte  Echantillon de texte
 ColorChooser.swatchesNameText=Echantillons
 ColorChooser.swatchesMnemonic=69
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Dernier :
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=V
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RVB
 ColorChooser.rgbMnemonic=86
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=Rouge
 ColorChooser.rgbRedMnemonic=71
 ColorChooser.rgbGreenText=Vert
 ColorChooser.rgbGreenMnemonic=84
 ColorChooser.rgbBlueText=Bleu
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Testo di prova          Testo di prova
 ColorChooser.swatchesNameText=Colori campione
 ColorChooser.swatchesMnemonic=67
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Recenti:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=Rosso
 ColorChooser.rgbRedMnemonic=79
 ColorChooser.rgbGreenText=Verde
 ColorChooser.rgbGreenMnemonic=69
 ColorChooser.rgbBlueText=Blu
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=\u30b5\u30f3\u30d7\u30eb\u30c6\u30ad\u30b9\u30c8 \u30b5\u30f3\u30d7\u30eb\u30c6\u30ad\u30b9\u30c8
 ColorChooser.swatchesNameText=\u30b5\u30f3\u30d7\u30eb(S)
 ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=5
 ColorChooser.swatchesRecentText=\u6700\u65b0:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=\u8d64(D)
 ColorChooser.rgbRedMnemonic=68
 ColorChooser.rgbGreenText=\u7dd1(N)
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=\u9752(B)
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=\uc0d8\ud50c \ud14d\uc2a4\ud2b8  \uc0d8\ud50c \ud14d\uc2a4\ud2b8
 ColorChooser.swatchesNameText=\uacac\ubcf8(S)
 ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=3
 ColorChooser.swatchesRecentText=\ucd5c\uadfc \ubaa9\ub85d:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=\ube68\uac04\uc0c9(D)
 ColorChooser.rgbRedMnemonic=68
 ColorChooser.rgbGreenText=\ub179\uc0c9(N)
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=\ud30c\ub780\uc0c9(B)
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=Exempeltext  Exempeltext
 ColorChooser.swatchesNameText=Prov
 ColorChooser.swatchesMnemonic=80
-ColorChooser.swatchesDisplayedMnemonicIndex=0
 ColorChooser.swatchesRecentText=Tidigare:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=R\u00f6d
 ColorChooser.rgbRedMnemonic=82
 ColorChooser.rgbGreenText=Gr\u00f6n
 ColorChooser.rgbGreenMnemonic=71
 ColorChooser.rgbBlueText=Bl\u00e5
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=\u6837\u54c1\u6587\u672c  \u6837\u54c1\u6587\u672c
 ColorChooser.swatchesNameText=\u6837\u54c1(S)
 ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=3
 ColorChooser.swatchesRecentText=\u6700\u8fd1:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=\u7ea2
 ColorChooser.rgbRedMnemonic=68
 ColorChooser.rgbGreenText=\u7eff
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=\u84dd
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -101,30 +101,41 @@
 ColorChooser.sampleText=\u7bc4\u4f8b\u6587\u5b57  \u7bc4\u4f8b\u6587\u5b57
 ColorChooser.swatchesNameText=\u8abf\u8272\u677f(S)
 ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=4
 ColorChooser.swatchesRecentText=\u6700\u65b0\u9078\u64c7:
-ColorChooser.hsbNameText=HSB
 # Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
 # constant, and an index into the text to render the mnemonic as. The
 # mnemonic is xxxMnemonic and the index of the character to underline is
 # xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
+ColorChooser.hsvNameText=HSV
+ColorChooser.hsvMnemonic=72
+ColorChooser.hsvHueText=Hue
+ColorChooser.hsvSaturationText=Saturation
+ColorChooser.hsvValueText=Value
+ColorChooser.hsvTransparencyText=Transparency
+ColorChooser.hslNameText=HSL
+ColorChooser.hslMnemonic=76
+ColorChooser.hslHueText=Hue
+ColorChooser.hslSaturationText=Saturation
+ColorChooser.hslLightnessText=Lightness
+ColorChooser.hslTransparencyText=Transparency
 ColorChooser.rgbNameText=RGB
 ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
 ColorChooser.rgbRedText=\u7d05\u8272(D)
 ColorChooser.rgbRedMnemonic=68
 ColorChooser.rgbGreenText=\u7da0\u8272(N)
 ColorChooser.rgbGreenMnemonic=78
 ColorChooser.rgbBlueText=\u85cd\u8272(B)
 ColorChooser.rgbBlueMnemonic=66
+ColorChooser.rgbAlphaText=Alpha
+ColorChooser.rgbHexCodeText=Color Code
+ColorChooser.rgbHexCodeMnemonic=67
+ColorChooser.cmykNameText=CMYK
+ColorChooser.cmykMnemonic=77
+ColorChooser.cmykCyanText=Cyan
+ColorChooser.cmykMagentaText=Magenta
+ColorChooser.cmykYellowText=Yellow
+ColorChooser.cmykBlackText=Black
+ColorChooser.cmykAlphaText=Alpha
 
 ############ OPTION PANE STRINGS #############
 # Mnemonic keys correspond to KeyEvent.VK_XXX constant
--- a/jdk/src/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Wed Jul 05 16:42:37 2017 +0200
@@ -61,7 +61,8 @@
     private ThreadGroupReference threadGroup;
 
     // This is cached only while this one thread is suspended.  Each time
-    // the thread is resumed, we clear this and start with a fresh one.
+    // the thread is resumed, we abandon the current cache object and
+    // create a new intialized one.
     private static class LocalCache {
         JDWP.ThreadReference.Status status = null;
         List<StackFrame> frames = null;
@@ -74,6 +75,28 @@
         boolean triedCurrentContended = false;
     }
 
+    /*
+     * The localCache instance var is set by resetLocalCache to an initialized
+     * object as shown above.  This occurs when the ThreadReference
+     * object is created, and when the mirrored thread is resumed.
+     * The fields are then filled in by the relevant methods as they
+     * are called.  A problem can occur if resetLocalCache is called
+     * (ie, a resume() is executed) at certain points in the execution
+     * of some of these methods - see 6751643.  To avoid this, each
+     * method that wants to use this cache must make a local copy of
+     * this variable and use that.  This means that each invocation of
+     * these methods will use a copy of the cache object that was in
+     * effect at the point that the copy was made; if a racy resume
+     * occurs, it won't affect the method's local copy.  This means that
+     * the values returned by these calls may not match the state of
+     * the debuggee at the time the caller gets the values.  EG,
+     * frameCount() is called and comes up with 5 frames.  But before
+     * it returns this, a resume of the debuggee thread is executed in a
+     * different debugger thread.  The thread is resumed and running at
+     * the time that the value 5 is returned.  Or even worse, the thread
+     * could be suspended again and have a different number of frames, eg, 24,
+     * but this call will still return 5.
+     */
     private LocalCache localCache;
 
     private void resetLocalCache() {
@@ -129,8 +152,9 @@
     }
 
     /**
-     * Note that we only cache the name string while suspended because
-     * it can change via Thread.setName arbitrarily
+     * Note that we only cache the name string while the entire VM is suspended
+     * because the name can change via Thread.setName arbitrarily while this
+     * thread is running.
      */
     public String name() {
         String name = null;
@@ -240,19 +264,20 @@
     }
 
     private JDWP.ThreadReference.Status jdwpStatus() {
-        JDWP.ThreadReference.Status myStatus = localCache.status;
+        LocalCache snapshot = localCache;
+        JDWP.ThreadReference.Status myStatus = snapshot.status;
         try {
              if (myStatus == null) {
                  myStatus = JDWP.ThreadReference.Status.process(vm, this);
                 if ((myStatus.suspendStatus & SUSPEND_STATUS_SUSPENDED) != 0) {
                     // thread is suspended, we can cache the status.
-                    localCache.status = myStatus;
+                    snapshot.status = myStatus;
                 }
             }
          } catch (JDWPException exc) {
             throw exc.toJDIException();
         }
-         return myStatus;
+        return myStatus;
     }
 
     public int status() {
@@ -304,9 +329,10 @@
     }
 
     public int frameCount() throws IncompatibleThreadStateException  {
+        LocalCache snapshot = localCache;
         try {
-            if (localCache.frameCount == -1) {
-                localCache.frameCount = JDWP.ThreadReference.FrameCount
+            if (snapshot.frameCount == -1) {
+                snapshot.frameCount = JDWP.ThreadReference.FrameCount
                                           .process(vm, this).frameCount;
             }
         } catch (JDWPException exc) {
@@ -318,7 +344,7 @@
                 throw exc.toJDIException();
             }
         }
-        return localCache.frameCount;
+        return snapshot.frameCount;
     }
 
     public List<StackFrame> frames() throws IncompatibleThreadStateException  {
@@ -335,22 +361,22 @@
      * local is known to be non-null.  Should only be called from
      * a sync method.
      */
-    private boolean isSubrange(LocalCache localCache,
+    private boolean isSubrange(LocalCache snapshot,
                                int start, int length) {
-        if (start < localCache.framesStart) {
+        if (start < snapshot.framesStart) {
             return false;
         }
         if (length == -1) {
-            return (localCache.framesLength == -1);
+            return (snapshot.framesLength == -1);
         }
-        if (localCache.framesLength == -1) {
-            if ((start + length) > (localCache.framesStart +
-                                    localCache.frames.size())) {
+        if (snapshot.framesLength == -1) {
+            if ((start + length) > (snapshot.framesStart +
+                                    snapshot.frames.size())) {
                 throw new IndexOutOfBoundsException();
             }
             return true;
         }
-        return ((start + length) <= (localCache.framesStart + localCache.framesLength));
+        return ((start + length) <= (snapshot.framesStart + snapshot.framesLength));
     }
 
     public List<StackFrame> frames(int start, int length)
@@ -371,14 +397,14 @@
 
         // Lock must be held while creating stack frames so if that two threads
         // do this at the same time, one won't clobber the subset created by the other.
-
+        LocalCache snapshot = localCache;
         try {
-            if (localCache.frames == null || !isSubrange(localCache, start, length)) {
+            if (snapshot.frames == null || !isSubrange(snapshot, start, length)) {
                 JDWP.ThreadReference.Frames.Frame[] jdwpFrames
                     = JDWP.ThreadReference.Frames.
                     process(vm, this, start, length).frames;
                 int count = jdwpFrames.length;
-                localCache.frames = new ArrayList<StackFrame>(count);
+                snapshot.frames = new ArrayList<StackFrame>(count);
 
                 for (int i = 0; i<count; i++) {
                     if (jdwpFrames[i].location == null) {
@@ -388,20 +414,20 @@
                                                           jdwpFrames[i].frameID,
                                                           jdwpFrames[i].location);
                     // Add to the frame list
-                    localCache.frames.add(frame);
+                    snapshot.frames.add(frame);
                 }
-                localCache.framesStart = start;
-                localCache.framesLength = length;
-                return Collections.unmodifiableList(localCache.frames);
+                snapshot.framesStart = start;
+                snapshot.framesLength = length;
+                return Collections.unmodifiableList(snapshot.frames);
             } else {
-                int fromIndex = start - localCache.framesStart;
+                int fromIndex = start - snapshot.framesStart;
                 int toIndex;
                 if (length == -1) {
-                    toIndex = localCache.frames.size() - fromIndex;
+                    toIndex = snapshot.frames.size() - fromIndex;
                 } else {
                     toIndex = fromIndex + length;
                 }
-                return Collections.unmodifiableList(localCache.frames.subList(fromIndex, toIndex));
+                return Collections.unmodifiableList(snapshot.frames.subList(fromIndex, toIndex));
             }
         } catch (JDWPException exc) {
             switch (exc.errorCode()) {
@@ -415,15 +441,16 @@
     }
 
     public List<ObjectReference> ownedMonitors()  throws IncompatibleThreadStateException  {
+        LocalCache snapshot = localCache;
         try {
-            if (localCache.ownedMonitors == null) {
-                localCache.ownedMonitors = Arrays.asList(
+            if (snapshot.ownedMonitors == null) {
+                snapshot.ownedMonitors = Arrays.asList(
                                  (ObjectReference[])JDWP.ThreadReference.OwnedMonitors.
                                          process(vm, this).owned);
                 if ((vm.traceFlags & vm.TRACE_OBJREFS) != 0) {
                     vm.printTrace(description() +
                                   " temporarily caching owned monitors"+
-                                  " (count = " + localCache.ownedMonitors.size() + ")");
+                                  " (count = " + snapshot.ownedMonitors.size() + ")");
                 }
             }
         } catch (JDWPException exc) {
@@ -435,54 +462,57 @@
                 throw exc.toJDIException();
             }
         }
-        return localCache.ownedMonitors;
+        return snapshot.ownedMonitors;
     }
 
     public ObjectReference currentContendedMonitor()
                               throws IncompatibleThreadStateException  {
+        LocalCache snapshot = localCache;
         try {
-            if (localCache.contendedMonitor == null &&
-                !localCache.triedCurrentContended) {
-                localCache.contendedMonitor = JDWP.ThreadReference.CurrentContendedMonitor.
+            if (snapshot.contendedMonitor == null &&
+                !snapshot.triedCurrentContended) {
+                snapshot.contendedMonitor = JDWP.ThreadReference.CurrentContendedMonitor.
                     process(vm, this).monitor;
-                localCache.triedCurrentContended = true;
-                if ((localCache.contendedMonitor != null) &&
+                snapshot.triedCurrentContended = true;
+                if ((snapshot.contendedMonitor != null) &&
                     ((vm.traceFlags & vm.TRACE_OBJREFS) != 0)) {
                     vm.printTrace(description() +
                                   " temporarily caching contended monitor"+
-                                  " (id = " + localCache.contendedMonitor.uniqueID() + ")");
+                                  " (id = " + snapshot.contendedMonitor.uniqueID() + ")");
                 }
             }
         } catch (JDWPException exc) {
             switch (exc.errorCode()) {
+            case JDWP.Error.THREAD_NOT_SUSPENDED:
             case JDWP.Error.INVALID_THREAD:   /* zombie */
                 throw new IncompatibleThreadStateException();
             default:
                 throw exc.toJDIException();
             }
         }
-        return localCache.contendedMonitor;
+        return snapshot.contendedMonitor;
     }
 
     public List<MonitorInfo> ownedMonitorsAndFrames()  throws IncompatibleThreadStateException  {
+        LocalCache snapshot = localCache;
         try {
-            if (localCache.ownedMonitorsInfo == null) {
+            if (snapshot.ownedMonitorsInfo == null) {
                 JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.monitor[] minfo;
                 minfo = JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.process(vm, this).owned;
 
-                localCache.ownedMonitorsInfo = new ArrayList<MonitorInfo>(minfo.length);
+                snapshot.ownedMonitorsInfo = new ArrayList<MonitorInfo>(minfo.length);
 
                 for (int i=0; i < minfo.length; i++) {
                     JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.monitor mi =
                                                                          minfo[i];
                     MonitorInfo mon = new MonitorInfoImpl(vm, minfo[i].monitor, this, minfo[i].stack_depth);
-                    localCache.ownedMonitorsInfo.add(mon);
+                    snapshot.ownedMonitorsInfo.add(mon);
                 }
 
                 if ((vm.traceFlags & vm.TRACE_OBJREFS) != 0) {
                     vm.printTrace(description() +
                                   " temporarily caching owned monitors"+
-                                  " (count = " + localCache.ownedMonitorsInfo.size() + ")");
+                                  " (count = " + snapshot.ownedMonitorsInfo.size() + ")");
                     }
                 }
 
@@ -495,7 +525,7 @@
                 throw exc.toJDIException();
             }
         }
-        return localCache.ownedMonitorsInfo;
+        return snapshot.ownedMonitorsInfo;
     }
 
     public void popFrames(StackFrame frame) throws IncompatibleThreadStateException {
--- a/jdk/src/share/classes/java/awt/EventDispatchThread.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/awt/EventDispatchThread.java	Wed Jul 05 16:42:37 2017 +0200
@@ -39,6 +39,7 @@
 import java.util.logging.*;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
+import sun.awt.EventQueueDelegate;
 
 /**
  * EventDispatchThread is a package-private AWT class which takes
@@ -243,10 +244,16 @@
         try {
             AWTEvent event;
             boolean eventOK;
+            EventQueueDelegate.Delegate delegate =
+                EventQueueDelegate.getDelegate();
             do {
-                event = (id == ANY_EVENT)
-                    ? theQueue.getNextEvent()
-                    : theQueue.getNextEvent(id);
+                if (delegate != null && id == ANY_EVENT) {
+                    event = delegate.getNextEvent(theQueue);
+                } else {
+                    event = (id == ANY_EVENT)
+                        ? theQueue.getNextEvent()
+                        : theQueue.getNextEvent(id);
+                }
 
                 eventOK = true;
                 synchronized (eventFilters) {
@@ -272,7 +279,14 @@
                 eventLog.log(Level.FINEST, "Dispatching: " + event);
             }
 
+            Object handle = null;
+            if (delegate != null) {
+                handle = delegate.beforeDispatch(event);
+            }
             theQueue.dispatchEvent(event);
+            if (delegate != null) {
+                delegate.afterDispatch(event, handle);
+            }
             return true;
         }
         catch (ThreadDeath death) {
--- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Wed Jul 05 16:42:37 2017 +0200
@@ -298,7 +298,7 @@
                 oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{});
                 newL = (EventListener[])MethodUtil.invoke(m, newInstance, new Object[]{});
             }
-            catch (Throwable e2) {
+            catch (Exception e2) {
                 try {
                     Method m = type.getMethod("getListeners", new Class[]{Class.class});
                     oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{listenerType});
--- a/jdk/src/share/classes/java/beans/EventHandler.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/EventHandler.java	Wed Jul 05 16:42:37 2017 +0200
@@ -404,7 +404,7 @@
             Object newTarget = MethodUtil.invoke(getter, target, new Object[]{});
             return applyGetters(newTarget, rest);
         }
-        catch (Throwable e) {
+        catch (Exception e) {
             throw new RuntimeException("Failed to call method: " + first +
                                        " on " + target, e);
         }
--- a/jdk/src/share/classes/java/beans/MetaData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/MetaData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -650,7 +650,7 @@
         // Remove the new elements.
         // Do this first otherwise we undo the adding work.
         if (newMap != null) {
-            for ( Object newKey : newMap.keySet() ) {
+            for (Object newKey : newMap.keySet().toArray()) {
                // PENDING: This "key" is not in the right environment.
                 if (!oldMap.containsKey(newKey)) {
                     invokeStatement(oldInstance, "remove", new Object[]{newKey}, out);
@@ -986,14 +986,20 @@
         // null to defined values after the Windows are made visible -
         // special case them for now.
         if (!(oldInstance instanceof java.awt.Window)) {
-            String[] fieldNames = new String[]{"background", "foreground", "font"};
-            for(int i = 0; i < fieldNames.length; i++) {
-                String name = fieldNames[i];
-                Object oldValue = ReflectionUtils.getPrivateField(oldInstance, java.awt.Component.class, name, out.getExceptionListener());
-                Object newValue = (newInstance == null) ? null : ReflectionUtils.getPrivateField(newInstance, java.awt.Component.class, name, out.getExceptionListener());
-                if (oldValue != null && !oldValue.equals(newValue)) {
-                    invokeStatement(oldInstance, "set" + NameGenerator.capitalize(name), new Object[]{oldValue}, out);
-                }
+            Object oldBackground = c.isBackgroundSet() ? c.getBackground() : null;
+            Object newBackground = c2.isBackgroundSet() ? c2.getBackground() : null;
+            if (!MetaData.equals(oldBackground, newBackground)) {
+                invokeStatement(oldInstance, "setBackground", new Object[] { oldBackground }, out);
+            }
+            Object oldForeground = c.isForegroundSet() ? c.getForeground() : null;
+            Object newForeground = c2.isForegroundSet() ? c2.getForeground() : null;
+            if (!MetaData.equals(oldForeground, newForeground)) {
+                invokeStatement(oldInstance, "setForeground", new Object[] { oldForeground }, out);
+            }
+            Object oldFont = c.isFontSet() ? c.getFont() : null;
+            Object newFont = c2.isFontSet() ? c2.getFont() : null;
+            if (!MetaData.equals(oldFont, newFont)) {
+                invokeStatement(oldInstance, "setFont", new Object[] { oldFont }, out);
             }
         }
 
@@ -1104,26 +1110,30 @@
 
 // BorderLayout
 class java_awt_BorderLayout_PersistenceDelegate extends DefaultPersistenceDelegate {
+    private static final String[] CONSTRAINTS = {
+            BorderLayout.NORTH,
+            BorderLayout.SOUTH,
+            BorderLayout.EAST,
+            BorderLayout.WEST,
+            BorderLayout.CENTER,
+            BorderLayout.PAGE_START,
+            BorderLayout.PAGE_END,
+            BorderLayout.LINE_START,
+            BorderLayout.LINE_END,
+    };
+    @Override
     protected void initialize(Class<?> type, Object oldInstance,
                               Object newInstance, Encoder out) {
         super.initialize(type, oldInstance, newInstance, out);
-        String[] locations = {"north", "south", "east", "west", "center"};
-        String[] names = {java.awt.BorderLayout.NORTH, java.awt.BorderLayout.SOUTH,
-                          java.awt.BorderLayout.EAST, java.awt.BorderLayout.WEST,
-                          java.awt.BorderLayout.CENTER};
-        for(int i = 0; i < locations.length; i++) {
-            Object oldC = ReflectionUtils.getPrivateField(oldInstance,
-                                                          java.awt.BorderLayout.class,
-                                                          locations[i],
-                                                          out.getExceptionListener());
-            Object newC = ReflectionUtils.getPrivateField(newInstance,
-                                                          java.awt.BorderLayout.class,
-                                                          locations[i],
-                                                          out.getExceptionListener());
+        BorderLayout oldLayout = (BorderLayout) oldInstance;
+        BorderLayout newLayout = (BorderLayout) newInstance;
+        for (String constraints : CONSTRAINTS) {
+            Object oldC = oldLayout.getLayoutComponent(constraints);
+            Object newC = newLayout.getLayoutComponent(constraints);
             // Pending, assume any existing elements are OK.
             if (oldC != null && newC == null) {
                 invokeStatement(oldInstance, "addLayoutComponent",
-                                new Object[]{oldC, names[i]}, out);
+                                new Object[] { oldC, constraints }, out);
             }
         }
     }
--- a/jdk/src/share/classes/java/beans/PropertyChangeSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/PropertyChangeSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,12 +34,49 @@
 
 /**
  * This is a utility class that can be used by beans that support bound
- * properties.  You can use an instance of this class as a member field
- * of your bean and delegate various work to it.
+ * properties.  It manages a list of listeners and dispatches
+ * {@link PropertyChangeEvent}s to them.  You can use an instance of this class
+ * as a member field of your bean and delegate these types of work to it.
+ * The {@link PropertyChangeListener} can be registered for all properties
+ * or for a property specified by name.
+ * <p>
+ * Here is an example of {@code PropertyChangeSupport} usage that follows
+ * the rules and recommendations laid out in the JavaBeans&trade; specification:
+ * <pre>
+ * public class MyBean {
+ *     private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ *
+ *     public void addPropertyChangeListener(PropertyChangeListener listener) {
+ *         this.pcs.addPropertyChangeListener(listener);
+ *     }
  *
+ *     public void removePropertyChangeListener(PropertyChangeListener listener) {
+ *         this.pcs.removePropertyChangeListener(listener);
+ *     }
+ *
+ *     private String value;
+ *
+ *     public String getValue() {
+ *         return this.value;
+ *     }
+ *
+ *     public void setValue(String newValue) {
+ *         String oldValue = this.value;
+ *         this.value = newValue;
+ *         this.pcs.firePropertyChange("value", oldValue, newValue);
+ *     }
+ *
+ *     [...]
+ * }
+ * </pre>
+ * <p>
+ * A {@code PropertyChangeSupport} instance is thread-safe.
+ * <p>
  * This class is serializable.  When it is serialized it will save
  * (and restore) any listeners that are themselves serializable.  Any
  * non-serializable listeners will be skipped during serialization.
+ *
+ * @see VetoableChangeSupport
  */
 public class PropertyChangeSupport implements Serializable {
     private PropertyChangeListenerMap map = new PropertyChangeListenerMap();
@@ -208,91 +245,91 @@
     }
 
     /**
-     * Report a bound property update to any registered listeners.
-     * No event is fired if old and new are equal and non-null.
-     *
+     * Reports a bound property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * No event is fired if old and new values are equal and non-null.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * firePropertyChange method that takes {@code
-     * PropertyChangeEvent} value.
+     * {@link #firePropertyChange(PropertyChangeEvent)} method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that was changed.
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      */
-    public void firePropertyChange(String propertyName,
-                                        Object oldValue, Object newValue) {
-        if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
-            return;
+    public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
+        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
+            firePropertyChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue));
         }
-        firePropertyChange(new PropertyChangeEvent(source, propertyName,
-                                                   oldValue, newValue));
     }
 
     /**
-     * Report an int bound property update to any registered listeners.
-     * No event is fired if old and new are equal.
+     * Reports an integer bound property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * firePropertyChange method that takes Object values.
+     * {@link #firePropertyChange(String, Object, Object)}  method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that was changed.
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      */
-    public void firePropertyChange(String propertyName,
-                                        int oldValue, int newValue) {
-        if (oldValue == newValue) {
-            return;
+    public void firePropertyChange(String propertyName, int oldValue, int newValue) {
+        if (oldValue != newValue) {
+            firePropertyChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
         }
-        firePropertyChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
     }
 
     /**
-     * Report a boolean bound property update to any registered listeners.
-     * No event is fired if old and new are equal.
+     * Reports a boolean bound property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * firePropertyChange method that takes Object values.
+     * {@link #firePropertyChange(String, Object, Object)}  method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that was changed.
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      */
-    public void firePropertyChange(String propertyName,
-                                        boolean oldValue, boolean newValue) {
-        if (oldValue == newValue) {
-            return;
+    public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
+        if (oldValue != newValue) {
+            firePropertyChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
         }
-        firePropertyChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
     }
 
     /**
-     * Fire an existing PropertyChangeEvent to any registered listeners.
-     * No event is fired if the given event's old and new values are
-     * equal and non-null.
-     * @param evt  The PropertyChangeEvent object.
+     * Fires a property change event to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * No event is fired if the given event's old and new values are equal and non-null.
+     *
+     * @param event  the {@code PropertyChangeEvent} to be fired
      */
-    public void firePropertyChange(PropertyChangeEvent evt) {
-        Object oldValue = evt.getOldValue();
-        Object newValue = evt.getNewValue();
-        String propertyName = evt.getPropertyName();
-        if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
-            return;
+    public void firePropertyChange(PropertyChangeEvent event) {
+        Object oldValue = event.getOldValue();
+        Object newValue = event.getNewValue();
+        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
+            String name = event.getPropertyName();
+
+            PropertyChangeListener[] common = this.map.get(null);
+            PropertyChangeListener[] named = (name != null)
+                        ? this.map.get(name)
+                        : null;
+
+            fire(common, event);
+            fire(named, event);
         }
-        PropertyChangeListener[] common = this.map.get(null);
-        PropertyChangeListener[] named = (propertyName != null)
-                    ? this.map.get(propertyName)
-                    : null;
-
-        fire(common, evt);
-        fire(named, evt);
     }
 
-    private void fire(PropertyChangeListener[] listeners, PropertyChangeEvent event) {
+    private static void fire(PropertyChangeListener[] listeners, PropertyChangeEvent event) {
         if (listeners != null) {
             for (PropertyChangeListener listener : listeners) {
                 listener.propertyChange(event);
@@ -301,78 +338,69 @@
     }
 
     /**
-     * Report a bound indexed property update to any registered
-     * listeners.
+     * Reports a bound indexed property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
      * <p>
-     * No event is fired if old and new values are equal
-     * and non-null.
-     *
+     * No event is fired if old and new values are equal and non-null.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * firePropertyChange method that takes {@code PropertyChangeEvent} value.
+     * {@link #firePropertyChange(PropertyChangeEvent)} method.
      *
-     * @param propertyName The programmatic name of the property that
-     *                     was changed.
-     * @param index        index of the property element that was changed.
-     * @param oldValue     The old value of the property.
-     * @param newValue     The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param index         the index of the property element that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      * @since 1.5
      */
-    public void fireIndexedPropertyChange(String propertyName, int index,
-                                          Object oldValue, Object newValue) {
-        firePropertyChange(new IndexedPropertyChangeEvent
-            (source, propertyName, oldValue, newValue, index));
+    public void fireIndexedPropertyChange(String propertyName, int index, Object oldValue, Object newValue) {
+        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
+            firePropertyChange(new IndexedPropertyChangeEvent(source, propertyName, oldValue, newValue, index));
+        }
     }
 
     /**
-     * Report an <code>int</code> bound indexed property update to any registered
-     * listeners.
+     * Reports an integer bound indexed property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
      * <p>
      * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * fireIndexedPropertyChange method which takes Object values.
+     * {@link #fireIndexedPropertyChange(String, int, Object, Object)} method.
      *
-     * @param propertyName The programmatic name of the property that
-     *                     was changed.
-     * @param index        index of the property element that was changed.
-     * @param oldValue     The old value of the property.
-     * @param newValue     The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param index         the index of the property element that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      * @since 1.5
      */
-    public void fireIndexedPropertyChange(String propertyName, int index,
-                                          int oldValue, int newValue) {
-        if (oldValue == newValue) {
-            return;
+    public void fireIndexedPropertyChange(String propertyName, int index, int oldValue, int newValue) {
+        if (oldValue != newValue) {
+            fireIndexedPropertyChange(propertyName, index, Integer.valueOf(oldValue), Integer.valueOf(newValue));
         }
-        fireIndexedPropertyChange(propertyName, index,
-                                  Integer.valueOf(oldValue),
-                                  Integer.valueOf(newValue));
     }
 
     /**
-     * Report a <code>boolean</code> bound indexed property update to any
-     * registered listeners.
+     * Reports a boolean bound indexed property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
      * <p>
      * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * fireIndexedPropertyChange method which takes Object values.
+     * {@link #fireIndexedPropertyChange(String, int, Object, Object)} method.
      *
-     * @param propertyName The programmatic name of the property that
-     *                     was changed.
-     * @param index        index of the property element that was changed.
-     * @param oldValue     The old value of the property.
-     * @param newValue     The new value of the property.
+     * @param propertyName  the programmatic name of the property that was changed
+     * @param index         the index of the property element that was changed
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
      * @since 1.5
      */
-    public void fireIndexedPropertyChange(String propertyName, int index,
-                                          boolean oldValue, boolean newValue) {
-        if (oldValue == newValue) {
-            return;
+    public void fireIndexedPropertyChange(String propertyName, int index, boolean oldValue, boolean newValue) {
+        if (oldValue != newValue) {
+            fireIndexedPropertyChange(propertyName, index, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
         }
-        fireIndexedPropertyChange(propertyName, index, Boolean.valueOf(oldValue),
-                                  Boolean.valueOf(newValue));
     }
 
     /**
--- a/jdk/src/share/classes/java/beans/PropertyEditor.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/PropertyEditor.java	Wed Jul 05 16:42:37 2017 +0200
@@ -204,20 +204,21 @@
     //----------------------------------------------------------------------
 
     /**
-     * Register a listener for the PropertyChange event.  When a
-     * PropertyEditor changes its value it should fire a PropertyChange
-     * event on all registered PropertyChangeListeners, specifying the
-     * null value for the property name and itself as the source.
+     * Adds a listener for the value change.
+     * When the property editor changes its value
+     * it should fire a {@link PropertyChangeEvent}
+     * on all registered {@link PropertyChangeListener}s,
+     * specifying the {@code null} value for the property name
+     * and itself as the source.
      *
-     * @param listener  An object to be invoked when a PropertyChange
-     *          event is fired.
+     * @param listener  the {@link PropertyChangeListener} to add
      */
     void addPropertyChangeListener(PropertyChangeListener listener);
 
     /**
-     * Remove a listener for the PropertyChange event.
+     * Removes a listener for the value change.
      *
-     * @param listener  The PropertyChange listener to be removed.
+     * @param listener  the {@link PropertyChangeListener} to remove
      */
     void removePropertyChangeListener(PropertyChangeListener listener);
 
--- a/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/PropertyEditorManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 
 package java.beans;
 
+import com.sun.beans.WeakCache;
 import sun.beans.editors.*;
 
 /**
@@ -55,32 +56,30 @@
 public class PropertyEditorManager {
 
     /**
-     * Register an editor class to be used to edit values of
-     * a given target class.
-     *
-     * <p>First, if there is a security manager, its <code>checkPropertiesAccess</code>
-     * method is called. This could result in a SecurityException.
+     * Registers an editor class to edit values of the given target class.
+     * If the editor class is {@code null},
+     * then any existing definition will be removed.
+     * Thus this method can be used to cancel the registration.
+     * The registration is canceled automatically
+     * if either the target or editor class is unloaded.
+     * <p>
+     * If there is a security manager, its {@code checkPropertiesAccess}
+     * method is called. This could result in a {@linkplain SecurityException}.
      *
-     * @param targetType the Class object of the type to be edited
-     * @param editorClass the Class object of the editor class.  If
-     *     this is null, then any existing definition will be removed.
-     * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkPropertiesAccess</code> method doesn't allow setting
-     *              of system properties.
+     * @param targetType   the class object of the type to be edited
+     * @param editorClass  the class object of the editor class
+     * @throws SecurityException  if a security manager exists and
+     *                            its {@code checkPropertiesAccess} method
+     *                            doesn't allow setting of system properties
+     *
      * @see SecurityManager#checkPropertiesAccess
      */
-
-    public static void registerEditor(Class<?> targetType, Class<?> editorClass) {
+    public static synchronized void registerEditor(Class<?> targetType, Class<?> editorClass) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        initialize();
-        if (editorClass == null) {
-            registry.remove(targetType);
-        } else {
-            registry.put(targetType, editorClass);
-        }
+        registry.put(targetType, editorClass);
     }
 
     /**
@@ -90,10 +89,8 @@
      * @return An editor object for the given target class.
      * The result is null if no suitable editor can be found.
      */
-
     public static synchronized PropertyEditor findEditor(Class<?> targetType) {
-        initialize();
-        Class editorClass = (Class)registry.get(targetType);
+        Class editorClass = registry.get(targetType);
         if (editorClass != null) {
             try {
                 Object o = editorClass.newInstance();
@@ -143,10 +140,7 @@
      *         e.g. Sun implementation initially sets to  {"sun.beans.editors"}.
      */
     public static synchronized String[] getEditorSearchPath() {
-        // Return a copy of the searchPath.
-        String result[] = new String[searchPath.length];
-        System.arraycopy(searchPath, 0, result, 0, searchPath.length);
-        return result;
+        return searchPath.clone();
     }
 
     /**
@@ -162,23 +156,22 @@
      *              of system properties.
      * @see SecurityManager#checkPropertiesAccess
      */
-
-    public static synchronized void setEditorSearchPath(String path[]) {
+    public static synchronized void setEditorSearchPath(String[] path) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        if (path == null) {
-            path = new String[0];
-        }
-        searchPath = path;
+        searchPath = (path != null)
+                ? path.clone()
+                : EMPTY;
     }
 
-    private static synchronized void initialize() {
-        if (registry != null) {
-            return;
-        }
-        registry = new java.util.Hashtable();
+    private static String[] searchPath = { "sun.beans.editors" };
+    private static final String[] EMPTY = {};
+    private static final WeakCache<Class<?>, Class<?>> registry;
+
+    static {
+        registry = new WeakCache<Class<?>, Class<?>>();
         registry.put(Byte.TYPE, ByteEditor.class);
         registry.put(Short.TYPE, ShortEditor.class);
         registry.put(Integer.TYPE, IntegerEditor.class);
@@ -187,7 +180,4 @@
         registry.put(Float.TYPE, FloatEditor.class);
         registry.put(Double.TYPE, DoubleEditor.class);
     }
-
-    private static String[] searchPath = { "sun.beans.editors" };
-    private static java.util.Hashtable registry;
 }
--- a/jdk/src/share/classes/java/beans/PropertyEditorSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/PropertyEditorSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -233,11 +233,20 @@
     //----------------------------------------------------------------------
 
     /**
-     * Register a listener for the PropertyChange event.  The class will
-     * fire a PropertyChange value whenever the value is updated.
+     * Adds a listener for the value change.
+     * When the property editor changes its value
+     * it should fire a {@link PropertyChangeEvent}
+     * on all registered {@link PropertyChangeListener}s,
+     * specifying the {@code null} value for the property name.
+     * If the source property is set,
+     * it should be used as the source of the event.
+     * <p>
+     * The same listener object may be added more than once,
+     * and will be called as many times as it is added.
+     * If {@code listener} is {@code null},
+     * no exception is thrown and no action is taken.
      *
-     * @param listener  An object to be invoked when a PropertyChange
-     *          event is fired.
+     * @param listener  the {@link PropertyChangeListener} to add
      */
     public synchronized void addPropertyChangeListener(
                                 PropertyChangeListener listener) {
@@ -248,9 +257,14 @@
     }
 
     /**
-     * Remove a listener for the PropertyChange event.
+     * Removes a listener for the value change.
+     * <p>
+     * If the same listener was added more than once,
+     * it will be notified one less time after being removed.
+     * If {@code listener} is {@code null}, or was never added,
+     * no exception is thrown and no action is taken.
      *
-     * @param listener  The PropertyChange listener to be removed.
+     * @param listener  the {@link PropertyChangeListener} to remove
      */
     public synchronized void removePropertyChangeListener(
                                 PropertyChangeListener listener) {
--- a/jdk/src/share/classes/java/beans/VetoableChangeSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/beans/VetoableChangeSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,12 +34,49 @@
 
 /**
  * This is a utility class that can be used by beans that support constrained
- * properties.  You can use an instance of this class as a member field
- * of your bean and delegate various work to it.
+ * properties.  It manages a list of listeners and dispatches
+ * {@link PropertyChangeEvent}s to them.  You can use an instance of this class
+ * as a member field of your bean and delegate these types of work to it.
+ * The {@link VetoableChangeListener} can be registered for all properties
+ * or for a property specified by name.
+ * <p>
+ * Here is an example of {@code VetoableChangeSupport} usage that follows
+ * the rules and recommendations laid out in the JavaBeans&trade; specification:
+ * <pre>
+ * public class MyBean {
+ *     private final VetoableChangeSupport vcs = new VetoableChangeSupport(this);
+ *
+ *     public void addVetoableChangeListener(VetoableChangeListener listener) {
+ *         this.vcs.addVetoableChangeListener(listener);
+ *     }
  *
+ *     public void removeVetoableChangeListener(VetoableChangeListener listener) {
+ *         this.vcs.removeVetoableChangeListener(listener);
+ *     }
+ *
+ *     private String value;
+ *
+ *     public String getValue() {
+ *         return this.value;
+ *     }
+ *
+ *     public void setValue(String newValue) throws PropertyVetoException {
+ *         String oldValue = this.value;
+ *         this.vcs.fireVetoableChange("value", oldValue, newValue);
+ *         this.value = newValue;
+ *     }
+ *
+ *     [...]
+ * }
+ * </pre>
+ * <p>
+ * A {@code VetoableChangeSupport} instance is thread-safe.
+ * <p>
  * This class is serializable.  When it is serialized it will save
  * (and restore) any listeners that are themselves serializable.  Any
  * non-serializable listeners will be skipped during serialization.
+ *
+ * @see PropertyChangeSupport
  */
 public class VetoableChangeSupport implements Serializable {
     private VetoableChangeListenerMap map = new VetoableChangeListenerMap();
@@ -208,126 +245,149 @@
     }
 
     /**
-     * Report a vetoable property update to any registered listeners.  If
-     * anyone vetos the change, then fire a new event reverting everyone to
-     * the old value and then rethrow the PropertyVetoException.
+     * Reports a constrained property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
      * <p>
-     * No event is fired if old and new are equal and non-null.
+     * Any listener can throw a {@code PropertyVetoException} to veto the update.
+     * If one of the listeners vetoes the update, this method passes
+     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
+     * to all listeners that already confirmed this update
+     * and throws the {@code PropertyVetoException} again.
+     * <p>
+     * No event is fired if old and new values are equal and non-null.
+     * <p>
+     * This is merely a convenience wrapper around the more general
+     * {@link #fireVetoableChange(PropertyChangeEvent)} method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that is about to change..
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
-     * @exception PropertyVetoException if the recipient wishes the property
-     *              change to be rolled back.
+     * @param propertyName  the programmatic name of the property that is about to change
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
+     * @throws PropertyVetoException if one of listeners vetoes the property update
      */
-    public void fireVetoableChange(String propertyName,
-                                        Object oldValue, Object newValue)
-                                        throws PropertyVetoException {
-        if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
-            return;
+    public void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
+            throws PropertyVetoException {
+        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
+            fireVetoableChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue));
         }
-        PropertyChangeEvent evt = new PropertyChangeEvent(source, propertyName,
-                                                            oldValue, newValue);
-        fireVetoableChange(evt);
     }
 
     /**
-     * Report a int vetoable property update to any registered listeners.
-     * No event is fired if old and new are equal.
+     * Reports an integer constrained property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * Any listener can throw a {@code PropertyVetoException} to veto the update.
+     * If one of the listeners vetoes the update, this method passes
+     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
+     * to all listeners that already confirmed this update
+     * and throws the {@code PropertyVetoException} again.
+     * <p>
+     * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * fireVetoableChange method that takes Object values.
+     * {@link #fireVetoableChange(String, Object, Object)} method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that is about to change.
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
+     * @param propertyName  the programmatic name of the property that is about to change
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
+     * @throws PropertyVetoException if one of listeners vetoes the property update
      */
-    public void fireVetoableChange(String propertyName,
-                                        int oldValue, int newValue)
-                                        throws PropertyVetoException {
-        if (oldValue == newValue) {
-            return;
+    public void fireVetoableChange(String propertyName, int oldValue, int newValue)
+            throws PropertyVetoException {
+        if (oldValue != newValue) {
+            fireVetoableChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
         }
-        fireVetoableChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
     }
 
     /**
-     * Report a boolean vetoable property update to any registered listeners.
-     * No event is fired if old and new are equal.
+     * Reports a boolean constrained property update to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
+     * <p>
+     * Any listener can throw a {@code PropertyVetoException} to veto the update.
+     * If one of the listeners vetoes the update, this method passes
+     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
+     * to all listeners that already confirmed this update
+     * and throws the {@code PropertyVetoException} again.
+     * <p>
+     * No event is fired if old and new values are equal.
      * <p>
      * This is merely a convenience wrapper around the more general
-     * fireVetoableChange method that takes Object values.
+     * {@link #fireVetoableChange(String, Object, Object)} method.
      *
-     * @param propertyName  The programmatic name of the property
-     *          that is about to change.
-     * @param oldValue  The old value of the property.
-     * @param newValue  The new value of the property.
+     * @param propertyName  the programmatic name of the property that is about to change
+     * @param oldValue      the old value of the property
+     * @param newValue      the new value of the property
+     * @throws PropertyVetoException if one of listeners vetoes the property update
      */
-    public void fireVetoableChange(String propertyName,
-                                        boolean oldValue, boolean newValue)
-                                        throws PropertyVetoException {
-        if (oldValue == newValue) {
-            return;
+    public void fireVetoableChange(String propertyName, boolean oldValue, boolean newValue)
+            throws PropertyVetoException {
+        if (oldValue != newValue) {
+            fireVetoableChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
         }
-        fireVetoableChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
     }
 
     /**
-     * Fire a vetoable property update to any registered listeners.  If
-     * anyone vetos the change, then fire a new event reverting everyone to
-     * the old value and then rethrow the PropertyVetoException.
+     * Fires a property change event to listeners
+     * that have been registered to track updates of
+     * all properties or a property with the specified name.
      * <p>
-     * No event is fired if old and new are equal and non-null.
+     * Any listener can throw a {@code PropertyVetoException} to veto the update.
+     * If one of the listeners vetoes the update, this method passes
+     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
+     * to all listeners that already confirmed this update
+     * and throws the {@code PropertyVetoException} again.
+     * <p>
+     * No event is fired if the given event's old and new values are equal and non-null.
      *
-     * @param evt  The PropertyChangeEvent to be fired.
-     * @exception PropertyVetoException if the recipient wishes the property
-     *              change to be rolled back.
+     * @param event  the {@code PropertyChangeEvent} to be fired
+     * @throws PropertyVetoException if one of listeners vetoes the property update
      */
-    public void fireVetoableChange(PropertyChangeEvent evt)
-                                        throws PropertyVetoException {
+    public void fireVetoableChange(PropertyChangeEvent event)
+            throws PropertyVetoException {
+        Object oldValue = event.getOldValue();
+        Object newValue = event.getNewValue();
+        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
+            String name = event.getPropertyName();
 
-        Object oldValue = evt.getOldValue();
-        Object newValue = evt.getNewValue();
-        String propertyName = evt.getPropertyName();
-        if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
-            return;
-        }
-        VetoableChangeListener[] common = this.map.get(null);
-        VetoableChangeListener[] named = (propertyName != null)
-                    ? this.map.get(propertyName)
-                    : null;
-        fire(common, evt);
-        fire(named, evt);
-    }
+            VetoableChangeListener[] common = this.map.get(null);
+            VetoableChangeListener[] named = (name != null)
+                        ? this.map.get(name)
+                        : null;
 
-    private void fire(VetoableChangeListener[] listeners, PropertyChangeEvent event) throws PropertyVetoException {
-        if (listeners != null) {
-            VetoableChangeListener current = null;
-            try {
-                for (VetoableChangeListener listener : listeners) {
-                    current = listener;
-                    listener.vetoableChange(event);
-                }
-            } catch (PropertyVetoException veto) {
-                // Create an event to revert everyone to the old value.
-                event = new PropertyChangeEvent( this.source,
-                                                 event.getPropertyName(),
-                                                 event.getNewValue(),
-                                                 event.getOldValue() );
-                for (VetoableChangeListener listener : listeners) {
-                    if (current == listener) {
-                        break;
-                    }
-                    try {
-                        listener.vetoableChange(event);
-                    } catch (PropertyVetoException ex) {
-                         // We just ignore exceptions that occur during reversions.
+            VetoableChangeListener[] listeners;
+            if (common == null) {
+                listeners = named;
+            }
+            else if (named == null) {
+                listeners = common;
+            }
+            else {
+                listeners = new VetoableChangeListener[common.length + named.length];
+                System.arraycopy(common, 0, listeners, 0, common.length);
+                System.arraycopy(named, 0, listeners, common.length, named.length);
+            }
+            if (listeners != null) {
+                int current = 0;
+                try {
+                    while (current < listeners.length) {
+                        listeners[current].vetoableChange(event);
+                        current++;
                     }
                 }
-                // And now rethrow the PropertyVetoException.
-                throw veto;
+                catch (PropertyVetoException veto) {
+                    event = new PropertyChangeEvent(this.source, name, newValue, oldValue);
+                    for (int i = 0; i < current; i++) {
+                        try {
+                            listeners[i].vetoableChange(event);
+                        }
+                        catch (PropertyVetoException exception) {
+                            // ignore exceptions that occur during rolling back
+                        }
+                    }
+                    throw veto; // rethrow the veto exception
+                }
             }
         }
     }
--- a/jdk/src/share/classes/java/io/CharConversionException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/CharConversionException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
 public class CharConversionException
     extends java.io.IOException
 {
+    private static final long serialVersionUID = -8680016352018427031L;
+
     /**
      * This provides no detailed message.
      */
--- a/jdk/src/share/classes/java/io/EOFException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/EOFException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,8 @@
  */
 public
 class EOFException extends IOException {
+    private static final long serialVersionUID = 6433858223774886977L;
+
     /**
      * Constructs an <code>EOFException</code> with <code>null</code>
      * as its error detail message.
--- a/jdk/src/share/classes/java/io/FileNotFoundException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/FileNotFoundException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,7 @@
  */
 
 public class FileNotFoundException extends IOException {
+    private static final long serialVersionUID = -897856973823710492L;
 
     /**
      * Constructs a <code>FileNotFoundException</code> with
--- a/jdk/src/share/classes/java/io/InterruptedIOException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/InterruptedIOException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,8 @@
  */
 public
 class InterruptedIOException extends IOException {
+    private static final long serialVersionUID = 4020568460727500567L;
+
     /**
      * Constructs an <code>InterruptedIOException</code> with
      * <code>null</code> as its error detail message.
--- a/jdk/src/share/classes/java/io/SyncFailedException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/SyncFailedException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @since   JDK1.1
  */
 public class SyncFailedException extends IOException {
+    private static final long serialVersionUID = -2353342684412443330L;
+
     /**
      * Constructs an SyncFailedException with a detail message.
      * A detail message is a String that describes this particular exception.
--- a/jdk/src/share/classes/java/io/UTFDataFormatException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/UTFDataFormatException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,8 @@
  */
 public
 class UTFDataFormatException extends IOException {
+    private static final long serialVersionUID = 420743449228280612L;
+
     /**
      * Constructs a <code>UTFDataFormatException</code> with
      * <code>null</code> as its error detail message.
--- a/jdk/src/share/classes/java/io/UnsupportedEncodingException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/io/UnsupportedEncodingException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
 public class UnsupportedEncodingException
     extends IOException
 {
+    private static final long serialVersionUID = -4274276298326136670L;
+
     /**
      * Constructs an UnsupportedEncodingException without a detail message.
      */
--- a/jdk/src/share/classes/java/lang/AbstractMethodError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/AbstractMethodError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  */
 public
 class AbstractMethodError extends IncompatibleClassChangeError {
+    private static final long serialVersionUID = -1654391082989018462L;
+
     /**
      * Constructs an <code>AbstractMethodError</code> with no detail  message.
      */
--- a/jdk/src/share/classes/java/lang/ArithmeticException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ArithmeticException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class ArithmeticException extends RuntimeException {
+    private static final long serialVersionUID = 2256477558314496007L;
+
     /**
      * Constructs an <code>ArithmeticException</code> with no detail
      * message.
--- a/jdk/src/share/classes/java/lang/ArrayIndexOutOfBoundsException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ArrayIndexOutOfBoundsException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
+    private static final long serialVersionUID = -5116101128118950844L;
+
     /**
      * Constructs an <code>ArrayIndexOutOfBoundsException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/ArrayStoreException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ArrayStoreException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,8 @@
  */
 public
 class ArrayStoreException extends RuntimeException {
+    private static final long serialVersionUID = -4522193890499838241L;
+
     /**
      * Constructs an <code>ArrayStoreException</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/AssertionError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/AssertionError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,8 @@
  * @since   1.4
  */
 public class AssertionError extends Error {
+    private static final long serialVersionUID = -5013299493970297370L;
+
     /**
      * Constructs an AssertionError with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/ClassCastException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ClassCastException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,8 @@
  */
 public
 class ClassCastException extends RuntimeException {
+    private static final long serialVersionUID = -9223365651070458532L;
+
     /**
      * Constructs a <code>ClassCastException</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/ClassCircularityError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ClassCircularityError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  * @since      JDK1.0
  */
 public class ClassCircularityError extends LinkageError {
+    private static final long serialVersionUID = 1054362542914539689L;
+
     /**
      * Constructs a {@code ClassCircularityError} with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/ClassFormatError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ClassFormatError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class ClassFormatError extends LinkageError {
+    private static final long serialVersionUID = -8420114879011949195L;
+
     /**
      * Constructs a <code>ClassFormatError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/CloneNotSupportedException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/CloneNotSupportedException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,8 @@
 
 public
 class CloneNotSupportedException extends Exception {
+    private static final long serialVersionUID = 5195511250079656443L;
+
     /**
      * Constructs a <code>CloneNotSupportedException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/EnumConstantNotPresentException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/EnumConstantNotPresentException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  * @since   1.5
  */
 public class EnumConstantNotPresentException extends RuntimeException {
+    private static final long serialVersionUID = -6046998521960521108L;
+
     /**
      * The type of the missing enum constant.
      */
--- a/jdk/src/share/classes/java/lang/IllegalAccessError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IllegalAccessError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  * @since   JDK1.0
  */
 public class IllegalAccessError extends IncompatibleClassChangeError {
+    private static final long serialVersionUID = -8988904074992417891L;
+
     /**
      * Constructs an <code>IllegalAccessError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/IllegalAccessException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IllegalAccessException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,6 +57,8 @@
  * @since   JDK1.0
  */
 public class IllegalAccessException extends Exception {
+    private static final long serialVersionUID = 6616958222490762034L;
+
     /**
      * Constructs an <code>IllegalAccessException</code> without a
      * detail message.
--- a/jdk/src/share/classes/java/lang/IllegalMonitorStateException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IllegalMonitorStateException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
  */
 public
 class IllegalMonitorStateException extends RuntimeException {
+    private static final long serialVersionUID = 3713306369498869069L;
+
     /**
      * Constructs an <code>IllegalMonitorStateException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/IllegalThreadStateException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IllegalThreadStateException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  * @since   JDK1.0
  */
 public class IllegalThreadStateException extends IllegalArgumentException {
+    private static final long serialVersionUID = -7626246362397460174L;
+
     /**
      * Constructs an <code>IllegalThreadStateException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/IncompatibleClassChangeError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IncompatibleClassChangeError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class IncompatibleClassChangeError extends LinkageError {
+    private static final long serialVersionUID = -4914975503642802119L;
+
     /**
      * Constructs an <code>IncompatibleClassChangeError</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/IndexOutOfBoundsException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/IndexOutOfBoundsException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
  */
 public
 class IndexOutOfBoundsException extends RuntimeException {
+    private static final long serialVersionUID = 234122996006267687L;
+
     /**
      * Constructs an <code>IndexOutOfBoundsException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/InstantiationError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/InstantiationError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
 
 public
 class InstantiationError extends IncompatibleClassChangeError {
+    private static final long serialVersionUID = -4885810657349421204L;
+
     /**
      * Constructs an <code>InstantiationError</code> with no detail  message.
      */
--- a/jdk/src/share/classes/java/lang/InstantiationException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/InstantiationException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,8 @@
  */
 public
 class InstantiationException extends Exception {
+    private static final long serialVersionUID = -8441929162975509110L;
+
     /**
      * Constructs an {@code InstantiationException} with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/InternalError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/InternalError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  */
 public
 class InternalError extends VirtualMachineError {
+    private static final long serialVersionUID = -9062593416125562365L;
+
     /**
      * Constructs an <code>InternalError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/InterruptedException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/InterruptedException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,6 +48,8 @@
  */
 public
 class InterruptedException extends Exception {
+    private static final long serialVersionUID = 6700697376100628473L;
+
     /**
      * Constructs an <code>InterruptedException</code> with no detail  message.
      */
--- a/jdk/src/share/classes/java/lang/LinkageError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/LinkageError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
  */
 public
 class LinkageError extends Error {
+    private static final long serialVersionUID = 3579600108157160122L;
+
     /**
      * Constructs a <code>LinkageError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/NegativeArraySizeException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NegativeArraySizeException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  */
 public
 class NegativeArraySizeException extends RuntimeException {
+    private static final long serialVersionUID = -8960118058596991861L;
+
     /**
      * Constructs a <code>NegativeArraySizeException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/NoClassDefFoundError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NoClassDefFoundError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
  */
 public
 class NoClassDefFoundError extends LinkageError {
+    private static final long serialVersionUID = 9095859863287012458L;
+
     /**
      * Constructs a <code>NoClassDefFoundError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/NoSuchFieldError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NoSuchFieldError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,8 @@
  */
 public
 class NoSuchFieldError extends IncompatibleClassChangeError {
+    private static final long serialVersionUID = -3456430195886129035L;
+
     /**
      * Constructs a <code>NoSuchFieldException</code> with no detail  message.
      */
--- a/jdk/src/share/classes/java/lang/NoSuchFieldException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NoSuchFieldException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
  * @since   JDK1.1
  */
 public class NoSuchFieldException extends Exception {
+    private static final long serialVersionUID = -6143714805279938260L;
+
     /**
      * Constructor.
      */
--- a/jdk/src/share/classes/java/lang/NoSuchMethodError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NoSuchMethodError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1998 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,8 @@
  */
 public
 class NoSuchMethodError extends IncompatibleClassChangeError {
+    private static final long serialVersionUID = -3765521442372831335L;
+
     /**
      * Constructs a <code>NoSuchMethodError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/NoSuchMethodException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NoSuchMethodException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  */
 public
 class NoSuchMethodException extends Exception {
+    private static final long serialVersionUID = 5034388446362600923L;
+
     /**
      * Constructs a <code>NoSuchMethodException</code> without a detail message.
      */
--- a/jdk/src/share/classes/java/lang/NullPointerException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/NullPointerException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,8 @@
  */
 public
 class NullPointerException extends RuntimeException {
+    private static final long serialVersionUID = 5162710183389028792L;
+
     /**
      * Constructs a <code>NullPointerException</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/OutOfMemoryError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/OutOfMemoryError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class OutOfMemoryError extends VirtualMachineError {
+    private static final long serialVersionUID = 8228564086184010517L;
+
     /**
      * Constructs an <code>OutOfMemoryError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/StackOverflowError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/StackOverflowError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  */
 public
 class StackOverflowError extends VirtualMachineError {
+    private static final long serialVersionUID = 8609175038441759607L;
+
     /**
      * Constructs a <code>StackOverflowError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/StringIndexOutOfBoundsException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/StringIndexOutOfBoundsException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  */
 public
 class StringIndexOutOfBoundsException extends IndexOutOfBoundsException {
+    private static final long serialVersionUID = -6762910422159637258L;
+
     /**
      * Constructs a <code>StringIndexOutOfBoundsException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/ThreadDeath.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/ThreadDeath.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,4 +46,6 @@
  * @since   JDK1.0
  */
 
-public class ThreadDeath extends Error {}
+public class ThreadDeath extends Error {
+    private static final long serialVersionUID = -4417128565033088268L;
+}
--- a/jdk/src/share/classes/java/lang/TypeNotPresentException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/TypeNotPresentException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
  * @since 1.5
  */
 public class TypeNotPresentException extends RuntimeException {
+    private static final long serialVersionUID = -5101214195716534496L;
+
     private String typeName;
 
     /**
--- a/jdk/src/share/classes/java/lang/UnknownError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/UnknownError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  */
 public
 class UnknownError extends VirtualMachineError {
+    private static final long serialVersionUID = 2524784860676771849L;
+
     /**
      * Constructs an <code>UnknownError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/UnsatisfiedLinkError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/UnsatisfiedLinkError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class UnsatisfiedLinkError extends LinkageError {
+    private static final long serialVersionUID = -4019343241616879428L;
+
     /**
      * Constructs an <code>UnsatisfiedLinkError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/UnsupportedClassVersionError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/UnsupportedClassVersionError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  */
 public
 class UnsupportedClassVersionError extends ClassFormatError {
+    private static final long serialVersionUID = -7123279212883497373L;
+
     /**
      * Constructs a <code>UnsupportedClassVersionError</code>
      * with no detail message.
--- a/jdk/src/share/classes/java/lang/VerifyError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/VerifyError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class VerifyError extends LinkageError {
+    private static final long serialVersionUID = 7001962396098498785L;
+
     /**
      * Constructs an <code>VerifyError</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/lang/annotation/AnnotationFormatError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/annotation/AnnotationFormatError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  * @since   1.5
  */
 public class AnnotationFormatError extends Error {
+    private static final long serialVersionUID = -4256701562333669892L;
+
     /**
      * Constructs a new <tt>AnnotationFormatError</tt> with the specified
      * detail message.
--- a/jdk/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  * @since 1.5
  */
 public class AnnotationTypeMismatchException extends RuntimeException {
+    private static final long serialVersionUID = 8125925355765570191L;
+
     /**
      * The <tt>Method</tt> object for the annotation element.
      */
--- a/jdk/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  * @since 1.5
  */
 public class IncompleteAnnotationException extends RuntimeException {
+    private static final long serialVersionUID = 8445097402741811912L;
+
     private Class annotationType;
     private String elementName;
 
--- a/jdk/src/share/classes/java/lang/instrument/IllegalClassFormatException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/instrument/IllegalClassFormatException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
  * @since   1.5
  */
 public class IllegalClassFormatException extends Exception {
+    private static final long serialVersionUID = -3841736710924794009L;
+
     /**
      * Constructs an <code>IllegalClassFormatException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/instrument/UnmodifiableClassException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/instrument/UnmodifiableClassException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @since   1.5
  */
 public class UnmodifiableClassException extends Exception {
+    private static final long serialVersionUID = 1716652643585309178L;
+
     /**
      * Constructs an <code>UnmodifiableClassException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/lang/management/ManagementPermission.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/management/ManagementPermission.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,6 +83,7 @@
  */
 
 public final class ManagementPermission extends java.security.BasicPermission {
+    private static final long serialVersionUID = 1897496590799378737L;
 
     /**
      * Constructs a ManagementPermission with the specified name.
--- a/jdk/src/share/classes/java/lang/reflect/GenericSignatureFormatError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/GenericSignatureFormatError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,6 @@
  *
  * @since 1.5
  */
-public class GenericSignatureFormatError extends ClassFormatError{}
+public class GenericSignatureFormatError extends ClassFormatError {
+    private static final long serialVersionUID = 6709919147137911034L;
+}
--- a/jdk/src/share/classes/java/lang/reflect/MalformedParameterizedTypeException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/MalformedParameterizedTypeException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,4 +34,6 @@
  *
  * @since 1.5
  */
-public class MalformedParameterizedTypeException extends RuntimeException{}
+public class MalformedParameterizedTypeException extends RuntimeException {
+    private static final long serialVersionUID = -5696557788586220964L;
+}
--- a/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java	Wed Jul 05 16:42:37 2017 +0200
@@ -308,6 +308,12 @@
             FileDescriptor fd = acquireFD();
             try {
                 socketConnect(address, port, timeout);
+                /* socket may have been closed during poll/select */
+                synchronized (fdLock) {
+                    if (closePending) {
+                        throw new SocketException ("Socket closed");
+                    }
+                }
                 // If we have a ref. to the Socket, then sets the flags
                 // created, bound & connected to true.
                 // This is normally done in Socket.connect() but some
--- a/jdk/src/share/classes/java/net/BindException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/BindException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
  */
 
 public class BindException extends SocketException {
+    private static final long serialVersionUID = -5945005768251722951L;
 
     /**
      * Constructs a new BindException with the specified detail
--- a/jdk/src/share/classes/java/net/ConnectException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/ConnectException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @since   JDK1.1
  */
 public class ConnectException extends SocketException {
+    private static final long serialVersionUID = 3831404271622369215L;
+
     /**
      * Constructs a new ConnectException with the specified detail
      * message as to why the connect error occurred.
--- a/jdk/src/share/classes/java/net/HttpRetryException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/HttpRetryException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
  */
 public
 class HttpRetryException extends IOException {
+    private static final long serialVersionUID = -9186022286469111381L;
 
     private int responseCode;
     private String location;
--- a/jdk/src/share/classes/java/net/MalformedURLException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/MalformedURLException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
  * @since   JDK1.0
  */
 public class MalformedURLException extends IOException {
+    private static final long serialVersionUID = -182787522200415866L;
+
     /**
      * Constructs a <code>MalformedURLException</code> with no detail message.
      */
--- a/jdk/src/share/classes/java/net/NoRouteToHostException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/NoRouteToHostException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @since   JDK1.1
  */
 public class NoRouteToHostException extends SocketException {
+    private static final long serialVersionUID = -1897550894873493790L;
+
     /**
      * Constructs a new NoRouteToHostException with the specified detail
      * message as to why the remote host cannot be reached.
--- a/jdk/src/share/classes/java/net/PortUnreachableException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/PortUnreachableException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  */
 
 public class PortUnreachableException extends SocketException {
+    private static final long serialVersionUID = 8462541992376507323L;
 
     /**
      * Constructs a new <code>PortUnreachableException</code> with a
--- a/jdk/src/share/classes/java/net/ProtocolException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/ProtocolException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
  */
 public
 class ProtocolException extends IOException {
+    private static final long serialVersionUID = -6098449442062388080L;
+
     /**
      * Constructs a new <code>ProtocolException</code> with the
      * specified detail message.
--- a/jdk/src/share/classes/java/net/SocketException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/SocketException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class SocketException extends IOException {
+    private static final long serialVersionUID = -5935874303556886934L;
+
     /**
      * Constructs a new <code>SocketException</code> with the
      * specified detail message.
--- a/jdk/src/share/classes/java/net/SocketTimeoutException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/SocketTimeoutException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
  */
 
 public class SocketTimeoutException extends java.io.InterruptedIOException {
+    private static final long serialVersionUID = -8846654841826352300L;
 
     /**
      * Constructs a new SocketTimeoutException with a detail
--- a/jdk/src/share/classes/java/net/URISyntaxException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/URISyntaxException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,8 @@
 public class URISyntaxException
     extends Exception
 {
+    private static final long serialVersionUID = 2137979680897488891L;
+
     private String input;
     private int index;
 
--- a/jdk/src/share/classes/java/net/UnknownHostException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/UnknownHostException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class UnknownHostException extends IOException {
+    private static final long serialVersionUID = -4639126076052875403L;
+
     /**
      * Constructs a new <code>UnknownHostException</code> with the
      * specified detail message.
--- a/jdk/src/share/classes/java/net/UnknownServiceException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/net/UnknownServiceException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-1997 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  * @since   JDK1.0
  */
 public class UnknownServiceException extends IOException {
+    private static final long serialVersionUID = -4169033248853639508L;
+
     /**
      * Constructs a new <code>UnknownServiceException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/text/SimpleDateFormat.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java	Wed Jul 05 16:42:37 2017 +0200
@@ -374,6 +374,24 @@
     private String pattern;
 
     /**
+     * Saved numberFormat and pattern.
+     * @see SimpleDateFormat#checkNegativeNumberExpression
+     */
+    transient private NumberFormat originalNumberFormat;
+    transient private String originalNumberPattern;
+
+    /**
+     * The minus sign to be used with format and parse.
+     */
+    transient private char minusSign = '-';
+
+    /**
+     * True when a negative sign follows a number.
+     * (True as default in Arabic.)
+     */
+    transient private boolean hasFollowingMinusSign = false;
+
+    /**
      * The compiled pattern.
      */
     transient private char[] compiledPattern;
@@ -1226,6 +1244,8 @@
      */
     public Date parse(String text, ParsePosition pos)
     {
+        checkNegativeNumberExpression();
+
         int start = pos.index;
         int oldStart = start;
         int textLength = text.length();
@@ -1271,14 +1291,42 @@
                 // digit text (e.g., "20010704") with a pattern which
                 // has no delimiters between fields, like "yyyyMMdd".
                 boolean obeyCount = false;
+
+                // In Arabic, a minus sign for a negative number is put after
+                // the number. Even in another locale, a minus sign can be
+                // put after a number using DateFormat.setNumberFormat().
+                // If both the minus sign and the field-delimiter are '-',
+                // subParse() needs to determine whether a '-' after a number
+                // in the given text is a delimiter or is a minus sign for the
+                // preceding number. We give subParse() a clue based on the
+                // information in compiledPattern.
+                boolean useFollowingMinusSignAsDelimiter = false;
+
                 if (i < compiledPattern.length) {
                     int nextTag = compiledPattern[i] >>> 8;
-                    if (!(nextTag == TAG_QUOTE_ASCII_CHAR || nextTag == TAG_QUOTE_CHARS)) {
+                    if (!(nextTag == TAG_QUOTE_ASCII_CHAR ||
+                          nextTag == TAG_QUOTE_CHARS)) {
                         obeyCount = true;
                     }
+
+                    if (hasFollowingMinusSign &&
+                        (nextTag == TAG_QUOTE_ASCII_CHAR ||
+                         nextTag == TAG_QUOTE_CHARS)) {
+                        int c;
+                        if (nextTag == TAG_QUOTE_ASCII_CHAR) {
+                            c = compiledPattern[i] & 0xff;
+                        } else {
+                            c = compiledPattern[i+1];
+                        }
+
+                        if (c == minusSign) {
+                            useFollowingMinusSignAsDelimiter = true;
+                        }
+                    }
                 }
                 start = subParse(text, start, tag, count, obeyCount,
-                                 ambiguousYear, pos);
+                                 ambiguousYear, pos,
+                                 useFollowingMinusSignAsDelimiter);
                 if (start < 0) {
                     pos.index = oldStart;
                     return null;
@@ -1482,10 +1530,13 @@
             // If the time zone matched uses the same name
             // (abbreviation) for both standard and daylight time,
             // let the time zone in the Calendar decide which one.
-            if (!useSameName) {
+            //
+            // Also if tz.getDSTSaving() returns 0 for DST, use tz to
+            // determine the local time. (6645292)
+            int dstAmount = (nameIndex >= 3) ? tz.getDSTSavings() : 0;
+            if (!(useSameName || (nameIndex >= 3 && dstAmount == 0))) {
                 calendar.set(Calendar.ZONE_OFFSET, tz.getRawOffset());
-                calendar.set(Calendar.DST_OFFSET,
-                             nameIndex >= 3 ? tz.getDSTSavings() : 0);
+                calendar.set(Calendar.DST_OFFSET, dstAmount);
             }
             return (start + zoneNames[nameIndex].length());
         }
@@ -1511,8 +1562,8 @@
      */
     private int subParse(String text, int start, int patternCharIndex, int count,
                          boolean obeyCount, boolean[] ambiguousYear,
-                         ParsePosition origPos)
-    {
+                         ParsePosition origPos,
+                         boolean useFollowingMinusSignAsDelimiter) {
         Number number = null;
         int value = 0;
         ParsePosition pos = new ParsePosition(0);
@@ -1537,10 +1588,10 @@
             // a number value.  We handle further, more generic cases below.  We need
             // to handle some of them here because some fields require extra processing on
             // the parsed value.
-            if (patternCharIndex == 4 /*HOUR_OF_DAY1_FIELD*/ ||
-                patternCharIndex == 15 /*HOUR1_FIELD*/ ||
-                (patternCharIndex == 2 /*MONTH_FIELD*/ && count <= 2) ||
-                patternCharIndex == 1) {
+            if (patternCharIndex == 4 /* HOUR_OF_DAY1_FIELD */ ||
+                patternCharIndex == 15 /* HOUR1_FIELD */ ||
+                (patternCharIndex == 2 /* MONTH_FIELD */ && count <= 2) ||
+                patternCharIndex == 1 /* YEAR_FIELD */) {
                 // It would be good to unify this with the obeyCount logic below,
                 // but that's going to be difficult.
                 if (obeyCount) {
@@ -1557,6 +1608,15 @@
                     }
                 } else {
                     value = number.intValue();
+
+                    if (useFollowingMinusSignAsDelimiter && (value < 0) &&
+                        (((pos.index < text.length()) &&
+                         (text.charAt(pos.index) != minusSign)) ||
+                         ((pos.index == text.length()) &&
+                          (text.charAt(pos.index-1) == minusSign)))) {
+                        value = -value;
+                        pos.index--;
+                    }
                 }
             }
 
@@ -1888,7 +1948,18 @@
                     number = numberFormat.parse(text, pos);
                 }
                 if (number != null) {
-                    calendar.set(field, number.intValue());
+                    value = number.intValue();
+
+                    if (useFollowingMinusSignAsDelimiter && (value < 0) &&
+                        (((pos.index < text.length()) &&
+                         (text.charAt(pos.index) != minusSign)) ||
+                         ((pos.index == text.length()) &&
+                          (text.charAt(pos.index-1) == minusSign)))) {
+                        value = -value;
+                        pos.index--;
+                    }
+
+                    calendar.set(field, value);
                     return pos.index;
                 }
                 break parsing;
@@ -2099,4 +2170,33 @@
             }
         }
     }
+
+    /**
+     * Analyze the negative subpattern of DecimalFormat and set/update values
+     * as necessary.
+     */
+    private void checkNegativeNumberExpression() {
+        if ((numberFormat instanceof DecimalFormat) &&
+            !numberFormat.equals(originalNumberFormat)) {
+            String numberPattern = ((DecimalFormat)numberFormat).toPattern();
+            if (!numberPattern.equals(originalNumberPattern)) {
+                hasFollowingMinusSign = false;
+
+                int separatorIndex = numberPattern.indexOf(';');
+                // If the negative subpattern is not absent, we have to analayze
+                // it in order to check if it has a following minus sign.
+                if (separatorIndex > -1) {
+                    int minusIndex = numberPattern.indexOf('-', separatorIndex);
+                    if ((minusIndex > numberPattern.lastIndexOf('0')) &&
+                        (minusIndex > numberPattern.lastIndexOf('#'))) {
+                        hasFollowingMinusSign = true;
+                        minusSign = ((DecimalFormat)numberFormat).getDecimalFormatSymbols().getMinusSign();
+                    }
+                }
+                originalNumberPattern = numberPattern;
+            }
+            originalNumberFormat = numberFormat;
+        }
+    }
+
 }
--- a/jdk/src/share/classes/java/util/ConcurrentModificationException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/ConcurrentModificationException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -67,6 +67,8 @@
  * @since   1.2
  */
 public class ConcurrentModificationException extends RuntimeException {
+    private static final long serialVersionUID = -3666751008965953603L;
+
     /**
      * Constructs a ConcurrentModificationException with no
      * detail message.
--- a/jdk/src/share/classes/java/util/EmptyStackException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/EmptyStackException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1998 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 public
 class EmptyStackException extends RuntimeException {
+    private static final long serialVersionUID = 5084686378493302095L;
+
     /**
      * Constructs a new <code>EmptyStackException</code> with <tt>null</tt>
      * as its error message string.
--- a/jdk/src/share/classes/java/util/InputMismatchException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/InputMismatchException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
  */
 public
 class InputMismatchException extends NoSuchElementException {
+    private static final long serialVersionUID = 8811230760997066428L;
+
     /**
      * Constructs an <code>InputMismatchException</code> with <tt>null</tt>
      * as its error message string.
--- a/jdk/src/share/classes/java/util/NoSuchElementException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/NoSuchElementException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1998 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
  */
 public
 class NoSuchElementException extends RuntimeException {
+    private static final long serialVersionUID = 6769829250639411880L;
+
     /**
      * Constructs a <code>NoSuchElementException</code> with <tt>null</tt>
      * as its error message string.
--- a/jdk/src/share/classes/java/util/TooManyListenersException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/TooManyListenersException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,6 +48,7 @@
  */
 
 public class TooManyListenersException extends Exception {
+    private static final long serialVersionUID = 5074640544770687831L;
 
     /**
      * Constructs a TooManyListenersException with no detail message.
--- a/jdk/src/share/classes/java/util/jar/JarException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/jar/JarException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-1999 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  */
 public
 class JarException extends java.util.zip.ZipException {
+    private static final long serialVersionUID = 7159778400963954473L;
+
     /**
      * Constructs a JarException with no detail message.
      */
--- a/jdk/src/share/classes/java/util/regex/PatternSyntaxException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/regex/PatternSyntaxException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
 public class PatternSyntaxException
     extends IllegalArgumentException
 {
+    private static final long serialVersionUID = -3864639126226059218L;
 
     private final String desc;
     private final String pattern;
--- a/jdk/src/share/classes/java/util/zip/DataFormatException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/zip/DataFormatException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
  */
 public
 class DataFormatException extends Exception {
+    private static final long serialVersionUID = 2219632870893641452L;
+
     /**
      * Constructs a DataFormatException with no detail message.
      */
--- a/jdk/src/share/classes/java/util/zip/ZipException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
 
 public
 class ZipException extends IOException {
+    private static final long serialVersionUID = 8000196834066748623L;
+
     /**
      * Constructs an <code>ZipException</code> with <code>null</code>
      * as its error detail message.
--- a/jdk/src/share/classes/javax/management/openmbean/MXBeanMappingFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/MXBeanMappingFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -48,7 +48,7 @@
  * effect by defining {@code MyLinkedListMappingFactory} as follows:</p>
  *
  * <pre>
- * public class MyLinkedListMappingFactory implements MXBeanMappingFactory {
+ * public class MyLinkedListMappingFactory extends MXBeanMappingFactory {
  *     public MyLinkedListMappingFactory() {}
  *
  *     public MXBeanMapping mappingForType(Type t, MXBeanMappingFactory f)
--- a/jdk/src/share/classes/javax/swing/AbstractButton.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/AbstractButton.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1315,8 +1315,7 @@
             // Make sure the change actually took effect
             if (!selected && isSelected()) {
                 if (getModel() instanceof DefaultButtonModel) {
-                    ButtonGroup group = (ButtonGroup)
-                            ((DefaultButtonModel)getModel()).getGroup();
+                    ButtonGroup group = ((DefaultButtonModel)getModel()).getGroup();
                     if (group != null) {
                         group.clearSelection();
                     }
@@ -1886,8 +1885,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])(listenerList.getListeners(
-            ChangeListener.class));
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
@@ -1944,8 +1942,7 @@
      * @since 1.4
      */
     public ActionListener[] getActionListeners() {
-        return (ActionListener[])(listenerList.getListeners(
-            ActionListener.class));
+        return listenerList.getListeners(ActionListener.class);
     }
 
     /**
@@ -2137,7 +2134,7 @@
      * @since 1.4
      */
     public ItemListener[] getItemListeners() {
-        return (ItemListener[])listenerList.getListeners(ItemListener.class);
+        return listenerList.getListeners(ItemListener.class);
     }
 
    /**
@@ -2981,7 +2978,7 @@
             paintViewR.height = AbstractButton.this.getHeight() - (paintViewInsets.top + paintViewInsets.bottom);
 
             String clippedText = SwingUtilities.layoutCompoundLabel(
-                (JComponent)AbstractButton.this,
+                AbstractButton.this,
                 getFontMetrics(getFont()),
                 text,
                 icon,
--- a/jdk/src/share/classes/javax/swing/AbstractCellEditor.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/AbstractCellEditor.java	Wed Jul 05 16:42:37 2017 +0200
@@ -118,8 +118,7 @@
      * @since 1.4
      */
     public CellEditorListener[] getCellEditorListeners() {
-        return (CellEditorListener[])listenerList.getListeners(
-                CellEditorListener.class);
+        return listenerList.getListeners(CellEditorListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/AbstractListModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/AbstractListModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -85,8 +85,7 @@
      * @since 1.4
      */
     public ListDataListener[] getListDataListeners() {
-        return (ListDataListener[])listenerList.getListeners(
-                ListDataListener.class);
+        return listenerList.getListeners(ListDataListener.class);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/AbstractSpinnerModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/AbstractSpinnerModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -98,8 +98,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/ActionMap.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/ActionMap.java	Wed Jul 05 16:42:37 2017 +0200
@@ -197,7 +197,7 @@
             return pKeys;
         }
 
-        HashMap        keyMap = new HashMap();
+        HashMap<Object, Object> keyMap = new HashMap<Object, Object>();
         int            counter;
 
         for (counter = keys.length - 1; counter >= 0; counter--) {
--- a/jdk/src/share/classes/javax/swing/AncestorNotifier.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/AncestorNotifier.java	Wed Jul 05 16:42:37 2017 +0200
@@ -62,7 +62,7 @@
     }
 
     AncestorListener[] getAncestorListeners() {
-        return (AncestorListener[])listenerList.getListeners(AncestorListener.class);
+        return listenerList.getListeners(AncestorListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/ArrayTable.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/ArrayTable.java	Wed Jul 05 16:42:37 2017 +0200
@@ -88,10 +88,10 @@
             // Write ou the Serializable key/value pairs.
             s.writeInt(validCount);
             if (validCount > 0) {
-                for (int counter = 0; counter < keys.length; counter++) {
-                    if (keys[counter] != null) {
-                        s.writeObject(keys[counter]);
-                        s.writeObject(table.get(keys[counter]));
+                for (Object key : keys) {
+                    if (key != null) {
+                        s.writeObject(key);
+                        s.writeObject(table.get(key));
                         if (--validCount == 0) {
                             break;
                         }
@@ -315,7 +315,7 @@
      */
     private void grow() {
         Object[] array = (Object[])table;
-        Hashtable tmp = new Hashtable(array.length/2);
+        Hashtable<Object, Object> tmp = new Hashtable<Object, Object>(array.length/2);
         for (int i = 0; i<array.length; i+=2) {
             tmp.put(array[i], array[i+1]);
         }
--- a/jdk/src/share/classes/javax/swing/ButtonGroup.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/ButtonGroup.java	Wed Jul 05 16:42:37 2017 +0200
@@ -68,7 +68,7 @@
 public class ButtonGroup implements Serializable {
 
     // the list of buttons participating in this group
-    protected Vector<AbstractButton> buttons = new Vector();
+    protected Vector<AbstractButton> buttons = new Vector<AbstractButton>();
 
     /**
      * The current selection.
--- a/jdk/src/share/classes/javax/swing/DebugGraphicsInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DebugGraphicsInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -37,7 +37,7 @@
     Color                flashColor = Color.red;
     int                  flashTime = 100;
     int                  flashCount = 2;
-    Hashtable            componentToDebug;
+    Hashtable<JComponent, Integer> componentToDebug;
     JFrame               debugFrame = null;
     java.io.PrintStream  stream = System.out;
 
@@ -46,7 +46,7 @@
             return;
         }
         if (componentToDebug == null) {
-            componentToDebug = new Hashtable();
+            componentToDebug = new Hashtable<JComponent, Integer>();
         }
         if (debug > 0) {
             componentToDebug.put(component, Integer.valueOf(debug));
@@ -59,7 +59,7 @@
         if (componentToDebug == null) {
             return 0;
         } else {
-            Integer integer = (Integer)componentToDebug.get(component);
+            Integer integer = componentToDebug.get(component);
 
             return integer == null ? 0 : integer.intValue();
         }
--- a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -343,8 +343,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -326,8 +326,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
@@ -380,8 +379,7 @@
      * @since 1.4
      */
     public ActionListener[] getActionListeners() {
-        return (ActionListener[])listenerList.getListeners(
-                ActionListener.class);
+        return listenerList.getListeners(ActionListener.class);
     }
 
     /**
@@ -434,7 +432,7 @@
      * @since 1.4
      */
     public ItemListener[] getItemListeners() {
-        return (ItemListener[])listenerList.getListeners(ItemListener.class);
+        return listenerList.getListeners(ItemListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/DefaultFocusManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultFocusManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -156,18 +156,17 @@
     }
 }
 
-final class CompareTabOrderComparator implements Comparator {
+final class CompareTabOrderComparator implements Comparator<Component> {
     private final DefaultFocusManager defaultFocusManager;
 
     CompareTabOrderComparator(DefaultFocusManager defaultFocusManager) {
         this.defaultFocusManager = defaultFocusManager;
     }
 
-    public int compare(Object o1, Object o2) {
+    public int compare(Component o1, Component o2) {
         if (o1 == o2) {
             return 0;
         }
-        return (defaultFocusManager.compareTabOrder((Component)o1,
-                                                    (Component)o2)) ? -1 : 1;
+        return (defaultFocusManager.compareTabOrder(o1, o2)) ? -1 : 1;
     }
 }
--- a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -133,8 +133,7 @@
      * @since 1.4
      */
     public ListSelectionListener[] getListSelectionListeners() {
-        return (ListSelectionListener[])listenerList.getListeners(
-                ListSelectionListener.class);
+        return listenerList.getListeners(ListSelectionListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -110,8 +110,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/GroupLayout.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/GroupLayout.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1119,7 +1119,7 @@
      * creating one if necessary.
      */
     private ComponentInfo getComponentInfo(Component component) {
-        ComponentInfo info = (ComponentInfo)componentInfos.get(component);
+        ComponentInfo info = componentInfos.get(component);
         if (info == null) {
             info = new ComponentInfo(component);
             componentInfos.put(component, info);
@@ -1698,7 +1698,7 @@
             for (int counter = springs.size() - 1; counter >= 0; counter--) {
                 Spring spring = springs.get(counter);
                 if (spring instanceof AutoPreferredGapSpring) {
-                    ((AutoPreferredGapSpring)spring).unset();
+                    spring.unset();
                 } else if (spring instanceof Group) {
                     ((Group)spring).unsetAutopadding();
                 }
--- a/jdk/src/share/classes/javax/swing/InputMap.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/InputMap.java	Wed Jul 05 16:42:37 2017 +0200
@@ -200,7 +200,7 @@
             return pKeys;
         }
 
-        HashMap        keyMap = new HashMap();
+        HashMap<KeyStroke, KeyStroke> keyMap = new HashMap<KeyStroke, KeyStroke>();
         int            counter;
 
         for (counter = keys.length - 1; counter >= 0; counter--) {
@@ -212,7 +212,7 @@
 
         KeyStroke[]    allKeys = new KeyStroke[keyMap.size()];
 
-        return (KeyStroke[])keyMap.keySet().toArray(allKeys);
+        return keyMap.keySet().toArray(allKeys);
     }
 
     private void writeObject(ObjectOutputStream s) throws IOException {
--- a/jdk/src/share/classes/javax/swing/JApplet.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JApplet.java	Wed Jul 05 16:42:37 2017 +0200
@@ -131,10 +131,7 @@
         // Check the timerQ and restart if necessary.
         TimerQueue q = TimerQueue.sharedInstance();
         if(q != null) {
-            synchronized(q) {
-                if(!q.running)
-                    q.start();
-            }
+            q.startIfNeeded();
         }
 
         /* Workaround for bug 4155072.  The shared double buffer image
--- a/jdk/src/share/classes/javax/swing/JComboBox.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java	Wed Jul 05 16:42:37 2017 +0200
@@ -859,7 +859,7 @@
      * @since 1.4
      */
     public ItemListener[] getItemListeners() {
-        return (ItemListener[])listenerList.getListeners(ItemListener.class);
+        return listenerList.getListeners(ItemListener.class);
     }
 
     /**
@@ -897,8 +897,7 @@
      * @since 1.4
      */
     public ActionListener[] getActionListeners() {
-        return (ActionListener[])listenerList.getListeners(
-                ActionListener.class);
+        return listenerList.getListeners(ActionListener.class);
     }
 
     /**
@@ -937,8 +936,7 @@
      * @since 1.4
      */
     public PopupMenuListener[] getPopupMenuListeners() {
-        return (PopupMenuListener[])listenerList.getListeners(
-                PopupMenuListener.class);
+        return listenerList.getListeners(PopupMenuListener.class);
     }
 
     /**
@@ -1668,7 +1666,7 @@
             if (editor != null) {
                 Component comp = editor.getEditorComponent();
                 if (comp instanceof Accessible) {
-                    AccessibleContext ac = ((Accessible)comp).getAccessibleContext();
+                    AccessibleContext ac = comp.getAccessibleContext();
                     if (ac != null) { // may be null
                         ac.setAccessibleName(getAccessibleName());
                         ac.setAccessibleDescription(getAccessibleDescription());
@@ -1741,7 +1739,7 @@
 
                 // Fire a FOCUSED lost PropertyChangeEvent for the
                 // previously selected list item.
-                PropertyChangeEvent pce = null;
+                PropertyChangeEvent pce;
 
                 if (previousSelectedAccessible != null) {
                     pce = new PropertyChangeEvent(previousSelectedAccessible,
--- a/jdk/src/share/classes/javax/swing/JComponent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JComponent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -192,7 +192,8 @@
     /**
      * @see #readObject
      */
-    private static final Hashtable readObjectCallbacks = new Hashtable(1);
+    private static final Hashtable<ObjectInputStream, ReadObjectCallback> readObjectCallbacks =
+            new Hashtable<ObjectInputStream, ReadObjectCallback>(1);
 
     /**
      * Keys to use for forward focus traversal when the JComponent is
@@ -356,7 +357,7 @@
     /**
      * Temporary rectangles.
      */
-    private static java.util.List tempRectangles = new java.util.ArrayList(11);
+    private static java.util.List<Rectangle> tempRectangles = new java.util.ArrayList<Rectangle>(11);
 
     /** Used for <code>WHEN_FOCUSED</code> bindings. */
     private InputMap focusInputMap;
@@ -451,7 +452,7 @@
             Rectangle rect;
             int size = tempRectangles.size();
             if (size > 0) {
-                rect = (Rectangle)tempRectangles.remove(size - 1);
+                rect = tempRectangles.remove(size - 1);
             }
             else {
                 rect = new Rectangle(0, 0, 0, 0);
@@ -806,7 +807,7 @@
             // its index.
             if (paintingChild != null &&
                 (paintingChild instanceof JComponent) &&
-                ((JComponent)paintingChild).isOpaque()) {
+                paintingChild.isOpaque()) {
                 for (; i >= 0; i--) {
                     if (getComponent(i) == paintingChild){
                         break;
@@ -875,7 +876,7 @@
                                     shouldSetFlagBack = true;
                                 }
                                 if(!printing) {
-                                    ((JComponent)comp).paint(cg);
+                                    comp.paint(cg);
                                 }
                                 else {
                                     if (!getFlag(IS_PRINTING_ALL)) {
@@ -1098,7 +1099,7 @@
     }
 
     private void adjustPaintFlags() {
-        JComponent jparent = null;
+        JComponent jparent;
         Container parent;
         for(parent = getParent() ; parent != null ; parent =
             parent.getParent()) {
@@ -2096,7 +2097,7 @@
     private void registerWithKeyboardManager(boolean onlyIfNew) {
         InputMap inputMap = getInputMap(WHEN_IN_FOCUSED_WINDOW, false);
         KeyStroke[] strokes;
-        Hashtable registered = (Hashtable)getClientProperty
+        Hashtable<KeyStroke, KeyStroke> registered = (Hashtable)getClientProperty
                                 (WHEN_IN_FOCUSED_WINDOW_BINDINGS);
 
         if (inputMap != null) {
@@ -2120,10 +2121,10 @@
         }
         // Remove any old ones.
         if (registered != null && registered.size() > 0) {
-            Enumeration keys = registered.keys();
+            Enumeration<KeyStroke> keys = registered.keys();
 
             while (keys.hasMoreElements()) {
-                KeyStroke ks = (KeyStroke)keys.nextElement();
+                KeyStroke ks = keys.nextElement();
                 unregisterWithKeyboardManager(ks);
             }
             registered.clear();
@@ -2131,7 +2132,7 @@
         // Updated the registered Hashtable.
         if (strokes != null && strokes.length > 0) {
             if (registered == null) {
-                registered = new Hashtable(strokes.length);
+                registered = new Hashtable<KeyStroke, KeyStroke>(strokes.length);
                 putClientProperty(WHEN_IN_FOCUSED_WINDOW_BINDINGS, registered);
             }
             for (int counter = strokes.length - 1; counter >= 0; counter--) {
@@ -2174,7 +2175,7 @@
         InputMap km = getInputMap(WHEN_IN_FOCUSED_WINDOW, false);
 
         while (km != inputMap && km != null) {
-            km = (ComponentInputMap)km.getParent();
+            km = km.getParent();
         }
         if (km != null) {
             registerWithKeyboardManager(false);
@@ -3673,7 +3674,7 @@
                 if (c != null && c instanceof Accessible) {
                     AccessibleJComponent.this.firePropertyChange(
                         AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
-                        null, ((Accessible) c).getAccessibleContext());
+                        null, c.getAccessibleContext());
                 }
             }
             public void componentRemoved(ContainerEvent e) {
@@ -3681,7 +3682,7 @@
                 if (c != null && c instanceof Accessible) {
                     AccessibleJComponent.this.firePropertyChange(
                         AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
-                        ((Accessible) c).getAccessibleContext(), null);
+                        c.getAccessibleContext(), null);
                 }
             }
         }
@@ -4377,7 +4378,7 @@
 //                  System.out.println("A) checking opaque: " + ((JComponent)child).isOpaque() + "  " + child);
 //                  System.out.print("B) ");
 //                  Thread.dumpStack();
-                    return ((JComponent)child).isOpaque();
+                    return child.isOpaque();
                 } else {
                     /** Sometimes a heavy weight can have a bound larger than its peer size
                      *  so we should always draw under heavy weights
@@ -4693,7 +4694,7 @@
             result = (T[])getPropertyChangeListeners();
         }
         else {
-            result = (T[])listenerList.getListeners(listenerType);
+            result = listenerList.getListeners(listenerType);
         }
 
         if (result.length == 0) {
@@ -4904,7 +4905,7 @@
         if(!isShowing()) {
             return;
         }
-        while(!((JComponent)c).isOpaque()) {
+        while(!c.isOpaque()) {
             parent = c.getParent();
             if(parent != null) {
                 x += c.getX();
@@ -5198,7 +5199,7 @@
             Rectangle siblingRect;
             boolean opaque;
             if (sibling instanceof JComponent) {
-                opaque = ((JComponent)sibling).isOpaque();
+                opaque = sibling.isOpaque();
                 if (!opaque) {
                     if (retValue == PARTIALLY_OBSCURED) {
                         continue;
@@ -5345,7 +5346,7 @@
      */
     private class ReadObjectCallback implements ObjectInputValidation
     {
-        private final Vector roots = new Vector(1);
+        private final Vector<JComponent> roots = new Vector<JComponent>(1);
         private final ObjectInputStream inputStream;
 
         ReadObjectCallback(ObjectInputStream s) throws Exception {
@@ -5361,8 +5362,7 @@
          */
         public void validateObject() throws InvalidObjectException {
             try {
-                for(int i = 0; i < roots.size(); i++) {
-                    JComponent root = (JComponent)(roots.elementAt(i));
+                for (JComponent root : roots) {
                     SwingUtilities.updateComponentTreeUI(root);
                 }
             }
@@ -5382,8 +5382,7 @@
             /* If the Component c is a descendant of one of the
              * existing roots (or it IS an existing root), we're done.
              */
-            for(int i = 0; i < roots.size(); i++) {
-                JComponent root = (JComponent)roots.elementAt(i);
+            for (JComponent root : roots) {
                 for(Component p = c; p != null; p = p.getParent()) {
                     if (p == root) {
                         return;
@@ -5396,7 +5395,7 @@
              * to the roots vector.
              */
             for(int i = 0; i < roots.size(); i++) {
-                JComponent root = (JComponent)roots.elementAt(i);
+                JComponent root = roots.elementAt(i);
                 for(Component p = root.getParent(); p != null; p = p.getParent()) {
                     if (p == c) {
                         roots.removeElementAt(i--); // !!
@@ -5428,7 +5427,7 @@
          * in the readObjectCallbacks table.  Note that the ReadObjectCallback
          * constructor takes care of calling s.registerValidation().
          */
-        ReadObjectCallback cb = (ReadObjectCallback)(readObjectCallbacks.get(s));
+        ReadObjectCallback cb = readObjectCallbacks.get(s);
         if (cb == null) {
             try {
                 readObjectCallbacks.put(s, cb = new ReadObjectCallback(s));
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -133,8 +133,8 @@
             public Component getDefaultComponent(Container c) {
                 JInternalFrame jifArray[] = getAllFrames();
                 Component comp = null;
-                for (int i = 0; i < jifArray.length; i++) {
-                    comp = jifArray[i].getFocusTraversalPolicy().getDefaultComponent(jifArray[i]);
+                for (JInternalFrame jif : jifArray) {
+                    comp = jif.getFocusTraversalPolicy().getDefaultComponent(jif);
                     if (comp != null) {
                         break;
                     }
@@ -262,16 +262,15 @@
     public JInternalFrame[] getAllFrames() {
         int i, count;
         JInternalFrame[] results;
-        Vector vResults = new Vector(10);
-        Object next, tmp;
+        Vector<JInternalFrame> vResults = new Vector<JInternalFrame>(10);
 
         count = getComponentCount();
         for(i = 0; i < count; i++) {
-            next = getComponent(i);
+            Component next = getComponent(i);
             if(next instanceof JInternalFrame)
-                vResults.addElement(next);
+                vResults.addElement((JInternalFrame) next);
             else if(next instanceof JInternalFrame.JDesktopIcon)  {
-                tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
+                JInternalFrame tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
                 if(tmp != null)
                     vResults.addElement(tmp);
             }
@@ -324,18 +323,17 @@
     public JInternalFrame[] getAllFramesInLayer(int layer) {
         int i, count;
         JInternalFrame[] results;
-        Vector vResults = new Vector(10);
-        Object next, tmp;
+        Vector<JInternalFrame> vResults = new Vector<JInternalFrame>(10);
 
         count = getComponentCount();
         for(i = 0; i < count; i++) {
-            next = getComponent(i);
+            Component next = getComponent(i);
             if(next instanceof JInternalFrame) {
                 if(((JInternalFrame)next).getLayer() == layer)
-                    vResults.addElement(next);
+                    vResults.addElement((JInternalFrame) next);
             } else if(next instanceof JInternalFrame.JDesktopIcon)  {
-                tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
-                if(tmp != null && ((JInternalFrame)tmp).getLayer() == layer)
+                JInternalFrame tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
+                if(tmp != null && tmp.getLayer() == layer)
                     vResults.addElement(tmp);
             }
         }
--- a/jdk/src/share/classes/javax/swing/JDialog.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JDialog.java	Wed Jul 05 16:42:37 2017 +0200
@@ -277,7 +277,7 @@
               title, modal);
         if (owner == null) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             addWindowListener(ownerShutdownListener);
         }
         dialogInit();
@@ -329,7 +329,7 @@
               title, modal, gc);
         if (owner == null) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             addWindowListener(ownerShutdownListener);
         }
         dialogInit();
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -319,8 +319,7 @@
      * @since 1.4
      */
     public synchronized HyperlinkListener[] getHyperlinkListeners() {
-        return (HyperlinkListener[])listenerList.getListeners(
-                HyperlinkListener.class);
+        return listenerList.getListeners(javax.swing.event.HyperlinkListener.class);
     }
 
     /**
@@ -492,8 +491,8 @@
         if (pageProperties != null) {
             // transfer properties discovered in stream to the
             // document property collection.
-            for (Enumeration e = pageProperties.keys(); e.hasMoreElements() ;) {
-                Object key = e.nextElement();
+            for (Enumeration<String> e = pageProperties.keys(); e.hasMoreElements() ;) {
+                String key = e.nextElement();
                 doc.putProperty(key, pageProperties.get(key));
             }
             pageProperties.clear();
@@ -775,7 +774,7 @@
      */
     private void handleConnectionProperties(URLConnection conn) {
         if (pageProperties == null) {
-            pageProperties = new Hashtable();
+            pageProperties = new Hashtable<String, Object>();
         }
         String type = conn.getContentType();
         if (type != null) {
@@ -989,7 +988,7 @@
      * of the content type in the http header information.
      */
     private void setCharsetFromContentTypeParameters(String paramlist) {
-        String charset = null;
+        String charset;
         try {
             // paramlist is handed to us with a leading ';', strip it.
             int semi = paramlist.indexOf(';');
@@ -1080,9 +1079,9 @@
      */
     public EditorKit getEditorKitForContentType(String type) {
         if (typeHandlers == null) {
-            typeHandlers = new Hashtable(3);
+            typeHandlers = new Hashtable<String, EditorKit>(3);
         }
-        EditorKit k = (EditorKit) typeHandlers.get(type);
+        EditorKit k = typeHandlers.get(type);
         if (k == null) {
             k = createEditorKitForContentType(type);
             if (k != null) {
@@ -1106,7 +1105,7 @@
      */
     public void setEditorKitForContentType(String type, EditorKit k) {
         if (typeHandlers == null) {
-            typeHandlers = new Hashtable(3);
+            typeHandlers = new Hashtable<String, EditorKit>(3);
         }
         typeHandlers.put(type, k);
     }
@@ -1176,13 +1175,12 @@
      *   registered for the given type
      */
     public static EditorKit createEditorKitForContentType(String type) {
-        EditorKit k = null;
-        Hashtable kitRegistry = getKitRegisty();
-        k = (EditorKit) kitRegistry.get(type);
+        Hashtable<String, EditorKit> kitRegistry = getKitRegisty();
+        EditorKit k = kitRegistry.get(type);
         if (k == null) {
             // try to dynamically load the support
-            String classname = (String) getKitTypeRegistry().get(type);
-            ClassLoader loader = (ClassLoader) getKitLoaderRegistry().get(type);
+            String classname = getKitTypeRegistry().get(type);
+            ClassLoader loader = getKitLoaderRegistry().get(type);
             try {
                 Class c;
                 if (loader != null) {
@@ -1252,20 +1250,20 @@
      * @since 1.3
      */
     public static String getEditorKitClassNameForContentType(String type) {
-        return (String)getKitTypeRegistry().get(type);
+        return getKitTypeRegistry().get(type);
     }
 
-    private static Hashtable getKitTypeRegistry() {
+    private static Hashtable<String, String> getKitTypeRegistry() {
         loadDefaultKitsIfNecessary();
         return (Hashtable)SwingUtilities.appContextGet(kitTypeRegistryKey);
     }
 
-    private static Hashtable getKitLoaderRegistry() {
+    private static Hashtable<String, ClassLoader> getKitLoaderRegistry() {
         loadDefaultKitsIfNecessary();
         return (Hashtable)SwingUtilities.appContextGet(kitLoaderRegistryKey);
     }
 
-    private static Hashtable getKitRegisty() {
+    private static Hashtable<String, EditorKit> getKitRegisty() {
         Hashtable ht = (Hashtable)SwingUtilities.appContextGet(kitRegistryKey);
         if (ht == null) {
             ht = new Hashtable(3);
@@ -1512,7 +1510,7 @@
     private EditorKit kit;
     private boolean isUserSetEditorKit;
 
-    private Hashtable pageProperties;
+    private Hashtable<String, Object> pageProperties;
 
     /** Should be kept in sync with javax.swing.text.html.FormView counterpart. */
     final static String PostDataProperty = "javax.swing.JEditorPane.postdata";
@@ -1520,7 +1518,7 @@
     /**
      * Table of registered type handlers for this editor.
      */
-    private Hashtable typeHandlers;
+    private Hashtable<String, EditorKit> typeHandlers;
 
     /*
      * Private AppContext keys for this class's static variables.
@@ -1913,11 +1911,11 @@
             }
         }
 
-        private class LinkVector extends Vector {
+        private class LinkVector extends Vector<HTMLLink> {
             public int baseElementIndex(Element e) {
                 HTMLLink l;
                 for (int i = 0; i < elementCount; i++) {
-                    l = (HTMLLink) elementAt(i);
+                    l = elementAt(i);
                     if (l.element == e) {
                         return i;
                     }
@@ -2029,7 +2027,7 @@
                 buildLinkTable();
             }
             if (linkIndex >= 0 && linkIndex < hyperlinks.size()) {
-                return (AccessibleHyperlink) hyperlinks.elementAt(linkIndex);
+                return hyperlinks.elementAt(linkIndex);
             } else {
                 return null;
             }
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java	Wed Jul 05 16:42:37 2017 +0200
@@ -248,7 +248,7 @@
     private String approveButtonToolTipText = null;
     private int approveButtonMnemonic = 0;
 
-    private Vector filters = new Vector(5);
+    private Vector<FileFilter> filters = new Vector<FileFilter>(5);
     private JDialog dialog = null;
     private int dialogType = OPEN_DIALOG;
     private int returnValue = ERROR_OPTION;
@@ -503,7 +503,7 @@
         if(selectedFiles == null) {
             return new File[0];
         } else {
-            return (File[]) selectedFiles.clone();
+            return selectedFiles.clone();
         }
     }
 
@@ -1415,17 +1415,17 @@
         fileFilter = filter;
         if (filter != null) {
             if (isMultiSelectionEnabled() && selectedFiles != null && selectedFiles.length > 0) {
-                Vector fList = new Vector();
+                Vector<File> fList = new Vector<File>();
                 boolean failed = false;
-                for (int i = 0; i < selectedFiles.length; i++) {
-                    if (filter.accept(selectedFiles[i])) {
-                        fList.add(selectedFiles[i]);
+                for (File file : selectedFiles) {
+                    if (filter.accept(file)) {
+                        fList.add(file);
                     } else {
                         failed = true;
                     }
                 }
                 if (failed) {
-                    setSelectedFiles((fList.size() == 0) ? null : (File[])fList.toArray(new File[fList.size()]));
+                    setSelectedFiles((fList.size() == 0) ? null : fList.toArray(new File[fList.size()]));
                 }
             } else if (selectedFile != null && !filter.accept(selectedFile)) {
                 setSelectedFile(null);
@@ -1702,8 +1702,7 @@
      * @since 1.4
      */
     public ActionListener[] getActionListeners() {
-        return (ActionListener[])listenerList.getListeners(
-                ActionListener.class);
+        return listenerList.getListeners(ActionListener.class);
     }
 
     /**
@@ -1744,7 +1743,7 @@
         WeakReference<JFileChooser> jfcRef;
 
         public WeakPCL(JFileChooser jfc) {
-            jfcRef = new WeakReference(jfc);
+            jfcRef = new WeakReference<JFileChooser>(jfc);
         }
         public void propertyChange(PropertyChangeEvent ev) {
             assert ev.getPropertyName().equals(SHOW_HIDDEN_PROP);
--- a/jdk/src/share/classes/javax/swing/JInternalFrame.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JInternalFrame.java	Wed Jul 05 16:42:37 2017 +0200
@@ -421,8 +421,8 @@
         invalidate();
         Component[] children = getComponents();
         if (children != null) {
-            for(int i = 0; i < children.length; i++) {
-                SwingUtilities.updateComponentTreeUI(children[i]);
+            for (Component child : children) {
+                SwingUtilities.updateComponentTreeUI(child);
             }
         }
     }
@@ -1535,8 +1535,7 @@
      * @see #addInternalFrameListener
      */
     public InternalFrameListener[] getInternalFrameListeners() {
-        return (InternalFrameListener[])listenerList.getListeners(
-                InternalFrameListener.class);
+        return listenerList.getListeners(InternalFrameListener.class);
     }
 
     // remind: name ok? all one method ok? need to be synchronized?
@@ -2258,8 +2257,8 @@
             invalidate();
             Component[] children = getComponents();
             if (children != null) {
-                for(int i = 0; i < children.length; i++) {
-                    SwingUtilities.updateComponentTreeUI(children[i]);
+                for (Component child : children) {
+                    SwingUtilities.updateComponentTreeUI(child);
                 }
             }
         }
--- a/jdk/src/share/classes/javax/swing/JLayeredPane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JLayeredPane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -191,7 +191,7 @@
     private void validateOptimizedDrawing() {
         boolean layeredComponentFound = false;
         synchronized(getTreeLock()) {
-            Integer layer = null;
+            Integer layer;
 
             for (Component c : getComponents()) {
                 layer = null;
@@ -213,7 +213,7 @@
     }
 
     protected void addImpl(Component comp, Object constraints, int index) {
-        int layer = DEFAULT_LAYER.intValue();
+        int layer;
         int pos;
 
         if(constraints instanceof Integer) {
@@ -364,7 +364,7 @@
         if(c instanceof JComponent)
             ((JComponent)c).putClientProperty(LAYER_PROPERTY, layerObj);
         else
-            getComponentToLayer().put((Component)c, layerObj);
+            getComponentToLayer().put(c, layerObj);
 
         if(c.getParent() == null || c.getParent() != this) {
             repaint(c.getBounds());
@@ -388,7 +388,7 @@
         if(c instanceof JComponent)
             i = (Integer)((JComponent)c).getClientProperty(LAYER_PROPERTY);
         else
-            i = (Integer)getComponentToLayer().get((Component)c);
+            i = getComponentToLayer().get(c);
 
         if(i == null)
             return DEFAULT_LAYER.intValue();
@@ -465,9 +465,9 @@
      * @see #getComponentCountInLayer
      */
     public int getPosition(Component c) {
-        int i, count, startLayer, curLayer, startLocation, pos = 0;
+        int i, startLayer, curLayer, startLocation, pos = 0;
 
-        count = getComponentCount();
+        getComponentCount();
         startLocation = getIndexOf(c);
 
         if(startLocation == -1)
--- a/jdk/src/share/classes/javax/swing/JList.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JList.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1848,8 +1848,7 @@
      * @since 1.4
      */
     public ListSelectionListener[] getListSelectionListeners() {
-        return (ListSelectionListener[])listenerList.getListeners(
-                ListSelectionListener.class);
+        return listenerList.getListeners(ListSelectionListener.class);
     }
 
 
@@ -2220,9 +2219,9 @@
         ListSelectionModel sm = getSelectionModel();
         sm.clearSelection();
         int size = getModel().getSize();
-        for(int i = 0; i < indices.length; i++) {
-            if (indices[i] < size) {
-                sm.addSelectionInterval(indices[i], indices[i]);
+        for (int i : indices) {
+            if (i < size) {
+                sm.addSelectionInterval(i, i);
             }
         }
     }
@@ -2724,7 +2723,7 @@
             return true;
         }
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getWidth() > getPreferredSize().width);
+            return (getParent().getWidth() > getPreferredSize().width);
         }
         return false;
     }
@@ -2749,7 +2748,7 @@
             return true;
         }
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getHeight() > getPreferredSize().height);
+            return (getParent().getHeight() > getPreferredSize().height);
         }
         return false;
     }
@@ -3161,7 +3160,7 @@
             private AccessibleContext getCurrentAccessibleContext() {
                 Component c = getComponentAtIndex(indexInParent);
                 if (c instanceof Accessible) {
-                    return ((Accessible) c).getAccessibleContext();
+                    return c.getAccessibleContext();
                 } else {
                     return null;
                 }
--- a/jdk/src/share/classes/javax/swing/JMenu.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JMenu.java	Wed Jul 05 16:42:37 2017 +0200
@@ -371,8 +371,8 @@
      * @since 1.3
      */
     protected Point getPopupMenuOrigin() {
-        int x = 0;
-        int y = 0;
+        int x;
+        int y;
         JPopupMenu pm = getPopupMenu();
         // Figure out the sizes needed to caclulate the menu position
         Dimension s = getSize();
@@ -900,10 +900,8 @@
      *         on another menu
      */
     public boolean isTopLevelMenu() {
-        if (getParent() instanceof JMenuBar)
-            return true;
+        return getParent() instanceof JMenuBar;
 
-        return false;
     }
 
     /**
@@ -1015,7 +1013,7 @@
      * @since 1.4
      */
     public MenuListener[] getMenuListeners() {
-        return (MenuListener[])listenerList.getListeners(MenuListener.class);
+        return listenerList.getListeners(MenuListener.class);
     }
 
     /**
@@ -1305,7 +1303,7 @@
      * @return the array of menu items
      */
     private MenuElement[] buildMenuElementArray(JMenu leaf) {
-        Vector elements = new Vector();
+        Vector<MenuElement> elements = new Vector<MenuElement>();
         Component current = leaf.getPopupMenu();
         JPopupMenu pop;
         JMenu menu;
@@ -1409,8 +1407,8 @@
         public int getAccessibleChildrenCount() {
             Component[] children = getMenuComponents();
             int count = 0;
-            for (int j = 0; j < children.length; j++) {
-                if (children[j] instanceof Accessible) {
+            for (Component child : children) {
+                if (child instanceof Accessible) {
                     count++;
                 }
             }
@@ -1426,18 +1424,18 @@
         public Accessible getAccessibleChild(int i) {
             Component[] children = getMenuComponents();
             int count = 0;
-            for (int j = 0; j < children.length; j++) {
-                if (children[j] instanceof Accessible) {
+            for (Component child : children) {
+                if (child instanceof Accessible) {
                     if (count == i) {
-                        if (children[j] instanceof JComponent) {
+                        if (child instanceof JComponent) {
                             // FIXME:  [[[WDW - probably should set this when
                             // the component is added to the menu.  I tried
                             // to do this in most cases, but the separators
                             // added by addSeparator are hard to get to.]]]
-                            AccessibleContext ac = ((Accessible) children[j]).getAccessibleContext();
+                            AccessibleContext ac = child.getAccessibleContext();
                             ac.setAccessibleParent(JMenu.this);
                         }
-                        return (Accessible) children[j];
+                        return (Accessible) child;
                     } else {
                         count++;
                     }
@@ -1581,7 +1579,7 @@
             }
             JMenuItem mi = getItem(i);
             if (mi != null && mi instanceof JMenu) {
-                if (((JMenu) mi).isSelected()) {
+                if (mi.isSelected()) {
                     MenuElement old[] =
                         MenuSelectionManager.defaultManager().getSelectedPath();
                     MenuElement me[] = new MenuElement[old.length-2];
--- a/jdk/src/share/classes/javax/swing/JMenuBar.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JMenuBar.java	Wed Jul 05 16:42:37 2017 +0200
@@ -414,7 +414,7 @@
      */
     public MenuElement[] getSubElements() {
         MenuElement result[];
-        Vector tmp = new Vector();
+        Vector<MenuElement> tmp = new Vector<MenuElement>();
         int c = getComponentCount();
         int i;
         Component m;
@@ -422,12 +422,12 @@
         for(i=0 ; i < c ; i++) {
             m = getComponent(i);
             if(m instanceof MenuElement)
-                tmp.addElement(m);
+                tmp.addElement((MenuElement) m);
         }
 
         result = new MenuElement[tmp.size()];
         for(i=0,c=tmp.size() ; i < c ; i++)
-            result[i] = (MenuElement) tmp.elementAt(i);
+            result[i] = tmp.elementAt(i);
         return result;
     }
 
@@ -664,9 +664,9 @@
         boolean retValue = super.processKeyBinding(ks, e, condition, pressed);
         if (!retValue) {
             MenuElement[] subElements = getSubElements();
-            for (int i=0; i<subElements.length; i++) {
+            for (MenuElement subElement : subElements) {
                 if (processBindingForKeyStrokeRecursive(
-                                                        subElements[i], ks, e, condition, pressed)) {
+                        subElement, ks, e, condition, pressed)) {
                     return true;
                 }
             }
@@ -693,9 +693,8 @@
         }
 
         MenuElement[] subElements = elem.getSubElements();
-        for(int i=0; i<subElements.length; i++) {
-            if (processBindingForKeyStrokeRecursive(subElements[i], ks, e,
-                                                    condition, pressed)) {
+        for (MenuElement subElement : subElements) {
+            if (processBindingForKeyStrokeRecursive(subElement, ks, e, condition, pressed)) {
                 return true;
                 // We don't, pass along to children JMenu's
             }
--- a/jdk/src/share/classes/javax/swing/JMenuItem.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JMenuItem.java	Wed Jul 05 16:42:37 2017 +0200
@@ -275,7 +275,7 @@
      *         hidden: true
      */
     public void setArmed(boolean b) {
-        ButtonModel model = (ButtonModel) getModel();
+        ButtonModel model = getModel();
 
         boolean oldValue = model.isArmed();
         if(model.isArmed() != b) {
@@ -290,7 +290,7 @@
      * @see #setArmed
      */
     public boolean isArmed() {
-        ButtonModel model = (ButtonModel) getModel();
+        ButtonModel model = getModel();
         return model.isArmed();
     }
 
@@ -721,8 +721,7 @@
      * @since 1.4
      */
     public MenuDragMouseListener[] getMenuDragMouseListeners() {
-        return (MenuDragMouseListener[])listenerList.getListeners(
-                MenuDragMouseListener.class);
+        return listenerList.getListeners(MenuDragMouseListener.class);
     }
 
     /**
@@ -752,8 +751,7 @@
      * @since 1.4
      */
     public MenuKeyListener[] getMenuKeyListeners() {
-        return (MenuKeyListener[])listenerList.getListeners(
-                MenuKeyListener.class);
+        return listenerList.getListeners(MenuKeyListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/JOptionPane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JOptionPane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -963,7 +963,7 @@
         }
         if (window instanceof SwingUtilities.SharedOwnerFrame) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             dialog.addWindowListener(ownerShutdownListener);
         }
         initDialog(dialog, style, parentComponent);
@@ -1300,11 +1300,10 @@
 
         // Use reflection to get Container.startLWModal.
         try {
-            Object obj;
-            obj = AccessController.doPrivileged(new ModalPrivilegedAction(
+            Method method = AccessController.doPrivileged(new ModalPrivilegedAction(
                     Container.class, "startLWModal"));
-            if (obj != null) {
-                ((Method)obj).invoke(dialog, (Object[])null);
+            if (method != null) {
+                method.invoke(dialog, (Object[])null);
             }
         } catch (IllegalAccessException ex) {
         } catch (IllegalArgumentException ex) {
@@ -1446,11 +1445,10 @@
 
         // Use reflection to get Container.startLWModal.
         try {
-            Object obj;
-            obj = AccessController.doPrivileged(new ModalPrivilegedAction(
+            Method method = AccessController.doPrivileged(new ModalPrivilegedAction(
                     Container.class, "startLWModal"));
-            if (obj != null) {
-                ((Method)obj).invoke(dialog, (Object[])null);
+            if (method != null) {
+                method.invoke(dialog, (Object[])null);
             }
         } catch (IllegalAccessException ex) {
         } catch (IllegalArgumentException ex) {
@@ -1531,12 +1529,11 @@
                         event.getPropertyName().equals(VALUE_PROPERTY)) {
                 // Use reflection to get Container.stopLWModal().
                 try {
-                    Object obj;
-                    obj = AccessController.doPrivileged(
+                    Method method = AccessController.doPrivileged(
                         new ModalPrivilegedAction(
                             Container.class, "stopLWModal"));
-                    if (obj != null) {
-                        ((Method)obj).invoke(iFrame, (Object[])null);
+                    if (method != null) {
+                        method.invoke(iFrame, (Object[])null);
                     }
                 } catch (IllegalAccessException ex) {
                 } catch (IllegalArgumentException ex) {
@@ -1852,7 +1849,7 @@
      * description: The UI object that implements the optionpane's LookAndFeel
      */
     public void setUI(OptionPaneUI ui) {
-        if ((OptionPaneUI)this.ui != ui) {
+        if (this.ui != ui) {
             super.setUI(ui);
             invalidate();
         }
@@ -2327,7 +2324,7 @@
 
     // Serialization support.
     private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector      values = new Vector();
+        Vector<Object> values = new Vector<Object>();
 
         s.defaultWriteObject();
         // Save the icon, if its Serializable.
@@ -2342,7 +2339,7 @@
         }
         // Save the treeModel, if its Serializable.
         if(options != null) {
-            Vector           serOptions = new Vector();
+            Vector<Object> serOptions = new Vector<Object>();
 
             for(int counter = 0, maxCounter = options.length;
                 counter < maxCounter; counter++)
@@ -2510,16 +2507,16 @@
     /**
      * Retrieves a method from the provided class and makes it accessible.
      */
-    private static class ModalPrivilegedAction implements PrivilegedAction {
-        private Class clazz;
+    private static class ModalPrivilegedAction implements PrivilegedAction<Method> {
+        private Class<?> clazz;
         private String methodName;
 
-        public ModalPrivilegedAction(Class clazz, String methodName) {
+        public ModalPrivilegedAction(Class<?> clazz, String methodName) {
             this.clazz = clazz;
             this.methodName = methodName;
         }
 
-        public Object run() {
+        public Method run() {
             Method method = null;
             try {
                 method = clazz.getDeclaredMethod(methodName, (Class[])null);
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java	Wed Jul 05 16:42:37 2017 +0200
@@ -584,7 +584,7 @@
 
         int nitems = getComponentCount();
         // PENDING(ges): Why not use an array?
-        Vector tempItems = new Vector();
+        Vector<Component> tempItems = new Vector<Component>();
 
         /* Remove the item at index, nitems-index times
            storing them in a temporary vector in the
@@ -600,8 +600,8 @@
         /* Add the removed items back to the menu, they are
            already in the correct order in the temp vector.
            */
-        for (int i = 0; i < tempItems.size()  ; i++) {
-            add((Component)tempItems.elementAt(i));
+        for (Component tempItem : tempItems) {
+            add(tempItem);
         }
     }
 
@@ -632,8 +632,7 @@
      * @since 1.4
      */
     public PopupMenuListener[] getPopupMenuListeners() {
-        return (PopupMenuListener[])listenerList.getListeners(
-                PopupMenuListener.class);
+        return listenerList.getListeners(PopupMenuListener.class);
     }
 
     /**
@@ -665,8 +664,7 @@
      * @since 1.5
      */
     public MenuKeyListener[] getMenuKeyListeners() {
-        return (MenuKeyListener[])listenerList.getListeners(
-                MenuKeyListener.class);
+        return listenerList.getListeners(MenuKeyListener.class);
     }
 
     /**
@@ -781,7 +779,7 @@
             // set selection path before popping up!
             if (isPopupMenu()) {
                 MenuElement me[] = new MenuElement[1];
-                me[0] = (MenuElement) this;
+                me[0] = this;
                 MenuSelectionManager.defaultManager().setSelectedPath(me);
             }
         }
@@ -848,10 +846,7 @@
      * being displayed).
      */
     public boolean isVisible() {
-        if(popup != null)
-            return true;
-        else
-            return false;
+        return popup != null;
     }
 
     /**
@@ -1311,7 +1306,7 @@
 // Serialization support.
 ////////////
     private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector      values = new Vector();
+        Vector<Object> values = new Vector<Object>();
 
         s.defaultWriteObject();
         // Save the invoker, if its Serializable.
@@ -1494,7 +1489,7 @@
      */
     public MenuElement[] getSubElements() {
         MenuElement result[];
-        Vector tmp = new Vector();
+        Vector<MenuElement> tmp = new Vector<MenuElement>();
         int c = getComponentCount();
         int i;
         Component m;
@@ -1502,12 +1497,12 @@
         for(i=0 ; i < c ; i++) {
             m = getComponent(i);
             if(m instanceof MenuElement)
-                tmp.addElement(m);
+                tmp.addElement((MenuElement) m);
         }
 
         result = new MenuElement[tmp.size()];
         for(i=0,c=tmp.size() ; i < c ; i++)
-            result[i] = (MenuElement) tmp.elementAt(i);
+            result[i] = tmp.elementAt(i);
         return result;
     }
 
--- a/jdk/src/share/classes/javax/swing/JProgressBar.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JProgressBar.java	Wed Jul 05 16:42:37 2017 +0200
@@ -699,8 +699,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java	Wed Jul 05 16:42:37 2017 +0200
@@ -659,8 +659,7 @@
      * @since 1.4
      */
     public AdjustmentListener[] getAdjustmentListeners() {
-        return (AdjustmentListener[])listenerList.getListeners(
-                AdjustmentListener.class);
+        return listenerList.getListeners(AdjustmentListener.class);
     }
 
 
@@ -754,8 +753,8 @@
     public void setEnabled(boolean x)  {
         super.setEnabled(x);
         Component[] children = getComponents();
-        for(int i = 0; i < children.length; i++) {
-            children[i].setEnabled(x);
+        for (Component child : children) {
+            child.setEnabled(x);
         }
     }
 
--- a/jdk/src/share/classes/javax/swing/JSlider.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JSlider.java	Wed Jul 05 16:42:37 2017 +0200
@@ -270,8 +270,7 @@
     {
         checkOrientation(orientation);
         this.orientation = orientation;
-        sliderModel = new DefaultBoundedRangeModel(value, 0, min, max);
-        sliderModel.addChangeListener(changeListener);
+        setModel(new DefaultBoundedRangeModel(value, 0, min, max));
         updateUI();
     }
 
@@ -284,7 +283,6 @@
     {
         this.orientation = JSlider.HORIZONTAL;
         setModel(brm);
-        sliderModel.addChangeListener(changeListener);
         updateUI();
     }
 
@@ -476,15 +474,15 @@
 
         if (newModel != null) {
             newModel.addChangeListener(changeListener);
+        }
 
-            if (accessibleContext != null) {
-                accessibleContext.firePropertyChange(
-                                                    AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
-                                                    (oldModel == null
-                                                     ? null : Integer.valueOf(oldModel.getValue())),
-                                                    (newModel == null
-                                                     ? null : Integer.valueOf(newModel.getValue())));
-            }
+        if (accessibleContext != null) {
+            accessibleContext.firePropertyChange(
+                                                AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
+                                                (oldModel == null
+                                                 ? null : Integer.valueOf(oldModel.getValue())),
+                                                (newModel == null
+                                                 ? null : Integer.valueOf(newModel.getValue())));
         }
 
         firePropertyChange("model", oldModel, sliderModel);
@@ -930,7 +928,7 @@
             throw new IllegalArgumentException( "Label incremement must be > 0" );
         }
 
-        class SmartHashtable extends Hashtable implements PropertyChangeListener {
+        class SmartHashtable extends Hashtable<Object, Object> implements PropertyChangeListener {
             int increment = 0;
             int start = 0;
             boolean startAtMin = false;
@@ -977,9 +975,8 @@
                 if ( e.getPropertyName().equals( "minimum" ) ||
                      e.getPropertyName().equals( "maximum" ) ) {
 
-                    Dictionary labelTable = getLabelTable();
-                    Enumeration keys = labelTable.keys();
-                    Hashtable hashtable = new Hashtable();
+                    Enumeration keys = getLabelTable().keys();
+                    Hashtable<Object, Object> hashtable = new Hashtable<Object, Object>();
 
                     // Save the labels that were added by the developer
                     while ( keys.hasMoreElements() ) {
--- a/jdk/src/share/classes/javax/swing/JSpinner.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java	Wed Jul 05 16:42:37 2017 +0200
@@ -433,8 +433,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
 
@@ -1536,7 +1535,7 @@
                     return textField.getAccessibleContext();
                 }
             } else if (editor instanceof Accessible) {
-                return ((Accessible)editor).getAccessibleContext();
+                return editor.getAccessibleContext();
             }
             return null;
         }
@@ -1693,7 +1692,7 @@
             if (i < 0 || i > 1) {
                 return false;
             }
-            Object o = null;
+            Object o;
             if (i == 0) {
                 o = getNextValue(); // AccessibleAction.INCREMENT
             } else {
--- a/jdk/src/share/classes/javax/swing/JTabbedPane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JTabbedPane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -313,8 +313,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
@@ -2062,7 +2061,7 @@
                  * Accessibility classes unnecessarily.
                  */
                 AccessibleContext ac;
-                ac = ((Accessible) component).getAccessibleContext();
+                ac = component.getAccessibleContext();
                 if (ac != null) {
                     ac.setAccessibleParent(this);
                 }
--- a/jdk/src/share/classes/javax/swing/JTable.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JTable.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1677,16 +1677,16 @@
                 if (!forDrop && state != null) {
                     clearSelection();
 
-                    int[] rows = (int[])((int[][])state)[0];
-                    int[] cols = (int[])((int[][])state)[1];
-                    int[] anchleads = (int[])((int[][])state)[2];
-
-                    for (int i = 0; i < rows.length; i++) {
-                        addRowSelectionInterval(rows[i], rows[i]);
+                    int[] rows = ((int[][])state)[0];
+                    int[] cols = ((int[][])state)[1];
+                    int[] anchleads = ((int[][])state)[2];
+
+                    for (int row : rows) {
+                        addRowSelectionInterval(row, row);
                     }
 
-                    for (int i = 0; i < cols.length; i++) {
-                        addColumnSelectionInterval(cols[i], cols[i]);
+                    for (int col : cols) {
+                        addColumnSelectionInterval(col, col);
                     }
 
                     SwingUtilities2.setLeadAnchorWithoutSelection(
@@ -1776,7 +1776,7 @@
         boolean oldValue = this.autoCreateRowSorter;
         this.autoCreateRowSorter = autoCreateRowSorter;
         if (autoCreateRowSorter) {
-            setRowSorter(new TableRowSorter(getModel()));
+            setRowSorter(new TableRowSorter<TableModel>(getModel()));
         }
         firePropertyChange("autoCreateRowSorter", oldValue,
                            autoCreateRowSorter);
@@ -3198,7 +3198,7 @@
     private void accommodateDelta(int resizingColumnIndex, int delta) {
         int columnCount = getColumnCount();
         int from = resizingColumnIndex;
-        int to = columnCount;
+        int to;
 
         // Use the mode to determine how to absorb the changes.
         switch(autoResizeMode) {
@@ -3237,8 +3237,6 @@
         }
 
         adjustSizes(totalWidth + delta, r, false);
-
-        return;
     }
 
     private interface Resizable2 {
@@ -3492,7 +3490,7 @@
      * @see     #editingRow
      */
     public boolean isEditing() {
-        return (cellEditor == null)? false : true;
+        return cellEditor != null;
     }
 
     /**
@@ -3642,7 +3640,7 @@
             firePropertyChange("model", old, dataModel);
 
             if (getAutoCreateRowSorter()) {
-                setRowSorter(new TableRowSorter(dataModel));
+                setRowSorter(new TableRowSorter<TableModel>(dataModel));
             }
         }
     }
@@ -5160,7 +5158,7 @@
     public boolean getScrollableTracksViewportHeight() {
         return getFillsViewportHeight()
                && getParent() instanceof JViewport
-               && (((JViewport)getParent()).getHeight() > getPreferredSize().height);
+               && (getParent().getHeight() > getPreferredSize().height);
     }
 
     /**
@@ -5214,7 +5212,7 @@
         // by setting the client property JTable.autoStartsEdit to Boolean.FALSE.
         if (!retValue && condition == WHEN_ANCESTOR_OF_FOCUSED_COMPONENT &&
             isFocusOwner() &&
-            !Boolean.FALSE.equals((Boolean)getClientProperty("JTable.autoStartsEdit"))) {
+            !Boolean.FALSE.equals(getClientProperty("JTable.autoStartsEdit"))) {
             // We do not have a binding for the event.
             Component editorComponent = getEditorComponent();
             if (editorComponent == null) {
@@ -5436,7 +5434,7 @@
             this.value = null;
             ((JComponent)getComponent()).setBorder(new LineBorder(Color.black));
             try {
-                Class type = table.getColumnClass(column);
+                Class<?> type = table.getColumnClass(column);
                 // Since our obligation is to produce a value which is
                 // assignable for the required type it is OK to use the
                 // String constructor for columns which are declared
@@ -6627,10 +6625,10 @@
             } else if (name.compareTo("tableCellEditor") == 0) {
 
                 if (oldValue != null && oldValue instanceof TableCellEditor) {
-                    ((TableCellEditor) oldValue).removeCellEditorListener((CellEditorListener) this);
+                    ((TableCellEditor) oldValue).removeCellEditorListener(this);
                 }
                 if (newValue != null && newValue instanceof TableCellEditor) {
-                    ((TableCellEditor) newValue).addCellEditorListener((CellEditorListener) this);
+                    ((TableCellEditor) newValue).addCellEditorListener(this);
                 }
             }
         }
@@ -7045,7 +7043,7 @@
          */
         public Accessible getAccessibleSelection(int i) {
             if (i < 0 || i > getAccessibleSelectionCount()) {
-                return (Accessible) null;
+                return null;
             }
 
             int rowsSel = JTable.this.getSelectedRowCount();
@@ -7158,7 +7156,7 @@
                     return getAccessibleChild((r * ttlCols) + c);
                 }
             }
-            return (Accessible) null;
+            return null;
         }
 
         /**
@@ -7906,7 +7904,7 @@
                                   JTable.this, getValueAt(row, column),
                                   false, false, row, column);
                 if (component instanceof Accessible) {
-                    return ((Accessible) component).getAccessibleContext();
+                    return component.getAccessibleContext();
                 } else {
                     return null;
                 }
--- a/jdk/src/share/classes/javax/swing/JTextField.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JTextField.java	Wed Jul 05 16:42:37 2017 +0200
@@ -475,8 +475,7 @@
      * @since 1.4
      */
     public synchronized ActionListener[] getActionListeners() {
-        return (ActionListener[])listenerList.getListeners(
-                ActionListener.class);
+        return listenerList.getListeners(ActionListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/JTree.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JTree.java	Wed Jul 05 16:42:37 2017 +0200
@@ -187,7 +187,7 @@
      * information must be determined by visiting all the parent
      * paths and seeing if they are visible.
      */
-    transient private Hashtable           expandedState;
+    transient private Hashtable<TreePath, Boolean> expandedState;
 
 
     /**
@@ -281,7 +281,7 @@
      * Used when <code>setExpandedState</code> is invoked,
      * will be a <code>Stack</code> of <code>Stack</code>s.
      */
-    transient private Stack           expandedStack;
+    transient private Stack<Stack<TreePath>> expandedStack;
 
     /**
      * Lead selection path, may not be <code>null</code>.
@@ -652,9 +652,9 @@
     @ConstructorProperties({"model"})
     public JTree(TreeModel newModel) {
         super();
-        expandedStack = new Stack();
+        expandedStack = new Stack<Stack<TreePath>>();
         toggleClickCount = 2;
-        expandedState = new Hashtable();
+        expandedState = new Hashtable<TreePath, Boolean>();
         setLayout(null);
         rowHeight = 16;
         visibleRowCount = 20;
@@ -691,7 +691,7 @@
      *  description: The UI object that implements the Component's LookAndFeel.
      */
     public void setUI(TreeUI ui) {
-        if ((TreeUI)this.ui != ui) {
+        if (this.ui != ui) {
             settingUI = true;
             uiTreeExpansionListener = null;
             try {
@@ -1298,8 +1298,8 @@
         Object root = (model == null) ? null : model.getRoot();
         TreePath rootPath = (root == null) ? null : new TreePath(root);
 
-        TreePath child = null;
-        TreePath parent = null;
+        TreePath child;
+        TreePath parent;
         boolean outside = row == -1
                           || p.y < bounds.y
                           || p.y >= bounds.y + bounds.height;
@@ -1940,14 +1940,14 @@
         if(!isExpanded(parent))
             return null;
 
-        Enumeration       toggledPaths = expandedState.keys();
-        Vector            elements = null;
+        Enumeration<TreePath> toggledPaths = expandedState.keys();
+        Vector<TreePath> elements = null;
         TreePath          path;
         Object            value;
 
         if(toggledPaths != null) {
             while(toggledPaths.hasMoreElements()) {
-                path = (TreePath)toggledPaths.nextElement();
+                path = toggledPaths.nextElement();
                 value = expandedState.get(path);
                 // Add the path if it is expanded, a descendant of parent,
                 // and it is visible (all parents expanded). This is rather
@@ -1956,7 +1956,7 @@
                    ((Boolean)value).booleanValue() &&
                    parent.isDescendant(path) && isVisible(path)) {
                     if (elements == null) {
-                        elements = new Vector();
+                        elements = new Vector<TreePath>();
                     }
                     elements.addElement(path);
                 }
@@ -1990,9 +1990,9 @@
             return false;
 
         // Is this node expanded?
-        Object          value = expandedState.get(path);
-
-        if(value == null || !((Boolean)value).booleanValue())
+        Boolean value = expandedState.get(path);
+
+        if(value == null || !value.booleanValue())
             return false;
 
         // It is, make sure its parent is also expanded.
@@ -2018,7 +2018,7 @@
             TreePath         path = tree.getPathForRow(this, row);
 
             if(path != null) {
-                Boolean value = (Boolean)expandedState.get(path);
+                Boolean value = expandedState.get(path);
 
                 return (value != null && value.booleanValue());
             }
@@ -2704,8 +2704,7 @@
      * @since 1.4
      */
     public TreeExpansionListener[] getTreeExpansionListeners() {
-        return (TreeExpansionListener[])listenerList.getListeners(
-                TreeExpansionListener.class);
+        return listenerList.getListeners(TreeExpansionListener.class);
     }
 
     /**
@@ -2737,8 +2736,7 @@
      * @since 1.4
      */
     public TreeWillExpandListener[] getTreeWillExpandListeners() {
-        return (TreeWillExpandListener[])listenerList.getListeners(
-                TreeWillExpandListener.class);
+        return listenerList.getListeners(TreeWillExpandListener.class);
     }
 
     /**
@@ -2895,8 +2893,7 @@
      * @since 1.4
      */
     public TreeSelectionListener[] getTreeSelectionListeners() {
-        return (TreeSelectionListener[])listenerList.getListeners(
-                TreeSelectionListener.class);
+        return listenerList.getListeners(TreeSelectionListener.class);
     }
 
     /**
@@ -3030,7 +3027,7 @@
 
     // Serialization support.
     private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector      values = new Vector();
+        Vector<Object> values = new Vector<Object>();
 
         s.defaultWriteObject();
         // Save the cellRenderer, if its Serializable.
@@ -3077,9 +3074,9 @@
 
         // Create an instance of expanded state.
 
-        expandedState = new Hashtable();
-
-        expandedStack = new Stack();
+        expandedState = new Hashtable<TreePath, Boolean>();
+
+        expandedStack = new Stack<Stack<TreePath>>();
 
         Vector          values = (Vector)s.readObject();
         int             indexCounter = 0;
@@ -3132,13 +3129,13 @@
         TreeModel       model = getModel();
 
         if(model != null) {
-            Enumeration        paths = expandedState.keys();
+            Enumeration<TreePath> paths = expandedState.keys();
 
             if(paths != null) {
-                Vector         state = new Vector();
+                Vector<Object> state = new Vector<Object>();
 
                 while(paths.hasMoreElements()) {
-                    TreePath   path = (TreePath)paths.nextElement();
+                    TreePath path = paths.nextElement();
                     Object     archivePath;
 
                     try {
@@ -3502,7 +3499,7 @@
      */
     public boolean getScrollableTracksViewportWidth() {
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getWidth() > getPreferredSize().width);
+            return getParent().getWidth() > getPreferredSize().width;
         }
         return false;
     }
@@ -3518,7 +3515,7 @@
      */
     public boolean getScrollableTracksViewportHeight() {
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getHeight() > getPreferredSize().height);
+            return getParent().getHeight() > getPreferredSize().height;
         }
         return false;
     }
@@ -3535,14 +3532,14 @@
     protected void setExpandedState(TreePath path, boolean state) {
         if(path != null) {
             // Make sure all parents of path are expanded.
-            Stack         stack;
-            TreePath      parentPath = path.getParentPath();
+            Stack<TreePath> stack;
+            TreePath parentPath = path.getParentPath();
 
             if (expandedStack.size() == 0) {
-                stack = new Stack();
+                stack = new Stack<TreePath>();
             }
             else {
-                stack = (Stack)expandedStack.pop();
+                stack = expandedStack.pop();
             }
 
             try {
@@ -3556,7 +3553,7 @@
                     }
                 }
                 for(int counter = stack.size() - 1; counter >= 0; counter--) {
-                    parentPath = (TreePath)stack.pop();
+                    parentPath = stack.pop();
                     if(!isExpanded(parentPath)) {
                         try {
                             fireTreeWillExpand(parentPath);
@@ -3636,12 +3633,11 @@
         if(parent == null)
             return null;
 
-        Vector            descendants = new Vector();
-        Enumeration       nodes = expandedState.keys();
-        TreePath          path;
+        Vector<TreePath> descendants = new Vector<TreePath>();
+        Enumeration<TreePath> nodes = expandedState.keys();
 
         while(nodes.hasMoreElements()) {
-            path = (TreePath)nodes.nextElement();
+            TreePath path = nodes.nextElement();
             if(parent.isDescendant(path))
                 descendants.addElement(path);
         }
@@ -3664,8 +3660,8 @@
     {
          if(toRemove != null) {
              while(toRemove.hasMoreElements()) {
-                 Enumeration         descendants = getDescendantToggledPaths
-                                         ((TreePath)toRemove.nextElement());
+                 Enumeration descendants = getDescendantToggledPaths
+                         (toRemove.nextElement());
 
                  if(descendants != null) {
                      while(descendants.hasMoreElements()) {
@@ -4250,7 +4246,7 @@
         private AccessibleContext getCurrentAccessibleContext() {
             Component c = getCurrentComponent();
             if (c instanceof Accessible) {
-                return (((Accessible) c).getAccessibleContext());
+                return c.getAccessibleContext();
             } else {
                 return null;
             }
@@ -4573,7 +4569,7 @@
             private AccessibleContext getCurrentAccessibleContext() {
                 Component c = getCurrentComponent();
                 if (c instanceof Accessible) {
-                    return (((Accessible) c).getAccessibleContext());
+                    return c.getAccessibleContext();
                 } else {
                     return null;
                 }
@@ -5117,12 +5113,8 @@
             public boolean isVisible() {
                 Rectangle pathBounds = tree.getPathBounds(path);
                 Rectangle parentBounds = tree.getVisibleRect();
-                if (pathBounds != null && parentBounds != null &&
-                    parentBounds.intersects(pathBounds)) {
-                    return true;
-                } else {
-                    return false;
-                }
+                return pathBounds != null && parentBounds != null &&
+                        parentBounds.intersects(pathBounds);
             }
 
             public void setVisible(boolean b) {
--- a/jdk/src/share/classes/javax/swing/JViewport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JViewport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -389,7 +389,7 @@
                 // could be bigger than invalid size.
                 validateView();
             }
-            int     dx = 0, dy = 0;
+            int dx, dy;
 
             dx = positionAdjustment(getWidth(), contentRect.width, contentRect.x);
             dy = positionAdjustment(getHeight(), contentRect.height, contentRect.y);
@@ -682,10 +682,7 @@
      * @see JComponent#isPaintingOrigin()
      */
     boolean isPaintingOrigin() {
-        if (scrollMode == BACKINGSTORE_SCROLL_MODE) {
-            return true;
-        }
-        return false;
+        return scrollMode == BACKINGSTORE_SCROLL_MODE;
     }
 
 
@@ -903,11 +900,7 @@
       */
     public void setScrollMode(int mode) {
         scrollMode = mode;
-        if (mode == BACKINGSTORE_SCROLL_MODE) {
-            backingStore = true;
-        } else {
-            backingStore = false;
-        }
+        backingStore = mode == BACKINGSTORE_SCROLL_MODE;
     }
 
     /**
@@ -958,10 +951,10 @@
         }
     }
 
-    private final boolean isBlitting() {
+    private boolean isBlitting() {
         Component view = getView();
         return (scrollMode == BLIT_SCROLL_MODE) &&
-               (view instanceof JComponent) && ((JComponent)view).isOpaque();
+               (view instanceof JComponent) && view.isOpaque();
     }
 
 
@@ -1380,8 +1373,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/JWindow.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/JWindow.java	Wed Jul 05 16:42:37 2017 +0200
@@ -185,7 +185,7 @@
         super(owner == null? SwingUtilities.getSharedOwnerFrame() : owner);
         if (owner == null) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             addWindowListener(ownerShutdownListener);
         }
         windowInit();
@@ -212,7 +212,7 @@
               owner);
         if (owner == null) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             addWindowListener(ownerShutdownListener);
         }
         windowInit();
@@ -250,7 +250,7 @@
               owner, gc);
         if (owner == null) {
             WindowListener ownerShutdownListener =
-                (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener();
+                    SwingUtilities.getSharedOwnerFrameShutdownListener();
             addWindowListener(ownerShutdownListener);
         }
         windowInit();
--- a/jdk/src/share/classes/javax/swing/KeyboardManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/KeyboardManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -68,13 +68,13 @@
     /**
       * maps top-level containers to a sub-hashtable full of keystrokes
       */
-    Hashtable containerMap = new Hashtable();
+    Hashtable<Container, Hashtable> containerMap = new Hashtable<Container, Hashtable>();
 
     /**
       * Maps component/keystroke pairs to a topLevel container
       * This is mainly used for fast unregister operations
       */
-    Hashtable componentKeyStrokeMap = new Hashtable();
+    Hashtable<ComponentKeyStrokePair, Container> componentKeyStrokeMap = new Hashtable<ComponentKeyStrokePair, Container>();
 
     public static KeyboardManager getCurrentManager() {
         return currentManager;
@@ -95,7 +95,7 @@
          if (topContainer == null) {
              return;
          }
-         Hashtable keyMap = (Hashtable)containerMap.get(topContainer);
+         Hashtable keyMap = containerMap.get(topContainer);
 
          if (keyMap ==  null) {  // lazy evaluate one
              keyMap = registerNewTopContainer(topContainer);
@@ -114,8 +114,8 @@
            // Then add the old compoennt and the new compoent to the vector
            // then insert the vector in the table
            if (tmp != c) {  // this means this is already registered for this component, no need to dup
-               Vector v = new Vector();
-               v.addElement(tmp);
+               Vector<JComponent> v = new Vector<JComponent>();
+               v.addElement((JComponent) tmp);
                v.addElement(c);
                keyMap.put(k, v);
            }
@@ -154,13 +154,13 @@
 
          ComponentKeyStrokePair ckp = new ComponentKeyStrokePair(c,ks);
 
-         Object topContainer = componentKeyStrokeMap.get(ckp);
+         Container topContainer = componentKeyStrokeMap.get(ckp);
 
          if (topContainer == null) {  // never heard of this pairing, so bail
              return;
          }
 
-         Hashtable keyMap = (Hashtable)containerMap.get(topContainer);
+         Hashtable keyMap = containerMap.get(topContainer);
          if  (keyMap == null) { // this should never happen, but I'm being safe
              Thread.dumpStack();
              return;
@@ -221,7 +221,7 @@
                ks=KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers(), !pressed);
          }
 
-         Hashtable keyMap = (Hashtable)containerMap.get(topAncestor);
+         Hashtable keyMap = containerMap.get(topAncestor);
          if (keyMap != null) { // this container isn't registered, so bail
 
              Object tmp = keyMap.get(ks);
@@ -293,7 +293,7 @@
         if (top == null) {
             return;
         }
-        Hashtable keyMap = (Hashtable)containerMap.get(top);
+        Hashtable keyMap = containerMap.get(top);
 
         if (keyMap ==  null) {  // lazy evaluate one
              keyMap = registerNewTopContainer(top);
@@ -314,11 +314,11 @@
 
 
     public void unregisterMenuBar(JMenuBar mb) {
-        Object topContainer = getTopAncestor(mb);
+        Container topContainer = getTopAncestor(mb);
         if (topContainer == null) {
             return;
         }
-        Hashtable keyMap = (Hashtable)containerMap.get(topContainer);
+        Hashtable keyMap = containerMap.get(topContainer);
         if (keyMap!=null) {
             Vector v = (Vector)keyMap.get(JMenuBar.class);
             if (v != null) {
--- a/jdk/src/share/classes/javax/swing/LayoutComparator.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/LayoutComparator.java	Wed Jul 05 16:42:37 2017 +0200
@@ -39,7 +39,7 @@
  *
  * @author David Mendenhall
  */
-final class LayoutComparator implements Comparator, java.io.Serializable {
+final class LayoutComparator implements Comparator<Component>, java.io.Serializable {
 
     private static final int ROW_TOLERANCE = 10;
 
@@ -51,10 +51,7 @@
         leftToRight = orientation.isLeftToRight();
     }
 
-    public int compare(Object o1, Object o2) {
-        Component a = (Component)o1;
-        Component b = (Component)o2;
-
+    public int compare(Component a, Component b) {
         if (a == b) {
             return 0;
         }
@@ -65,9 +62,9 @@
         // each Component and then search from the Window down until the
         // hierarchy branches.
         if (a.getParent() != b.getParent()) {
-            LinkedList aAncestory, bAncestory;
+            LinkedList<Component> aAncestory = new LinkedList<Component>();
 
-            for(aAncestory = new LinkedList(); a != null; a = a.getParent()) {
+            for(; a != null; a = a.getParent()) {
                 aAncestory.add(a);
                 if (a instanceof Window) {
                     break;
@@ -78,7 +75,9 @@
                 throw new ClassCastException();
             }
 
-            for(bAncestory = new LinkedList(); b != null; b = b.getParent()) {
+            LinkedList<Component> bAncestory = new LinkedList<Component>();
+
+            for(; b != null; b = b.getParent()) {
                 bAncestory.add(b);
                 if (b instanceof Window) {
                     break;
@@ -89,18 +88,18 @@
                 throw new ClassCastException();
             }
 
-            for (ListIterator
+            for (ListIterator<Component>
                      aIter = aAncestory.listIterator(aAncestory.size()),
                      bIter = bAncestory.listIterator(bAncestory.size()); ;) {
                 if (aIter.hasPrevious()) {
-                    a = (Component)aIter.previous();
+                    a = aIter.previous();
                 } else {
                     // a is an ancestor of b
                     return -1;
                 }
 
                 if (bIter.hasPrevious()) {
-                    b = (Component)bIter.previous();
+                    b = bIter.previous();
                 } else {
                     // b is an ancestor of a
                     return 1;
--- a/jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -65,7 +65,7 @@
      * Constructs a LayoutFocusTraversalPolicy with the passed in
      * <code>Comparator</code>.
      */
-    LayoutFocusTraversalPolicy(Comparator c) {
+    LayoutFocusTraversalPolicy(Comparator<? super Component> c) {
         super(c);
     }
 
--- a/jdk/src/share/classes/javax/swing/LegacyGlueFocusTraversalPolicy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/LegacyGlueFocusTraversalPolicy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -48,8 +48,8 @@
     private transient FocusTraversalPolicy delegatePolicy;
     private transient DefaultFocusManager delegateManager;
 
-    private HashMap forwardMap = new HashMap(),
-        backwardMap = new HashMap();
+    private HashMap<Component, Component> forwardMap = new HashMap<Component, Component>(),
+        backwardMap = new HashMap<Component, Component>();
 
     LegacyGlueFocusTraversalPolicy(FocusTraversalPolicy delegatePolicy) {
         this.delegatePolicy = delegatePolicy;
@@ -70,11 +70,11 @@
     public Component getComponentAfter(Container focusCycleRoot,
                                        Component aComponent) {
         Component hardCoded = aComponent, prevHardCoded;
-        HashSet sanity = new HashSet();
+        HashSet<Component> sanity = new HashSet<Component>();
 
         do {
             prevHardCoded = hardCoded;
-            hardCoded = (Component)forwardMap.get(hardCoded);
+            hardCoded = forwardMap.get(hardCoded);
             if (hardCoded == null) {
                 if (delegatePolicy != null &&
                     prevHardCoded.isFocusCycleRoot(focusCycleRoot)) {
@@ -99,11 +99,11 @@
     public Component getComponentBefore(Container focusCycleRoot,
                                         Component aComponent) {
         Component hardCoded = aComponent, prevHardCoded;
-        HashSet sanity = new HashSet();
+        HashSet<Component> sanity = new HashSet<Component>();
 
         do {
             prevHardCoded = hardCoded;
-            hardCoded = (Component)backwardMap.get(hardCoded);
+            hardCoded = backwardMap.get(hardCoded);
             if (hardCoded == null) {
                 if (delegatePolicy != null &&
                     prevHardCoded.isFocusCycleRoot(focusCycleRoot)) {
--- a/jdk/src/share/classes/javax/swing/MenuSelectionManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/MenuSelectionManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -37,7 +37,7 @@
  * @author Arnaud Weber
  */
 public class MenuSelectionManager {
-    private Vector selection = new Vector();
+    private Vector<MenuElement> selection = new Vector<MenuElement>();
 
     /* diagnostic aids -- should be false for production builds. */
     private static final boolean TRACE =   false; // trace creates and disposes
@@ -100,14 +100,14 @@
         }
 
         for(i=0,c=path.length;i<c;i++) {
-            if(i < currentSelectionCount && (MenuElement)selection.elementAt(i) == path[i])
+            if (i < currentSelectionCount && selection.elementAt(i) == path[i])
                 firstDifference++;
             else
                 break;
         }
 
         for(i=currentSelectionCount - 1 ; i >= firstDifference ; i--) {
-            MenuElement me = (MenuElement)selection.elementAt(i);
+            MenuElement me = selection.elementAt(i);
             selection.removeElementAt(i);
             me.menuSelectionChanged(false);
         }
@@ -131,7 +131,7 @@
         MenuElement res[] = new MenuElement[selection.size()];
         int i,c;
         for(i=0,c=selection.size();i<c;i++)
-            res[i] = (MenuElement) selection.elementAt(i);
+            res[i] = selection.elementAt(i);
         return res;
     }
 
@@ -172,8 +172,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
@@ -258,8 +257,8 @@
                 if(!mc.isShowing())
                     continue;
                 if(mc instanceof JComponent) {
-                    cWidth  = ((JComponent)mc).getWidth();
-                    cHeight = ((JComponent)mc).getHeight();
+                    cWidth  = mc.getWidth();
+                    cHeight = mc.getHeight();
                 } else {
                     r2 = mc.getBounds();
                     cWidth  = r2.width;
@@ -338,7 +337,7 @@
         for(i=0,j=path.length; i<j ;i++){
             for (int k=0; k<=i; k++)
                 System.out.print("  ");
-            MenuElement me = (MenuElement) path[i];
+            MenuElement me = path[i];
             if(me instanceof JMenuItem) {
                 System.out.println(((JMenuItem)me).getText() + ", ");
             } else if (me instanceof JMenuBar) {
@@ -399,8 +398,8 @@
                 if(!mc.isShowing())
                     continue;
                 if(mc instanceof JComponent) {
-                    cWidth  = ((JComponent)mc).getWidth();
-                    cHeight = ((JComponent)mc).getHeight();
+                    cWidth  = mc.getWidth();
+                    cHeight = mc.getHeight();
                 } else {
                     r2 = mc.getBounds();
                     cWidth  = r2.width;
@@ -429,7 +428,7 @@
      */
     public void processKeyEvent(KeyEvent e) {
         MenuElement[] sel2 = new MenuElement[0];
-        sel2 = (MenuElement[])selection.toArray(sel2);
+        sel2 = selection.toArray(sel2);
         int selSize = sel2.length;
         MenuElement[] path;
 
@@ -474,7 +473,7 @@
      */
     public boolean isComponentPartOfCurrentMenu(Component c) {
         if(selection.size() > 0) {
-            MenuElement me = (MenuElement)selection.elementAt(0);
+            MenuElement me = selection.elementAt(0);
             return isComponentPartOfCurrentMenu(me,c);
         } else
             return false;
--- a/jdk/src/share/classes/javax/swing/MultiUIDefaults.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/MultiUIDefaults.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,8 +56,7 @@
             return value;
         }
 
-        for(int i = 0; i < tables.length; i++) {
-            UIDefaults table = tables[i];
+        for (UIDefaults table : tables) {
             value = (table != null) ? table.get(key) : null;
             if (value != null) {
                 return value;
@@ -75,8 +74,7 @@
             return value;
         }
 
-        for(int i = 0; i < tables.length; i++) {
-            UIDefaults table = tables[i];
+        for (UIDefaults table : tables) {
             value = (table != null) ? table.get(key,l) : null;
             if (value != null) {
                 return value;
@@ -89,8 +87,7 @@
 
     public int size() {
         int n = super.size();
-        for(int i = 0; i < tables.length; i++) {
-            UIDefaults table = tables[i];
+        for (UIDefaults table : tables) {
             n += (table != null) ? table.size() : 0;
         }
         return n;
@@ -102,7 +99,7 @@
     }
 
 
-    public Enumeration keys()
+    public Enumeration<Object> keys()
     {
         Enumeration[] enums = new Enumeration[1 + tables.length];
         enums[0] = super.keys();
@@ -116,7 +113,7 @@
     }
 
 
-    public Enumeration elements()
+    public Enumeration<Object> elements()
     {
         Enumeration[] enums = new Enumeration[1 + tables.length];
         enums[0] = super.elements();
@@ -137,7 +134,7 @@
         }
     }
 
-    private static class MultiUIDefaultsEnumerator implements Enumeration
+    private static class MultiUIDefaultsEnumerator implements Enumeration<Object>
     {
         Enumeration[] enums;
         int n = 0;
@@ -175,8 +172,7 @@
             return value;
         }
 
-        for(int i = 0; i < tables.length; i++) {
-            UIDefaults table = tables[i];
+        for (UIDefaults table : tables) {
             value = (table != null) ? table.remove(key) : null;
             if (value != null) {
                 return value;
@@ -189,8 +185,7 @@
 
     public void clear() {
         super.clear();
-        for(int i = 0; i < tables.length; i++) {
-            UIDefaults table = tables[i];
+        for (UIDefaults table : tables) {
             if (table != null) {
                 table.clear();
             }
--- a/jdk/src/share/classes/javax/swing/PopupFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/PopupFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -313,9 +313,9 @@
                 if(contents instanceof JPopupMenu) {
                     JPopupMenu jpm = (JPopupMenu) contents;
                     Component popComps[] = jpm.getComponents();
-                    for(int i=0;i<popComps.length;i++) {
-                        if(!(popComps[i] instanceof MenuElement) &&
-                           !(popComps[i] instanceof JSeparator)) {
+                    for (Component popComp : popComps) {
+                        if (!(popComp instanceof MenuElement) &&
+                                !(popComp instanceof JSeparator)) {
                             focusPopup = true;
                             break;
                         }
@@ -357,17 +357,16 @@
          */
         private static HeavyWeightPopup getRecycledHeavyWeightPopup(Window w) {
             synchronized (HeavyWeightPopup.class) {
-                List cache;
-                Map heavyPopupCache = getHeavyWeightPopupCache();
+                List<HeavyWeightPopup> cache;
+                Map<Window, List<HeavyWeightPopup>> heavyPopupCache = getHeavyWeightPopupCache();
 
                 if (heavyPopupCache.containsKey(w)) {
-                    cache = (List)heavyPopupCache.get(w);
+                    cache = heavyPopupCache.get(w);
                 } else {
                     return null;
                 }
-                int c;
-                if ((c = cache.size()) > 0) {
-                    HeavyWeightPopup r = (HeavyWeightPopup)cache.get(0);
+                if (cache.size() > 0) {
+                    HeavyWeightPopup r = cache.get(0);
                     cache.remove(0);
                     return r;
                 }
@@ -380,13 +379,13 @@
          * <code>Window</code> to a <code>List</code> of
          * <code>HeavyWeightPopup</code>s.
          */
-        private static Map getHeavyWeightPopupCache() {
+        private static Map<Window, List<HeavyWeightPopup>> getHeavyWeightPopupCache() {
             synchronized (HeavyWeightPopup.class) {
-                Map cache = (Map)SwingUtilities.appContextGet(
+                Map<Window, List<HeavyWeightPopup>> cache = (Map<Window, List<HeavyWeightPopup>>)SwingUtilities.appContextGet(
                                   heavyWeightPopupCacheKey);
 
                 if (cache == null) {
-                    cache = new HashMap(2);
+                    cache = new HashMap<Window, List<HeavyWeightPopup>>(2);
                     SwingUtilities.appContextPut(heavyWeightPopupCacheKey,
                                                  cache);
                 }
@@ -399,13 +398,13 @@
          */
         private static void recycleHeavyWeightPopup(HeavyWeightPopup popup) {
             synchronized (HeavyWeightPopup.class) {
-                List cache;
-                Object window = SwingUtilities.getWindowAncestor(
+                List<HeavyWeightPopup> cache;
+                Window window = SwingUtilities.getWindowAncestor(
                                      popup.getComponent());
-                Map heavyPopupCache = getHeavyWeightPopupCache();
+                Map<Window, List<HeavyWeightPopup>> heavyPopupCache = getHeavyWeightPopupCache();
 
                 if (window instanceof Popup.DefaultFrame ||
-                                      !((Window)window).isVisible()) {
+                                      !window.isVisible()) {
                     // If the Window isn't visible, we don't cache it as we
                     // likely won't ever get a windowClosed event to clean up.
                     // We also don't cache DefaultFrames as this indicates
@@ -414,28 +413,27 @@
                     popup._dispose();
                     return;
                 } else if (heavyPopupCache.containsKey(window)) {
-                    cache = (List)heavyPopupCache.get(window);
+                    cache = heavyPopupCache.get(window);
                 } else {
-                    cache = new ArrayList();
+                    cache = new ArrayList<HeavyWeightPopup>();
                     heavyPopupCache.put(window, cache);
                     // Clean up if the Window is closed
-                    final Window w = (Window)window;
+                    final Window w = window;
 
                     w.addWindowListener(new WindowAdapter() {
                         public void windowClosed(WindowEvent e) {
-                            List popups;
+                            List<HeavyWeightPopup> popups;
 
                             synchronized(HeavyWeightPopup.class) {
-                                Map heavyPopupCache2 =
+                                Map<Window, List<HeavyWeightPopup>> heavyPopupCache2 =
                                               getHeavyWeightPopupCache();
 
-                                popups = (List)heavyPopupCache2.remove(w);
+                                popups = heavyPopupCache2.remove(w);
                             }
                             if (popups != null) {
                                 for (int counter = popups.size() - 1;
                                                    counter >= 0; counter--) {
-                                    ((HeavyWeightPopup)popups.get(counter)).
-                                                       _dispose();
+                                    popups.get(counter)._dispose();
                                 }
                             }
                         }
@@ -534,10 +532,9 @@
                 Window[] ownedWindows = w.getOwnedWindows();
                 if(ownedWindows != null) {
                     Rectangle bnd = component.getBounds();
-                    for(int i=0; i<ownedWindows.length;i++) {
-                        Window owned = ownedWindows[i];
-                        if (owned.isVisible() &&
-                            bnd.intersects(owned.getBounds())) {
+                    for (Window window : ownedWindows) {
+                        if (window.isVisible() &&
+                                bnd.intersects(window.getBounds())) {
 
                             return true;
                         }
@@ -667,11 +664,11 @@
         /**
          * Returns the cache to use for heavy weight popups.
          */
-        private static List getLightWeightPopupCache() {
-            List cache = (List)SwingUtilities.appContextGet(
+        private static List<LightWeightPopup> getLightWeightPopupCache() {
+            List<LightWeightPopup> cache = (List<LightWeightPopup>)SwingUtilities.appContextGet(
                                    lightWeightPopupCacheKey);
             if (cache == null) {
-                cache = new ArrayList();
+                cache = new ArrayList<LightWeightPopup>();
                 SwingUtilities.appContextPut(lightWeightPopupCacheKey, cache);
             }
             return cache;
@@ -682,7 +679,7 @@
          */
         private static void recycleLightWeightPopup(LightWeightPopup popup) {
             synchronized (LightWeightPopup.class) {
-                List lightPopupCache = getLightWeightPopupCache();
+                List<LightWeightPopup> lightPopupCache = getLightWeightPopupCache();
                 if (lightPopupCache.size() < MAX_CACHE_SIZE) {
                     lightPopupCache.add(popup);
                 }
@@ -695,11 +692,9 @@
          */
         private static LightWeightPopup getRecycledLightWeightPopup() {
             synchronized (LightWeightPopup.class) {
-                List lightPopupCache = getLightWeightPopupCache();
-                int c;
-                if((c = lightPopupCache.size()) > 0) {
-                    LightWeightPopup r = (LightWeightPopup)lightPopupCache.
-                                               get(0);
+                List<LightWeightPopup> lightPopupCache = getLightWeightPopupCache();
+                if (lightPopupCache.size() > 0) {
+                    LightWeightPopup r = lightPopupCache.get(0);
                     lightPopupCache.remove(0);
                     return r;
                 }
@@ -755,8 +750,7 @@
 
             component.setLocation(p.x, p.y);
             if (parent instanceof JLayeredPane) {
-                ((JLayeredPane)parent).add(component,
-                                           JLayeredPane.POPUP_LAYER, 0);
+                parent.add(component, JLayeredPane.POPUP_LAYER, 0);
             } else {
                 parent.add(component);
             }
@@ -826,12 +820,12 @@
         /**
          * Returns the cache to use for medium weight popups.
          */
-        private static List getMediumWeightPopupCache() {
-            List cache = (List)SwingUtilities.appContextGet(
+        private static List<MediumWeightPopup> getMediumWeightPopupCache() {
+            List<MediumWeightPopup> cache = (List<MediumWeightPopup>)SwingUtilities.appContextGet(
                                     mediumWeightPopupCacheKey);
 
             if (cache == null) {
-                cache = new ArrayList();
+                cache = new ArrayList<MediumWeightPopup>();
                 SwingUtilities.appContextPut(mediumWeightPopupCacheKey, cache);
             }
             return cache;
@@ -842,7 +836,7 @@
          */
         private static void recycleMediumWeightPopup(MediumWeightPopup popup) {
             synchronized (MediumWeightPopup.class) {
-                List mediumPopupCache = getMediumWeightPopupCache();
+                List<MediumWeightPopup> mediumPopupCache = getMediumWeightPopupCache();
                 if (mediumPopupCache.size() < MAX_CACHE_SIZE) {
                     mediumPopupCache.add(popup);
                 }
@@ -855,12 +849,9 @@
          */
         private static MediumWeightPopup getRecycledMediumWeightPopup() {
             synchronized (MediumWeightPopup.class) {
-                java.util.List mediumPopupCache =
-                                     getMediumWeightPopupCache();
-                int c;
-                if ((c=mediumPopupCache.size()) > 0) {
-                    MediumWeightPopup r = (MediumWeightPopup)mediumPopupCache.
-                                                 get(0);
+                List<MediumWeightPopup> mediumPopupCache = getMediumWeightPopupCache();
+                if (mediumPopupCache.size() > 0) {
+                    MediumWeightPopup r = mediumPopupCache.get(0);
                     mediumPopupCache.remove(0);
                     return r;
                 }
@@ -904,7 +895,7 @@
                                                                        x, y);
                 component.setVisible(false);
                 component.setLocation(p.x, p.y);
-                ((JLayeredPane)parent).add(component, JLayeredPane.POPUP_LAYER,
+                parent.add(component, JLayeredPane.POPUP_LAYER,
                                            0);
             } else {
                 Point p = SwingUtilities.convertScreenLocationToParent(parent,
--- a/jdk/src/share/classes/javax/swing/RepaintManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/RepaintManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -40,6 +40,8 @@
 import sun.java2d.SunGraphicsEnvironment;
 import sun.security.action.GetPropertyAction;
 
+import com.sun.java.swing.SwingUtilities3;
+
 
 /**
  * This class manages repaint requests, allowing the number
@@ -303,6 +305,11 @@
      */
     public synchronized void addInvalidComponent(JComponent invalidComponent)
     {
+        RepaintManager delegate = getDelegate(invalidComponent);
+        if (delegate != null) {
+            delegate.addInvalidComponent(invalidComponent);
+            return;
+        }
         Component validateRoot = null;
 
         /* Find the first JComponent ancestor of this component whose
@@ -373,6 +380,11 @@
      * @see #addInvalidComponent
      */
     public synchronized void removeInvalidComponent(JComponent component) {
+        RepaintManager delegate = getDelegate(component);
+        if (delegate != null) {
+            delegate.removeInvalidComponent(component);
+            return;
+        }
         if(invalidComponents != null) {
             int index = invalidComponents.indexOf(component);
             if(index != -1) {
@@ -464,6 +476,11 @@
      */
     public void addDirtyRegion(JComponent c, int x, int y, int w, int h)
     {
+        RepaintManager delegate = getDelegate(c);
+        if (delegate != null) {
+            delegate.addDirtyRegion(c, x, y, w, h);
+            return;
+        }
         addDirtyRegion0(c, x, y, w, h);
     }
 
@@ -572,7 +589,7 @@
      */
     private synchronized boolean extendDirtyRegion(
         Component c, int x, int y, int w, int h) {
-        Rectangle r = (Rectangle)dirtyComponents.get(c);
+        Rectangle r = dirtyComponents.get(c);
         if (r != null) {
             // A non-null r implies c is already marked as dirty,
             // and that the parent is valid. Therefore we can
@@ -588,9 +605,13 @@
      *  dirty.
      */
     public Rectangle getDirtyRegion(JComponent aComponent) {
-        Rectangle r = null;
+        RepaintManager delegate = getDelegate(aComponent);
+        if (delegate != null) {
+            return delegate.getDirtyRegion(aComponent);
+        }
+        Rectangle r;
         synchronized(this) {
-            r = (Rectangle)dirtyComponents.get(aComponent);
+            r = dirtyComponents.get(aComponent);
         }
         if(r == null)
             return new Rectangle(0,0,0,0);
@@ -603,6 +624,11 @@
      * completely painted during the next paintDirtyRegions() call.
      */
     public void markCompletelyDirty(JComponent aComponent) {
+        RepaintManager delegate = getDelegate(aComponent);
+        if (delegate != null) {
+            delegate.markCompletelyDirty(aComponent);
+            return;
+        }
         addDirtyRegion(aComponent,0,0,Integer.MAX_VALUE,Integer.MAX_VALUE);
     }
 
@@ -611,6 +637,11 @@
      * get painted during the next paintDirtyRegions() call.
      */
     public void markCompletelyClean(JComponent aComponent) {
+        RepaintManager delegate = getDelegate(aComponent);
+        if (delegate != null) {
+            delegate.markCompletelyClean(aComponent);
+            return;
+        }
         synchronized(this) {
                 dirtyComponents.remove(aComponent);
         }
@@ -623,6 +654,10 @@
      * if it return true.
      */
     public boolean isCompletelyDirty(JComponent aComponent) {
+        RepaintManager delegate = getDelegate(aComponent);
+        if (delegate != null) {
+            return delegate.isCompletelyDirty(aComponent);
+        }
         Rectangle r;
 
         r = getDirtyRegion(aComponent);
@@ -710,8 +745,8 @@
         Rectangle rect;
         int localBoundsX = 0;
         int localBoundsY = 0;
-        int localBoundsH = 0;
-        int localBoundsW = 0;
+        int localBoundsH;
+        int localBoundsW;
         Enumeration keys;
 
         roots = new ArrayList<Component>(count);
@@ -818,7 +853,7 @@
 
         dx = rootDx = 0;
         dy = rootDy = 0;
-        tmp.setBounds((Rectangle) dirtyComponents.get(dirtyComponent));
+        tmp.setBounds(dirtyComponents.get(dirtyComponent));
 
         // System.out.println("Collect dirty component for bound " + tmp +
         //                                   "component bounds is " + cBounds);;
@@ -865,7 +900,7 @@
             Rectangle r;
             tmp.setLocation(tmp.x + rootDx - dx,
                             tmp.y + rootDy - dy);
-            r = (Rectangle)dirtyComponents.get(rootDirtyComponent);
+            r = dirtyComponents.get(rootDirtyComponent);
             SwingUtilities.computeUnion(tmp.x,tmp.y,tmp.width,tmp.height,r);
         }
 
@@ -900,6 +935,10 @@
      * repaint manager.
      */
     public Image getOffscreenBuffer(Component c,int proposedWidth,int proposedHeight) {
+        RepaintManager delegate = getDelegate(c);
+        if (delegate != null) {
+            return delegate.getOffscreenBuffer(c, proposedWidth, proposedHeight);
+        }
         return _getOffscreenBuffer(c, proposedWidth, proposedHeight);
     }
 
@@ -917,6 +956,11 @@
    */
     public Image getVolatileOffscreenBuffer(Component c,
                                             int proposedWidth,int proposedHeight) {
+        RepaintManager delegate = getDelegate(c);
+        if (delegate != null) {
+            return delegate.getVolatileOffscreenBuffer(c, proposedWidth,
+                                                        proposedHeight);
+        }
         GraphicsConfiguration config = c.getGraphicsConfiguration();
         if (config == null) {
             config = GraphicsEnvironment.getLocalGraphicsEnvironment().
@@ -941,7 +985,7 @@
 
     private Image _getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight) {
         Dimension maxSize = getDoubleBufferMaximumSize();
-        DoubleBufferInfo doubleBuffer = null;
+        DoubleBufferInfo doubleBuffer;
         int width, height;
 
         if (standardDoubleBuffer == null) {
@@ -1010,7 +1054,7 @@
         Iterator gcs = volatileMap.keySet().iterator();
         while (gcs.hasNext()) {
             GraphicsConfiguration gc = (GraphicsConfiguration)gcs.next();
-            VolatileImage image = (VolatileImage)volatileMap.get(gc);
+            VolatileImage image = volatileMap.get(gc);
             if (image.getWidth() > width || image.getHeight() > height) {
                 image.flush();
                 gcs.remove();
@@ -1178,7 +1222,7 @@
      */
     void beginPaint() {
         boolean multiThreadedPaint = false;
-        int paintDepth = 0;
+        int paintDepth;
         Thread currentThread = Thread.currentThread();
         synchronized(this) {
             paintDepth = this.paintDepth;
@@ -1550,4 +1594,11 @@
             prePaintDirtyRegions();
         }
     }
+    private RepaintManager getDelegate(Component c) {
+        RepaintManager delegate = SwingUtilities3.getDelegateRepaintManager(c);
+        if (this == delegate) {
+            delegate = null;
+        }
+        return delegate;
+    }
 }
--- a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -79,7 +79,7 @@
      * sorted list should be reused if possible.
      */
     transient private Container cachedRoot;
-    transient private List cachedCycle;
+    transient private List<Component> cachedCycle;
 
     // Delegate our fitness test to ContainerOrder so that we only have to
     // code the algorithm once.
@@ -111,7 +111,7 @@
         return cycle;
     }
     private int getComponentIndex(List<Component> cycle, Component aComponent) {
-        int index = 0;
+        int index;
         try {
             index = Collections.binarySearch(cycle, aComponent, comparator);
         } catch (ClassCastException e) {
@@ -130,14 +130,14 @@
         return index;
     }
 
-    private void enumerateAndSortCycle(Container focusCycleRoot, List cycle) {
+    private void enumerateAndSortCycle(Container focusCycleRoot, List<Component> cycle) {
         if (focusCycleRoot.isShowing()) {
             enumerateCycle(focusCycleRoot, cycle);
             Collections.sort(cycle, comparator);
         }
     }
 
-    private void enumerateCycle(Container container, List cycle) {
+    private void enumerateCycle(Container container, List<Component> cycle) {
         if (!(container.isVisible() && container.isDisplayable())) {
             return;
         }
@@ -145,8 +145,7 @@
         cycle.add(container);
 
         Component[] components = container.getComponents();
-        for (int i = 0; i < components.length; i++) {
-            Component comp = components[i];
+        for (Component comp : components) {
             if (comp instanceof Container) {
                 Container cont = (Container)comp;
 
@@ -385,8 +384,8 @@
             return getLastComponent(aContainer);
         }
 
-        Component comp = null;
-        Component tryComp = null;
+        Component comp;
+        Component tryComp;
 
         for (index--; index>=0; index--) {
             comp = cycle.get(index);
@@ -442,8 +441,7 @@
         }
         if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
 
-        for (int i = 0; i < cycle.size(); i++) {
-            Component comp = cycle.get(i);
+        for (Component comp : cycle) {
             if (accept(comp)) {
                 return comp;
             } else if (comp instanceof Container && comp != aContainer) {
--- a/jdk/src/share/classes/javax/swing/SpringLayout.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/SpringLayout.java	Wed Jul 05 16:42:37 2017 +0200
@@ -185,11 +185,11 @@
  * @since       1.4
  */
 public class SpringLayout implements LayoutManager2 {
-    private Map componentConstraints = new HashMap();
+    private Map<Component, Constraints> componentConstraints = new HashMap<Component, Constraints>();
 
     private Spring cyclicReference = Spring.constant(Spring.UNSET);
-    private Set cyclicSprings;
-    private Set acyclicSprings;
+    private Set<Spring> cyclicSprings;
+    private Set<Spring> acyclicSprings;
 
 
     /**
@@ -415,8 +415,7 @@
             }
             if (!valid) {
                 String[] all = horizontal ? ALL_HORIZONTAL : ALL_VERTICAL;
-                for (int i = 0; i < all.length; i++) {
-                    String s = all[i];
+                for (String s : all) {
                     if (!history.contains(s)) {
                         setConstraint(s, null);
                     }
@@ -822,8 +821,7 @@
        /*pp*/ void reset() {
            Spring[] allSprings = {x, y, width, height, east, south,
                horizontalCenter, verticalCenter, baseline};
-           for (int i = 0; i < allSprings.length; i++) {
-               Spring s = allSprings[i];
+           for (Spring s : allSprings) {
                if (s != null) {
                    s.setValue(Spring.UNSET);
                }
@@ -881,8 +879,8 @@
     public SpringLayout() {}
 
     private void resetCyclicStatuses() {
-        cyclicSprings = new HashSet();
-        acyclicSprings = new HashSet();
+        cyclicSprings = new HashSet<Spring>();
+        acyclicSprings = new HashSet<Spring>();
     }
 
     private void setParent(Container p) {
@@ -1145,7 +1143,7 @@
      * @return      the constraints for the specified component
      */
     public Constraints getConstraints(Component c) {
-       Constraints result = (Constraints)componentConstraints.get(c);
+       Constraints result = componentConstraints.get(c);
        if (result == null) {
            if (c instanceof javax.swing.JComponent) {
                 Object cp = ((javax.swing.JComponent)c).getClientProperty(SpringLayout.class);
--- a/jdk/src/share/classes/javax/swing/SwingUtilities.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/SwingUtilities.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -108,11 +108,8 @@
      * Return true if <code>a</code> contains <code>b</code>
      */
     public static final boolean isRectangleContainingRectangle(Rectangle a,Rectangle b) {
-        if (b.x >= a.x && (b.x + b.width) <= (a.x + a.width) &&
-            b.y >= a.y && (b.y + b.height) <= (a.y + a.height)) {
-            return true;
-        }
-        return false;
+        return b.x >= a.x && (b.x + b.width) <= (a.x + a.width) &&
+                b.y >= a.y && (b.y + b.height) <= (a.y + a.height);
     }
 
     /**
@@ -272,8 +269,7 @@
         }
         if (parent instanceof Container) {
             Component components[] = ((Container)parent).getComponents();
-            for (int i = 0 ; i < components.length ; i++) {
-                Component comp = components[i];
+            for (Component comp : components) {
                 if (comp != null && comp.isVisible()) {
                     Point loc = comp.getLocation();
                     if (comp instanceof Container) {
@@ -376,8 +372,8 @@
 
             do {
                 if(c instanceof JComponent) {
-                    x = ((JComponent)c).getX();
-                    y = ((JComponent)c).getY();
+                    x = c.getX();
+                    y = c.getY();
                 } else if(c instanceof java.applet.Applet ||
                           c instanceof java.awt.Window) {
                     try {
@@ -415,8 +411,8 @@
 
         do {
             if(c instanceof JComponent) {
-                x = ((JComponent)c).getX();
-                y = ((JComponent)c).getY();
+                x = c.getX();
+                y = c.getY();
             }  else if(c instanceof java.applet.Applet ||
                        c instanceof java.awt.Window) {
                 try {
@@ -974,12 +970,13 @@
 
         boolean textIsEmpty = (text == null) || text.equals("");
         int lsb = 0;
+        int rsb = 0;
         /* Unless both text and icon are non-null, we effectively ignore
          * the value of textIconGap.
          */
         int gap;
 
-        View v = null;
+        View v;
         if (textIsEmpty) {
             textR.width = textR.height = 0;
             text = "";
@@ -1015,7 +1012,7 @@
                 if (lsb < 0) {
                     textR.width -= lsb;
                 }
-                int rsb = SwingUtilities2.getRightSideBearing(c, fm, text);
+                rsb = SwingUtilities2.getRightSideBearing(c, fm, text);
                 if (rsb > 0) {
                     textR.width += rsb;
                 }
@@ -1118,6 +1115,11 @@
             // lsb is negative. Shift the x location so that the text is
             // visually drawn at the right location.
             textR.x -= lsb;
+
+            textR.width += lsb;
+        }
+        if (rsb > 0) {
+            textR.width -= rsb;
         }
 
         return text;
@@ -1242,8 +1244,8 @@
             children = ((Container)c).getComponents();
         }
         if (children != null) {
-            for(int i = 0; i < children.length; i++) {
-                updateComponentTreeUI0(children[i]);
+            for (Component child : children) {
+                updateComponentTreeUI0(child);
             }
         }
     }
@@ -1696,7 +1698,7 @@
      */
     public static void replaceUIActionMap(JComponent component,
                                           ActionMap uiActionMap) {
-        ActionMap map = component.getActionMap((uiActionMap != null));;
+        ActionMap map = component.getActionMap((uiActionMap != null));
 
         while (map != null) {
             ActionMap parent = map.getParent();
@@ -1764,8 +1766,7 @@
          */
         void installListeners() {
             Window[] windows = getOwnedWindows();
-            for (int ind = 0; ind < windows.length; ind++){
-                Window window = windows[ind];
+            for (Window window : windows) {
                 if (window != null) {
                     window.removeWindowListener(this);
                     window.addWindowListener(this);
@@ -1780,8 +1781,7 @@
         public void windowClosed(WindowEvent e) {
             synchronized(getTreeLock()) {
                 Window[] windows = getOwnedWindows();
-                for (int ind = 0; ind < windows.length; ind++) {
-                    Window window = windows[ind];
+                for (Window window : windows) {
                     if (window != null) {
                         if (window.isDisplayable()) {
                             return;
@@ -1869,7 +1869,7 @@
     }
 
 
-    static Class loadSystemClass(String className) throws ClassNotFoundException {
+    static Class<?> loadSystemClass(String className) throws ClassNotFoundException {
         return Class.forName(className, true, Thread.currentThread().
                              getContextClassLoader());
     }
--- a/jdk/src/share/classes/javax/swing/Timer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/Timer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -270,8 +270,7 @@
      * @since 1.4
      */
     public ActionListener[] getActionListeners() {
-        return (ActionListener[])listenerList.getListeners(
-                ActionListener.class);
+        return listenerList.getListeners(ActionListener.class);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/TimerQueue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/TimerQueue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -31,6 +31,7 @@
 
 import java.util.*;
 import java.util.concurrent.*;
+import java.util.concurrent.locks.*;
 import java.util.concurrent.atomic.AtomicLong;
 import sun.awt.AppContext;
 
@@ -52,7 +53,8 @@
         new StringBuffer("TimerQueue.expiredTimersKey");
 
     private final DelayQueue<DelayedTimer> queue;
-    volatile boolean running;
+    private volatile boolean running;
+    private final Lock runningLock;
 
     /* Lock object used in place of class object for synchronization.
      * (4187686)
@@ -69,7 +71,8 @@
         super();
         queue = new DelayQueue<DelayedTimer>();
         // Now start the TimerQueue thread.
-        start();
+        runningLock = new ReentrantLock();
+        startIfNeeded();
     }
 
 
@@ -87,33 +90,30 @@
     }
 
 
-    synchronized void start() {
-        if (running) {
-            throw new RuntimeException("Can't start a TimerQueue " +
-                                       "that is already running");
-        }
-        else {
-            final ThreadGroup threadGroup =
-                AppContext.getAppContext().getThreadGroup();
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                public Object run() {
-                    Thread timerThread = new Thread(threadGroup, TimerQueue.this,
-                                                    "TimerQueue");
-                    timerThread.setDaemon(true);
-                    timerThread.setPriority(Thread.NORM_PRIORITY);
-                    timerThread.start();
-                    return null;
-                }
-            });
-            running = true;
+    void startIfNeeded() {
+        if (! running) {
+            runningLock.lock();
+            try {
+                final ThreadGroup threadGroup =
+                    AppContext.getAppContext().getThreadGroup();
+                java.security.AccessController.doPrivileged(
+                    new java.security.PrivilegedAction<Object>() {
+                    public Object run() {
+                        Thread timerThread = new Thread(threadGroup, TimerQueue.this,
+                                                        "TimerQueue");
+                        timerThread.setDaemon(true);
+                        timerThread.setPriority(Thread.NORM_PRIORITY);
+                        timerThread.start();
+                        return null;
+                    }
+                });
+                running = true;
+            } finally {
+                runningLock.unlock();
+            }
         }
     }
 
-     synchronized void stop() {
-         running = false;
-     }
-
     void addTimer(Timer timer, long delayMillis) {
         timer.getLock().lock();
         try {
@@ -164,6 +164,7 @@
 
 
     public void run() {
+        runningLock.lock();
         try {
             while (running) {
                 try {
@@ -195,14 +196,14 @@
             }
         }
         catch (ThreadDeath td) {
-            synchronized (this) {
-                running = false;
-                // Mark all the timers we contain as not being queued.
-                for (DelayedTimer delayedTimer : queue) {
-                    delayedTimer.getTimer().cancelEvent();
-                }
-                throw td;
+            // Mark all the timers we contain as not being queued.
+            for (DelayedTimer delayedTimer : queue) {
+                delayedTimer.getTimer().cancelEvent();
             }
+            throw td;
+        } finally {
+            running = false;
+            runningLock.unlock();
         }
     }
 
@@ -225,7 +226,7 @@
     /**
      * Returns nanosecond time offset by origin
      */
-    private final static long now() {
+    private static long now() {
         return System.nanoTime() - NANO_ORIGIN;
     }
 
--- a/jdk/src/share/classes/javax/swing/UIDefaults.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/UIDefaults.java	Wed Jul 05 16:42:37 2017 +0200
@@ -72,11 +72,11 @@
  */
 public class UIDefaults extends Hashtable<Object,Object>
 {
-    private static final Object PENDING = new String("Pending");
+    private static final Object PENDING = "Pending";
 
     private SwingPropertyChangeSupport changeSupport;
 
-    private Vector resourceBundles;
+    private Vector<String> resourceBundles;
 
     private Locale defaultLocale = Locale.getDefault();
 
@@ -86,7 +86,7 @@
      * Access to this should be done while holding a lock on the
      * UIDefaults, eg synchronized(this).
      */
-    private Map resourceCache;
+    private Map<Locale, Map<String, Object>> resourceCache;
 
     /**
      * Creates an empty defaults table.
@@ -106,7 +106,7 @@
      */
     public UIDefaults(int initialCapacity, float loadFactor) {
         super(initialCapacity, loadFactor);
-        resourceCache = new HashMap();
+        resourceCache = new HashMap<Locale, Map<String, Object>>();
     }
 
 
@@ -281,24 +281,24 @@
             if( defaultLocale == null )
                 return null;
             else
-                l = (Locale)defaultLocale;
+                l = defaultLocale;
         }
 
         synchronized(this) {
-            return getResourceCache(l).get((String)key);
+            return getResourceCache(l).get(key);
         }
     }
 
     /**
      * Returns a Map of the known resources for the given locale.
      */
-    private Map getResourceCache(Locale l) {
-        Map values = (Map)resourceCache.get(l);
+    private Map<String, Object> getResourceCache(Locale l) {
+        Map<String, Object> values = resourceCache.get(l);
 
         if (values == null) {
-            values = new HashMap();
+            values = new HashMap<String, Object>();
             for (int i=resourceBundles.size()-1; i >= 0; i--) {
-                String bundleName = (String)resourceBundles.get(i);
+                String bundleName = resourceBundles.get(i);
                 try {
                     Control c = CoreResourceBundleControl.getRBControlInstance(bundleName);
                     ResourceBundle b;
@@ -751,7 +751,7 @@
         Object cl = get("ClassLoader");
         ClassLoader uiClassLoader =
             (cl != null) ? (ClassLoader)cl : target.getClass().getClassLoader();
-        Class uiClass = getUIClass(target.getUIClassID(), uiClassLoader);
+        Class<? extends ComponentUI> uiClass = getUIClass(target.getUIClassID(), uiClassLoader);
         Object uiObject = null;
 
         if (uiClass == null) {
@@ -761,8 +761,7 @@
             try {
                 Method m = (Method)get(uiClass);
                 if (m == null) {
-                    Class acClass = javax.swing.JComponent.class;
-                    m = uiClass.getMethod("createUI", new Class[]{acClass});
+                    m = uiClass.getMethod("createUI", new Class[]{JComponent.class});
                     put(uiClass, m);
                 }
                 uiObject = MethodUtil.invoke(m, null, new Object[]{target});
@@ -862,7 +861,7 @@
             return;
         }
         if( resourceBundles == null ) {
-            resourceBundles = new Vector(5);
+            resourceBundles = new Vector<String>(5);
         }
         if (!resourceBundles.contains(bundleName)) {
             resourceBundles.add( bundleName );
@@ -1064,7 +1063,7 @@
             className = c;
             methodName = m;
             if (o != null) {
-                args = (Object[])o.clone();
+                args = o.clone();
             }
         }
 
@@ -1079,10 +1078,10 @@
             // In order to pick up the security policy in effect at the
             // time of creation we use a doPrivileged with the
             // AccessControlContext that was in place when this was created.
-            return AccessController.doPrivileged(new PrivilegedAction() {
+            return AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 public Object run() {
                     try {
-                        Class c;
+                        Class<?> c;
                         Object cl;
                         // See if we should use a separate ClassLoader
                         if (table == null || !((cl = table.get("ClassLoader"))
--- a/jdk/src/share/classes/javax/swing/UIManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/UIManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -191,7 +191,7 @@
         MultiUIDefaults multiUIDefaults = new MultiUIDefaults(tables);
         LookAndFeel lookAndFeel;
         LookAndFeel multiLookAndFeel = null;
-        Vector auxLookAndFeels = null;
+        Vector<LookAndFeel> auxLookAndFeels = null;
         SwingPropertyChangeSupport changeSupport;
 
         UIDefaults getLookAndFeelDefaults() { return tables[0]; }
@@ -378,7 +378,7 @@
     private static LookAndFeelInfo[] installedLAFs;
 
     static {
-        ArrayList iLAFs = new ArrayList(4);
+        ArrayList<LookAndFeelInfo> iLAFs = new ArrayList<LookAndFeelInfo>(4);
         iLAFs.add(new LookAndFeelInfo(
                       "Metal", "javax.swing.plaf.metal.MetalLookAndFeel"));
         iLAFs.add(new LookAndFeelInfo("CDE/Motif",
@@ -400,8 +400,7 @@
             iLAFs.add(new LookAndFeelInfo("GTK+",
                   "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"));
         }
-        installedLAFs = (LookAndFeelInfo[])iLAFs.toArray(
-                        new LookAndFeelInfo[iLAFs.size()]);
+        installedLAFs = iLAFs.toArray(new LookAndFeelInfo[iLAFs.size()]);
     }
 
 
@@ -640,7 +639,7 @@
      * @see #getSystemLookAndFeelClassName
      */
     public static String getCrossPlatformLookAndFeelClassName() {
-        String laf = (String)AccessController.doPrivileged(
+        String laf = AccessController.doPrivileged(
                              new GetPropertyAction("swing.crossplatformlaf"));
         if (laf != null) {
             return laf;
@@ -1079,9 +1078,9 @@
             // for that.
             return;
         }
-        Vector v = getLAFState().auxLookAndFeels;
+        Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
         if (v == null) {
-            v = new Vector();
+            v = new Vector<LookAndFeel>();
         }
 
         if (!v.contains(laf)) {
@@ -1115,7 +1114,7 @@
 
         boolean result;
 
-        Vector v = getLAFState().auxLookAndFeels;
+        Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
         if ((v == null) || (v.size() == 0)) {
             return false;
         }
@@ -1151,14 +1150,14 @@
     static public LookAndFeel[] getAuxiliaryLookAndFeels() {
         maybeInitialize();
 
-        Vector v = getLAFState().auxLookAndFeels;
+        Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
         if ((v == null) || (v.size() == 0)) {
             return null;
         }
         else {
             LookAndFeel[] rv = new LookAndFeel[v.size()];
             for (int i = 0; i < rv.length; i++) {
-                rv[i] = (LookAndFeel)v.elementAt(i);
+                rv[i] = v.elementAt(i);
             }
             return rv;
         }
@@ -1225,7 +1224,7 @@
             final Properties props = new Properties();
 
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
+                new java.security.PrivilegedAction<Object>() {
                 public Object run() {
                     try {
                         File file = new File(makeSwingPropertiesFilename());
@@ -1284,7 +1283,7 @@
          * property.  For example given "swing.installedlafs=motif,windows"
          * lafs = {"motif", "windows"}.
          */
-        Vector lafs = new Vector();
+        Vector<String> lafs = new Vector<String>();
         StringTokenizer st = new StringTokenizer(ilafsString, ",", false);
         while (st.hasMoreTokens()) {
             lafs.addElement(st.nextToken());
@@ -1294,9 +1293,8 @@
          * list.  If they both exist then add a LookAndFeelInfo to
          * the installedLafs array.
          */
-        Vector ilafs = new Vector(lafs.size());
-        for(int i = 0; i < lafs.size(); i++) {
-            String laf = (String)lafs.elementAt(i);
+        Vector<LookAndFeelInfo> ilafs = new Vector<LookAndFeelInfo>(lafs.size());
+        for (String laf : lafs) {
             String name = swingProps.getProperty(makeInstalledLAFKey(laf, "name"), laf);
             String cls = swingProps.getProperty(makeInstalledLAFKey(laf, "class"));
             if (cls != null) {
@@ -1306,7 +1304,7 @@
 
         installedLAFs = new LookAndFeelInfo[ilafs.size()];
         for(int i = 0; i < ilafs.size(); i++) {
-            installedLAFs[i] = (LookAndFeelInfo)(ilafs.elementAt(i));
+            installedLAFs[i] = ilafs.elementAt(i);
         }
     }
 
@@ -1350,7 +1348,7 @@
             return;
         }
 
-        Vector auxLookAndFeels = new Vector();
+        Vector<LookAndFeel> auxLookAndFeels = new Vector<LookAndFeel>();
 
         StringTokenizer p = new StringTokenizer(auxLookAndFeelNames,",");
         String factoryName;
@@ -1451,7 +1449,7 @@
                         Component c = e.getComponent();
 
                         if ((!(c instanceof JComponent) ||
-                             (c != null && !((JComponent)c).isEnabled())) &&
+                             (c != null && !c.isEnabled())) &&
                                 JComponent.KeyboardState.shouldProcess(e) &&
                                 SwingUtilities.processKeyBindings(e)) {
                             e.consume();
--- a/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Wed Jul 05 16:42:37 2017 +0200
@@ -79,10 +79,13 @@
     }
 
     /**
-     * Returns whether or not this compound border is opaque.
-     * Returns true if both the inside and outside borders are
-     * non-null and opaque; returns false otherwise.
+     * Returns whether or not the compound border is opaque.
+     *
+     * @return {@code true} if the inside and outside borders
+     *         are each either {@code null} or opaque;
+     *         or {@code false} otherwise
      */
+    @Override
     public boolean isBorderOpaque() {
         return (outsideBorder == null || outsideBorder.isBorderOpaque()) &&
                (insideBorder == null || insideBorder.isBorderOpaque());
--- a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -160,7 +160,9 @@
       *         is editing
       */
     public ColorSelectionModel getColorSelectionModel() {
-        return chooser.getSelectionModel();
+        return (this.chooser != null)
+                ? this.chooser.getSelectionModel()
+                : null;
     }
 
     /**
@@ -168,7 +170,17 @@
      * @return the <code>Color</code> that is selected
      */
     protected Color getColorFromModel() {
-        return getColorSelectionModel().getSelectedColor();
+        ColorSelectionModel model = getColorSelectionModel();
+        return (model != null)
+                ? model.getSelectedColor()
+                : null;
+    }
+
+    void setSelectedColor(Color color) {
+        ColorSelectionModel model = getColorSelectionModel();
+        if (model != null) {
+            model.setSelectedColor(color);
+        }
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2001 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,7 @@
 
 package javax.swing.colorchooser;
 
-import javax.swing.*;
-
-
+import javax.swing.JComponent;
 
 /**
  * A class designed to produce preconfigured "accessory" objects to
@@ -49,16 +47,17 @@
 
     private ColorChooserComponentFactory() { } // can't instantiate
 
-
     public static AbstractColorChooserPanel[] getDefaultChooserPanels() {
-        AbstractColorChooserPanel[] choosers = { new DefaultSwatchChooserPanel(),
-                                                 new DefaultHSBChooserPanel(),
-                                                 new DefaultRGBChooserPanel() };
-        return choosers;
+        return new AbstractColorChooserPanel[] {
+                new DefaultSwatchChooserPanel(),
+                new ColorChooserPanel(new ColorModelHSV()),
+                new ColorChooserPanel(new ColorModelHSL()),
+                new ColorChooserPanel(new ColorModel()),
+                new ColorChooserPanel(new ColorModelCMYK()),
+        };
     }
 
     public static JComponent getPreviewPanel() {
         return new DefaultPreviewPanel();
     }
-
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserPanel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.Icon;
+import javax.swing.JComponent;
+import javax.swing.JFormattedTextField;
+import javax.swing.JLabel;
+import javax.swing.SwingConstants;
+
+final class ColorChooserPanel extends AbstractColorChooserPanel implements PropertyChangeListener {
+
+    private static final int MASK = 0xFF000000;
+    private final ColorModel model;
+    private final ColorPanel panel;
+    private final DiagramComponent slider;
+    private final DiagramComponent diagram;
+    private final JFormattedTextField text;
+    private final JLabel label;
+
+    ColorChooserPanel(ColorModel model) {
+        this.model = model;
+        this.panel = new ColorPanel(this.model);
+        this.slider = new DiagramComponent(this.panel, false);
+        this.diagram = new DiagramComponent(this.panel, true);
+        this.text = new JFormattedTextField();
+        this.label = new JLabel(null, null, SwingConstants.RIGHT);
+        ValueFormatter.init(6, true, this.text);
+    }
+
+    @Override
+    public void updateChooser() {
+        Color color = getColorFromModel();
+        if (color != null) {
+            this.panel.setColor(color);
+            this.text.setValue(Integer.valueOf(color.getRGB()));
+            this.slider.repaint();
+            this.diagram.repaint();
+        }
+    }
+
+    @Override
+    protected void buildChooser() {
+        if (0 == getComponentCount()) {
+            setLayout(new GridBagLayout());
+
+            GridBagConstraints gbc = new GridBagConstraints();
+
+            gbc.gridx = 3;
+            gbc.gridwidth = 2;
+            gbc.weighty = 1.0;
+            gbc.anchor = GridBagConstraints.NORTH;
+            gbc.fill = GridBagConstraints.HORIZONTAL;
+            gbc.insets.top = 10;
+            gbc.insets.right = 10;
+            add(this.panel, gbc);
+
+            gbc.gridwidth = 1;
+            gbc.weightx = 1.0;
+            gbc.weighty = 0.0;
+            gbc.anchor = GridBagConstraints.CENTER;
+            gbc.insets.right = 5;
+            gbc.insets.bottom = 10;
+            add(this.label, gbc);
+
+            gbc.gridx = 4;
+            gbc.weightx = 0.0;
+            gbc.insets.right = 10;
+            add(this.text, gbc);
+
+            gbc.gridx = 2;
+            gbc.gridheight = 2;
+            gbc.anchor = GridBagConstraints.NORTH;
+            gbc.ipadx = this.text.getPreferredSize().height;
+            gbc.ipady = getPreferredSize().height;
+            add(this.slider, gbc);
+
+            gbc.gridx = 1;
+            gbc.insets.left = 10;
+            gbc.ipadx = gbc.ipady;
+            add(this.diagram, gbc);
+
+            this.label.setLabelFor(this.text);
+            this.text.addPropertyChangeListener("value", this); // NON-NLS: the property name
+            this.slider.setBorder(this.text.getBorder());
+            this.diagram.setBorder(this.text.getBorder());
+
+            setInheritsPopupMenu(this, true); // CR:4966112
+        }
+        String label = this.model.getText(this, "HexCode"); // NON-NLS: suffix
+        boolean visible = label != null;
+        this.text.setVisible(visible);
+        this.label.setVisible(visible);
+        if (visible) {
+            this.label.setText(label);
+            int mnemonic = this.model.getInteger(this, "HexCodeMnemonic"); // NON-NLS: suffix
+            if (mnemonic > 0) {
+                this.label.setDisplayedMnemonic(mnemonic);
+                mnemonic = this.model.getInteger(this, "HexCodeMnemonicIndex"); // NON-NLS: suffix
+                if (mnemonic >= 0) {
+                    this.label.setDisplayedMnemonicIndex(mnemonic);
+                }
+            }
+        }
+        this.panel.buildPanel();
+    }
+
+    @Override
+    public String getDisplayName() {
+        return this.model.getText(this, "Name"); // NON-NLS: suffix
+    }
+
+    @Override
+    public int getMnemonic() {
+        return this.model.getInteger(this, "Mnemonic"); // NON-NLS: suffix
+    }
+
+    @Override
+    public int getDisplayedMnemonicIndex() {
+        return this.model.getInteger(this, "DisplayedMnemonicIndex"); // NON-NLS: suffix
+    }
+
+    @Override
+    public Icon getSmallDisplayIcon() {
+        return null;
+    }
+
+    @Override
+    public Icon getLargeDisplayIcon() {
+        return null;
+    }
+
+    public void propertyChange(PropertyChangeEvent event) {
+        ColorSelectionModel model = getColorSelectionModel();
+        if (model != null) {
+            Object object = event.getNewValue();
+            if (object instanceof Integer) {
+                int value = MASK & model.getSelectedColor().getRGB() | (Integer) object;
+                model.setSelectedColor(new Color(value, true));
+            }
+        }
+        this.text.selectAll();
+    }
+
+    /**
+     * Allows to show context popup for all components recursively.
+     *
+     * @param component  the root component of the tree
+     * @param value      whether or not the popup menu is inherited
+     */
+    private static void setInheritsPopupMenu(JComponent component, boolean value) {
+        component.setInheritsPopupMenu(value);
+        for (Object object : component.getComponents()) {
+            if (object instanceof JComponent) {
+                setInheritsPopupMenu((JComponent) object, value);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import java.awt.Component;
+import javax.swing.UIManager;
+
+class ColorModel {
+
+    private final String prefix;
+    private final String[] labels;
+
+    ColorModel(String name, String... labels) {
+        this.prefix = "ColorChooser." + name; // NON-NLS: default prefix
+        this.labels = labels;
+    }
+
+    ColorModel() {
+        this("rgb", "Red", "Green", "Blue", "Alpha"); // NON-NLS: components
+    }
+
+    void setColor(int color, float[] model) {
+        model[0] = normalize(color >> 16);
+        model[1] = normalize(color >> 8);
+        model[2] = normalize(color);
+        model[3] = normalize(color >> 24);
+    }
+
+    int getColor(float[] model) {
+        return to8bit(model[2]) | (to8bit(model[1]) << 8) | (to8bit(model[0]) << 16) | (to8bit(model[3]) << 24);
+    }
+
+    int getCount() {
+        return this.labels.length;
+    }
+
+    int getMinimum(int index) {
+        return 0;
+    }
+
+    int getMaximum(int index) {
+        return 255;
+    }
+
+    float getDefault(int index) {
+        return 0.0f;
+    }
+
+    final String getLabel(Component component, int index) {
+        return getText(component, this.labels[index]);
+    }
+
+    private static float normalize(int value) {
+        return (float) (value & 0xFF) / 255.0f;
+    }
+
+    private static int to8bit(float value) {
+        return (int) (255.0f * value);
+    }
+
+    final String getText(Component component, String suffix) {
+        return UIManager.getString(this.prefix + suffix + "Text", component.getLocale()); // NON-NLS: default postfix
+    }
+
+    final int getInteger(Component component, String suffix) {
+        Object value = UIManager.get(this.prefix + suffix, component.getLocale());
+        if (value instanceof Integer) {
+            return (Integer) value;
+        }
+        if (value instanceof String) {
+            try {
+                return Integer.parseInt((String) value);
+            }
+            catch (NumberFormatException exception) {
+            }
+        }
+        return -1;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorModelCMYK.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+final class ColorModelCMYK extends ColorModel {
+
+    ColorModelCMYK() {
+        super("cmyk", "Cyan", "Magenta", "Yellow", "Black", "Alpha"); // NON-NLS: components
+    }
+
+    @Override
+    void setColor(int color, float[] space) {
+        super.setColor(color, space);
+        space[4] = space[3];
+        RGBtoCMYK(space, space);
+    }
+
+    @Override
+    int getColor(float[] space) {
+        CMYKtoRGB(space, space);
+        space[3] = space[4];
+        return super.getColor(space);
+    }
+
+    /**
+     * Converts CMYK components of a color to a set of RGB components.
+     *
+     * @param cmyk  a float array with length equal to
+     *              the number of CMYK components
+     * @param rgb   a float array with length of at least 3
+     *              that contains RGB components of a color
+     * @return a float array that contains RGB components
+     */
+    private static float[] CMYKtoRGB(float[] cmyk, float[] rgb) {
+        if (rgb == null) {
+            rgb = new float[3];
+        }
+        rgb[0] = 1.0f + cmyk[0] * cmyk[3] - cmyk[3] - cmyk[0];
+        rgb[1] = 1.0f + cmyk[1] * cmyk[3] - cmyk[3] - cmyk[1];
+        rgb[2] = 1.0f + cmyk[2] * cmyk[3] - cmyk[3] - cmyk[2];
+        return rgb;
+    }
+
+    /**
+     * Converts RGB components of a color to a set of CMYK components.
+     *
+     * @param rgb   a float array with length of at least 3
+     *              that contains RGB components of a color
+     * @param cmyk  a float array with length equal to
+     *              the number of CMYK components
+     * @return a float array that contains CMYK components
+     */
+    private static float[] RGBtoCMYK(float[] rgb, float[] cmyk) {
+        if (cmyk == null) {
+            cmyk = new float[4];
+        }
+        float max = ColorModelHSL.max(rgb[0], rgb[1], rgb[2]);
+        if (max > 0.0f) {
+            cmyk[0] = 1.0f - rgb[0] / max;
+            cmyk[1] = 1.0f - rgb[1] / max;
+            cmyk[2] = 1.0f - rgb[2] / max;
+        }
+        else {
+            cmyk[0] = 0.0f;
+            cmyk[1] = 0.0f;
+            cmyk[2] = 0.0f;
+        }
+        cmyk[3] = 1.0f - max;
+        return cmyk;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorModelHSL.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+final class ColorModelHSL extends ColorModel {
+
+    ColorModelHSL() {
+        super("hsl", "Hue", "Saturation", "Lightness", "Transparency"); // NON-NLS: components
+    }
+
+    @Override
+    void setColor(int color, float[] space) {
+        super.setColor(color, space);
+        RGBtoHSL(space, space);
+        space[3] = 1.0f - space[3];
+    }
+
+    @Override
+    int getColor(float[] space) {
+        space[3] = 1.0f - space[3];
+        HSLtoRGB(space, space);
+        return super.getColor(space);
+    }
+
+    @Override
+    int getMaximum(int index) {
+        return (index == 0) ? 360 : 100;
+    }
+
+    @Override
+    float getDefault(int index) {
+        return (index == 0) ? -1.0f : (index == 2) ? 0.5f : 1.0f;
+    }
+
+    /**
+     * Converts HSL components of a color to a set of RGB components.
+     *
+     * @param hsl  a float array with length equal to
+     *             the number of HSL components
+     * @param rgb  a float array with length of at least 3
+     *             that contains RGB components of a color
+     * @return a float array that contains RGB components
+     */
+    private static float[] HSLtoRGB(float[] hsl, float[] rgb) {
+        if (rgb == null) {
+            rgb = new float[3];
+        }
+        float hue = hsl[0];
+        float saturation = hsl[1];
+        float lightness = hsl[2];
+
+        if (saturation > 0.0f) {
+            hue = (hue < 1.0f) ? hue * 6.0f : 0.0f;
+            float q = lightness + saturation * ((lightness > 0.5f) ? 1.0f - lightness : lightness);
+            float p = 2.0f * lightness - q;
+            rgb[0]= normalize(q, p, (hue < 4.0f) ? (hue + 2.0f) : (hue - 4.0f));
+            rgb[1]= normalize(q, p, hue);
+            rgb[2]= normalize(q, p, (hue < 2.0f) ? (hue + 4.0f) : (hue - 2.0f));
+        }
+        else {
+            rgb[0] = lightness;
+            rgb[1] = lightness;
+            rgb[2] = lightness;
+        }
+        return rgb;
+    }
+
+    /**
+     * Converts RGB components of a color to a set of HSL components.
+     *
+     * @param rgb  a float array with length of at least 3
+     *             that contains RGB components of a color
+     * @param hsl  a float array with length equal to
+     *             the number of HSL components
+     * @return a float array that contains HSL components
+     */
+    private static float[] RGBtoHSL(float[] rgb, float[] hsl) {
+        if (hsl == null) {
+            hsl = new float[3];
+        }
+        float max = max(rgb[0], rgb[1], rgb[2]);
+        float min = min(rgb[0], rgb[1], rgb[2]);
+
+        float summa = max + min;
+        float saturation = max - min;
+        if (saturation > 0.0f) {
+            saturation /= (summa > 1.0f)
+                    ? 2.0f - summa
+                    : summa;
+        }
+        hsl[0] = getHue(rgb[0], rgb[1], rgb[2], max, min);
+        hsl[1] = saturation;
+        hsl[2] = summa / 2.0f;
+        return hsl;
+    }
+
+    /**
+     * Returns the smaller of three color components.
+     *
+     * @param red    the red component of the color
+     * @param green  the green component of the color
+     * @param blue   the blue component of the color
+     * @return the smaller of {@code red}, {@code green} and {@code blue}
+     */
+    static float min(float red, float green, float blue) {
+        float min = (red < green) ? red : green;
+        return (min < blue) ? min : blue;
+    }
+
+    /**
+     * Returns the larger of three color components.
+     *
+     * @param red    the red component of the color
+     * @param green  the green component of the color
+     * @param blue   the blue component of the color
+     * @return the larger of {@code red}, {@code green} and {@code blue}
+     */
+    static float max(float red, float green, float blue) {
+        float max = (red > green) ? red : green;
+        return (max > blue) ? max : blue;
+    }
+
+    /**
+     * Calculates the hue component for HSL and HSV color spaces.
+     *
+     * @param red    the red component of the color
+     * @param green  the green component of the color
+     * @param blue   the blue component of the color
+     * @param max    the larger of {@code red}, {@code green} and {@code blue}
+     * @param min    the smaller of {@code red}, {@code green} and {@code blue}
+     * @return the hue component
+     */
+    static float getHue(float red, float green, float blue, float max, float min) {
+        float hue = max - min;
+        if (hue > 0.0f) {
+            if (max == red) {
+                hue = (green - blue) / hue;
+                if (hue < 0.0f) {
+                    hue += 6.0f;
+                }
+            }
+            else if (max == green) {
+                hue = 2.0f + (blue - red) / hue;
+            }
+            else /*max == blue*/ {
+                hue = 4.0f + (red - green) / hue;
+            }
+            hue /= 6.0f;
+        }
+        return hue;
+    }
+
+    private static float normalize(float q, float p, float color) {
+        if (color < 1.0f) {
+            return p + (q - p) * color;
+        }
+        if (color < 3.0f) {
+            return q;
+        }
+        if (color < 4.0f) {
+            return p + (q - p) * (4.0f - color);
+        }
+        return p;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorModelHSV.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+final class ColorModelHSV extends ColorModel {
+
+    ColorModelHSV() {
+        super("hsv", "Hue", "Saturation", "Value", "Transparency"); // NON-NLS: components
+    }
+
+    @Override
+    void setColor(int color, float[] space) {
+        super.setColor(color, space);
+        RGBtoHSV(space, space);
+        space[3] = 1.0f - space[3];
+    }
+
+    @Override
+    int getColor(float[] space) {
+        space[3] = 1.0f - space[3];
+        HSVtoRGB(space, space);
+        return super.getColor(space);
+    }
+
+    @Override
+    int getMaximum(int index) {
+        return (index == 0) ? 360 : 100;
+    }
+
+    @Override
+    float getDefault(int index) {
+        return (index == 0) ? -1.0f : 1.0f;
+    }
+
+    /**
+     * Converts HSV components of a color to a set of RGB components.
+     *
+     * @param hsv  a float array with length equal to
+     *             the number of HSV components
+     * @param rgb  a float array with length of at least 3
+     *             that contains RGB components of a color
+     * @return a float array that contains RGB components
+     */
+    private static float[] HSVtoRGB(float[] hsv, float[] rgb) {
+        if (rgb == null) {
+            rgb = new float[3];
+        }
+        float hue = hsv[0];
+        float saturation = hsv[1];
+        float value = hsv[2];
+
+        rgb[0] = value;
+        rgb[1] = value;
+        rgb[2] = value;
+
+        if (saturation > 0.0f) {
+            hue = (hue < 1.0f) ? hue * 6.0f : 0.0f;
+            int integer = (int) hue;
+            float f = hue - (float) integer;
+            switch (integer) {
+                case 0:
+                    rgb[1] *= 1.0f - saturation * (1.0f - f);
+                    rgb[2] *= 1.0f - saturation;
+                    break;
+                case 1:
+                    rgb[0] *= 1.0f - saturation * f;
+                    rgb[2] *= 1.0f - saturation;
+                    break;
+                case 2:
+                    rgb[0] *= 1.0f - saturation;
+                    rgb[2] *= 1.0f - saturation * (1.0f - f);
+                    break;
+                case 3:
+                    rgb[0] *= 1.0f - saturation;
+                    rgb[1] *= 1.0f - saturation * f;
+                    break;
+                case 4:
+                    rgb[0] *= 1.0f - saturation * (1.0f - f);
+                    rgb[1] *= 1.0f - saturation;
+                    break;
+                case 5:
+                    rgb[1] *= 1.0f - saturation;
+                    rgb[2] *= 1.0f - saturation * f;
+                    break;
+            }
+        }
+        return rgb;
+    }
+
+    /**
+     * Converts RGB components of a color to a set of HSV components.
+     *
+     * @param rgb  a float array with length of at least 3
+     *             that contains RGB components of a color
+     * @param hsv  a float array with length equal to
+     *             the number of HSV components
+     * @return a float array that contains HSV components
+     */
+    private static float[] RGBtoHSV(float[] rgb, float[] hsv) {
+        if (hsv == null) {
+            hsv = new float[3];
+        }
+        float max = ColorModelHSL.max(rgb[0], rgb[1], rgb[2]);
+        float min = ColorModelHSL.min(rgb[0], rgb[1], rgb[2]);
+
+        float saturation = max - min;
+        if (saturation > 0.0f) {
+            saturation /= max;
+        }
+        hsv[0] = ColorModelHSL.getHue(rgb[0], rgb[1], rgb[2], max, min);
+        hsv[1] = saturation;
+        hsv[2] = max;
+        return hsv;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorPanel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import java.awt.Color;
+import java.awt.ContainerOrderFocusTraversalPolicy;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.ButtonGroup;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.border.EmptyBorder;
+
+final class ColorPanel extends JPanel implements ActionListener {
+
+    private final SlidingSpinner[] spinners = new SlidingSpinner[5];
+    private final float[] values = new float[this.spinners.length];
+
+    private final ColorModel model;
+    private Color color;
+    private int x = 1;
+    private int y = 2;
+    private int z;
+
+    ColorPanel(ColorModel model) {
+        super(new GridBagLayout());
+
+        GridBagConstraints gbc = new GridBagConstraints();
+        gbc.fill = GridBagConstraints.HORIZONTAL;
+
+        gbc.gridx = 1;
+        ButtonGroup group = new ButtonGroup();
+        EmptyBorder border = null;
+        for (int i = 0; i < this.spinners.length; i++) {
+            if (i < 3) {
+                JRadioButton button = new JRadioButton();
+                if (i == 0) {
+                    Insets insets = button.getInsets();
+                    insets.left = button.getPreferredSize().width;
+                    border = new EmptyBorder(insets);
+                    button.setSelected(true);
+                    gbc.insets.top = 5;
+                }
+                add(button, gbc);
+                group.add(button);
+                button.setActionCommand(Integer.toString(i));
+                button.addActionListener(this);
+                this.spinners[i] = new SlidingSpinner(this, button);
+            }
+            else {
+                JLabel label = new JLabel();
+                add(label, gbc);
+                label.setBorder(border);
+                label.setFocusable(false);
+                this.spinners[i] = new SlidingSpinner(this, label);
+            }
+        }
+        gbc.gridx = 2;
+        gbc.weightx = 1.0;
+        gbc.insets.top = 0;
+        gbc.insets.left = 5;
+        for (SlidingSpinner spinner : this.spinners) {
+            add(spinner.getSlider(), gbc);
+            gbc.insets.top = 5;
+        }
+        gbc.gridx = 3;
+        gbc.weightx = 0.0;
+        gbc.insets.top = 0;
+        for (SlidingSpinner spinner : this.spinners) {
+            add(spinner.getSpinner(), gbc);
+            gbc.insets.top = 5;
+        }
+        setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy());
+        setFocusTraversalPolicyProvider(true);
+        setFocusable(false);
+
+        this.model = model;
+    }
+
+    public void actionPerformed(ActionEvent event) {
+        try {
+            this.z = Integer.parseInt(event.getActionCommand());
+            this.y = (this.z != 2) ? 2 : 1;
+            this.x = (this.z != 0) ? 0 : 1;
+            getParent().repaint();
+        }
+        catch (NumberFormatException exception) {
+        }
+    }
+
+    void buildPanel() {
+        int count = this.model.getCount();
+        this.spinners[4].setVisible(count > 4);
+        for (int i = 0; i < count; i++) {
+            Object object = this.spinners[i].getLabel();
+            if (object instanceof JRadioButton) {
+                JRadioButton button = (JRadioButton) object;
+                button.setText(this.model.getLabel(this, i));
+            }
+            else if (object instanceof JLabel) {
+                JLabel label = (JLabel) object;
+                label.setText(this.model.getLabel(this, i));
+            }
+            this.spinners[i].setRange(this.model.getMinimum(i), this.model.getMaximum(i));
+            this.spinners[i].setValue(this.values[i]);
+        }
+    }
+
+    void colorChanged() {
+        this.color = new Color(getColor(0), true);
+        Object parent = getParent();
+        if (parent instanceof ColorChooserPanel) {
+            ColorChooserPanel chooser = (ColorChooserPanel) parent;
+            chooser.setSelectedColor(this.color);
+            chooser.repaint();
+        }
+    }
+
+    float getValueX() {
+        return this.spinners[this.x].getValue();
+    }
+
+    float getValueY() {
+        return 1.0f - this.spinners[this.y].getValue();
+    }
+
+    float getValueZ() {
+        return 1.0f - this.spinners[this.z].getValue();
+    }
+
+    void setValue(float z) {
+        this.spinners[this.z].setValue(1.0f - z);
+        colorChanged();
+    }
+
+    void setValue(float x, float y) {
+        this.spinners[this.x].setValue(x);
+        this.spinners[this.y].setValue(1.0f - y);
+        colorChanged();
+    }
+
+    int getColor(float z) {
+        setDefaultValue(this.x);
+        setDefaultValue(this.y);
+        this.values[this.z] = 1.0f - z;
+        return getColor(3);
+    }
+
+    int getColor(float x, float y) {
+        this.values[this.x] = x;
+        this.values[this.y] = 1.0f - y;
+        setValue(this.z);
+        return getColor(3);
+    }
+
+    void setColor(Color color) {
+        if (!color.equals(this.color)) {
+            this.color = color;
+            this.model.setColor(color.getRGB(), this.values);
+            for (int i = 0; i < this.model.getCount(); i++) {
+                this.spinners[i].setValue(this.values[i]);
+            }
+        }
+    }
+
+    private int getColor(int index) {
+        while (index < this.model.getCount()) {
+            setValue(index++);
+        }
+        return this.model.getColor(this.values);
+    }
+
+    private void setValue(int index) {
+        this.values[index] = this.spinners[index].getValue();
+    }
+
+    private void setDefaultValue(int index) {
+        float value = this.model.getDefault(index);
+        this.values[index] = (value < 0.0f)
+                ? this.spinners[index].getValue()
+                : value;
+    }
+}
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultHSBChooserPanel.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,801 +0,0 @@
-/*
- * Copyright 1998-2004 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package javax.swing.colorchooser;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.event.*;
-import javax.swing.border.*;
-import java.awt.image.*;
-import java.util.Locale;
-
-/**
- * Implements the default HSB Color chooser
- *
- *  @author Tom Santos
- *  @author Steve Wilson
- *  @author Mark Davidson
- *  @author Shannon Hickey
- */
-class DefaultHSBChooserPanel extends AbstractColorChooserPanel implements ChangeListener, HierarchyListener {
-
-    private transient HSBImage palette;
-    private transient HSBImage sliderPalette;
-
-    private transient Image paletteImage;
-    private transient Image sliderPaletteImage;
-
-    private JSlider slider;
-    private JSpinner hField;
-    private JSpinner sField;
-    private JSpinner bField;
-
-    private JTextField redField;
-    private JTextField greenField;
-    private JTextField blueField;
-
-    private boolean isAdjusting = false; // Flag which indicates that values are set internally
-    private Point paletteSelection = new Point();
-    private JLabel paletteLabel;
-    private JLabel sliderPaletteLabel;
-
-    private JRadioButton hRadio;
-    private JRadioButton sRadio;
-    private JRadioButton bRadio;
-
-    private static final int PALETTE_DIMENSION = 200;
-    private static final int MAX_HUE_VALUE = 359;
-    private static final int MAX_SATURATION_VALUE = 100;
-    private static final int MAX_BRIGHTNESS_VALUE = 100;
-
-    private int currentMode = HUE_MODE;
-
-    private static final int HUE_MODE = 0;
-    private static final int SATURATION_MODE = 1;
-    private static final int BRIGHTNESS_MODE = 2;
-
-    public DefaultHSBChooserPanel() {
-    }
-
-    private void addPaletteListeners() {
-        paletteLabel.addMouseListener(new MouseAdapter() {
-            public void mousePressed(MouseEvent e ) {
-                float[] hsb = new float[3];
-                palette.getHSBForLocation( e.getX(), e.getY(), hsb );
-                updateHSB( hsb[0], hsb[1], hsb[2] );
-            }
-        });
-
-        paletteLabel.addMouseMotionListener(new MouseMotionAdapter() {
-            public void mouseDragged( MouseEvent e ){
-                int labelWidth = paletteLabel.getWidth();
-
-                int labelHeight = paletteLabel.getHeight();
-                int x = e.getX();
-                int y = e.getY();
-
-                if ( x >= labelWidth ) {
-                    x = labelWidth - 1;
-                }
-
-                if ( y >= labelHeight ) {
-                    y = labelHeight - 1;
-                }
-
-                if ( x < 0 ) {
-                    x = 0;
-                }
-
-                if ( y < 0 ) {
-                    y = 0;
-                }
-
-                float[] hsb = new float[3];
-                palette.getHSBForLocation( x, y, hsb );
-                updateHSB( hsb[0], hsb[1], hsb[2] );
-            }
-        });
-    }
-
-    private void updatePalette( float h, float s, float b ) {
-        int x = 0;
-        int y = 0;
-
-        switch ( currentMode ) {
-        case HUE_MODE:
-            if ( h != palette.getHue() ) {
-                palette.setHue( h );
-                palette.nextFrame();
-            }
-            x = PALETTE_DIMENSION - (int)(s * PALETTE_DIMENSION);
-            y = PALETTE_DIMENSION - (int)(b * PALETTE_DIMENSION);
-            break;
-        case SATURATION_MODE:
-            if ( s != palette.getSaturation() ) {
-                palette.setSaturation( s );
-                palette.nextFrame();
-            }
-            x = (int)(h * PALETTE_DIMENSION);
-            y = PALETTE_DIMENSION - (int)(b * PALETTE_DIMENSION);
-            break;
-        case BRIGHTNESS_MODE:
-            if ( b != palette.getBrightness() ) {
-                palette.setBrightness( b );
-                palette.nextFrame();
-            }
-            x = (int)(h * PALETTE_DIMENSION);
-            y = PALETTE_DIMENSION - (int)(s * PALETTE_DIMENSION);
-            break;
-        }
-
-        paletteSelection.setLocation( x, y );
-        paletteLabel.repaint();
-    }
-
-    private void updateSlider( float h, float s, float b ) {
-        // Update the slider palette if necessary.
-        // When the slider is the hue slider or the hue hasn't changed,
-        // the hue of the palette will not need to be updated.
-        if (currentMode != HUE_MODE && h != sliderPalette.getHue() ) {
-            sliderPalette.setHue( h );
-            sliderPalette.nextFrame();
-        }
-
-        float value = 0f;
-
-        switch ( currentMode ) {
-        case HUE_MODE:
-            value = h;
-            break;
-        case SATURATION_MODE:
-            value = s;
-            break;
-        case BRIGHTNESS_MODE:
-            value = b;
-            break;
-        }
-
-        slider.setValue( Math.round(value * (slider.getMaximum())) );
-    }
-
-    private void updateHSBTextFields( float hue, float saturation, float brightness ) {
-        int h =  Math.round(hue * 359);
-        int s =  Math.round(saturation * 100);
-        int b =  Math.round(brightness * 100);
-
-        if (((Integer)hField.getValue()).intValue() != h) {
-            hField.setValue(new Integer(h));
-        }
-        if (((Integer)sField.getValue()).intValue() != s) {
-            sField.setValue(new Integer(s));
-        }
-        if (((Integer)bField.getValue()).intValue() != b) {
-            bField.setValue(new Integer(b));
-        }
-    }
-
-    /**
-     * Updates the values of the RGB fields to reflect the new color change
-     */
-    private void updateRGBTextFields( Color color ) {
-        redField.setText(String.valueOf(color.getRed()));
-        greenField.setText(String.valueOf(color.getGreen()));
-        blueField.setText(String.valueOf(color.getBlue()));
-    }
-
-    /**
-     * Main internal method of updating the ui controls and the color model.
-     */
-    private void updateHSB( float h, float s, float b ) {
-        if ( !isAdjusting ) {
-            isAdjusting = true;
-
-            updatePalette( h, s, b );
-            updateSlider( h, s, b );
-            updateHSBTextFields( h, s, b );
-
-            Color color = Color.getHSBColor(h, s, b);
-            updateRGBTextFields( color );
-
-            getColorSelectionModel().setSelectedColor( color );
-
-            isAdjusting = false;
-        }
-    }
-
-    /**
-      * Invoked automatically when the model's state changes.
-      * It is also called by <code>installChooserPanel</code> to allow
-      * you to set up the initial state of your chooser.
-      * Override this method to update your <code>ChooserPanel</code>.
-      */
-    public void updateChooser() {
-        if ( !isAdjusting ) {
-            float[] hsb = getHSBColorFromModel();
-            updateHSB( hsb[0], hsb[1], hsb[2] );
-        }
-    }
-
-    public void installChooserPanel(JColorChooser enclosingChooser) {
-        super.installChooserPanel(enclosingChooser);
-        setInheritsPopupMenu(true);
-        addHierarchyListener(this);
-    }
-
-    /**
-     * Invoked when the panel is removed from the chooser.
-     */
-    public void uninstallChooserPanel(JColorChooser enclosingChooser) {
-        super.uninstallChooserPanel(enclosingChooser);
-        cleanupPalettesIfNecessary();
-        removeAll();
-        removeHierarchyListener(this);
-    }
-
-    /**
-     * Returns an float array containing the HSB values of the selected color from
-     * the ColorSelectionModel
-     */
-    private float[] getHSBColorFromModel()  {
-        Color color = getColorFromModel();
-        float[] hsb = new float[3];
-        Color.RGBtoHSB( color.getRed(), color.getGreen(), color.getBlue(), hsb );
-
-        return hsb;
-    }
-
-    /**
-     * Builds a new chooser panel.
-     */
-    protected void buildChooser() {
-        setLayout(new BorderLayout());
-        JComponent spp = buildSliderPalettePanel();
-        spp.setInheritsPopupMenu(true);
-        add(spp, BorderLayout.BEFORE_LINE_BEGINS);
-
-        JPanel controlHolder = new JPanel(new SmartGridLayout(1,3));
-        JComponent hsbControls = buildHSBControls();
-        hsbControls.setInheritsPopupMenu(true);
-        controlHolder.add(hsbControls);
-
-        controlHolder.add(new JLabel(" ")); // spacer
-
-        JComponent rgbControls = buildRGBControls();
-        rgbControls.setInheritsPopupMenu(true);
-        controlHolder.add(rgbControls);
-        controlHolder.setInheritsPopupMenu(true);
-
-        controlHolder.setBorder(new EmptyBorder( 10, 5, 10, 5));
-        add( controlHolder, BorderLayout.CENTER);
-    }
-
-    /**
-     * Creates the panel with the uneditable RGB field
-     */
-    private JComponent buildRGBControls() {
-        JPanel panel = new JPanel(new SmartGridLayout(2,3));
-        panel.setInheritsPopupMenu(true);
-
-        Color color = getColorFromModel();
-        redField = new JTextField( String.valueOf(color.getRed()), 3 );
-        redField.setEditable(false);
-        redField.setHorizontalAlignment( JTextField.RIGHT );
-        redField.setInheritsPopupMenu(true);
-
-        greenField = new JTextField(String.valueOf(color.getGreen()), 3 );
-        greenField.setEditable(false);
-        greenField.setHorizontalAlignment( JTextField.RIGHT );
-        greenField.setInheritsPopupMenu(true);
-
-        blueField = new JTextField( String.valueOf(color.getBlue()), 3 );
-        blueField.setEditable(false);
-        blueField.setHorizontalAlignment( JTextField.RIGHT );
-        blueField.setInheritsPopupMenu(true);
-
-        Locale locale = getLocale();
-        String redString = UIManager.getString("ColorChooser.hsbRedText", locale);
-        String greenString = UIManager.getString("ColorChooser.hsbGreenText", locale);
-        String blueString = UIManager.getString("ColorChooser.hsbBlueText", locale);
-
-        panel.add( new JLabel(redString) );
-        panel.add( redField );
-        panel.add( new JLabel(greenString) );
-        panel.add( greenField );
-        panel.add( new JLabel(blueString) );
-        panel.add( blueField );
-
-        return panel;
-    }
-
-    /**
-     * Creates the panel with the editable HSB fields and the radio buttons.
-     */
-    private JComponent buildHSBControls() {
-
-        Locale locale = getLocale();
-        String hueString = UIManager.getString("ColorChooser.hsbHueText", locale);
-        String saturationString = UIManager.getString("ColorChooser.hsbSaturationText", locale);
-        String brightnessString = UIManager.getString("ColorChooser.hsbBrightnessText", locale);
-
-        RadioButtonHandler handler = new RadioButtonHandler();
-
-        hRadio = new JRadioButton(hueString);
-        hRadio.addActionListener(handler);
-        hRadio.setSelected(true);
-        hRadio.setInheritsPopupMenu(true);
-
-        sRadio = new JRadioButton(saturationString);
-        sRadio.addActionListener(handler);
-        sRadio.setInheritsPopupMenu(true);
-
-        bRadio = new JRadioButton(brightnessString);
-        bRadio.addActionListener(handler);
-        bRadio.setInheritsPopupMenu(true);
-
-        ButtonGroup group = new ButtonGroup();
-        group.add(hRadio);
-        group.add(sRadio);
-        group.add(bRadio);
-
-        float[] hsb = getHSBColorFromModel();
-
-        hField = new JSpinner(new SpinnerNumberModel((int)(hsb[0] * 359), 0, 359, 1));
-        sField = new JSpinner(new SpinnerNumberModel((int)(hsb[1] * 100), 0, 100, 1));
-        bField = new JSpinner(new SpinnerNumberModel((int)(hsb[2] * 100), 0, 100, 1));
-
-        hField.addChangeListener(this);
-        sField.addChangeListener(this);
-        bField.addChangeListener(this);
-
-        hField.setInheritsPopupMenu(true);
-        sField.setInheritsPopupMenu(true);
-        bField.setInheritsPopupMenu(true);
-
-        JPanel panel = new JPanel( new SmartGridLayout(2, 3) );
-
-        panel.add(hRadio);
-        panel.add(hField);
-        panel.add(sRadio);
-        panel.add(sField);
-        panel.add(bRadio);
-        panel.add(bField);
-        panel.setInheritsPopupMenu(true);
-
-        return panel;
-    }
-
-    /**
-     * Handler for the radio button classes.
-     */
-    private class RadioButtonHandler implements ActionListener  {
-        public void actionPerformed(ActionEvent evt)  {
-            Object obj = evt.getSource();
-
-            if (obj instanceof JRadioButton)  {
-                JRadioButton button = (JRadioButton)obj;
-                if (button == hRadio) {
-                    setMode(HUE_MODE);
-                } else if (button == sRadio) {
-                    setMode(SATURATION_MODE);
-                } else if (button == bRadio) {
-                    setMode(BRIGHTNESS_MODE);
-                }
-            }
-        }
-    }
-
-    private void setMode(int mode) {
-        if (currentMode == mode) {
-            return;
-        }
-
-        isAdjusting = true;  // Ensure no events propagate from changing slider value.
-        currentMode = mode;
-
-        float[] hsb = getHSBColorFromModel();
-
-        switch (currentMode) {
-            case HUE_MODE:
-                slider.setInverted(true);
-                slider.setMaximum(MAX_HUE_VALUE);
-                palette.setValues(HSBImage.HSQUARE, hsb[0], 1.0f, 1.0f);
-                sliderPalette.setValues(HSBImage.HSLIDER, 0f, 1.0f, 1.0f);
-                break;
-            case SATURATION_MODE:
-                slider.setInverted(false);
-                slider.setMaximum(MAX_SATURATION_VALUE);
-                palette.setValues(HSBImage.SSQUARE, hsb[0], hsb[1], 1.0f);
-                sliderPalette.setValues(HSBImage.SSLIDER, hsb[0], 1.0f, 1.0f);
-                break;
-            case BRIGHTNESS_MODE:
-                slider.setInverted(false);
-                slider.setMaximum(MAX_BRIGHTNESS_VALUE);
-                palette.setValues(HSBImage.BSQUARE, hsb[0], 1.0f, hsb[2]);
-                sliderPalette.setValues(HSBImage.BSLIDER, hsb[0], 1.0f, 1.0f);
-                break;
-        }
-
-        isAdjusting = false;
-
-        palette.nextFrame();
-        sliderPalette.nextFrame();
-
-        updateChooser();
-    }
-
-    protected JComponent buildSliderPalettePanel() {
-
-        // This slider has to have a minimum of 0.  A lot of math in this file is simplified due to this.
-        slider = new JSlider(JSlider.VERTICAL, 0, MAX_HUE_VALUE, 0);
-        slider.setInverted(true);
-        slider.setPaintTrack(false);
-        slider.setPreferredSize(new Dimension(slider.getPreferredSize().width, PALETTE_DIMENSION + 15));
-        slider.addChangeListener(this);
-        slider.setInheritsPopupMenu(true);
-        // We're not painting ticks, but need to ask UI classes to
-        // paint arrow shape anyway, if possible.
-        slider.putClientProperty("Slider.paintThumbArrowShape", Boolean.TRUE);
-        paletteLabel = createPaletteLabel();
-        addPaletteListeners();
-        sliderPaletteLabel = new JLabel();
-
-        JPanel panel = new JPanel();
-        panel.add( paletteLabel );
-        panel.add( slider );
-        panel.add( sliderPaletteLabel );
-
-        initializePalettesIfNecessary();
-
-        return panel;
-    }
-
-    private void initializePalettesIfNecessary() {
-        if (palette != null) {
-            return;
-        }
-
-        float[] hsb = getHSBColorFromModel();
-
-        switch(currentMode){
-            case HUE_MODE:
-                palette = new HSBImage(HSBImage.HSQUARE, PALETTE_DIMENSION, PALETTE_DIMENSION, hsb[0], 1.0f, 1.0f);
-                sliderPalette = new HSBImage(HSBImage.HSLIDER, 16, PALETTE_DIMENSION, 0f, 1.0f, 1.0f);
-                break;
-            case SATURATION_MODE:
-                palette = new HSBImage(HSBImage.SSQUARE, PALETTE_DIMENSION, PALETTE_DIMENSION, 1.0f, hsb[1], 1.0f);
-                sliderPalette = new HSBImage(HSBImage.SSLIDER, 16, PALETTE_DIMENSION, 1.0f, 0f, 1.0f);
-                break;
-            case BRIGHTNESS_MODE:
-                palette = new HSBImage(HSBImage.BSQUARE, PALETTE_DIMENSION, PALETTE_DIMENSION, 1.0f, 1.0f, hsb[2]);
-                sliderPalette = new HSBImage(HSBImage.BSLIDER, 16, PALETTE_DIMENSION, 1.0f, 1.0f, 0f);
-                break;
-        }
-        paletteImage = Toolkit.getDefaultToolkit().createImage(palette);
-        sliderPaletteImage = Toolkit.getDefaultToolkit().createImage(sliderPalette);
-
-        paletteLabel.setIcon(new ImageIcon(paletteImage));
-        sliderPaletteLabel.setIcon(new ImageIcon(sliderPaletteImage));
-    }
-
-    private void cleanupPalettesIfNecessary() {
-        if (palette == null) {
-            return;
-        }
-
-        palette.aborted = true;
-        sliderPalette.aborted = true;
-
-        palette.nextFrame();
-        sliderPalette.nextFrame();
-
-        palette = null;
-        sliderPalette = null;
-
-        paletteImage = null;
-        sliderPaletteImage = null;
-
-        paletteLabel.setIcon(null);
-        sliderPaletteLabel.setIcon(null);
-    }
-
-    protected JLabel createPaletteLabel() {
-        return new JLabel() {
-            protected void paintComponent( Graphics g ) {
-                super.paintComponent( g );
-                g.setColor( Color.white );
-                g.drawOval( paletteSelection.x - 4, paletteSelection.y - 4, 8, 8 );
-            }
-        };
-    }
-
-    public String getDisplayName() {
-        return UIManager.getString("ColorChooser.hsbNameText", getLocale());
-    }
-
-    /**
-     * Provides a hint to the look and feel as to the
-     * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to
-     * access the panel. A return value <= 0 indicates there is no mnemonic.
-     * <p>
-     * The return value here is a hint, it is ultimately up to the look
-     * and feel to honor the return value in some meaningful way.
-     * <p>
-     * This implementation looks up the value from the default
-     * <code>ColorChooser.hsbMnemonic</code>, or if it
-     * isn't available (or not an <code>Integer</code>) returns -1.
-     * The lookup for the default is done through the <code>UIManager</code>:
-     * <code>UIManager.get("ColorChooser.rgbMnemonic");</code>.
-     *
-     * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no
-     *         mnemonic
-     * @see #getDisplayedMnemonicIndex
-     * @since 1.4
-     */
-    public int getMnemonic() {
-        return getInt("ColorChooser.hsbMnemonic", -1);
-    }
-
-    /**
-     * Provides a hint to the look and feel as to the index of the character in
-     * <code>getDisplayName</code> that should be visually identified as the
-     * mnemonic. The look and feel should only use this if
-     * <code>getMnemonic</code> returns a value > 0.
-     * <p>
-     * The return value here is a hint, it is ultimately up to the look
-     * and feel to honor the return value in some meaningful way. For example,
-     * a look and feel may wish to render each
-     * <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>,
-     * and further use this return value to underline a character in
-     * the <code>getDisplayName</code>.
-     * <p>
-     * This implementation looks up the value from the default
-     * <code>ColorChooser.rgbDisplayedMnemonicIndex</code>, or if it
-     * isn't available (or not an <code>Integer</code>) returns -1.
-     * The lookup for the default is done through the <code>UIManager</code>:
-     * <code>UIManager.get("ColorChooser.hsbDisplayedMnemonicIndex");</code>.
-     *
-     * @return Character index to render mnemonic for; -1 to provide no
-     *                   visual identifier for this panel.
-     * @see #getMnemonic
-     * @since 1.4
-     */
-    public int getDisplayedMnemonicIndex() {
-        return getInt("ColorChooser.hsbDisplayedMnemonicIndex", -1);
-    }
-
-    public Icon getSmallDisplayIcon() {
-        return null;
-    }
-
-    public Icon getLargeDisplayIcon() {
-        return null;
-    }
-
-    /**
-     * Class for the slider and palette images.
-     */
-    class HSBImage extends SyntheticImage {
-        protected float h = .0f;
-        protected float s = .0f;
-        protected float b = .0f;
-        protected float[] hsb = new float[3];
-
-        protected boolean isDirty = true;
-        protected int cachedY;
-        protected int cachedColor;
-        protected int type;
-
-        private static final int HSQUARE = 0;
-        private static final int SSQUARE = 1;
-        private static final int BSQUARE = 2;
-        private static final int HSLIDER = 3;
-        private static final int SSLIDER = 4;
-        private static final int BSLIDER = 5;
-
-        protected HSBImage(int type, int width, int height, float h, float s, float b) {
-            super(width, height);
-            setValues(type, h, s, b);
-        }
-
-        public void setValues(int type, float h, float s, float b) {
-            this.type = type;
-            cachedY = -1;
-            cachedColor = 0;
-            setHue( h );
-            setSaturation( s );
-            setBrightness( b );
-        }
-
-        public final void setHue( float hue ) {
-            h = hue;
-        }
-
-        public final void setSaturation( float saturation ) {
-            s = saturation;
-        }
-
-        public final void setBrightness( float brightness ) {
-            b = brightness;
-        }
-
-        public final float getHue() {
-            return h;
-        }
-
-        public final float getSaturation() {
-            return s;
-        }
-
-        public final float getBrightness() {
-            return b;
-        }
-
-        protected boolean isStatic() {
-            return false;
-        }
-
-        public synchronized void nextFrame() {
-            isDirty = true;
-            notifyAll();
-        }
-
-        public synchronized void addConsumer(ImageConsumer ic) {
-            isDirty = true;
-            super.addConsumer(ic);
-        }
-
-        private int getRGBForLocation( int x, int y ) {
-            if (type >= HSLIDER && y == cachedY) {
-                return cachedColor;
-            }
-
-            getHSBForLocation( x, y, hsb );
-            cachedY = y;
-            cachedColor = Color.HSBtoRGB( hsb[0], hsb[1], hsb[2] );
-
-            return cachedColor;
-        }
-
-        public void getHSBForLocation( int x, int y, float[] hsbArray ) {
-            switch (type) {
-                case HSQUARE: {
-                    float saturationStep = ((float)x) / width;
-                    float brightnessStep = ((float)y) / height;
-                    hsbArray[0] = h;
-                    hsbArray[1] = s - saturationStep;
-                    hsbArray[2] = b - brightnessStep;
-                    break;
-                }
-                case SSQUARE: {
-                    float brightnessStep = ((float)y) / height;
-                    float step = 1.0f / ((float)width);
-                    hsbArray[0] = x * step;
-                    hsbArray[1] = s;
-                    hsbArray[2] = 1.0f - brightnessStep;
-                    break;
-                }
-                case BSQUARE: {
-                    float saturationStep = ((float)y) / height;
-                    float step = 1.0f / ((float)width);
-                    hsbArray[0] = x * step;
-                    hsbArray[1] = 1.0f - saturationStep;
-                    hsbArray[2] = b;
-                    break;
-                }
-                case HSLIDER: {
-                    float step = 1.0f / ((float)height);
-                    hsbArray[0] = y * step;
-                    hsbArray[1] = s;
-                    hsbArray[2] = b;
-                    break;
-                }
-                case SSLIDER: {
-                    float saturationStep = ((float)y) / height;
-                    hsbArray[0] = h;
-                    hsbArray[1] = s - saturationStep;
-                    hsbArray[2] = b;
-                    break;
-                }
-                case BSLIDER: {
-                    float brightnessStep = ((float)y) / height;
-                    hsbArray[0] = h;
-                    hsbArray[1] = s;
-                    hsbArray[2] = b - brightnessStep;
-                    break;
-                }
-            }
-        }
-
-        /**
-         * Overriden method from SyntheticImage
-         */
-        protected void computeRow( int y, int[] row ) {
-            if ( y == 0 ) {
-                synchronized ( this ) {
-                    try {
-                        while ( !isDirty ) {
-                            wait();
-                        }
-                    } catch (InterruptedException ie) {
-                    }
-                    isDirty = false;
-                }
-            }
-
-            if (aborted) {
-                return;
-            }
-
-            for ( int i = 0; i < row.length; ++i ) {
-                row[i] = getRGBForLocation( i, y );
-            }
-        }
-    }
-
-    public void stateChanged(ChangeEvent e) {
-        if (e.getSource() == slider) {
-            boolean modelIsAdjusting = slider.getModel().getValueIsAdjusting();
-
-            if (!modelIsAdjusting && !isAdjusting) {
-                int sliderValue = slider.getValue();
-                int sliderRange = slider.getMaximum();
-                float value = (float)sliderValue / (float)sliderRange;
-
-                float[] hsb = getHSBColorFromModel();
-
-                switch ( currentMode ){
-                    case HUE_MODE:
-                        updateHSB(value, hsb[1], hsb[2]);
-                        break;
-                    case SATURATION_MODE:
-                        updateHSB(hsb[0], value, hsb[2]);
-                        break;
-                    case BRIGHTNESS_MODE:
-                        updateHSB(hsb[0], hsb[1], value);
-                        break;
-                }
-            }
-        } else if (e.getSource() instanceof JSpinner) {
-            float hue = ((Integer)hField.getValue()).floatValue() / 359f;
-            float saturation = ((Integer)sField.getValue()).floatValue() / 100f;
-            float brightness = ((Integer)bField.getValue()).floatValue() / 100f;
-
-            updateHSB(hue, saturation, brightness);
-        }
-    }
-
-    public void hierarchyChanged(HierarchyEvent he) {
-        if ((he.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {
-            if (isDisplayable()) {
-                initializePalettesIfNecessary();
-            } else {
-                cleanupPalettesIfNecessary();
-            }
-        }
-    }
-
-}
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultRGBChooserPanel.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/*
- * Copyright 1998-2004 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package javax.swing.colorchooser;
-
-import javax.swing.*;
-import javax.swing.event.*;
-import java.awt.*;
-import java.util.Locale;
-
-/**
- * The standard RGB chooser.
- * <p>
- * <strong>Warning:</strong>
- * Serialized objects of this class will not be compatible with
- * future Swing releases. The current serialization support is
- * appropriate for short term storage or RMI between applications running
- * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
- * has been added to the <code>java.beans</code> package.
- * Please see {@link java.beans.XMLEncoder}.
- *
- * @author Steve Wilson
- * @author Mark Davidson
- * @see JColorChooser
- * @see AbstractColorChooserPanel
- */
-class DefaultRGBChooserPanel extends AbstractColorChooserPanel implements ChangeListener {
-
-    protected JSlider redSlider;
-    protected JSlider greenSlider;
-    protected JSlider blueSlider;
-    protected JSpinner redField;
-    protected JSpinner blueField;
-    protected JSpinner greenField;
-
-    private final int minValue = 0;
-    private final int maxValue = 255;
-
-    private boolean isAdjusting = false; // indicates the fields are being set internally
-
-    public DefaultRGBChooserPanel() {
-        super();
-        setInheritsPopupMenu(true);
-    }
-
-    /**
-     * Sets the values of the controls to reflect the color
-     */
-    private void setColor( Color newColor ) {
-        int red = newColor.getRed();
-        int blue = newColor.getBlue();
-        int green = newColor.getGreen();
-
-        if (redSlider.getValue() != red) {
-            redSlider.setValue(red);
-        }
-        if (greenSlider.getValue() != green) {
-            greenSlider.setValue(green);
-        }
-        if (blueSlider.getValue() != blue) {
-            blueSlider.setValue(blue);
-        }
-
-        if (((Integer)redField.getValue()).intValue() != red)
-            redField.setValue(new Integer(red));
-        if (((Integer)greenField.getValue()).intValue() != green)
-            greenField.setValue(new Integer(green));
-        if (((Integer)blueField.getValue()).intValue() != blue )
-            blueField.setValue(new Integer(blue));
-    }
-
-    public String getDisplayName() {
-        return UIManager.getString("ColorChooser.rgbNameText", getLocale());
-    }
-
-    /**
-     * Provides a hint to the look and feel as to the
-     * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to
-     * access the panel. A return value <= 0 indicates there is no mnemonic.
-     * <p>
-     * The return value here is a hint, it is ultimately up to the look
-     * and feel to honor the return value in some meaningful way.
-     * <p>
-     * This implementation looks up the value from the default
-     * <code>ColorChooser.rgbMnemonic</code>, or if it
-     * isn't available (or not an <code>Integer</code>) returns -1.
-     * The lookup for the default is done through the <code>UIManager</code>:
-     * <code>UIManager.get("ColorChooser.rgbMnemonic");</code>.
-     *
-     * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no
-     *         mnemonic
-     * @see #getDisplayedMnemonicIndex
-     * @since 1.4
-     */
-    public int getMnemonic() {
-        return getInt("ColorChooser.rgbMnemonic", -1);
-    }
-
-    /**
-     * Provides a hint to the look and feel as to the index of the character in
-     * <code>getDisplayName</code> that should be visually identified as the
-     * mnemonic. The look and feel should only use this if
-     * <code>getMnemonic</code> returns a value > 0.
-     * <p>
-     * The return value here is a hint, it is ultimately up to the look
-     * and feel to honor the return value in some meaningful way. For example,
-     * a look and feel may wish to render each
-     * <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>,
-     * and further use this return value to underline a character in
-     * the <code>getDisplayName</code>.
-     * <p>
-     * This implementation looks up the value from the default
-     * <code>ColorChooser.rgbDisplayedMnemonicIndex</code>, or if it
-     * isn't available (or not an <code>Integer</code>) returns -1.
-     * The lookup for the default is done through the <code>UIManager</code>:
-     * <code>UIManager.get("ColorChooser.rgbDisplayedMnemonicIndex");</code>.
-     *
-     * @return Character index to render mnemonic for; -1 to provide no
-     *                   visual identifier for this panel.
-     * @see #getMnemonic
-     * @since 1.4
-     */
-    public int getDisplayedMnemonicIndex() {
-        return getInt("ColorChooser.rgbDisplayedMnemonicIndex", -1);
-    }
-
-    public Icon getSmallDisplayIcon() {
-        return null;
-    }
-
-    public Icon getLargeDisplayIcon() {
-        return null;
-    }
-
-    /**
-     * The background color, foreground color, and font are already set to the
-     * defaults from the defaults table before this method is called.
-     */
-    public void installChooserPanel(JColorChooser enclosingChooser) {
-        super.installChooserPanel(enclosingChooser);
-    }
-
-    protected void buildChooser() {
-
-        Locale locale = getLocale();
-        String redString = UIManager.getString("ColorChooser.rgbRedText", locale);
-        String greenString = UIManager.getString("ColorChooser.rgbGreenText", locale);
-        String blueString = UIManager.getString("ColorChooser.rgbBlueText", locale);
-
-        setLayout( new BorderLayout() );
-        Color color = getColorFromModel();
-
-
-        JPanel enclosure = new JPanel();
-        enclosure.setLayout( new SmartGridLayout( 3, 3 ) );
-        enclosure.setInheritsPopupMenu(true);
-
-        // The panel that holds the sliders
-
-        add( enclosure, BorderLayout.CENTER );
-        //        sliderPanel.setBorder(new LineBorder(Color.black));
-
-        // The row for the red value
-        JLabel l = new JLabel(redString);
-        l.setDisplayedMnemonic(getInt("ColorChooser.rgbRedMnemonic", -1));
-        enclosure.add(l);
-        redSlider = new JSlider(JSlider.HORIZONTAL, 0, 255, color.getRed());
-        redSlider.setMajorTickSpacing( 85 );
-        redSlider.setMinorTickSpacing( 17 );
-        redSlider.setPaintTicks( true );
-        redSlider.setPaintLabels( true );
-        redSlider.setInheritsPopupMenu(true);
-        enclosure.add( redSlider );
-        redField = new JSpinner(
-            new SpinnerNumberModel(color.getRed(), minValue, maxValue, 1));
-        l.setLabelFor(redSlider);
-        redField.setInheritsPopupMenu(true);
-        JPanel redFieldHolder = new JPanel(new CenterLayout());
-        redFieldHolder.setInheritsPopupMenu(true);
-        redField.addChangeListener(this);
-        redFieldHolder.add(redField);
-        enclosure.add(redFieldHolder);
-
-
-        // The row for the green value
-        l = new JLabel(greenString);
-        l.setDisplayedMnemonic(getInt("ColorChooser.rgbGreenMnemonic", -1));
-        enclosure.add(l);
-        greenSlider = new JSlider(JSlider.HORIZONTAL, 0, 255, color.getGreen());
-        greenSlider.setMajorTickSpacing( 85 );
-        greenSlider.setMinorTickSpacing( 17 );
-        greenSlider.setPaintTicks( true );
-        greenSlider.setPaintLabels( true );
-        greenSlider.setInheritsPopupMenu(true);
-        enclosure.add(greenSlider);
-        greenField = new JSpinner(
-            new SpinnerNumberModel(color.getGreen(), minValue, maxValue, 1));
-        l.setLabelFor(greenSlider);
-        greenField.setInheritsPopupMenu(true);
-        JPanel greenFieldHolder = new JPanel(new CenterLayout());
-        greenFieldHolder.add(greenField);
-        greenFieldHolder.setInheritsPopupMenu(true);
-        greenField.addChangeListener(this);
-        enclosure.add(greenFieldHolder);
-
-        // The slider for the blue value
-        l = new JLabel(blueString);
-        l.setDisplayedMnemonic(getInt("ColorChooser.rgbBlueMnemonic", -1));
-        enclosure.add(l);
-        blueSlider = new JSlider(JSlider.HORIZONTAL, 0, 255, color.getBlue());
-        blueSlider.setMajorTickSpacing( 85 );
-        blueSlider.setMinorTickSpacing( 17 );
-        blueSlider.setPaintTicks( true );
-        blueSlider.setPaintLabels( true );
-        blueSlider.setInheritsPopupMenu(true);
-        enclosure.add(blueSlider);
-        blueField = new JSpinner(
-            new SpinnerNumberModel(color.getBlue(), minValue, maxValue, 1));
-        l.setLabelFor(blueSlider);
-        blueField.setInheritsPopupMenu(true);
-        JPanel blueFieldHolder = new JPanel(new CenterLayout());
-        blueFieldHolder.add(blueField);
-        blueField.addChangeListener(this);
-        blueFieldHolder.setInheritsPopupMenu(true);
-        enclosure.add(blueFieldHolder);
-
-        redSlider.addChangeListener( this );
-        greenSlider.addChangeListener( this );
-        blueSlider.addChangeListener( this );
-
-        redSlider.putClientProperty("JSlider.isFilled", Boolean.TRUE);
-        greenSlider.putClientProperty("JSlider.isFilled", Boolean.TRUE);
-        blueSlider.putClientProperty("JSlider.isFilled", Boolean.TRUE);
-    }
-
-    public void uninstallChooserPanel(JColorChooser enclosingChooser) {
-        super.uninstallChooserPanel(enclosingChooser);
-        removeAll();
-    }
-
-    public void updateChooser() {
-        if (!isAdjusting) {
-            isAdjusting = true;
-
-            setColor(getColorFromModel());
-
-            isAdjusting = false;
-        }
-    }
-
-    public void stateChanged( ChangeEvent e ) {
-        if ( e.getSource() instanceof JSlider && !isAdjusting) {
-
-            int red = redSlider.getValue();
-            int green = greenSlider.getValue();
-            int blue = blueSlider.getValue() ;
-            Color color = new Color (red, green, blue);
-
-            getColorSelectionModel().setSelectedColor(color);
-        } else if (e.getSource() instanceof JSpinner && !isAdjusting) {
-
-            int red = ((Integer)redField.getValue()).intValue();
-            int green = ((Integer)greenField.getValue()).intValue();
-            int blue = ((Integer)blueField.getValue()).intValue();
-            Color color = new Color (red, green, blue);
-
-            getColorSelectionModel().setSelectedColor(color);
-        }
-    }
-
-}
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -213,17 +213,15 @@
     class RecentSwatchListener extends MouseAdapter implements Serializable {
         public void mousePressed(MouseEvent e) {
             Color color = recentSwatchPanel.getColorForLocation(e.getX(), e.getY());
-            getColorSelectionModel().setSelectedColor(color);
-
+            setSelectedColor(color);
         }
     }
 
     class MainSwatchListener extends MouseAdapter implements Serializable {
         public void mousePressed(MouseEvent e) {
             Color color = swatchPanel.getColorForLocation(e.getX(), e.getY());
-            getColorSelectionModel().setSelectedColor(color);
+            setSelectedColor(color);
             recentSwatchPanel.setMostRecentColor(color);
-
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DiagramComponent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Insets;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.image.BufferedImage;
+import javax.swing.JComponent;
+
+final class DiagramComponent extends JComponent implements MouseListener, MouseMotionListener {
+
+    private final ColorPanel panel;
+    private final boolean diagram;
+
+    private final Insets insets = new Insets(0, 0, 0, 0);
+
+    private int width;
+    private int height;
+
+    private int[] array;
+    private BufferedImage image;
+
+    DiagramComponent(ColorPanel panel, boolean diagram) {
+        this.panel = panel;
+        this.diagram = diagram;
+        addMouseListener(this);
+        addMouseMotionListener(this);
+    }
+
+    @Override
+    protected void paintComponent(Graphics g) {
+        getInsets(this.insets);
+        this.width = getWidth() - this.insets.left - this.insets.right;
+        this.height = getHeight() - this.insets.top - this.insets.bottom;
+
+        boolean update = (this.image == null)
+                || (this.width != this.image.getWidth())
+                || (this.height != this.image.getHeight());
+        if (update) {
+            int size = this.width * this.height;
+            if ((this.array == null) || (this.array.length < size)) {
+                this.array = new int[size];
+            }
+            this.image = new BufferedImage(this.width, this.height, BufferedImage.TYPE_INT_RGB);
+        }
+        {
+            float dx = 1.0f / (float) (this.width - 1);
+            float dy = 1.0f / (float) (this.height - 1);
+
+            int offset = 0;
+            float y = 0.0f;
+            for (int h = 0; h < this.height; h++, y += dy) {
+                if (this.diagram) {
+                    float x = 0.0f;
+                    for (int w = 0; w < this.width; w++, x += dx, offset++) {
+                        this.array[offset] = this.panel.getColor(x, y);
+                    }
+                }
+                else {
+                    int color = this.panel.getColor(y);
+                    for (int w = 0; w < this.width; w++, offset++) {
+                        this.array[offset] = color;
+                    }
+                }
+            }
+        }
+        this.image.setRGB(0, 0, this.width, this.height, this.array, 0, this.width);
+        g.drawImage(this.image, this.insets.left, this.insets.top, this.width, this.height, this);
+        if (isEnabled()) {
+            this.width--;
+            this.height--;
+            g.setXORMode(Color.WHITE);
+            g.setColor(Color.BLACK);
+            if (this.diagram) {
+                int x = getValue(this.panel.getValueX(), this.insets.left, this.width);
+                int y = getValue(this.panel.getValueY(), this.insets.top, this.height);
+                g.drawLine(x - 8, y, x + 8, y);
+                g.drawLine(x, y - 8, x, y + 8);
+            }
+            else {
+                int z = getValue(this.panel.getValueZ(), this.insets.top, this.height);
+                g.drawLine(this.insets.left, z, this.insets.left + this.width, z);
+            }
+            g.setPaintMode();
+        }
+    }
+
+    public void mousePressed(MouseEvent event) {
+        mouseDragged(event);
+    }
+
+    public void mouseReleased(MouseEvent event) {
+    }
+
+    public void mouseClicked(MouseEvent event) {
+    }
+
+    public void mouseEntered(MouseEvent event) {
+    }
+
+    public void mouseExited(MouseEvent event) {
+    }
+
+    public void mouseMoved(MouseEvent event) {
+    }
+
+    public void mouseDragged(MouseEvent event) {
+        if (isEnabled()) {
+            float y = getValue(event.getY(), this.insets.top, this.height);
+            if (this.diagram) {
+                float x = getValue(event.getX(), this.insets.left, this.width);
+                this.panel.setValue(x, y);
+            }
+            else {
+                this.panel.setValue(y);
+            }
+        }
+    }
+
+    private static int getValue(float value, int min, int max) {
+        return min + (int) (value * (float) (max));
+    }
+
+    private static float getValue(int value, int min, int max) {
+        if (min < value) {
+            value -= min;
+            return (value < max)
+                    ? (float) value / (float) max
+                    : 1.0f;
+        }
+        return 0.0f;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/SlidingSpinner.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import javax.swing.JComponent;
+import javax.swing.JSlider;
+import javax.swing.JSpinner;
+import javax.swing.JSpinner.DefaultEditor;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+final class SlidingSpinner implements ChangeListener {
+
+    private final ColorPanel panel;
+    private final JComponent label;
+    private final SpinnerNumberModel model = new SpinnerNumberModel();
+    private final JSlider slider = new JSlider();
+    private final JSpinner spinner = new JSpinner(this.model);
+    private float value;
+    private boolean internal;
+
+    SlidingSpinner(ColorPanel panel, JComponent label) {
+        this.panel = panel;
+        this.label = label;
+        this.slider.addChangeListener(this);
+        this.spinner.addChangeListener(this);
+        DefaultEditor editor = (DefaultEditor) this.spinner.getEditor();
+        ValueFormatter.init(3, false, editor.getTextField());
+        editor.setFocusable(false);
+        this.spinner.setFocusable(false);
+    }
+
+    JComponent getLabel() {
+        return this.label;
+    }
+
+    JSlider getSlider() {
+        return this.slider;
+    }
+
+    JSpinner getSpinner() {
+        return this.spinner;
+    }
+
+    float getValue() {
+        return this.value;
+    }
+
+    void setValue(float value) {
+        int min = this.slider.getMinimum();
+        int max = this.slider.getMaximum();
+        this.internal = true;
+        this.slider.setValue(min + (int) (value * (float) (max - min)));
+        this.spinner.setValue(Integer.valueOf(this.slider.getValue()));
+        this.internal = false;
+        this.value = value;
+    }
+
+    void setRange(int min, int max) {
+        this.internal = true;
+        this.slider.setMinimum(min);
+        this.slider.setMaximum(max);
+        this.model.setMinimum(Integer.valueOf(min));
+        this.model.setMaximum(Integer.valueOf(max));
+        this.internal = false;
+    }
+
+    void setVisible(boolean visible) {
+        this.label.setVisible(visible);
+        this.slider.setVisible(visible);
+        this.spinner.setVisible(visible);
+    }
+
+    public void stateChanged(ChangeEvent event) {
+        if (!this.internal) {
+            if (this.spinner == event.getSource()) {
+                Object value = this.spinner.getValue();
+                if (value instanceof Integer) {
+                    this.internal = true;
+                    this.slider.setValue((Integer) value);
+                    this.internal = false;
+                }
+            }
+            int value = this.slider.getValue();
+            this.internal = true;
+            this.spinner.setValue(Integer.valueOf(value));
+            this.internal = false;
+            int min = this.slider.getMinimum();
+            int max = this.slider.getMaximum();
+            this.value = (float) (value - min) / (float) (max - min);
+            this.panel.colorChanged();
+        }
+    }
+}
--- a/jdk/src/share/classes/javax/swing/colorchooser/SyntheticImage.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
- * Copyright 1997-2003 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package javax.swing.colorchooser;
-
-import java.awt.*;
-import java.awt.image.*;
-
-/** A helper class to make computing synthetic images a little easier.
- *  All you need to do is define a subclass that overrides computeRow
- *  to compute a row of the image.  It is passed the y coordinate of the
- *  row and an array into which to put the pixels in
- *  <a href="http://java.sun.com/products/jdk/1.1/docs/api/java.awt.image.ColorModel.html#getRGBdefault()">
- *  standard ARGB format</a>.
- *  <p>Normal usage looks something like this:
- *  <pre>&nbsp;Image i = createImage(new SyntheticImage(200, 100) {
- *  &nbsp;    protected void computeRow(int y, int[] row) {
- *  &nbsp;      for(int i = width; --i>=0; ) {
- *  &nbsp;          int grey = i*255/(width-1);
- *  &nbsp;          row[i] = (255<<24)|(grey<<16)|(grey<<8)|grey;
- *  &nbsp;      }
- *  &nbsp;    }
- *  &nbsp;}
- *  </pre>This creates a image 200 pixels wide and 100 pixels high
- *  that is a horizontal grey ramp, going from black on the left to
- *  white on the right.
- *  <p>
- *  If the image is to be a movie, override isStatic to return false,
- *  <i>y</i> cycling back to 0 is computeRow's signal that the next
- *  frame has started.  It is acceptable (expected?) for computeRow(0,r)
- *  to pause until the appropriate time to start the next frame.
- *
- *  @author James Gosling
- */
-abstract class SyntheticImage implements ImageProducer {
-    private SyntheticImageGenerator root;
-    protected int width=10, height=100;
-    static final ColorModel cm = ColorModel.getRGBdefault();
-    public static final int pixMask = 0xFF;
-    private Thread runner;
-    protected SyntheticImage() {    }
-    protected SyntheticImage(int w, int h) { width = w; height = h; }
-    protected void computeRow(int y, int[] row) {
-        int p = 255-255*y/(height-1);
-        p = (pixMask<<24)|(p<<16)|(p<<8)|p;
-        for (int i = row.length; --i>=0; ) row[i] = p;
-    }
-    public synchronized void addConsumer(ImageConsumer ic){
-        for (SyntheticImageGenerator ics = root; ics != null; ics = ics.next)
-            if (ics.ic == ic) return;
-        root = new SyntheticImageGenerator(ic, root, this);
-    }
-    public synchronized boolean isConsumer(ImageConsumer ic){
-        for (SyntheticImageGenerator ics = root; ics != null; ics = ics.next)
-            if (ics.ic == ic) return true;
-        return false;
-    }
-    public synchronized void removeConsumer(ImageConsumer ic) {
-        SyntheticImageGenerator prev = null;
-        for (SyntheticImageGenerator ics = root; ics != null; ics = ics.next) {
-            if (ics.ic == ic) {
-                ics.useful = false;
-                if (prev!=null) prev.next = ics.next;
-                else root = ics.next;
-                return;
-            }
-            prev = ics;
-        }
-    }
-    public synchronized void startProduction(ImageConsumer ic) {
-        addConsumer(ic);
-        for (SyntheticImageGenerator ics = root; ics != null; ics = ics.next)
-            if (ics.useful && !ics.isAlive())
-                ics.start();
-    }
-    protected boolean isStatic() { return true; }
-    public void nextFrame(int param) {}//Override if !isStatic
-    public void requestTopDownLeftRightResend(ImageConsumer ic){}
-
-    protected volatile boolean aborted = false;
-}
-
-class SyntheticImageGenerator extends Thread {
-    ImageConsumer ic;
-    boolean useful;
-    SyntheticImageGenerator next;
-    SyntheticImage parent;
-    SyntheticImageGenerator(ImageConsumer ic, SyntheticImageGenerator next,
-        SyntheticImage parent) {
-        super("SyntheticImageGenerator");
-        this.ic = ic;
-        this.next = next;
-        this.parent = parent;
-        useful = true;
-        setDaemon(true);
-    }
-    public void run() {
-        ImageConsumer ic = this.ic;
-        int w = parent.width;
-        int h = parent.height;
-        int hints = ic.SINGLEPASS|ic.COMPLETESCANLINES|ic.TOPDOWNLEFTRIGHT;
-        if (parent.isStatic())
-            hints |= ic.SINGLEFRAME;
-        ic.setHints(hints);
-        ic.setDimensions(w, h);
-        ic.setProperties(null);
-        ic.setColorModel(parent.cm);
-
-        if (useful) {
-            int[] row=new int[w];
-            doPrivileged( new Runnable() {
-                public void run() {
-                    Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
-                }
-            });
-
-            do {
-                for (int y = 0; y<h && useful; y++) {
-                    parent.computeRow(y,row);
-
-                    if (parent.aborted) {
-                        ic.imageComplete(ic.IMAGEABORTED);
-                        return;
-                    }
-
-                    ic.setPixels(0, y, w, 1, parent.cm, row, 0, w);
-                }
-                ic.imageComplete(parent.isStatic() ? ic.STATICIMAGEDONE
-                                            : ic.SINGLEFRAMEDONE );
-            } while(!parent.isStatic() && useful);
-        }
-    }
-
-    private final static void doPrivileged(final Runnable doRun) {
-        java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                  doRun.run();
-                  return null;
-                }
-            }
-        );
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ValueFormatter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.colorchooser;
+
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.text.ParseException;
+import static java.util.Locale.ENGLISH;
+import javax.swing.JFormattedTextField;
+import javax.swing.JFormattedTextField.AbstractFormatter;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultFormatterFactory;
+import javax.swing.text.DocumentFilter;
+
+final class ValueFormatter extends AbstractFormatter implements FocusListener, Runnable {
+
+    static void init(int length, boolean hex, JFormattedTextField text) {
+        ValueFormatter formatter = new ValueFormatter(length, hex);
+        text.setColumns(length);
+        text.setFormatterFactory(new DefaultFormatterFactory(formatter));
+        text.setHorizontalAlignment(SwingConstants.RIGHT);
+        text.setMinimumSize(text.getPreferredSize());
+        text.addFocusListener(formatter);
+    }
+
+    private final DocumentFilter filter = new DocumentFilter() {
+        @Override
+        public void remove(FilterBypass fb, int offset, int length) throws BadLocationException {
+            if (isValid(fb.getDocument().getLength() - length)) {
+                fb.remove(offset, length);
+            }
+        }
+
+        @Override
+        public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet set) throws BadLocationException {
+            if (isValid(fb.getDocument().getLength() + text.length() - length) && isValid(text)) {
+                fb.replace(offset, length, text.toUpperCase(ENGLISH), set);
+            }
+        }
+
+        @Override
+        public void insertString(FilterBypass fb, int offset, String text, AttributeSet set) throws BadLocationException {
+            if (isValid(fb.getDocument().getLength() + text.length()) && isValid(text)) {
+                fb.insertString(offset, text.toUpperCase(ENGLISH), set);
+            }
+        }
+    };
+
+    private final int length;
+    private final int radix;
+
+    private JFormattedTextField text;
+
+    ValueFormatter(int length, boolean hex) {
+        this.length = length;
+        this.radix = hex ? 16 : 10;
+    }
+
+    @Override
+    public Object stringToValue(String text) throws ParseException {
+        try {
+            return Integer.valueOf(text, this.radix);
+        }
+        catch (NumberFormatException nfe) {
+            ParseException pe = new ParseException("illegal format", 0);
+            pe.initCause(nfe);
+            throw pe;
+        }
+    }
+
+    @Override
+    public String valueToString(Object object) throws ParseException {
+        if (object instanceof Integer) {
+            if (this.radix == 10) {
+                return object.toString();
+            }
+            int value = (Integer) object;
+            int index = this.length;
+            char[] array = new char[index];
+            while (0 < index--) {
+                array[index] = Character.forDigit(value & 0x0F, this.radix);
+                value >>= 4;
+            }
+            return new String(array).toUpperCase(ENGLISH);
+        }
+        throw new ParseException("illegal object", 0);
+    }
+
+    @Override
+    protected DocumentFilter getDocumentFilter() {
+        return this.filter;
+    }
+
+    public void focusGained(FocusEvent event) {
+        Object source = event.getSource();
+        if (source instanceof JFormattedTextField) {
+            this.text = (JFormattedTextField) source;
+            SwingUtilities.invokeLater(this);
+        }
+    }
+
+    public void focusLost(FocusEvent event) {
+    }
+
+    public void run() {
+        if (this.text != null) {
+            this.text.selectAll();
+        }
+    }
+
+    private boolean isValid(int length) {
+        return (0 <= length) && (length <= this.length);
+    }
+
+    private boolean isValid(String text) {
+        int length = text.length();
+        for (int i = 0; i < length; i++) {
+            char ch = text.charAt(i);
+            if (Character.digit(ch, this.radix) < 0) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
--- a/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -136,8 +136,8 @@
         }
 
         File[] roots = getRoots();
-        for (int i = 0; i < roots.length; i++) {
-            if (roots[i].equals(f)) {
+        for (File root : roots) {
+            if (root.equals(f)) {
                 return true;
             }
         }
@@ -252,8 +252,8 @@
                     return true;
                 }
             File[] children = getFiles(folder, false);
-            for (int i = 0; i < children.length; i++) {
-                if (file.equals(children[i])) {
+            for (File child : children) {
+                if (file.equals(child)) {
                     return true;
                 }
             }
@@ -276,9 +276,9 @@
     public File getChild(File parent, String fileName) {
         if (parent instanceof ShellFolder) {
             File[] children = getFiles(parent, false);
-            for (int i = 0; i < children.length; i++) {
-                if (children[i].getName().equals(fileName)) {
-                    return children[i];
+            for (File child : children) {
+                if (child.getName().equals(fileName)) {
+                    return child;
                 }
             }
         }
@@ -444,7 +444,7 @@
      * Gets the list of shown (i.e. not hidden) files.
      */
     public File[] getFiles(File dir, boolean useFileHiding) {
-        Vector files = new Vector();
+        Vector<File> files = new Vector<File>();
 
 
         // add all files in dir
@@ -483,7 +483,7 @@
             }
         }
 
-        return (File[])files.toArray(new File[files.size()]);
+        return files.toArray(new File[files.size()]);
     }
 
 
@@ -590,7 +590,7 @@
         if(containingDir == null) {
             throw new IOException("Containing directory is null:");
         }
-        File newFolder = null;
+        File newFolder;
         // Unix - using OpenWindows' default folder name. Can't find one for Motif/CDE.
         newFolder = createFileObject(containingDir, newFolderString);
         int i = 1;
@@ -614,11 +614,7 @@
     }
 
     public boolean isDrive(File dir) {
-        if (isFloppyDrive(dir)) {
-            return true;
-        } else {
-            return false;
-        }
+        return isFloppyDrive(dir);
     }
 
     public boolean isFloppyDrive(File dir) {
@@ -700,9 +696,8 @@
         if(containingDir == null) {
             throw new IOException("Containing directory is null:");
         }
-        File newFolder = null;
         // Using NT's default folder name
-        newFolder = createFileObject(containingDir, newFolderString);
+        File newFolder = createFileObject(containingDir, newFolderString);
         int i = 2;
         while (newFolder.exists() && (i < 100)) {
             newFolder = createFileObject(containingDir, MessageFormat.format(
@@ -770,9 +765,8 @@
         if(containingDir == null) {
             throw new IOException("Containing directory is null:");
         }
-        File newFolder = null;
         // Using NT's default folder name
-        newFolder = createFileObject(containingDir, newFolderString);
+        File newFolder = createFileObject(containingDir, newFolderString);
 
         if(newFolder.exists()) {
             throw new IOException("Directory already exists:" + newFolder.getAbsolutePath());
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Wed Jul 05 16:42:37 2017 +0200
@@ -165,7 +165,7 @@
             JRootPane root = b.getRootPane();
             if (root != null) {
                BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType(
-                         ((AbstractButton)b).getUI(), BasicButtonUI.class);
+                         b.getUI(), BasicButtonUI.class);
                if (ui != null && DefaultLookup.getBoolean(b, ui,
                                    ui.getPropertyPrefix() +
                                    "defaultButtonFollowsFocus", true)) {
@@ -185,7 +185,7 @@
            JButton initialDefault = (JButton)root.getClientProperty("initialDefaultButton");
            if (b != initialDefault) {
                BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType(
-                         ((AbstractButton)b).getUI(), BasicButtonUI.class);
+                         b.getUI(), BasicButtonUI.class);
                if (ui != null && DefaultLookup.getBoolean(b, ui,
                                    ui.getPropertyPrefix() +
                                    "defaultButtonFollowsFocus", true)) {
@@ -239,7 +239,7 @@
              }
           }
        }
-    };
+    }
 
     public void mouseReleased(MouseEvent e) {
         if (SwingUtilities.isLeftMouseButton(e)) {
@@ -253,7 +253,7 @@
             model.setPressed(false);
             model.setArmed(false);
         }
-    };
+    }
 
     public void mouseEntered(MouseEvent e) {
         AbstractButton b = (AbstractButton) e.getSource();
@@ -263,7 +263,7 @@
         }
         if (model.isPressed())
                 model.setArmed(true);
-    };
+    }
 
     public void mouseExited(MouseEvent e) {
         AbstractButton b = (AbstractButton) e.getSource();
@@ -272,7 +272,7 @@
             model.setRollover(false);
         }
         model.setArmed(false);
-    };
+    }
 
 
     /**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -237,7 +237,7 @@
 
             /* the fallback icon should be based on the selected state */
             if (model.isSelected()) {
-                selectedIcon = (Icon) b.getSelectedIcon();
+                selectedIcon = b.getSelectedIcon();
                 if (selectedIcon != null) {
                     icon = selectedIcon;
                 }
@@ -245,31 +245,31 @@
 
             if(!model.isEnabled()) {
                 if(model.isSelected()) {
-                   tmpIcon = (Icon) b.getDisabledSelectedIcon();
+                   tmpIcon = b.getDisabledSelectedIcon();
                    if (tmpIcon == null) {
                        tmpIcon = selectedIcon;
                    }
                 }
 
                 if (tmpIcon == null) {
-                    tmpIcon = (Icon) b.getDisabledIcon();
+                    tmpIcon = b.getDisabledIcon();
                 }
             } else if(model.isPressed() && model.isArmed()) {
-                tmpIcon = (Icon) b.getPressedIcon();
+                tmpIcon = b.getPressedIcon();
                 if(tmpIcon != null) {
                     // revert back to 0 offset
                     clearTextShiftOffset();
                 }
             } else if(b.isRolloverEnabled() && model.isRollover()) {
                 if(model.isSelected()) {
-                   tmpIcon = (Icon) b.getRolloverSelectedIcon();
+                   tmpIcon = b.getRolloverSelectedIcon();
                    if (tmpIcon == null) {
                        tmpIcon = selectedIcon;
                    }
                 }
 
                 if (tmpIcon == null) {
-                    tmpIcon = (Icon) b.getRolloverIcon();
+                    tmpIcon = b.getRolloverIcon();
                 }
             }
 
@@ -451,9 +451,9 @@
         MouseMotionListener[] listeners = b.getMouseMotionListeners();
 
         if (listeners != null) {
-            for (int counter = 0; counter < listeners.length; counter++) {
-                if (listeners[counter] instanceof BasicButtonListener) {
-                    return (BasicButtonListener)listeners[counter];
+            for (MouseMotionListener listener : listeners) {
+                if (listener instanceof BasicButtonListener) {
+                    return (BasicButtonListener) listener;
                 }
             }
         }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -299,8 +299,10 @@
                         tabbedPane.addTab(name, centerWrapper);
                         if (mnemonic > 0) {
                             tabbedPane.setMnemonicAt(i, mnemonic);
-                            tabbedPane.setDisplayedMnemonicIndexAt(
-                                  i, newPanels[i].getDisplayedMnemonicIndex());
+                            int index = newPanels[i].getDisplayedMnemonicIndex();
+                            if (index >= 0) {
+                                tabbedPane.setDisplayedMnemonicIndexAt(i, index);
+                            }
                         }
                     }
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Wed Jul 05 16:42:37 2017 +0200
@@ -92,7 +92,7 @@
                 return oldValue;
             } else {
                 // Must take the value from the editor and get the value and cast it to the new type.
-                Class cls = oldValue.getClass();
+                Class<?> cls = oldValue.getClass();
                 try {
                     Method method = cls.getMethod("valueOf", new Class[]{String.class});
                     newValue = method.invoke(oldValue, new Object[] { editor.getText()});
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1509,15 +1509,21 @@
                             || ui.isTableCellEditor) {
                         Object listItem = ui.popup.getList().getSelectedValue();
                         if (listItem != null) {
-                            comboBox.getModel().setSelectedItem(listItem);
-                            // Ensure that JComboBox.actionPerformed()
-                            // doesn't set editor value as selected item
+                            // Use the selected value from popup
+                            // to set the selected item in combo box,
+                            // but ensure before that JComboBox.actionPerformed()
+                            // won't use editor's value to set the selected item
                             comboBox.getEditor().setItem(listItem);
+                            comboBox.setSelectedItem(listItem);
                         }
                     }
                     comboBox.setPopupVisible(false);
                 }
                 else {
+                    // Hide combo box if it is a table cell editor
+                    if (ui.isTableCellEditor && !comboBox.isEditable()) {
+                        comboBox.setSelectedItem(comboBox.getSelectedItem());
+                    }
                     // Call the default button binding.
                     // This is a pretty messy way of passing an event through
                     // to the root pane.
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2003 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,7 @@
 
     protected JInternalFrame.JDesktopIcon desktopIcon;
     protected JInternalFrame frame;
+    private DesktopIconMover desktopIconMover;
 
     /**
      * The title pane component used in the desktop icon.
@@ -127,12 +128,21 @@
         mouseInputListener = createMouseInputListener();
         desktopIcon.addMouseMotionListener(mouseInputListener);
         desktopIcon.addMouseListener(mouseInputListener);
+         getDesktopIconMover().installListeners();
     }
 
     protected void uninstallListeners() {
         desktopIcon.removeMouseMotionListener(mouseInputListener);
         desktopIcon.removeMouseListener(mouseInputListener);
         mouseInputListener = null;
+         getDesktopIconMover().uninstallListeners();
+    }
+
+    private DesktopIconMover getDesktopIconMover() {
+        if (desktopIconMover == null) {
+            desktopIconMover = new DesktopIconMover(desktopIcon);
+        }
+        return desktopIconMover;
     }
 
     protected void installDefaults() {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -43,10 +43,10 @@
 
     private JFileChooser filechooser = null;
     // PENDING(jeff) pick the size more sensibly
-    private Vector fileCache = new Vector(50);
+    private Vector<File> fileCache = new Vector<File>(50);
     private LoadFilesThread loadThread = null;
-    private Vector files = null;
-    private Vector directories = null;
+    private Vector<File> files = null;
+    private Vector<File> directories = null;
     private int fetchID = 0;
 
     private PropertyChangeSupport changeSupport;
@@ -106,14 +106,14 @@
             if (files != null) {
                 return files;
             }
-            files = new Vector();
-            directories = new Vector();
+            files = new Vector<File>();
+            directories = new Vector<File>();
             directories.addElement(filechooser.getFileSystemView().createFileObject(
                 filechooser.getCurrentDirectory(), "..")
             );
 
             for (int i = 0; i < getSize(); i++) {
-                File f = (File)fileCache.get(i);
+                File f = fileCache.get(i);
                 if (filechooser.isTraversable(f)) {
                     directories.add(f);
                 } else {
@@ -215,7 +215,7 @@
     class LoadFilesThread extends Thread {
         File currentDirectory = null;
         int fid;
-        Vector runnables = new Vector(10);
+        Vector<DoChangeContents> runnables = new Vector<DoChangeContents>(10);
 
         public LoadFilesThread(File currentDirectory, int fid) {
             super("Basic L&F File Loading Thread");
@@ -223,7 +223,7 @@
             this.fid = fid;
         }
 
-        private void invokeLater(Runnable runnable) {
+        private void invokeLater(DoChangeContents runnable) {
             runnables.addElement(runnable);
             SwingUtilities.invokeLater(runnable);
         }
@@ -245,9 +245,9 @@
             }
 
             // run through the file list, add directories and selectable files to fileCache
-            for (int i = 0; i < list.length; i++) {
-                if(filechooser.accept(list[i])) {
-                    acceptsList.addElement(list[i]);
+            for (File file : list) {
+                if (filechooser.accept(file)) {
+                    acceptsList.addElement(file);
                 }
             }
 
@@ -258,11 +258,11 @@
             // First sort alphabetically by filename
             sort(acceptsList);
 
-            Vector newDirectories = new Vector(50);
-            Vector newFiles = new Vector();
+            Vector<File> newDirectories = new Vector<File>(50);
+            Vector<File> newFiles = new Vector<File>();
             // run through list grabbing directories in chunks of ten
             for(int i = 0; i < acceptsList.size(); i++) {
-                File f = (File) acceptsList.elementAt(i);
+                File f = acceptsList.elementAt(i);
                 boolean isTraversable = filechooser.isTraversable(f);
                 if (isTraversable) {
                     newDirectories.addElement(f);
@@ -274,7 +274,7 @@
                 }
             }
 
-            Vector newFileCache = new Vector(newDirectories);
+            Vector<File> newFileCache = new Vector<File>(newDirectories);
             newFileCache.addAll(newFiles);
 
             int newSize = newFileCache.size();
@@ -320,7 +320,7 @@
                     if(isInterrupted()) {
                         return;
                     }
-                    invokeLater(new DoChangeContents(null, 0, new Vector(fileCache.subList(start, end)),
+                    invokeLater(new DoChangeContents(null, 0, new Vector<File>(fileCache.subList(start, end)),
                                                      start, fid));
                     newFileCache = null;
                 }
@@ -334,9 +334,9 @@
         }
 
 
-        public void cancelRunnables(Vector runnables) {
-            for(int i = 0; i < runnables.size(); i++) {
-                ((DoChangeContents)runnables.elementAt(i)).cancel();
+        public void cancelRunnables(Vector<DoChangeContents> runnables) {
+            for (DoChangeContents runnable : runnables) {
+                runnable.cancel();
             }
         }
 
@@ -449,15 +449,14 @@
 
 
     class DoChangeContents implements Runnable {
-        private List addFiles;
-        private List remFiles;
+        private List<File> addFiles;
+        private List<File> remFiles;
         private boolean doFire = true;
         private int fid;
         private int addStart = 0;
         private int remStart = 0;
-        private int change;
 
-        public DoChangeContents(List addFiles, int addStart, List remFiles, int remStart, int fid) {
+        public DoChangeContents(List<File> addFiles, int addStart, List<File> remFiles, int remStart, int fid) {
             this.addFiles = addFiles;
             this.addStart = addStart;
             this.remFiles = remFiles;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -36,6 +36,7 @@
 import java.beans.*;
 import java.io.*;
 import java.util.*;
+import java.util.List;
 import java.util.regex.*;
 import sun.awt.shell.ShellFolder;
 import sun.swing.*;
@@ -159,9 +160,9 @@
     }
 
     public void uninstallUI(JComponent c) {
-        uninstallListeners((JFileChooser) filechooser);
-        uninstallComponents((JFileChooser) filechooser);
-        uninstallDefaults((JFileChooser) filechooser);
+        uninstallListeners(filechooser);
+        uninstallComponents(filechooser);
+        uninstallDefaults(filechooser);
 
         if(accessoryPanel != null) {
             accessoryPanel.removeAll();
@@ -506,9 +507,9 @@
                             setDirectorySelected(true);
                             setDirectory(((File)objects[0]));
                         } else {
-                            ArrayList fList = new ArrayList(objects.length);
-                            for (int i = 0; i < objects.length; i++) {
-                                File f = (File)objects[i];
+                            ArrayList<File> fList = new ArrayList<File>(objects.length);
+                            for (Object object : objects) {
+                                File f = (File) object;
                                 boolean isDir = f.isDirectory();
                                 if ((chooser.isFileSelectionEnabled() && !isDir)
                                     || (chooser.isDirectorySelectionEnabled()
@@ -518,7 +519,7 @@
                                 }
                             }
                             if (fList.size() > 0) {
-                                files = (File[])fList.toArray(new File[fList.size()]);
+                                files = fList.toArray(new File[fList.size()]);
                             }
                             setDirectorySelected(false);
                         }
@@ -829,11 +830,17 @@
             File dir = chooser.getCurrentDirectory();
 
             if (filename != null) {
-                // Remove whitespace from beginning and end of filename
-                filename = filename.trim();
+                // Remove whitespaces from end of filename
+                int i = filename.length() - 1;
+
+                while (i >=0 && filename.charAt(i) <= ' ') {
+                    i--;
+                }
+
+                filename = filename.substring(0, i + 1);
             }
 
-            if (filename == null || filename.equals("")) {
+            if (filename == null || filename.length() == 0) {
                 // no file selected, multiple selection off, therefore cancel the approve action
                 resetGlobFilter();
                 return;
@@ -842,100 +849,93 @@
             File selectedFile = null;
             File[] selectedFiles = null;
 
-            if (filename != null && !filename.equals("")) {
-                // Unix: Resolve '~' to user's home directory
-                if (File.separatorChar == '/') {
-                    if (filename.startsWith("~/")) {
-                        filename = System.getProperty("user.home") + filename.substring(1);
-                    } else if (filename.equals("~")) {
-                        filename = System.getProperty("user.home");
+            // Unix: Resolve '~' to user's home directory
+            if (File.separatorChar == '/') {
+                if (filename.startsWith("~/")) {
+                    filename = System.getProperty("user.home") + filename.substring(1);
+                } else if (filename.equals("~")) {
+                    filename = System.getProperty("user.home");
+                }
+            }
+
+            if (chooser.isMultiSelectionEnabled() && filename.length() > 1 &&
+                    filename.charAt(0) == '"' && filename.charAt(filename.length() - 1) == '"') {
+                List<File> fList = new ArrayList<File>();
+
+                String[] files = filename.substring(1, filename.length() - 1).split("\" \"");
+                // Optimize searching files by names in "children" array
+                Arrays.sort(files);
+
+                File[] children = null;
+                int childIndex = 0;
+
+                for (String str : files) {
+                    File file = fs.createFileObject(str);
+                    if (!file.isAbsolute()) {
+                        if (children == null) {
+                            children = fs.getFiles(dir, false);
+                            Arrays.sort(children);
+                        }
+                        for (int k = 0; k < children.length; k++) {
+                            int l = (childIndex + k) % children.length;
+                            if (children[l].getName().equals(str)) {
+                                file = children[l];
+                                childIndex = l + 1;
+                                break;
+                            }
+                        }
+                    }
+                    fList.add(file);
+                }
+
+                if (!fList.isEmpty()) {
+                    selectedFiles = fList.toArray(new File[fList.size()]);
+                }
+                resetGlobFilter();
+            } else {
+                selectedFile = fs.createFileObject(filename);
+                if (!selectedFile.isAbsolute()) {
+                    selectedFile = fs.getChild(dir, filename);
+                }
+                // check for wildcard pattern
+                FileFilter currentFilter = chooser.getFileFilter();
+                if (!selectedFile.exists() && isGlobPattern(filename)) {
+                    changeDirectory(selectedFile.getParentFile());
+                    if (globFilter == null) {
+                        globFilter = new GlobFilter();
+                    }
+                    try {
+                        globFilter.setPattern(selectedFile.getName());
+                        if (!(currentFilter instanceof GlobFilter)) {
+                            actualFileFilter = currentFilter;
+                        }
+                        chooser.setFileFilter(null);
+                        chooser.setFileFilter(globFilter);
+                        return;
+                    } catch (PatternSyntaxException pse) {
+                        // Not a valid glob pattern. Abandon filter.
                     }
                 }
 
-                if (chooser.isMultiSelectionEnabled() && filename.startsWith("\"")) {
-                    ArrayList fList = new ArrayList();
+                resetGlobFilter();
 
-                    filename = filename.substring(1);
-                    if (filename.endsWith("\"")) {
-                        filename = filename.substring(0, filename.length()-1);
-                    }
-                    File[] children = null;
-                    int childIndex = 0;
-                    do {
-                        String str;
-                        int i = filename.indexOf("\" \"");
-                        if (i > 0) {
-                            str = filename.substring(0, i);
-                            filename = filename.substring(i+3);
-                        } else {
-                            str = filename;
-                            filename = "";
-                        }
-                        File file = fs.createFileObject(str);
-                        if (!file.isAbsolute()) {
-                            if (children == null) {
-                                children = fs.getFiles(dir, false);
-                                Arrays.sort(children);
-                            }
-                            for (int k = 0; k < children.length; k++) {
-                                int l = (childIndex + k) % children.length;
-                                if (children[l].getName().equals(str)) {
-                                    file = children[l];
-                                    childIndex = l + 1;
-                                    break;
-                                }
-                            }
-                        }
-                        fList.add(file);
-                    } while (filename.length() > 0);
-                    if (fList.size() > 0) {
-                        selectedFiles = (File[])fList.toArray(new File[fList.size()]);
-                    }
-                    resetGlobFilter();
-                } else {
-                    selectedFile = fs.createFileObject(filename);
-                    if(!selectedFile.isAbsolute()) {
-                       selectedFile = fs.getChild(dir, filename);
-                    }
-                    // check for wildcard pattern
-                    FileFilter currentFilter = chooser.getFileFilter();
-                    if (!selectedFile.exists() && isGlobPattern(filename)) {
-                        changeDirectory(selectedFile.getParentFile());
-                        if (globFilter == null) {
-                            globFilter = new GlobFilter();
-                        }
-                        try {
-                            globFilter.setPattern(selectedFile.getName());
-                            if (!(currentFilter instanceof GlobFilter)) {
-                                actualFileFilter = currentFilter;
-                            }
-                            chooser.setFileFilter(null);
-                            chooser.setFileFilter(globFilter);
-                            return;
-                        } catch (PatternSyntaxException pse) {
-                            // Not a valid glob pattern. Abandon filter.
-                        }
-                    }
+                // Check for directory change action
+                boolean isDir = (selectedFile != null && selectedFile.isDirectory());
+                boolean isTrav = (selectedFile != null && chooser.isTraversable(selectedFile));
+                boolean isDirSelEnabled = chooser.isDirectorySelectionEnabled();
+                boolean isFileSelEnabled = chooser.isFileSelectionEnabled();
+                boolean isCtrl = (e != null && (e.getModifiers() & ActionEvent.CTRL_MASK) != 0);
 
-                    resetGlobFilter();
-
-                    // Check for directory change action
-                    boolean isDir = (selectedFile != null && selectedFile.isDirectory());
-                    boolean isTrav = (selectedFile != null && chooser.isTraversable(selectedFile));
-                    boolean isDirSelEnabled = chooser.isDirectorySelectionEnabled();
-                    boolean isFileSelEnabled = chooser.isFileSelectionEnabled();
-                    boolean isCtrl = (e != null && (e.getModifiers() & ActionEvent.CTRL_MASK) != 0);
-
-                    if (isDir && isTrav && (isCtrl || !isDirSelEnabled)) {
-                        changeDirectory(selectedFile);
-                        return;
-                    } else if ((isDir || !isFileSelEnabled)
-                               && (!isDir || !isDirSelEnabled)
-                               && (!isDirSelEnabled || selectedFile.exists())) {
-                        selectedFile = null;
-                    }
+                if (isDir && isTrav && (isCtrl || !isDirSelEnabled)) {
+                    changeDirectory(selectedFile);
+                    return;
+                } else if ((isDir || !isFileSelEnabled)
+                        && (!isDir || !isDirSelEnabled)
+                        && (!isDirSelEnabled || selectedFile.exists())) {
+                    selectedFile = null;
                 }
             }
+
             if (selectedFiles != null || selectedFile != null) {
                 if (selectedFiles != null || chooser.isMultiSelectionEnabled()) {
                     if (selectedFiles == null) {
@@ -1213,7 +1213,7 @@
         }
 
         public Icon getCachedIcon(File f) {
-            return (Icon) iconCache.get(f);
+            return iconCache.get(f);
         }
 
         public void cacheIcon(File f, Icon i) {
@@ -1296,8 +1296,7 @@
 
             htmlBuf.append("<html>\n<body>\n<ul>\n");
 
-            for (int i = 0; i < values.length; i++) {
-                Object obj = values[i];
+            for (Object obj : values) {
                 String val = ((obj == null) ? "" : obj.toString());
                 plainBuf.append(val + "\n");
                 htmlBuf.append("  <li>" + val + "\n");
@@ -1337,9 +1336,9 @@
              */
             protected Object getRicherData(DataFlavor flavor) {
                 if (DataFlavor.javaFileListFlavor.equals(flavor)) {
-                    ArrayList files = new ArrayList();
-                    for (int i = 0; i < fileData.length; i++) {
-                        files.add(fileData[i]);
+                    ArrayList<Object> files = new ArrayList<Object>();
+                    for (Object file : this.fileData) {
+                        files.add(file);
                     }
                     return files;
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -266,7 +266,7 @@
             return null;
         }
 
-        Icon icon = (Icon) b.getIcon();
+        Icon icon = b.getIcon();
         String text = b.getText();
 
         Font font = b.getFont();
@@ -277,7 +277,7 @@
         Rectangle viewR = new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);
 
         SwingUtilities.layoutCompoundLabel(
-            (JComponent) b, fm, text, icon,
+            b, fm, text, icon,
             b.getVerticalAlignment(), b.getHorizontalAlignment(),
             b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
             viewR, iconR, textR, (text == null ? 0 : textIconGap)
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -86,6 +86,7 @@
     protected Action moveAction;
     protected Action sizeAction;
 
+    // These constants are not used in JDK code
     protected static final String CLOSE_CMD =
         UIManager.getString("InternalFrameTitlePane.closeButtonText");
     protected static final String ICONIFY_CMD =
@@ -268,18 +269,18 @@
     }
 
     protected void addSystemMenuItems(JMenu systemMenu) {
-        JMenuItem mi = (JMenuItem)systemMenu.add(restoreAction);
+        JMenuItem mi = systemMenu.add(restoreAction);
         mi.setMnemonic('R');
-        mi = (JMenuItem)systemMenu.add(moveAction);
+        mi = systemMenu.add(moveAction);
         mi.setMnemonic('M');
-        mi = (JMenuItem)systemMenu.add(sizeAction);
+        mi = systemMenu.add(sizeAction);
         mi.setMnemonic('S');
-        mi = (JMenuItem)systemMenu.add(iconifyAction);
+        mi = systemMenu.add(iconifyAction);
         mi.setMnemonic('n');
-        mi = (JMenuItem)systemMenu.add(maximizeAction);
+        mi = systemMenu.add(maximizeAction);
         mi.setMnemonic('x');
         systemMenu.add(new JSeparator());
-        mi = (JMenuItem)systemMenu.add(closeAction);
+        mi = systemMenu.add(closeAction);
         mi.setMnemonic('C');
     }
 
@@ -413,7 +414,7 @@
         // PropertyChangeListener
         //
         public void propertyChange(PropertyChangeEvent evt) {
-            String prop = (String)evt.getPropertyName();
+            String prop = evt.getPropertyName();
 
             if (prop == JInternalFrame.IS_SELECTED_PROPERTY) {
                 repaint();
@@ -428,19 +429,19 @@
             }
 
             if ("closable" == prop) {
-                if ((Boolean)evt.getNewValue() == Boolean.TRUE) {
+                if (evt.getNewValue() == Boolean.TRUE) {
                     add(closeButton);
                 } else {
                     remove(closeButton);
                 }
             } else if ("maximizable" == prop) {
-                if ((Boolean)evt.getNewValue() == Boolean.TRUE) {
+                if (evt.getNewValue() == Boolean.TRUE) {
                     add(maxButton);
                 } else {
                     remove(maxButton);
                 }
             } else if ("iconable" == prop) {
-                if ((Boolean)evt.getNewValue() == Boolean.TRUE) {
+                if (evt.getNewValue() == Boolean.TRUE) {
                     add(iconButton);
                 } else {
                     remove(iconButton);
@@ -600,7 +601,8 @@
      */
     public class CloseAction extends AbstractAction {
         public CloseAction() {
-            super(CLOSE_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.closeButtonText"));
         }
 
         public void actionPerformed(ActionEvent e) {
@@ -616,7 +618,8 @@
      */
     public class MaximizeAction extends AbstractAction {
         public MaximizeAction() {
-            super(MAXIMIZE_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.maximizeButtonText"));
         }
 
         public void actionPerformed(ActionEvent evt) {
@@ -644,7 +647,8 @@
      */
     public class IconifyAction extends AbstractAction {
         public IconifyAction() {
-            super(ICONIFY_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.minimizeButtonText"));
         }
 
         public void actionPerformed(ActionEvent e) {
@@ -664,7 +668,8 @@
      */
     public class RestoreAction extends AbstractAction {
         public RestoreAction() {
-            super(RESTORE_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.restoreButtonText"));
         }
 
         public void actionPerformed(ActionEvent evt) {
@@ -690,7 +695,8 @@
      */
     public class MoveAction extends AbstractAction {
         public MoveAction() {
-            super(MOVE_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.moveButtonText"));
         }
 
         public void actionPerformed(ActionEvent e) {
@@ -723,7 +729,8 @@
      */
     public class SizeAction extends AbstractAction {
         public SizeAction() {
-            super(SIZE_CMD);
+            super(UIManager.getString(
+                    "InternalFrameTitlePane.sizeButtonText"));
         }
 
         public void actionPerformed(ActionEvent e) {
@@ -774,7 +781,7 @@
             }
         }
         public boolean isFocusTraversable() { return false; }
-        public void requestFocus() {};
+        public void requestFocus() {}
         public AccessibleContext getAccessibleContext() {
             AccessibleContext ac = super.getAccessibleContext();
             if (uiKey != null) {
@@ -783,6 +790,6 @@
             }
             return ac;
         }
-    };  // end NoFocusButton
+    }  // end NoFocusButton
 
 }   // End Title Pane Class
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,6 @@
     protected MouseInputAdapter          borderListener;
     protected PropertyChangeListener     propertyChangeListener;
     protected LayoutManager              internalFrameLayout;
-    protected ComponentListener          componentListener;
     protected MouseInputListener         glassPaneDispatcher;
     private InternalFrameListener        internalFrameListener;
 
@@ -67,9 +66,9 @@
     protected BasicInternalFrameTitlePane titlePane; // access needs this
 
     private static DesktopManager sharedDesktopManager;
-    private boolean componentListenerAdded = false;
 
     private Rectangle parentBounds;
+    private DesktopIconMover desktopIconMover;
 
     private boolean dragging = false;
     private boolean resizing = false;
@@ -210,14 +209,17 @@
             frame.getGlassPane().addMouseListener(glassPaneDispatcher);
             frame.getGlassPane().addMouseMotionListener(glassPaneDispatcher);
         }
-        componentListener =  createComponentListener();
         if (frame.getParent() != null) {
           parentBounds = frame.getParent().getBounds();
         }
-        if ((frame.getParent() != null) && !componentListenerAdded) {
-          frame.getParent().addComponentListener(componentListener);
-          componentListenerAdded = true;
+        getDesktopIconMover().installListeners();
+    }
+
+    private DesktopIconMover getDesktopIconMover() {
+        if (desktopIconMover == null) {
+            desktopIconMover = new DesktopIconMover(frame);
         }
+        return desktopIconMover;
     }
 
     // Provide a FocusListener to listen for a WINDOW_LOST_FOCUS event,
@@ -288,11 +290,7 @@
      * @since 1.3
      */
     protected void uninstallListeners() {
-      if ((frame.getParent() != null) && componentListenerAdded) {
-        frame.getParent().removeComponentListener(componentListener);
-        componentListenerAdded = false;
-      }
-      componentListener = null;
+      getDesktopIconMover().uninstallListeners();
       if (glassPaneDispatcher != null) {
           frame.getGlassPane().removeMouseListener(glassPaneDispatcher);
           frame.getGlassPane().removeMouseMotionListener(glassPaneDispatcher);
@@ -320,7 +318,7 @@
         if (resizing) {
             return;
         }
-        Cursor s = (Cursor)frame.getLastCursor();
+        Cursor s = frame.getLastCursor();
         if (s == null) {
             s = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
         }
@@ -338,13 +336,13 @@
 
 
     public Dimension getPreferredSize(JComponent x)    {
-        if((JComponent)frame == x)
+        if(frame == x)
             return frame.getLayout().preferredLayoutSize(x);
         return new Dimension(100, 100);
     }
 
     public Dimension getMinimumSize(JComponent x)  {
-        if((JComponent)frame == x) {
+        if(frame == x) {
             return frame.getLayout().minimumLayoutSize(x);
         }
         return new Dimension(0, 0);
@@ -1095,7 +1093,7 @@
             updateFrameCursor();
         }
 
-    };    /// End BorderListener Class
+    }    /// End BorderListener Class
 
     protected class ComponentHandler implements ComponentListener {
       // NOTE: This class exists only for backward compatability. All
@@ -1198,7 +1196,6 @@
       }
     }
 
-    private static boolean isDragging = false;
     private class Handler implements ComponentListener, InternalFrameListener,
             LayoutManager, MouseInputListener, PropertyChangeListener,
             WindowFocusListener, SwingConstants {
@@ -1230,15 +1227,6 @@
                 }
             }
 
-            // Relocate the icon base on the new parent bounds.
-            if (icon != null) {
-                Rectangle iconBounds = icon.getBounds();
-                int y = iconBounds.y +
-                    (parentNewBounds.height - parentBounds.height);
-                icon.setBounds(iconBounds.x, y,
-                    iconBounds.width, iconBounds.height);
-            }
-
             // Update the new parent bounds for next resize.
             if (!parentBounds.equals(parentNewBounds)) {
                 parentBounds = parentNewBounds;
@@ -1384,9 +1372,6 @@
 
 
         // MouseInputListener
-        private Component mouseEventTarget = null;
-        private Component dragSource = null;
-
         public void mousePressed(MouseEvent e) { }
 
         public void mouseEntered(MouseEvent e) { }
@@ -1403,7 +1388,7 @@
 
         // PropertyChangeListener
         public void propertyChange(PropertyChangeEvent evt) {
-            String prop = (String)evt.getPropertyName();
+            String prop = evt.getPropertyName();
             JInternalFrame f = (JInternalFrame)evt.getSource();
             Object newValue = evt.getNewValue();
             Object oldValue = evt.getOldValue();
@@ -1413,10 +1398,6 @@
                     // Cancel a resize in progress if the internal frame
                     // gets a setClosed(true) or dispose().
                     cancelResize();
-                    if ((frame.getParent() != null) && componentListenerAdded) {
-                        frame.getParent().removeComponentListener(
-                                componentListener);
-                    }
                     closeFrame(f);
                 }
             } else if (JInternalFrame.IS_MAXIMUM_PROPERTY == prop) {
@@ -1449,16 +1430,6 @@
                 } else {
                     parentBounds = null;
                 }
-                if ((frame.getParent() != null) && !componentListenerAdded) {
-                    f.getParent().addComponentListener(componentListener);
-                    componentListenerAdded = true;
-                } else if ((newValue == null) && componentListenerAdded) {
-                    if (f.getParent() != null) {
-                        f.getParent().removeComponentListener(
-                                componentListener);
-                    }
-                    componentListenerAdded = false;
-                }
             } else if (JInternalFrame.TITLE_PROPERTY == prop ||
                     prop == "closable" || prop == "iconable" ||
                     prop == "maximizable") {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -65,6 +65,9 @@
     protected static BasicLabelUI labelUI = new BasicLabelUI();
     private final static BasicLabelUI SAFE_BASIC_LABEL_UI = new BasicLabelUI();
 
+    private Rectangle paintIconR = new Rectangle();
+    private Rectangle paintTextR = new Rectangle();
+
     static void loadActionMap(LazyActionMap map) {
         map.put(new Actions(Actions.PRESS));
         map.put(new Actions(Actions.RELEASE));
@@ -135,17 +138,6 @@
                                                    textX, textY);
     }
 
-
-    /* These rectangles/insets are allocated once for this shared LabelUI
-     * implementation.  Re-using rectangles rather than allocating
-     * them in each paint call halved the time it took paint to run.
-     */
-    private static Rectangle paintIconR = new Rectangle();
-    private static Rectangle paintTextR = new Rectangle();
-    private static Rectangle paintViewR = new Rectangle();
-    private static Insets paintViewInsets = new Insets(0, 0, 0, 0);
-
-
     /**
      * Paint the label text in the foreground color, if the label
      * is opaque then paint the entire background with the background
@@ -194,10 +186,11 @@
 
     private String layout(JLabel label, FontMetrics fm,
                           int width, int height) {
-        Insets insets = label.getInsets(paintViewInsets);
+        Insets insets = label.getInsets(null);
         String text = label.getText();
         Icon icon = (label.isEnabled()) ? label.getIcon() :
                                           label.getDisabledIcon();
+        Rectangle paintViewR = new Rectangle();
         paintViewR.x = insets.left;
         paintViewR.y = insets.top;
         paintViewR.width = width - (insets.left + insets.right);
@@ -208,24 +201,13 @@
                         paintTextR);
     }
 
-
-    /* These rectangles/insets are allocated once for this shared LabelUI
-     * implementation.  Re-using rectangles rather than allocating
-     * them in each getPreferredSize call sped up the method substantially.
-     */
-    private static Rectangle iconR = new Rectangle();
-    private static Rectangle textR = new Rectangle();
-    private static Rectangle viewR = new Rectangle();
-    private static Insets viewInsets = new Insets(0, 0, 0, 0);
-
-
     public Dimension getPreferredSize(JComponent c)
     {
         JLabel label = (JLabel)c;
         String text = label.getText();
         Icon icon = (label.isEnabled()) ? label.getIcon() :
                                           label.getDisabledIcon();
-        Insets insets = label.getInsets(viewInsets);
+        Insets insets = label.getInsets(null);
         Font font = label.getFont();
 
         int dx = insets.left + insets.right;
@@ -242,6 +224,9 @@
         }
         else {
             FontMetrics fm = label.getFontMetrics(font);
+            Rectangle iconR = new Rectangle();
+            Rectangle textR = new Rectangle();
+            Rectangle viewR = new Rectangle();
 
             iconR.x = iconR.y = iconR.width = iconR.height = 0;
             textR.x = textR.y = textR.width = textR.height = 0;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2102,8 +2102,6 @@
      * <code>soundFile</code> passed into this method, it will
      * return <code>null</code>.
      *
-     * @param baseClass    used as the root class/location to get the
-     *                     soundFile from
      * @param soundFile    the name of the audio file to be retrieved
      *                     from disk
      * @return             A byte[] with audio data or null
@@ -2120,9 +2118,9 @@
          * Class.getResourceAsStream just returns raw
          * bytes, which we can convert to a sound.
          */
-        byte[] buffer = (byte[])AccessController.doPrivileged(
-                                                 new PrivilegedAction() {
-                public Object run() {
+        byte[] buffer = AccessController.doPrivileged(
+                                                 new PrivilegedAction<byte[]>() {
+                public byte[] run() {
                     try {
                         InputStream resource = BasicLookAndFeel.this.
                             getClass().getResourceAsStream(soundFile);
@@ -2184,9 +2182,9 @@
                                     UIManager.get("AuditoryCues.playList");
             if (audioStrings != null) {
                 // create a HashSet to help us decide to play or not
-                HashSet audioCues = new HashSet();
-                for (int i = 0; i < audioStrings.length; i++) {
-                    audioCues.add(audioStrings[i]);
+                HashSet<Object> audioCues = new HashSet<Object>();
+                for (Object audioString : audioStrings) {
+                    audioCues.add(audioString);
                 }
                 // get the name of the Action
                 String actionName = (String)audioAction.getValue(Action.NAME);
@@ -2237,7 +2235,7 @@
      * This class contains listener that watches for all the mouse
      * events that can possibly invoke popup on the component
      */
-    class AWTEventHelper implements AWTEventListener,PrivilegedAction {
+    class AWTEventHelper implements AWTEventListener,PrivilegedAction<Object> {
         AWTEventHelper() {
             super();
             AccessController.doPrivileged(this);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -25,9 +25,6 @@
 
 package javax.swing.plaf.basic;
 
-import sun.swing.MenuItemCheckIconFactory;
-import sun.swing.SwingUtilities2;
-import static sun.swing.SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET;
 import java.awt.*;
 import java.awt.event.*;
 import java.beans.PropertyChangeEvent;
@@ -39,8 +36,7 @@
 import javax.swing.plaf.*;
 import javax.swing.text.View;
 
-import sun.swing.UIAction;
-import sun.swing.StringUIClientPropertyKey;
+import sun.swing.*;
 
 /**
  * BasicMenuItem implementation
@@ -91,24 +87,6 @@
     private static final boolean VERBOSE = false; // show reuse hits/misses
     private static final boolean DEBUG =   false;  // show bad params, misc.
 
-    // Allows to reuse layoutInfo object.
-    // Shouldn't be used directly. Use getLayoutInfo() instead.
-    private final transient LayoutInfo layoutInfo = new LayoutInfo();
-
-    /* Client Property keys for calculation of maximal widths */
-    static final StringUIClientPropertyKey MAX_ARROW_WIDTH =
-                        new StringUIClientPropertyKey("maxArrowWidth");
-    static final StringUIClientPropertyKey MAX_CHECK_WIDTH =
-                        new StringUIClientPropertyKey("maxCheckWidth");
-    static final StringUIClientPropertyKey MAX_ICON_WIDTH =
-                        new StringUIClientPropertyKey("maxIconWidth");
-    static final StringUIClientPropertyKey MAX_TEXT_WIDTH =
-                        new StringUIClientPropertyKey("maxTextWidth");
-    static final StringUIClientPropertyKey MAX_ACC_WIDTH =
-                        new StringUIClientPropertyKey("maxAccWidth");
-    static final StringUIClientPropertyKey MAX_LABEL_WIDTH =
-                        new StringUIClientPropertyKey("maxLabelWidth");
-
     static void loadActionMap(LazyActionMap map) {
         // NOTE: BasicMenuUI also calls into this method.
         map.put(new Actions(Actions.CLICK));
@@ -199,13 +177,14 @@
             //In case of column layout, .checkIconFactory is defined for this UI,
             //the icon is compatible with it and useCheckAndArrow() is true,
             //then the icon is handled by the checkIcon.
-            boolean isColumnLayout = LayoutInfo.isColumnLayout(
+            boolean isColumnLayout = MenuItemLayoutHelper.isColumnLayout(
                     BasicGraphicsUtils.isLeftToRight(menuItem), menuItem);
             if (isColumnLayout) {
                 MenuItemCheckIconFactory iconFactory =
                     (MenuItemCheckIconFactory) UIManager.get(prefix
                         + ".checkIconFactory");
-                if (iconFactory != null && useCheckAndArrow()
+                if (iconFactory != null
+                        && MenuItemLayoutHelper.useCheckAndArrow(menuItem)
                         && iconFactory.isCompatible(checkIcon, prefix)) {
                     checkIcon = iconFactory.getIcon(menuItem);
                 }
@@ -256,20 +235,7 @@
         uninstallComponents(menuItem);
         uninstallListeners();
         uninstallKeyboardActions();
-
-
-        // Remove values from the parent's Client Properties.
-        JComponent p = getMenuItemParent(menuItem);
-        if(p != null) {
-            p.putClientProperty(BasicMenuItemUI.MAX_ARROW_WIDTH, null );
-            p.putClientProperty(BasicMenuItemUI.MAX_CHECK_WIDTH, null );
-            p.putClientProperty(BasicMenuItemUI.MAX_ACC_WIDTH, null );
-            p.putClientProperty(BasicMenuItemUI.MAX_TEXT_WIDTH, null );
-            p.putClientProperty(BasicMenuItemUI.MAX_ICON_WIDTH, null );
-            p.putClientProperty(BasicMenuItemUI.MAX_LABEL_WIDTH, null );
-            p.putClientProperty(BASICMENUITEMUI_MAX_TEXT_OFFSET, null );
-        }
-
+        MenuItemLayoutHelper.clearUsedParentClientProperties(menuItem);
         menuItem = null;
     }
 
@@ -405,19 +371,6 @@
         return d;
     }
 
-    // Returns parent of this component if it is not a top-level menu
-    // Otherwise returns null
-    private static JComponent getMenuItemParent(JMenuItem mi) {
-        Container parent = mi.getParent();
-        if ((parent instanceof JComponent) &&
-             (!(mi instanceof JMenu) ||
-               !((JMenu)mi).isTopLevelMenu())) {
-            return (JComponent) parent;
-        } else {
-            return null;
-        }
-    }
-
     protected Dimension getPreferredMenuItemSize(JComponent c,
                                                  Icon checkIcon,
                                                  Icon arrowIcon,
@@ -447,32 +400,36 @@
         // the icon and text when user points a menu item by mouse.
 
         JMenuItem mi = (JMenuItem) c;
-        LayoutInfo li = getLayoutInfo(mi, checkIcon, arrowIcon,
-                createMaxViewRect(), defaultTextIconGap, acceleratorDelimiter,
-                BasicGraphicsUtils.isLeftToRight(mi), acceleratorFont,
-                useCheckAndArrow(), getPropertyPrefix());
+        MenuItemLayoutHelper lh = new MenuItemLayoutHelper(mi, checkIcon,
+                arrowIcon, MenuItemLayoutHelper.createMaxRect(), defaultTextIconGap,
+                acceleratorDelimiter, BasicGraphicsUtils.isLeftToRight(mi),
+                mi.getFont(), acceleratorFont,
+                MenuItemLayoutHelper.useCheckAndArrow(menuItem),
+                getPropertyPrefix());
 
         Dimension result = new Dimension();
 
         // Calculate the result width
-        result.width = li.leadingGap;
-        addWidth(li.maxCheckWidth, li.afterCheckIconGap, result);
+        result.width = lh.getLeadingGap();
+        MenuItemLayoutHelper.addMaxWidth(lh.getCheckSize(),
+                lh.getAfterCheckIconGap(), result);
         // Take into account mimimal text offset.
-        if ((!li.isTopLevelMenu)
-                && (li.minTextOffset > 0)
-                && (result.width < li.minTextOffset)) {
-            result.width = li.minTextOffset;
+        if ((!lh.isTopLevelMenu())
+                && (lh.getMinTextOffset() > 0)
+                && (result.width < lh.getMinTextOffset())) {
+            result.width = lh.getMinTextOffset();
         }
-        addWidth(li.maxLabelWidth, li.gap, result);
-        addWidth(li.maxAccWidth, li.gap, result);
-        addWidth(li.maxArrowWidth, li.gap, result);
+        MenuItemLayoutHelper.addMaxWidth(lh.getLabelSize(), lh.getGap(), result);
+        MenuItemLayoutHelper.addMaxWidth(lh.getAccSize(), lh.getGap(), result);
+        MenuItemLayoutHelper.addMaxWidth(lh.getArrowSize(), lh.getGap(), result);
 
         // Calculate the result height
-        result.height = max(li.checkRect.height, li.labelRect.height,
-                            li.accRect.height, li.arrowRect.height);
+        result.height = MenuItemLayoutHelper.max(lh.getCheckSize().getHeight(),
+                lh.getLabelSize().getHeight(), lh.getAccSize().getHeight(),
+                lh.getArrowSize().getHeight());
 
         // Take into account menu item insets
-        Insets insets = li.mi.getInsets();
+        Insets insets = lh.getMenuItem().getInsets();
         if(insets != null) {
             result.width += insets.left + insets.right;
             result.height += insets.top + insets.bottom;
@@ -492,500 +449,9 @@
             result.height++;
         }
 
-        li.clear();
         return result;
     }
 
-    private Rectangle createMaxViewRect() {
-        return new Rectangle(0,0,Short.MAX_VALUE, Short.MAX_VALUE);
-    }
-
-    private void addWidth(int width, int gap, Dimension result) {
-        if (width > 0) {
-            result.width += width + gap;
-        }
-    }
-
-    private static int max(int... values) {
-        int maxValue = Integer.MIN_VALUE;
-        for (int i : values) {
-            if (i > maxValue) {
-                maxValue = i;
-            }
-        }
-        return maxValue;
-    }
-
-    // LayoutInfo helps to calculate preferred size and to paint a menu item
-    private static class LayoutInfo {
-        JMenuItem mi;
-        JComponent miParent;
-
-        FontMetrics fm;
-        FontMetrics accFm;
-
-        Icon icon;
-        Icon checkIcon;
-        Icon arrowIcon;
-        String text;
-        String accText;
-
-        boolean isColumnLayout;
-        boolean useCheckAndArrow;
-        boolean isLeftToRight;
-        boolean isTopLevelMenu;
-        View htmlView;
-
-        int verticalAlignment;
-        int horizontalAlignment;
-        int verticalTextPosition;
-        int horizontalTextPosition;
-        int gap;
-        int leadingGap;
-        int afterCheckIconGap;
-        int minTextOffset;
-
-        Rectangle viewRect;
-        Rectangle iconRect;
-        Rectangle textRect;
-        Rectangle accRect;
-        Rectangle checkRect;
-        Rectangle arrowRect;
-        Rectangle labelRect;
-
-        int origIconWidth;
-        int origTextWidth;
-        int origAccWidth;
-        int origCheckWidth;
-        int origArrowWidth;
-
-        int maxIconWidth;
-        int maxTextWidth;
-        int maxAccWidth;
-        int maxCheckWidth;
-        int maxArrowWidth;
-        int maxLabelWidth;
-
-        // Empty constructor helps to create "final" LayoutInfo object
-        public LayoutInfo() {
-        }
-
-        public LayoutInfo(JMenuItem mi, Icon checkIcon, Icon arrowIcon,
-                          Rectangle viewRect, int gap, String accDelimiter,
-                          boolean isLeftToRight, Font acceleratorFont,
-                          boolean useCheckAndArrow, String propertyPrefix) {
-            reset(mi, checkIcon, arrowIcon, viewRect, gap, accDelimiter,
-                  isLeftToRight, acceleratorFont, useCheckAndArrow,
-                  propertyPrefix);
-        }
-
-        // Allows to reuse a LayoutInfo object
-        public void reset(JMenuItem mi, Icon checkIcon, Icon arrowIcon,
-                          Rectangle viewRect, int gap, String accDelimiter,
-                          boolean isLeftToRight, Font acceleratorFont,
-                          boolean useCheckAndArrow, String propertyPrefix) {
-            this.mi = mi;
-            this.miParent = getMenuItemParent(mi);
-            this.accText = getAccText(accDelimiter);
-            this.verticalAlignment = mi.getVerticalAlignment();
-            this.horizontalAlignment = mi.getHorizontalAlignment();
-            this.verticalTextPosition = mi.getVerticalTextPosition();
-            this.horizontalTextPosition = mi.getHorizontalTextPosition();
-            this.useCheckAndArrow = useCheckAndArrow;
-            this.fm = mi.getFontMetrics(mi.getFont());
-            this.accFm = mi.getFontMetrics(acceleratorFont);
-            this.isLeftToRight = isLeftToRight;
-            this.isColumnLayout = isColumnLayout();
-            this.isTopLevelMenu = (this.miParent == null)? true : false;
-            this.checkIcon = checkIcon;
-            this.icon = getIcon(propertyPrefix);
-            this.arrowIcon = arrowIcon;
-            this.text = mi.getText();
-            this.gap = gap;
-            this.afterCheckIconGap = getAfterCheckIconGap(propertyPrefix);
-            this.minTextOffset = getMinTextOffset(propertyPrefix);
-            this.htmlView = (View) mi.getClientProperty(BasicHTML.propertyKey);
-
-            this.viewRect = viewRect;
-            this.iconRect = new Rectangle();
-            this.textRect = new Rectangle();
-            this.accRect = new Rectangle();
-            this.checkRect = new Rectangle();
-            this.arrowRect = new Rectangle();
-            this.labelRect = new Rectangle();
-
-            calcWidthsAndHeights();
-            this.origIconWidth = iconRect.width;
-            this.origTextWidth = textRect.width;
-            this.origAccWidth = accRect.width;
-            this.origCheckWidth = checkRect.width;
-            this.origArrowWidth = arrowRect.width;
-
-            calcMaxWidths();
-            this.leadingGap = getLeadingGap(propertyPrefix);
-            calcMaxTextOffset();
-        }
-
-        // Clears fields to remove all links to other objects
-        // to prevent memory leaks
-        public void clear() {
-            mi = null;
-            miParent = null;
-            fm = null;
-            accFm = null;
-            icon = null;
-            checkIcon = null;
-            arrowIcon = null;
-            text = null;
-            accText = null;
-            htmlView = null;
-            viewRect = null;
-            iconRect = null;
-            textRect = null;
-            accRect = null;
-            checkRect = null;
-            arrowRect = null;
-            labelRect = null;
-        }
-
-        private String getAccText(String acceleratorDelimiter) {
-            String accText = "";
-            KeyStroke accelerator = mi.getAccelerator();
-            if (accelerator != null) {
-                int modifiers = accelerator.getModifiers();
-                if (modifiers > 0) {
-                    accText = KeyEvent.getKeyModifiersText(modifiers);
-                    accText += acceleratorDelimiter;
-                }
-                int keyCode = accelerator.getKeyCode();
-                if (keyCode != 0) {
-                    accText += KeyEvent.getKeyText(keyCode);
-                } else {
-                    accText += accelerator.getKeyChar();
-                }
-            }
-            return accText;
-        }
-
-        // In case of column layout, .checkIconFactory is defined for this UI,
-        // the icon is compatible with it and useCheckAndArrow() is true,
-        // then the icon is handled by the checkIcon.
-        private Icon getIcon(String propertyPrefix) {
-            Icon icon = null;
-            MenuItemCheckIconFactory iconFactory =
-                (MenuItemCheckIconFactory) UIManager.get(propertyPrefix
-                    + ".checkIconFactory");
-            if (!isColumnLayout || !useCheckAndArrow || iconFactory == null
-                    || !iconFactory.isCompatible(checkIcon, propertyPrefix)) {
-               icon = mi.getIcon();
-            }
-            return icon;
-        }
-
-        private int getMinTextOffset(String propertyPrefix) {
-            int minimumTextOffset = 0;
-            Object minimumTextOffsetObject =
-                    UIManager.get(propertyPrefix + ".minimumTextOffset");
-            if (minimumTextOffsetObject instanceof Integer) {
-                minimumTextOffset = (Integer) minimumTextOffsetObject;
-            }
-            return minimumTextOffset;
-        }
-
-        private int getAfterCheckIconGap(String propertyPrefix) {
-            int afterCheckIconGap = gap;
-            Object afterCheckIconGapObject =
-                    UIManager.get(propertyPrefix + ".afterCheckIconGap");
-            if (afterCheckIconGapObject instanceof Integer) {
-                afterCheckIconGap = (Integer) afterCheckIconGapObject;
-            }
-            return afterCheckIconGap;
-        }
-
-        private int getLeadingGap(String propertyPrefix) {
-            if (maxCheckWidth > 0) {
-                return getCheckOffset(propertyPrefix);
-            } else {
-                return gap; // There is no any check icon
-            }
-        }
-
-        private int getCheckOffset(String propertyPrefix) {
-            int checkIconOffset = gap;
-            Object checkIconOffsetObject =
-                    UIManager.get(propertyPrefix + ".checkIconOffset");
-            if (checkIconOffsetObject instanceof Integer) {
-                checkIconOffset = (Integer) checkIconOffsetObject;
-            }
-            return checkIconOffset;
-        }
-
-        private void calcWidthsAndHeights()
-        {
-            // iconRect
-            if (icon != null) {
-                iconRect.width = icon.getIconWidth();
-                iconRect.height = icon.getIconHeight();
-            }
-
-            // accRect
-            if (!accText.equals("")) {
-                accRect.width = SwingUtilities2.stringWidth(
-                        mi, accFm, accText);
-                accRect.height = accFm.getHeight();
-            }
-
-            // textRect
-            if (text == null) {
-                text = "";
-            } else if (!text.equals("")) {
-                if (htmlView != null) {
-                    // Text is HTML
-                    textRect.width =
-                            (int) htmlView.getPreferredSpan(View.X_AXIS);
-                    textRect.height =
-                            (int) htmlView.getPreferredSpan(View.Y_AXIS);
-                } else {
-                    // Text isn't HTML
-                    textRect.width =
-                            SwingUtilities2.stringWidth(mi, fm, text);
-                    textRect.height = fm.getHeight();
-                }
-            }
-
-            if (useCheckAndArrow) {
-                // checkIcon
-                if (checkIcon != null) {
-                    checkRect.width = checkIcon.getIconWidth();
-                    checkRect.height = checkIcon.getIconHeight();
-                }
-                // arrowRect
-                if (arrowIcon != null) {
-                    arrowRect.width = arrowIcon.getIconWidth();
-                    arrowRect.height = arrowIcon.getIconHeight();
-                }
-            }
-
-            // labelRect
-            if (isColumnLayout) {
-                labelRect.width = iconRect.width + textRect.width + gap;
-                labelRect.height = max(checkRect.height, iconRect.height,
-                        textRect.height, accRect.height, arrowRect.height);
-            } else {
-                textRect = new Rectangle();
-                iconRect = new Rectangle();
-                SwingUtilities.layoutCompoundLabel(mi, fm, text, icon,
-                        verticalAlignment, horizontalAlignment,
-                        verticalTextPosition, horizontalTextPosition,
-                        viewRect, iconRect, textRect, gap);
-                 labelRect = iconRect.union(textRect);
-            }
-        }
-
-        private void calcMaxWidths() {
-            maxCheckWidth = calcMaxValue(BasicMenuItemUI.MAX_CHECK_WIDTH,
-                    checkRect.width);
-            maxArrowWidth = calcMaxValue(BasicMenuItemUI.MAX_ARROW_WIDTH,
-                    arrowRect.width);
-            maxAccWidth = calcMaxValue(BasicMenuItemUI.MAX_ACC_WIDTH,
-                    accRect.width);
-
-            if (isColumnLayout) {
-                maxIconWidth = calcMaxValue(BasicMenuItemUI.MAX_ICON_WIDTH,
-                        iconRect.width);
-                maxTextWidth = calcMaxValue(BasicMenuItemUI.MAX_TEXT_WIDTH,
-                        textRect.width);
-                int curGap = gap;
-                if ((maxIconWidth == 0) || (maxTextWidth == 0)) {
-                    curGap = 0;
-                }
-                maxLabelWidth =
-                        calcMaxValue(BasicMenuItemUI.MAX_LABEL_WIDTH,
-                        maxIconWidth + maxTextWidth + curGap);
-            } else {
-                // We shouldn't use current icon and text widths
-                // in maximal widths calculation for complex layout.
-                maxIconWidth = getParentIntProperty(BasicMenuItemUI.MAX_ICON_WIDTH);
-                maxLabelWidth = calcMaxValue(BasicMenuItemUI.MAX_LABEL_WIDTH,
-                        labelRect.width);
-                // If maxLabelWidth is wider
-                // than the widest icon + the widest text + gap,
-                // we should update the maximal text witdh
-                int candidateTextWidth = maxLabelWidth - maxIconWidth;
-                if (maxIconWidth > 0) {
-                    candidateTextWidth -= gap;
-                }
-                maxTextWidth = calcMaxValue(BasicMenuItemUI.MAX_TEXT_WIDTH,
-                        candidateTextWidth);
-            }
-        }
-
-        // Calculates and returns maximal value
-        // through specified parent component client property.
-        private int calcMaxValue(Object propertyName, int value) {
-            // Get maximal value from parent client property
-            int maxValue = getParentIntProperty(propertyName);
-            // Store new maximal width in parent client property
-            if (value > maxValue) {
-                if (miParent != null) {
-                    miParent.putClientProperty(propertyName, value);
-                }
-                return value;
-            } else {
-                return maxValue;
-            }
-        }
-
-        // Returns parent client property as int
-        private int getParentIntProperty(Object propertyName) {
-            Object value = null;
-            if (miParent != null) {
-                value = miParent.getClientProperty(propertyName);
-            }
-            if ((value == null) || !(value instanceof Integer)){
-                value = 0;
-            }
-            return (Integer)value;
-        }
-
-        private boolean isColumnLayout() {
-            return isColumnLayout(isLeftToRight, horizontalAlignment,
-                    horizontalTextPosition, verticalTextPosition);
-        }
-
-        public static boolean isColumnLayout(boolean isLeftToRight,
-                                             JMenuItem mi) {
-            assert(mi != null);
-            return isColumnLayout(isLeftToRight, mi.getHorizontalAlignment(),
-                    mi.getHorizontalTextPosition(), mi.getVerticalTextPosition());
-        }
-
-        // Answers should we do column layout for a menu item or not.
-        // We do it when a user doesn't set any alignments
-        // and text positions manually, except the vertical alignment.
-        public static boolean isColumnLayout( boolean isLeftToRight,
-                int horizontalAlignment, int horizontalTextPosition,
-                int verticalTextPosition) {
-            if (verticalTextPosition != SwingConstants.CENTER) {
-                return false;
-            }
-            if (isLeftToRight) {
-                if (horizontalAlignment != SwingConstants.LEADING
-                 && horizontalAlignment != SwingConstants.LEFT) {
-                    return false;
-                }
-                if (horizontalTextPosition != SwingConstants.TRAILING
-                 && horizontalTextPosition != SwingConstants.RIGHT) {
-                    return false;
-                }
-            } else {
-                if (horizontalAlignment != SwingConstants.LEADING
-                 && horizontalAlignment != SwingConstants.RIGHT) {
-                    return false;
-                }
-                if (horizontalTextPosition != SwingConstants.TRAILING
-                 && horizontalTextPosition != SwingConstants.LEFT) {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        // Calculates maximal text offset.
-        // It is required for some L&Fs (ex: Vista L&F).
-        // The offset is meaningful only for L2R column layout.
-        private void calcMaxTextOffset() {
-            if (!isColumnLayout || !isLeftToRight) {
-                return;
-            }
-
-            // Calculate the current text offset
-            int offset = viewRect.x + leadingGap + maxCheckWidth
-                     + afterCheckIconGap + maxIconWidth + gap;
-            if (maxCheckWidth == 0) {
-                offset -= afterCheckIconGap;
-            }
-            if (maxIconWidth == 0) {
-                offset -= gap;
-            }
-
-            // maximal text offset shouldn't be less than minimal text offset;
-            if (offset < minTextOffset) {
-                offset = minTextOffset;
-            }
-
-            // Calculate and store the maximal text offset
-            calcMaxValue(BASICMENUITEMUI_MAX_TEXT_OFFSET, offset);
-        }
-
-        public String toString() {
-            StringBuilder result = new StringBuilder();
-            result.append(super.toString()).append("\n");
-            result.append("accFm = ").append(accFm).append("\n");
-            result.append("accRect = ").append(accRect).append("\n");
-            result.append("accText = ").append(accText).append("\n");
-            result.append("afterCheckIconGap = ").append(afterCheckIconGap)
-                    .append("\n");
-            result.append("arrowIcon = ").append(arrowIcon).append("\n");
-            result.append("arrowRect = ").append(arrowRect).append("\n");
-            result.append("checkIcon = ").append(checkIcon).append("\n");
-            result.append("checkRect = ").append(checkRect).append("\n");
-            result.append("fm = ").append(fm).append("\n");
-            result.append("gap = ").append(gap).append("\n");
-            result.append("horizontalAlignment = ").append(horizontalAlignment)
-                    .append("\n");
-            result.append("horizontalTextPosition = ")
-                    .append(horizontalTextPosition).append("\n");
-            result.append("htmlView = ").append(htmlView).append("\n");
-            result.append("icon = ").append(icon).append("\n");
-            result.append("iconRect = ").append(iconRect).append("\n");
-            result.append("isColumnLayout = ").append(isColumnLayout).append("\n");
-            result.append("isLeftToRight = ").append(isLeftToRight).append("\n");
-            result.append("isTopLevelMenu = ").append(isTopLevelMenu).append("\n");
-            result.append("labelRect = ").append(labelRect).append("\n");
-            result.append("leadingGap = ").append(leadingGap).append("\n");
-            result.append("maxAccWidth = ").append(maxAccWidth).append("\n");
-            result.append("maxArrowWidth = ").append(maxArrowWidth).append("\n");
-            result.append("maxCheckWidth = ").append(maxCheckWidth).append("\n");
-            result.append("maxIconWidth = ").append(maxIconWidth).append("\n");
-            result.append("maxLabelWidth = ").append(maxLabelWidth).append("\n");
-            result.append("maxTextWidth = ").append(maxTextWidth).append("\n");
-            result.append("maxTextOffset = ")
-                    .append(getParentIntProperty(BASICMENUITEMUI_MAX_TEXT_OFFSET))
-                    .append("\n");
-            result.append("mi = ").append(mi).append("\n");
-            result.append("minTextOffset = ").append(minTextOffset).append("\n");
-            result.append("miParent = ").append(miParent).append("\n");
-            result.append("origAccWidth = ").append(origAccWidth).append("\n");
-            result.append("origArrowWidth = ").append(origArrowWidth).append("\n");
-            result.append("origCheckWidth = ").append(origCheckWidth).append("\n");
-            result.append("origIconWidth = ").append(origIconWidth).append("\n");
-            result.append("origTextWidth = ").append(origTextWidth).append("\n");
-            result.append("text = ").append(text).append("\n");
-            result.append("textRect = ").append(textRect).append("\n");
-            result.append("useCheckAndArrow = ").append(useCheckAndArrow)
-                    .append("\n");
-            result.append("verticalAlignment = ").append(verticalAlignment)
-                    .append("\n");
-            result.append("verticalTextPosition = ")
-                    .append(verticalTextPosition).append("\n");
-            result.append("viewRect = ").append(viewRect).append("\n");
-            return result.toString();
-        }
-    } // End of LayoutInfo
-
-    // Reuses layoutInfo object to reduce the amount of produced garbage
-    private LayoutInfo getLayoutInfo(JMenuItem mi, Icon checkIcon, Icon arrowIcon,
-                             Rectangle viewRect, int gap, String accDelimiter,
-                             boolean isLeftToRight, Font acceleratorFont,
-                             boolean useCheckAndArrow, String propertyPrefix) {
-        // layoutInfo is final and always not null
-        layoutInfo.reset(mi, checkIcon, arrowIcon, viewRect,
-                gap, accDelimiter, isLeftToRight, acceleratorFont,
-                useCheckAndArrow, propertyPrefix);
-        return layoutInfo;
-    }
-
     /**
      * We draw the background in paintMenuItem()
      * so override update (which fills the background of opaque
@@ -1016,122 +482,132 @@
         Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
         applyInsets(viewRect, mi.getInsets());
 
-        LayoutInfo li = getLayoutInfo(mi, checkIcon, arrowIcon,
-                viewRect, defaultTextIconGap, acceleratorDelimiter,
-                BasicGraphicsUtils.isLeftToRight(mi), acceleratorFont,
-                useCheckAndArrow(), getPropertyPrefix());
-        layoutMenuItem(li);
+        MenuItemLayoutHelper lh = new MenuItemLayoutHelper(mi, checkIcon,
+                arrowIcon, viewRect, defaultTextIconGap, acceleratorDelimiter,
+                BasicGraphicsUtils.isLeftToRight(mi), mi.getFont(),
+                acceleratorFont, MenuItemLayoutHelper.useCheckAndArrow(menuItem),
+                getPropertyPrefix());
+        MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
 
         paintBackground(g, mi, background);
-        paintCheckIcon(g, li, holdc, foreground);
-        paintIcon(g, li, holdc);
-        paintText(g, li);
-        paintAccText(g, li);
-        paintArrowIcon(g, li, foreground);
+        paintCheckIcon(g, lh, lr, holdc, foreground);
+        paintIcon(g, lh, lr, holdc);
+        paintText(g, lh, lr);
+        paintAccText(g, lh, lr);
+        paintArrowIcon(g, lh, lr, foreground);
 
         // Restore original graphics font and color
         g.setColor(holdc);
         g.setFont(holdf);
-
-        li.clear();
     }
 
-    private void paintIcon(Graphics g, LayoutInfo li, Color holdc) {
-        if (li.icon != null) {
+    private void paintIcon(Graphics g, MenuItemLayoutHelper lh,
+                           MenuItemLayoutHelper.LayoutResult lr, Color holdc) {
+        if (lh.getIcon() != null) {
             Icon icon;
-            ButtonModel model = li.mi.getModel();
+            ButtonModel model = lh.getMenuItem().getModel();
             if (!model.isEnabled()) {
-                icon = (Icon) li.mi.getDisabledIcon();
+                icon = lh.getMenuItem().getDisabledIcon();
             } else if (model.isPressed() && model.isArmed()) {
-                icon = (Icon) li.mi.getPressedIcon();
+                icon = lh.getMenuItem().getPressedIcon();
                 if (icon == null) {
                     // Use default icon
-                    icon = (Icon) li.mi.getIcon();
+                    icon = lh.getMenuItem().getIcon();
                 }
             } else {
-                icon = (Icon) li.mi.getIcon();
+                icon = lh.getMenuItem().getIcon();
             }
 
             if (icon != null) {
-                icon.paintIcon(li.mi, g, li.iconRect.x, li.iconRect.y);
+                icon.paintIcon(lh.getMenuItem(), g, lr.getIconRect().x,
+                        lr.getIconRect().y);
                 g.setColor(holdc);
             }
         }
     }
 
-    private void paintCheckIcon(Graphics g, LayoutInfo li,
+    private void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh,
+                                MenuItemLayoutHelper.LayoutResult lr,
                                 Color holdc, Color foreground) {
-        if (li.checkIcon != null) {
-            ButtonModel model = li.mi.getModel();
-            if (model.isArmed()
-                    || (li.mi instanceof JMenu && model.isSelected())) {
+        if (lh.getCheckIcon() != null) {
+            ButtonModel model = lh.getMenuItem().getModel();
+            if (model.isArmed() || (lh.getMenuItem() instanceof JMenu
+                    && model.isSelected())) {
                 g.setColor(foreground);
             } else {
                 g.setColor(holdc);
             }
-            if (li.useCheckAndArrow) {
-                li.checkIcon.paintIcon(li.mi, g, li.checkRect.x,
-                                       li.checkRect.y);
+            if (lh.useCheckAndArrow()) {
+                lh.getCheckIcon().paintIcon(lh.getMenuItem(), g,
+                        lr.getCheckRect().x, lr.getCheckRect().y);
             }
             g.setColor(holdc);
         }
     }
 
-    private void paintAccText(Graphics g, LayoutInfo li) {
-        if (!li.accText.equals("")) {
-            ButtonModel model = li.mi.getModel();
-            g.setFont(acceleratorFont);
+    private void paintAccText(Graphics g, MenuItemLayoutHelper lh,
+                              MenuItemLayoutHelper.LayoutResult lr) {
+        if (!lh.getAccText().equals("")) {
+            ButtonModel model = lh.getMenuItem().getModel();
+            g.setFont(lh.getAccFontMetrics().getFont());
             if (!model.isEnabled()) {
                 // *** paint the accText disabled
                 if (disabledForeground != null) {
                     g.setColor(disabledForeground);
-                    SwingUtilities2.drawString(li.mi, g, li.accText,
-                                 li.accRect.x,
-                                 li.accRect.y + li.accFm.getAscent());
+                    SwingUtilities2.drawString(lh.getMenuItem(), g,
+                        lh.getAccText(), lr.getAccRect().x,
+                        lr.getAccRect().y + lh.getAccFontMetrics().getAscent());
                 } else {
-                    g.setColor(li.mi.getBackground().brighter());
-                    SwingUtilities2.drawString(li.mi, g, li.accText, li.accRect.x,
-                                 li.accRect.y + li.accFm.getAscent());
-                    g.setColor(li.mi.getBackground().darker());
-                    SwingUtilities2.drawString(li.mi, g, li.accText,
-                            li.accRect.x - 1,
-                            li.accRect.y + li.accFm.getAscent() - 1);
+                    g.setColor(lh.getMenuItem().getBackground().brighter());
+                    SwingUtilities2.drawString(lh.getMenuItem(), g,
+                        lh.getAccText(), lr.getAccRect().x,
+                        lr.getAccRect().y + lh.getAccFontMetrics().getAscent());
+                    g.setColor(lh.getMenuItem().getBackground().darker());
+                    SwingUtilities2.drawString(lh.getMenuItem(), g,
+                        lh.getAccText(), lr.getAccRect().x - 1,
+                        lr.getAccRect().y + lh.getFontMetrics().getAscent() - 1);
                 }
             } else {
                 // *** paint the accText normally
-                if (model.isArmed() ||
-                        (li.mi instanceof JMenu && model.isSelected())) {
+                if (model.isArmed()
+                        || (lh.getMenuItem() instanceof JMenu
+                        && model.isSelected())) {
                     g.setColor(acceleratorSelectionForeground);
                 } else {
                     g.setColor(acceleratorForeground);
                 }
-                SwingUtilities2.drawString(li.mi, g, li.accText, li.accRect.x,
-                        li.accRect.y + li.accFm.getAscent());
+                SwingUtilities2.drawString(lh.getMenuItem(), g, lh.getAccText(),
+                        lr.getAccRect().x, lr.getAccRect().y +
+                        lh.getAccFontMetrics().getAscent());
             }
         }
     }
 
-    private void paintText(Graphics g, LayoutInfo li) {
-        if (!li.text.equals("")) {
-            if (li.htmlView != null) {
+    private void paintText(Graphics g, MenuItemLayoutHelper lh,
+                           MenuItemLayoutHelper.LayoutResult lr) {
+        if (!lh.getText().equals("")) {
+            if (lh.getHtmlView() != null) {
                 // Text is HTML
-                li.htmlView.paint(g, li.textRect);
+                lh.getHtmlView().paint(g, lr.getTextRect());
             } else {
                 // Text isn't HTML
-                paintText(g, li.mi, li.textRect, li.text);
+                paintText(g, lh.getMenuItem(), lr.getTextRect(), lh.getText());
             }
         }
     }
 
-    private void paintArrowIcon(Graphics g, LayoutInfo li, Color foreground) {
-        if (li.arrowIcon != null) {
-            ButtonModel model = li.mi.getModel();
-            if (model.isArmed()
-                    || (li.mi instanceof JMenu && model.isSelected())) {
+    private void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh,
+                                MenuItemLayoutHelper.LayoutResult lr,
+                                Color foreground) {
+        if (lh.getArrowIcon() != null) {
+            ButtonModel model = lh.getMenuItem().getModel();
+            if (model.isArmed() || (lh.getMenuItem() instanceof JMenu
+                                && model.isSelected())) {
                 g.setColor(foreground);
             }
-            if (li.useCheckAndArrow) {
-                li.arrowIcon.paintIcon(li.mi, g, li.arrowRect.x, li.arrowRect.y);
+            if (lh.useCheckAndArrow()) {
+                lh.getArrowIcon().paintIcon(lh.getMenuItem(), g,
+                        lr.getArrowRect().x, lr.getArrowRect().y);
             }
         }
     }
@@ -1216,346 +692,6 @@
         }
     }
 
-
-    /**
-     * Layout icon, text, check icon, accelerator text and arrow icon
-     * in the viewRect and return their positions.
-     *
-     * If horizontalAlignment, verticalTextPosition and horizontalTextPosition
-     * are default (user doesn't set any manually) the layouting algorithm is:
-     * Elements are layouted in the five columns:
-     * check icon + icon + text + accelerator text + arrow icon
-     *
-     * In the other case elements are layouted in the four columns:
-     * check icon + label + accelerator text + arrow icon
-     * Label is icon and text rectangles union.
-     *
-     * The order of columns can be reversed.
-     * It depends on the menu item orientation.
-     */
-    private void layoutMenuItem(LayoutInfo li)
-    {
-        li.checkRect.width = li.maxCheckWidth;
-        li.accRect.width = li.maxAccWidth;
-        li.arrowRect.width = li.maxArrowWidth;
-
-        if (li.isColumnLayout) {
-            if (li.isLeftToRight) {
-                doLTRColumnLayout(li);
-            } else {
-                doRTLColumnLayout(li);
-            }
-        } else {
-            if (li.isLeftToRight) {
-                doLTRComplexLayout(li);
-            } else {
-                doRTLComplexLayout(li);
-            }
-        }
-
-        alignAccCheckAndArrowVertically(li);
-    }
-
-    // Aligns the accelertor text and the check and arrow icons vertically
-    // with the center of the label rect.
-    private void alignAccCheckAndArrowVertically(LayoutInfo li) {
-        li.accRect.y = (int)(li.labelRect.y + (float)li.labelRect.height/2
-                - (float)li.accRect.height/2);
-        fixVerticalAlignment(li, li.accRect);
-        if (li.useCheckAndArrow) {
-            li.arrowRect.y = (int)(li.labelRect.y + (float)li.labelRect.height/2
-                    - (float)li.arrowRect.height/2);
-            li.checkRect.y = (int)(li.labelRect.y + (float)li.labelRect.height/2
-                    - (float)li.checkRect.height/2);
-            fixVerticalAlignment(li, li.arrowRect);
-            fixVerticalAlignment(li, li.checkRect);
-        }
-    }
-
-    // Fixes vertical alignment of all menu item elements if a rect.y
-    // or (rect.y + rect.height) is out of viewRect bounds
-    private void fixVerticalAlignment(LayoutInfo li, Rectangle r) {
-        int delta = 0;
-        if (r.y < li.viewRect.y) {
-            delta = li.viewRect.y - r.y;
-        } else if (r.y + r.height > li.viewRect.y + li.viewRect.height) {
-            delta = li.viewRect.y + li.viewRect.height - r.y - r.height;
-        }
-        if (delta != 0) {
-            li.checkRect.y += delta;
-            li.iconRect.y += delta;
-            li.textRect.y += delta;
-            li.accRect.y += delta;
-            li.arrowRect.y += delta;
-        }
-    }
-
-    private void doLTRColumnLayout(LayoutInfo li) {
-        // Set maximal width for all the five basic rects
-        // (three other ones are already maximal)
-        li.iconRect.width = li.maxIconWidth;
-        li.textRect.width = li.maxTextWidth;
-
-        // Set X coordinates
-        // All rects will be aligned at the left side
-        calcXPositionsL2R(li.viewRect.x, li.leadingGap, li.gap, li.checkRect,
-                li.iconRect, li.textRect);
-
-        // Tune afterCheckIconGap
-        if (li.checkRect.width > 0) { // there is the afterCheckIconGap
-            li.iconRect.x += li.afterCheckIconGap - li.gap;
-            li.textRect.x += li.afterCheckIconGap - li.gap;
-        }
-
-        calcXPositionsR2L(li.viewRect.x + li.viewRect.width, li.gap,
-                li.arrowRect, li.accRect);
-
-        // Take into account minimal text offset
-        int textOffset = li.textRect.x - li.viewRect.x;
-        if (!li.isTopLevelMenu && (textOffset < li.minTextOffset)) {
-            li.textRect.x += li.minTextOffset - textOffset;
-        }
-
-        // Take into account the left side bearings for text and accelerator text.
-        fixTextRects(li);
-
-        // Set Y coordinate for text and icon.
-        // Y coordinates for other rects
-        // will be calculated later in layoutMenuItem.
-        calcTextAndIconYPositions(li);
-
-        // Calculate valid X and Y coordinates for labelRect
-        li.labelRect = li.textRect.union(li.iconRect);
-    }
-
-    private void doLTRComplexLayout(LayoutInfo li) {
-        li.labelRect.width = li.maxLabelWidth;
-
-        // Set X coordinates
-        calcXPositionsL2R(li.viewRect.x, li.leadingGap, li.gap, li.checkRect,
-                li.labelRect);
-
-        // Tune afterCheckIconGap
-        if (li.checkRect.width > 0) { // there is the afterCheckIconGap
-            li.labelRect.x += li.afterCheckIconGap - li.gap;
-        }
-
-        calcXPositionsR2L(li.viewRect.x + li.viewRect.width, li.gap,
-                li.arrowRect, li.accRect);
-
-        // Take into account minimal text offset
-        int labelOffset = li.labelRect.x - li.viewRect.x;
-        if (!li.isTopLevelMenu && (labelOffset < li.minTextOffset)) {
-            li.labelRect.x += li.minTextOffset - labelOffset;
-        }
-
-        // Take into account the left side bearing for accelerator text.
-        // The LSB for text is taken into account in layoutCompoundLabel() below.
-        fixAccTextRect(li);
-
-        // Layout icon and text with SwingUtilities.layoutCompoundLabel()
-        // within the labelRect
-        li.textRect = new Rectangle();
-        li.iconRect = new Rectangle();
-        SwingUtilities.layoutCompoundLabel(
-                            li.mi, li.fm, li.text, li.icon, li.verticalAlignment,
-                            li.horizontalAlignment, li.verticalTextPosition,
-                            li.horizontalTextPosition, li.labelRect,
-                            li.iconRect, li.textRect, li.gap);
-    }
-
-    private void doRTLColumnLayout(LayoutInfo li) {
-        // Set maximal width for all the five basic rects
-        // (three other ones are already maximal)
-        li.iconRect.width = li.maxIconWidth;
-        li.textRect.width = li.maxTextWidth;
-
-        // Set X coordinates
-        calcXPositionsR2L(li.viewRect.x + li.viewRect.width, li.leadingGap,
-                li.gap, li.checkRect, li.iconRect, li.textRect);
-
-        // Tune the gap after check icon
-        if (li.checkRect.width > 0) { // there is the gap after check icon
-            li.iconRect.x -= li.afterCheckIconGap - li.gap;
-            li.textRect.x -= li.afterCheckIconGap - li.gap;
-        }
-
-        calcXPositionsL2R(li.viewRect.x, li.gap, li.arrowRect,
-                li.accRect);
-
-        // Take into account minimal text offset
-        int textOffset = (li.viewRect.x + li.viewRect.width)
-                       - (li.textRect.x + li.textRect.width);
-        if (!li.isTopLevelMenu && (textOffset < li.minTextOffset)) {
-            li.textRect.x -= li.minTextOffset - textOffset;
-        }
-
-        // Align icon, text, accelerator text, check icon and arrow icon
-        // at the right side
-        rightAlignAllRects(li);
-
-        // Take into account the left side bearings for text and accelerator text.
-        fixTextRects(li);
-
-        // Set Y coordinates for text and icon.
-        // Y coordinates for other rects
-        // will be calculated later in layoutMenuItem.
-        calcTextAndIconYPositions(li);
-
-        // Calculate valid X and Y coordinate for labelRect
-        li.labelRect = li.textRect.union(li.iconRect);
-    }
-
-    private void doRTLComplexLayout(LayoutInfo li) {
-        li.labelRect.width = li.maxLabelWidth;
-
-        // Set X coordinates
-        calcXPositionsR2L(li.viewRect.x + li.viewRect.width, li.leadingGap,
-                li.gap, li.checkRect, li.labelRect);
-
-        // Tune the gap after check icon
-        if (li.checkRect.width > 0) { // there is the gap after check icon
-            li.labelRect.x -= li.afterCheckIconGap - li.gap;
-        }
-
-        calcXPositionsL2R(li.viewRect.x, li.gap, li.arrowRect,
-                li.accRect);
-
-        // Take into account minimal text offset
-        int labelOffset = (li.viewRect.x + li.viewRect.width)
-                        - (li.labelRect.x + li.labelRect.width);
-        if (!li.isTopLevelMenu && (labelOffset < li.minTextOffset)) {
-            li.labelRect.x -= li.minTextOffset - labelOffset;
-        }
-
-        // Align icon, text, accelerator text, check icon and arrow icon
-        // at the right side
-        rightAlignAllRects(li);
-
-        // Take into account the left side bearing for accelerator text.
-        // The LSB for text is taken into account in layoutCompoundLabel() below.
-        fixAccTextRect(li);
-
-        // Layout icon and text with SwingUtilities.layoutCompoundLabel()
-        // within the labelRect
-        li.textRect = new Rectangle();
-        li.iconRect = new Rectangle();
-        SwingUtilities.layoutCompoundLabel(
-                            menuItem, li.fm, li.text, li.icon, li.verticalAlignment,
-                            li.horizontalAlignment, li.verticalTextPosition,
-                            li.horizontalTextPosition, li.labelRect,
-                            li.iconRect, li.textRect, li.gap);
-    }
-
-    private void calcXPositionsL2R(int startXPos, int leadingGap,
-                                   int gap, Rectangle... rects) {
-        int curXPos = startXPos + leadingGap;
-        for (Rectangle rect : rects) {
-            rect.x = curXPos;
-            if (rect.width > 0) {
-                curXPos += rect.width + gap;
-            }
-        }
-    }
-
-    private void calcXPositionsL2R(int startXPos, int gap, Rectangle... rects) {
-        calcXPositionsL2R(startXPos, gap, gap, rects);
-    }
-
-    private void calcXPositionsR2L(int startXPos, int leadingGap,
-                                   int gap, Rectangle... rects) {
-        int curXPos = startXPos - leadingGap;
-        for (Rectangle rect : rects) {
-            rect.x = curXPos - rect.width;
-            if (rect.width > 0) {
-                curXPos -= rect.width + gap;
-            }
-        }
-    }
-
-    private void calcXPositionsR2L(int startXPos, int gap, Rectangle... rects) {
-        calcXPositionsR2L(startXPos, gap, gap, rects);
-    }
-
-    // Takes into account the left side bearings for text and accelerator text
-    private void fixTextRects(LayoutInfo li) {
-        if (li.htmlView == null) { // The text isn't a HTML
-            int lsb = SwingUtilities2.getLeftSideBearing(li.mi, li.fm, li.text);
-            if (lsb < 0) {
-                li.textRect.x -= lsb;
-            }
-        }
-        fixAccTextRect(li);
-    }
-
-    // Takes into account the left side bearing for accelerator text
-    private void fixAccTextRect(LayoutInfo li) {
-        int lsb = SwingUtilities2
-                .getLeftSideBearing(li.mi, li.accFm, li.accText);
-        if (lsb < 0) {
-            li.accRect.x -= lsb;
-        }
-    }
-
-    // Sets Y coordinates of text and icon
-    // taking into account the vertical alignment
-    private void calcTextAndIconYPositions(LayoutInfo li) {
-        if (li.verticalAlignment == SwingUtilities.TOP) {
-            li.textRect.y  = (int)(li.viewRect.y
-                    + (float)li.labelRect.height/2
-                    - (float)li.textRect.height/2);
-            li.iconRect.y  = (int)(li.viewRect.y
-                    + (float)li.labelRect.height/2
-                    - (float)li.iconRect.height/2);
-        } else if (li.verticalAlignment == SwingUtilities.CENTER) {
-            li.textRect.y = (int)(li.viewRect.y
-                    + (float)li.viewRect.height/2
-                    - (float)li.textRect.height/2);
-            li.iconRect.y = (int)(li.viewRect.y
-                    + (float)li.viewRect.height/2
-                    - (float)li.iconRect.height/2);
-        }
-        else if (li.verticalAlignment == SwingUtilities.BOTTOM) {
-            li.textRect.y = (int)(li.viewRect.y + li.viewRect.height
-                    - (float)li.labelRect.height/2
-                    - (float)li.textRect.height/2);
-            li.iconRect.y = (int)(li.viewRect.y + li.viewRect.height
-                    - (float)li.labelRect.height/2
-                    - (float)li.iconRect.height/2);
-        }
-    }
-
-    // Aligns icon, text, accelerator text, check icon and arrow icon
-    // at the right side
-    private void rightAlignAllRects(LayoutInfo li) {
-        li.iconRect.x = li.iconRect.x + li.iconRect.width - li.origIconWidth;
-        li.iconRect.width = li.origIconWidth;
-        li.textRect.x = li.textRect.x + li.textRect.width - li.origTextWidth;
-        li.textRect.width = li.origTextWidth;
-        li.accRect.x = li.accRect.x + li.accRect.width
-                - li.origAccWidth;
-        li.accRect.width = li.origAccWidth;
-        li.checkRect.x = li.checkRect.x + li.checkRect.width
-                - li.origCheckWidth;
-        li.checkRect.width = li.origCheckWidth;
-        li.arrowRect.x = li.arrowRect.x + li.arrowRect.width -
-                li.origArrowWidth;
-        li.arrowRect.width = li.origArrowWidth;
-    }
-
-    /*
-     * Returns false if the component is a JMenu and it is a top
-     * level menu (on the menubar).
-     */
-    private boolean useCheckAndArrow(){
-        boolean b = true;
-        if((menuItem instanceof JMenu) &&
-           (((JMenu)menuItem).isTopLevelMenu())) {
-            b = false;
-        }
-        return b;
-    }
-
     public MenuElement[] getPath() {
         MenuSelectionManager m = MenuSelectionManager.defaultManager();
         MenuElement oldPath[] = m.getSelectedPath();
@@ -1601,7 +737,7 @@
         for(i=0,j=path.length; i<j ;i++){
             for (int k=0; k<=i; k++)
                 System.out.print("  ");
-            MenuElement me = (MenuElement) path[i];
+            MenuElement me = path[i];
             if(me instanceof JMenuItem)
                 System.out.println(((JMenuItem)me).getText() + ", ");
             else if (me == null)
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -123,9 +123,9 @@
         InputMap windowInputMap = SwingUtilities.getUIInputMap(
                        menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW);
         if (lastMnemonic != 0 && windowInputMap != null) {
-            for (int i=0; i<shortcutKeys.length; i++) {
+            for (int shortcutKey : shortcutKeys) {
                 windowInputMap.remove(KeyStroke.getKeyStroke
-                                      (lastMnemonic, shortcutKeys[i], false));
+                        (lastMnemonic, shortcutKey, false));
             }
         }
         if (mnemonic != 0) {
@@ -135,10 +135,9 @@
                 SwingUtilities.replaceUIInputMap(menuItem, JComponent.
                                        WHEN_IN_FOCUSED_WINDOW, windowInputMap);
             }
-            for (int i=0; i<shortcutKeys.length; i++) {
+            for (int shortcutKey : shortcutKeys) {
                 windowInputMap.put(KeyStroke.getKeyStroke(mnemonic,
-                                         shortcutKeys[i], false),
-                                   "selectMenu");
+                        shortcutKey, false), "selectMenu");
             }
         }
         lastMnemonic = mnemonic;
@@ -264,14 +263,14 @@
                     if(subElements.length > 0) {
                         me = new MenuElement[4];
                         me[0] = (MenuElement) cnt;
-                        me[1] = (MenuElement) menu;
-                        me[2] = (MenuElement) menu.getPopupMenu();
+                        me[1] = menu;
+                        me[2] = menu.getPopupMenu();
                         me[3] = subElements[0];
                     } else {
                         me = new MenuElement[3];
                         me[0] = (MenuElement)cnt;
                         me[1] = menu;
-                        me[2] = (MenuElement) menu.getPopupMenu();
+                        me[2] = menu.getPopupMenu();
                     }
                     defaultManager.setSelectedPath(me);
                 }
@@ -606,7 +605,7 @@
             MenuSelectionManager manager = e.getMenuSelectionManager();
             if (key == Character.toLowerCase(e.getKeyChar())) {
                 JPopupMenu popupMenu = ((JMenu)menuItem).getPopupMenu();
-                ArrayList newList = new ArrayList(Arrays.asList(path));
+                ArrayList<MenuElement> newList = new ArrayList<MenuElement>(Arrays.asList(path));
                 newList.add(popupMenu);
                 MenuElement subs[] = popupMenu.getSubElements();
                 MenuElement sub =
@@ -614,8 +613,8 @@
                 if(sub != null) {
                     newList.add(sub);
                 }
-                MenuElement newPath[] = new MenuElement[0];;
-                newPath = (MenuElement[]) newList.toArray(newPath);
+                MenuElement newPath[] = new MenuElement[0];
+                newPath = newList.toArray(newPath);
                 manager.setSelectedPath(newPath);
                 e.consume();
             } else if (((JMenu)menuItem).isTopLevelMenu()
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -109,7 +109,7 @@
 
 
     static {
-        newline = (String)java.security.AccessController.doPrivileged(
+        newline = java.security.AccessController.doPrivileged(
                                 new GetPropertyAction("line.separator"));
         if (newline == null) {
             newline = "\n";
@@ -262,7 +262,7 @@
      * <code>getMinimumOptionPaneSize</code>.
      */
     public Dimension getPreferredSize(JComponent c) {
-        if ((JOptionPane)c == optionPane) {
+        if (c == optionPane) {
             Dimension            ourMin = getMinimumOptionPaneSize();
             LayoutManager        lm = c.getLayout();
 
@@ -366,8 +366,8 @@
 
         } else if (msg instanceof Object[]) {
             Object [] msgs = (Object[]) msg;
-            for (int i = 0; i < msgs.length; i++) {
-                addMessageComponents(container, cons, msgs[i], maxll, false);
+            for (Object o : msgs) {
+                addMessageComponents(container, cons, o, maxll, false);
             }
 
         } else if (msg instanceof Icon) {
@@ -381,7 +381,7 @@
             if (len <= 0) {
                 return;
             }
-            int nl = -1;
+            int nl;
             int nll = 0;
 
             if ((nl = s.indexOf(newline)) >= 0) {
@@ -1320,7 +1320,7 @@
                 else if (changeName == "componentOrientation") {
                     ComponentOrientation o = (ComponentOrientation)e.getNewValue();
                     JOptionPane op = (JOptionPane)e.getSource();
-                    if (o != (ComponentOrientation)e.getOldValue()) {
+                    if (o != e.getOldValue()) {
                         op.applyComponentOrientation(o);
                     }
                 }
@@ -1418,7 +1418,7 @@
         }
 
         JButton createButton() {
-            JButton button = null;
+            JButton button;
 
             if (minimumWidth > 0) {
                 button = new ConstrainedButton(text, minimumWidth);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -225,14 +225,14 @@
         return popup;
     }
 
-    static List getPopups() {
+    static List<JPopupMenu> getPopups() {
         MenuSelectionManager msm = MenuSelectionManager.defaultManager();
         MenuElement[] p = msm.getSelectedPath();
 
-        List list = new ArrayList(p.length);
-        for(int i = 0; i < p.length; i++) {
-            if (p[i] instanceof JPopupMenu) {
-                list.add((JPopupMenu)p[i]);
+        List<JPopupMenu> list = new ArrayList<JPopupMenu>(p.length);
+        for (MenuElement element : p) {
+            if (element instanceof JPopupMenu) {
+                list.add((JPopupMenu) element);
             }
         }
         return list;
@@ -290,14 +290,14 @@
                 MenuElement subitem = findEnabledChild(
                         subpopup.getSubElements(), -1, true);
 
-                ArrayList lst = new ArrayList(Arrays.asList(e.getPath()));
+                ArrayList<MenuElement> lst = new ArrayList<MenuElement>(Arrays.asList(e.getPath()));
                 lst.add(menuToOpen);
                 lst.add(subpopup);
                 if (subitem != null) {
                     lst.add(subitem);
                 }
-                MenuElement newPath[] = new MenuElement[0];;
-                newPath = (MenuElement[])lst.toArray(newPath);
+                MenuElement newPath[] = new MenuElement[0];
+                newPath = lst.toArray(newPath);
                 MenuSelectionManager.defaultManager().setSelectedPath(newPath);
                 e.consume();
             }
@@ -345,7 +345,7 @@
             }
 
             if (matches == 0) {
-                ; // no op
+                // no op
             } else if (matches == 1) {
                 // Invoke the menu action
                 JMenuItem item = (JMenuItem)items[firstMatch];
@@ -362,7 +362,7 @@
                 // Select the menu item with the matching mnemonic. If
                 // the same mnemonic has been invoked then select the next
                 // menu item in the cycle.
-                MenuElement newItem = null;
+                MenuElement newItem;
 
                 newItem = items[indexes[(currentIndex + 1) % matches]];
 
@@ -372,7 +372,6 @@
                 manager.setSelectedPath(newPath);
                 e.consume();
             }
-            return;
         }
 
         public void menuKeyReleased(MenuKeyEvent e) {
@@ -625,7 +624,7 @@
             // 4234793: This action should call JPopupMenu.firePopupMenuCanceled but it's
             // a protected method. The real solution could be to make
             // firePopupMenuCanceled public and call it directly.
-            JPopupMenu lastPopup = (JPopupMenu)getLastPopup();
+            JPopupMenu lastPopup = getLastPopup();
             if (lastPopup != null) {
                 lastPopup.putClientProperty("JPopupMenu.firePopupMenuCanceled", Boolean.TRUE);
             }
@@ -703,7 +702,7 @@
 
     static MenuElement findEnabledChild(MenuElement e[], int fromIndex,
                                                 boolean forward) {
-        MenuElement result = null;
+        MenuElement result;
         if (forward) {
             result = nextEnabledChild(e, fromIndex+1, e.length-1);
             if (result == null) result = nextEnabledChild(e, 0, fromIndex-1);
@@ -752,7 +751,7 @@
             // A grab needs to be added
             final Toolkit tk = Toolkit.getDefaultToolkit();
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
+                new java.security.PrivilegedAction<Object>() {
                     public Object run() {
                         tk.addAWTEventListener(MouseGrabber.this,
                                 AWTEvent.MOUSE_EVENT_MASK |
@@ -785,7 +784,7 @@
             final Toolkit tk = Toolkit.getDefaultToolkit();
             // The grab should be removed
              java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
+                new java.security.PrivilegedAction<Object>() {
                     public Object run() {
                         tk.removeAWTEventListener(MouseGrabber.this);
                         return null;
@@ -911,10 +910,8 @@
                 // 4234793: This action should call firePopupMenuCanceled but it's
                 // a protected method. The real solution could be to make
                 // firePopupMenuCanceled public and call it directly.
-                List popups = getPopups();
-                Iterator iter = popups.iterator();
-                while (iter.hasNext()) {
-                    JPopupMenu popup = (JPopupMenu) iter.next();
+                List<JPopupMenu> popups = getPopups();
+                for (JPopupMenu popup : popups) {
                     popup.putClientProperty("JPopupMenu.firePopupMenuCanceled", Boolean.TRUE);
                 }
                 MenuSelectionManager.defaultManager().clearSelectedPath();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -150,15 +150,15 @@
                 }
             } else if(model.isSelected()) {
                 if(b.isRolloverEnabled() && model.isRollover()) {
-                        altIcon = (Icon) b.getRolloverSelectedIcon();
+                        altIcon = b.getRolloverSelectedIcon();
                         if (altIcon == null) {
-                                altIcon = (Icon) b.getSelectedIcon();
+                                altIcon = b.getSelectedIcon();
                         }
                 } else {
-                        altIcon = (Icon) b.getSelectedIcon();
+                        altIcon = b.getSelectedIcon();
                 }
             } else if(b.isRolloverEnabled() && model.isRollover()) {
-                altIcon = (Icon) b.getRolloverIcon();
+                altIcon = b.getRolloverIcon();
             }
 
             if(altIcon == null) {
@@ -214,7 +214,7 @@
 
         String text = b.getText();
 
-        Icon buttonIcon = (Icon) b.getIcon();
+        Icon buttonIcon = b.getIcon();
         if(buttonIcon == null) {
             buttonIcon = getDefaultIcon();
         }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -106,13 +106,13 @@
      * Keys to use for forward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusForwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusForwardTraversalKeys;
 
     /**
      * Keys to use for backward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusBackwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusBackwardTraversalKeys;
 
 
     /**
@@ -370,7 +370,7 @@
 
         // focus forward traversal key
         if (managingFocusForwardTraversalKeys==null) {
-            managingFocusForwardTraversalKeys = new HashSet();
+            managingFocusForwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusForwardTraversalKeys.add(
                 KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
         }
@@ -378,7 +378,7 @@
                                         managingFocusForwardTraversalKeys);
         // focus backward traversal key
         if (managingFocusBackwardTraversalKeys==null) {
-            managingFocusBackwardTraversalKeys = new HashSet();
+            managingFocusBackwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusBackwardTraversalKeys.add(
                 KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
         }
@@ -2170,7 +2170,7 @@
             Component focusOn = (direction > 0) ?
                 policy.getComponentAfter(rootAncestor, splitPane) :
                 policy.getComponentBefore(rootAncestor, splitPane);
-            HashSet focusFrom = new HashSet();
+            HashSet<Component> focusFrom = new HashSet<Component>();
             if (splitPane.isAncestorOf(focusOn)) {
                 do {
                     focusFrom.add(focusOn);
@@ -2212,7 +2212,7 @@
         private Component getNextSide(JSplitPane splitPane, Component focus) {
             Component left = splitPane.getLeftComponent();
             Component right = splitPane.getRightComponent();
-            Component next = null;
+            Component next;
             if (focus!=null && SwingUtilities.isDescendingFrom(focus, left) &&
                 right!=null) {
                 next = getFirstAvailableComponent(right);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -142,9 +142,9 @@
 
     private Component visibleComponent;
     // PENDING(api): See comment for ContainerHandler
-    private Vector htmlViews;
-
-    private Hashtable mnemonicToIndexMap;
+    private Vector<View> htmlViews;
+
+    private Hashtable<Integer, Integer> mnemonicToIndexMap;
 
     /**
      * InputMap used for mnemonics. Only non-null if the JTabbedPane has
@@ -546,7 +546,7 @@
      * Installs the state needed for mnemonics.
      */
     private void initMnemonics() {
-        mnemonicToIndexMap = new Hashtable();
+        mnemonicToIndexMap = new Hashtable<Integer, Integer>();
         mnemonicInputMap = new ComponentInputMapUIResource(tabPane);
         mnemonicInputMap.setParent(SwingUtilities.getUIInputMap(tabPane,
                               JComponent.WHEN_IN_FOCUSED_WINDOW));
@@ -909,10 +909,10 @@
     private static final int CROP_SEGMENT = 12;
 
     private static Polygon createCroppedTabShape(int tabPlacement, Rectangle tabRect, int cropline) {
-        int rlen = 0;
-        int start = 0;
-        int end = 0;
-        int ostart = 0;
+        int rlen;
+        int start;
+        int end;
+        int ostart;
 
         switch(tabPlacement) {
           case LEFT:
@@ -1014,7 +1014,7 @@
             tabPane.putClientProperty("html", v);
         }
 
-        SwingUtilities.layoutCompoundLabel((JComponent) tabPane,
+        SwingUtilities.layoutCompoundLabel(tabPane,
                                            metrics, title, icon,
                                            SwingUtilities.CENTER,
                                            SwingUtilities.CENTER,
@@ -1694,7 +1694,7 @@
      */
     protected View getTextViewForTab(int tabIndex) {
         if (htmlViews != null) {
-            return (View)htmlViews.elementAt(tabIndex);
+            return htmlViews.elementAt(tabIndex);
         }
         return null;
     }
@@ -2230,8 +2230,7 @@
                     if (mnemonic >= 'a' && mnemonic <='z') {
                         mnemonic  -= ('a' - 'A');
                     }
-                    Integer index = (Integer)ui.mnemonicToIndexMap.
-                                 get(Integer.valueOf(mnemonic));
+                    Integer index = ui.mnemonicToIndexMap.get(Integer.valueOf(mnemonic));
                     if (index != null && pane.isEnabledAt(index.intValue())) {
                         pane.setSelectedIndex(index.intValue());
                     }
@@ -2292,8 +2291,7 @@
             for (int i = 0; i < tabPane.getTabCount(); i++) {
                 Component component = tabPane.getComponentAt(i);
                 if (component != null) {
-                    Dimension size = zeroSize;
-                    size = minimum? component.getMinimumSize() :
+                    Dimension size = minimum ? component.getMinimumSize() :
                                 component.getPreferredSize();
 
                     if (size != null) {
@@ -2305,7 +2303,7 @@
             // Add content border insets to minimum size
             width += cWidth;
             height += cHeight;
-            int tabExtent = 0;
+            int tabExtent;
 
             // Calculate how much space the tabs will need, based on the
             // minimum size required to display largest child + content border
@@ -3143,7 +3141,7 @@
             Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
             int fontHeight = metrics.getHeight();
             int selectedIndex = tabPane.getSelectedIndex();
-            int i, j;
+            int i;
             boolean verticalTabRuns = (tabPlacement == LEFT || tabPlacement == RIGHT);
             boolean leftToRight = BasicGraphicsUtils.isLeftToRight(tabPane);
             int x = tabAreaInsets.left;
@@ -3433,10 +3431,10 @@
         }
 
         public String toString() {
-            return new String("viewport.viewSize="+viewport.getViewSize()+"\n"+
+            return "viewport.viewSize=" + viewport.getViewSize() + "\n" +
                               "viewport.viewRectangle="+viewport.getViewRect()+"\n"+
                               "leadingTabIndex="+leadingTabIndex+"\n"+
-                              "tabViewPosition="+tabViewPosition);
+                              "tabViewPosition=" + tabViewPosition;
         }
 
     }
@@ -3788,8 +3786,8 @@
         }
     }
 
-    private Vector createHTMLVector() {
-        Vector htmlViews = new Vector();
+    private Vector<View> createHTMLVector() {
+        Vector<View> htmlViews = new Vector<View>();
         int count = tabPane.getTabCount();
         if (count>0) {
             for (int i=0 ; i<count; i++) {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -526,16 +526,16 @@
         EditorKit editorKit = getEditorKit(editor);
         if ( editorKit != null
              && editorKit instanceof DefaultEditorKit) {
-            Set storedForwardTraversalKeys = editor.
+            Set<AWTKeyStroke> storedForwardTraversalKeys = editor.
                 getFocusTraversalKeys(KeyboardFocusManager.
                                       FORWARD_TRAVERSAL_KEYS);
-            Set storedBackwardTraversalKeys = editor.
+            Set<AWTKeyStroke> storedBackwardTraversalKeys = editor.
                 getFocusTraversalKeys(KeyboardFocusManager.
                                       BACKWARD_TRAVERSAL_KEYS);
-            Set forwardTraversalKeys =
-                new HashSet(storedForwardTraversalKeys);
-            Set backwardTraversalKeys =
-                new HashSet(storedBackwardTraversalKeys);
+            Set<AWTKeyStroke> forwardTraversalKeys =
+                new HashSet<AWTKeyStroke>(storedForwardTraversalKeys);
+            Set<AWTKeyStroke> backwardTraversalKeys =
+                new HashSet<AWTKeyStroke>(storedBackwardTraversalKeys);
             if (editor.isEditable()) {
                 forwardTraversalKeys.
                     remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
@@ -1888,7 +1888,7 @@
          *
          * @param e  The change notification from the currently associated
          *  document.
-         * @see DocumentListener#changeUpdate
+         * @see DocumentListener#changedUpdate(DocumentEvent)
          */
         public final void changedUpdate(DocumentEvent e) {
             Rectangle alloc = (painted) ? getVisibleEditorRect() : null;
@@ -1964,9 +1964,9 @@
                     }
                     try {
                         rootView.setSize(alloc.width, alloc.height);
-                        Enumeration components = constraints.keys();
+                        Enumeration<Component> components = constraints.keys();
                         while (components.hasMoreElements()) {
-                            Component comp = (Component) components.nextElement();
+                            Component comp = components.nextElement();
                             View v = (View) constraints.get(comp);
                             Shape ca = calculateViewPosition(alloc, v);
                             if (ca != null) {
@@ -2009,7 +2009,7 @@
         public void addLayoutComponent(Component comp, Object constraint) {
             if (constraint instanceof View) {
                 if (constraints == null) {
-                    constraints = new Hashtable(7);
+                    constraints = new Hashtable<Component, Object>(7);
                 }
                 constraints.put(comp, constraint);
             }
@@ -2060,7 +2060,7 @@
          * These are View objects for those components that are represented
          * by a View in the View tree.
          */
-        private Hashtable constraints;
+        private Hashtable<Component, Object> constraints;
 
         private boolean i18nView = false;
     }
@@ -2457,8 +2457,7 @@
             JTextComponent c = (JTextComponent)comp;
 
             int pos = modeBetween
-                      ? ((JTextComponent.DropLocation)c.getDropLocation()).getIndex()
-                      : c.getCaretPosition();
+                      ? c.getDropLocation().getIndex() : c.getCaretPosition();
 
             // if we are importing to the same component that we exported from
             // then don't actually do anything if the drop location is inside
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -125,31 +125,31 @@
 
         if(!model.isEnabled()) {
             if(model.isSelected()) {
-               icon = (Icon) b.getDisabledSelectedIcon();
+               icon = b.getDisabledSelectedIcon();
             } else {
-               icon = (Icon) b.getDisabledIcon();
+               icon = b.getDisabledIcon();
             }
         } else if(model.isPressed() && model.isArmed()) {
-            icon = (Icon) b.getPressedIcon();
+            icon = b.getPressedIcon();
             if(icon == null) {
                 // Use selected icon
-                icon = (Icon) b.getSelectedIcon();
+                icon = b.getSelectedIcon();
             }
         } else if(model.isSelected()) {
             if(b.isRolloverEnabled() && model.isRollover()) {
-                icon = (Icon) b.getRolloverSelectedIcon();
+                icon = b.getRolloverSelectedIcon();
                 if (icon == null) {
-                    icon = (Icon) b.getSelectedIcon();
+                    icon = b.getSelectedIcon();
                 }
             } else {
-                icon = (Icon) b.getSelectedIcon();
+                icon = b.getSelectedIcon();
             }
         } else if(b.isRolloverEnabled() && model.isRollover()) {
-            icon = (Icon) b.getRolloverIcon();
+            icon = b.getRolloverIcon();
         }
 
         if(icon == null) {
-            icon = (Icon) b.getIcon();
+            icon = b.getIcon();
         }
 
         icon.paintIcon(b, g, iconRect.x, iconRect.y);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -83,8 +83,8 @@
     private static Border nonRolloverToggleBorder;
     private boolean rolloverBorders = false;
 
-    private HashMap borderTable = new HashMap();
-    private Hashtable rolloverTable = new Hashtable();
+    private HashMap<AbstractButton, Border> borderTable = new HashMap<AbstractButton, Border>();
+    private Hashtable<AbstractButton, Boolean> rolloverTable = new Hashtable<AbstractButton, Boolean>();
 
 
     /**
@@ -171,7 +171,7 @@
         uninstallKeyboardActions();
 
         // Clear instance vars
-        if (isFloating() == true)
+        if (isFloating())
             setFloating(false, null);
 
         floatingToolBar = null;
@@ -273,9 +273,8 @@
             // Put focus listener on all components in toolbar
             Component[] components = toolBar.getComponents();
 
-            for ( int i = 0; i < components.length; ++i )
-            {
-                components[ i ].addFocusListener( toolBarFocusListener );
+            for (Component component : components) {
+                component.addFocusListener(toolBarFocusListener);
             }
         }
     }
@@ -307,9 +306,8 @@
             // Remove focus listener from all components in toolbar
             Component[] components = toolBar.getComponents();
 
-            for ( int i = 0; i < components.length; ++i )
-            {
-                components[ i ].removeFocusListener( toolBarFocusListener );
+            for (Component component : components) {
+                component.removeFocusListener(toolBarFocusListener);
             }
 
             toolBarFocusListener = null;
@@ -616,10 +614,10 @@
         // Put rollover borders on buttons
         Component[] components = c.getComponents();
 
-        for ( int i = 0; i < components.length; ++i ) {
-            if ( components[ i ] instanceof JComponent ) {
-                ( (JComponent)components[ i ] ).updateUI();
-                setBorderToRollover( components[ i ] );
+        for (Component component : components) {
+            if (component instanceof JComponent) {
+                ((JComponent) component).updateUI();
+                setBorderToRollover(component);
             }
         }
     }
@@ -640,10 +638,10 @@
         // Put non-rollover borders on buttons. These borders reduce the margin.
         Component[] components = c.getComponents();
 
-        for ( int i = 0; i < components.length; ++i ) {
-            if ( components[ i ] instanceof JComponent ) {
-                ( (JComponent)components[ i ] ).updateUI();
-                setBorderToNonRollover( components[ i ] );
+        for (Component component : components) {
+            if (component instanceof JComponent) {
+                ((JComponent) component).updateUI();
+                setBorderToNonRollover(component);
             }
         }
     }
@@ -664,8 +662,8 @@
         // Put back the normal borders on buttons
         Component[] components = c.getComponents();
 
-        for ( int i = 0; i < components.length; ++i ) {
-            setBorderToNormal( components[ i ] );
+        for (Component component : components) {
+            setBorderToNormal(component);
         }
     }
 
@@ -681,7 +679,7 @@
         if (c instanceof AbstractButton) {
             AbstractButton b = (AbstractButton)c;
 
-            Border border = (Border)borderTable.get(b);
+            Border border = borderTable.get(b);
             if (border == null || border instanceof UIResource) {
                 borderTable.put(b, b.getBorder());
             }
@@ -721,7 +719,7 @@
         if (c instanceof AbstractButton) {
             AbstractButton b = (AbstractButton)c;
 
-            Border border = (Border)borderTable.get(b);
+            Border border = borderTable.get(b);
             if (border == null || border instanceof UIResource) {
                 borderTable.put(b, b.getBorder());
             }
@@ -765,10 +763,10 @@
         if (c instanceof AbstractButton) {
             AbstractButton b = (AbstractButton)c;
 
-            Border border = (Border)borderTable.remove(b);
+            Border border = borderTable.remove(b);
             b.setBorder(border);
 
-            Boolean value = (Boolean)rolloverTable.remove(b);
+            Boolean value = rolloverTable.remove(b);
             if (value != null) {
                 b.setRolloverEnabled(value.booleanValue());
             }
@@ -785,7 +783,7 @@
     }
 
     public void setFloating(boolean b, Point p) {
-        if (toolBar.isFloatable() == true) {
+        if (toolBar.isFloatable()) {
             boolean visible = false;
             Window ancestor = SwingUtilities.getWindowAncestor(toolBar);
             if (ancestor != null) {
@@ -953,7 +951,7 @@
 
     protected void dragTo(Point position, Point origin)
     {
-        if (toolBar.isFloatable() == true)
+        if (toolBar.isFloatable())
         {
           try
           {
@@ -1003,7 +1001,7 @@
 
     protected void floatAt(Point position, Point origin)
     {
-        if(toolBar.isFloatable() == true)
+        if(toolBar.isFloatable())
         {
           try
           {
@@ -1174,7 +1172,7 @@
             if (!tb.isEnabled()) {
                 return;
             }
-            if (isDragging == true) {
+            if (isDragging) {
                 Point position = evt.getPoint();
                 if (origin == null)
                     origin = evt.getComponent().getLocationOnScreen();
@@ -1242,7 +1240,7 @@
 
     protected class FrameListener extends WindowAdapter {
         public void windowClosing(WindowEvent w) {
-            if (toolBar.isFloatable() == true) {
+            if (toolBar.isFloatable()) {
                 if (dragWindow != null)
                     dragWindow.setVisible(false);
                 floating = false;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1263,7 +1263,7 @@
     }
 
     private Rectangle getDropLineRect(JTree.DropLocation loc) {
-        Rectangle rect = null;
+        Rectangle rect;
         TreePath path = loc.getPath();
         int index = loc.getChildIndex();
         boolean ltr = leftToRight;
@@ -2138,7 +2138,7 @@
                                  compositeRequestFocus(editingComponent);
                 boolean selectAll = true;
 
-                if(event != null && event instanceof MouseEvent) {
+                if(event != null) {
                     /* Find the component that will get forwarded all the
                        mouse events until mouseReleased. */
                     Point          componentPoint = SwingUtilities.convertPoint
@@ -3125,7 +3125,7 @@
 
     private static final TransferHandler defaultTransferHandler = new TreeTransferHandler();
 
-    static class TreeTransferHandler extends TransferHandler implements UIResource, Comparator {
+    static class TreeTransferHandler extends TransferHandler implements UIResource, Comparator<TreePath> {
 
         private JTree tree;
 
@@ -3156,9 +3156,7 @@
                 TreePath lastPath = null;
                 TreePath[] displayPaths = getDisplayOrderPaths(paths);
 
-                for (int i = 0; i < displayPaths.length; i++) {
-                    TreePath path = displayPaths[i];
-
+                for (TreePath path : displayPaths) {
                     Object node = path.getLastPathComponent();
                     boolean leaf = model.isLeaf(node);
                     String label = getDisplayString(path, true, leaf);
@@ -3179,9 +3177,9 @@
             return null;
         }
 
-        public int compare(Object o1, Object o2) {
-            int row1 = tree.getRowForPath((TreePath)o1);
-            int row2 = tree.getRowForPath((TreePath)o2);
+        public int compare(TreePath o1, TreePath o2) {
+            int row1 = tree.getRowForPath(o1);
+            int row2 = tree.getRowForPath(o2);
             return row1 - row2;
         }
 
@@ -3200,15 +3198,15 @@
          */
         TreePath[] getDisplayOrderPaths(TreePath[] paths) {
             // sort the paths to display order rather than selection order
-            ArrayList selOrder = new ArrayList();
-            for (int i = 0; i < paths.length; i++) {
-                selOrder.add(paths[i]);
+            ArrayList<TreePath> selOrder = new ArrayList<TreePath>();
+            for (TreePath path : paths) {
+                selOrder.add(path);
             }
             Collections.sort(selOrder, this);
             int n = selOrder.size();
             TreePath[] displayPaths = new TreePath[n];
             for (int i = 0; i < n; i++) {
-                displayPaths[i] = (TreePath) selOrder.get(i);
+                displayPaths[i] = selOrder.get(i);
             }
             return displayPaths;
         }
@@ -3321,10 +3319,7 @@
             InputMap inputMap = tree.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
             KeyStroke key = KeyStroke.getKeyStrokeForEvent(event);
 
-            if (inputMap != null && inputMap.get(key) != null) {
-                return true;
-            }
-            return false;
+            return inputMap != null && inputMap.get(key) != null;
         }
 
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 
 import java.awt.Container;
 import java.awt.Dimension;
-import static sun.swing.SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET;
 
 /**
  * The default layout manager for Popup menus and menubars.  This
@@ -49,18 +48,7 @@
     public Dimension preferredLayoutSize(Container target) {
         if (target instanceof JPopupMenu) {
             JPopupMenu popupMenu = (JPopupMenu) target;
-
-            // Before the calculation of menu preferred size
-            // clear the previously calculated maximal widths and offsets
-            // in menu's Client Properties
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_ACC_WIDTH, null);
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_ARROW_WIDTH, null);
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_CHECK_WIDTH, null);
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_ICON_WIDTH, null);
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_LABEL_WIDTH, null);
-            popupMenu.putClientProperty(BasicMenuItemUI.MAX_TEXT_WIDTH, null);
-            popupMenu.putClientProperty(BASICMENUITEMUI_MAX_TEXT_OFFSET, null);
-
+            sun.swing.MenuItemLayoutHelper.clearUsedClientProperties(popupMenu);
             if (popupMenu.getComponentCount() == 0) {
                 return new Dimension(0, 0);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/DesktopIconMover.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,168 @@
+/*
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.plaf.basic;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+
+/**
+ * DesktopIconMover is intended to move desktop icon
+ * when parent window is resized.
+ */
+class DesktopIconMover implements ComponentListener, PropertyChangeListener {
+    private Component parent;
+    private JInternalFrame frame; // if not null, DesktopIconMover(frame)
+                                  // constructor was used
+    private JInternalFrame.JDesktopIcon icon;
+    private Rectangle parentBounds;
+    private boolean componentListenerAdded = false;
+
+    public DesktopIconMover(JInternalFrame frame) {
+        if (frame == null) {
+            throw new NullPointerException("Frame cannot be null");
+        }
+        this.frame = frame;
+        this.icon = frame.getDesktopIcon();
+        if (icon == null) {
+            throw new NullPointerException(
+                    "frame.getDesktopIcon() cannot be null");
+        }
+        this.parent = frame.getParent();
+        if (this.parent != null) {
+            parentBounds = this.parent.getBounds();
+        }
+    }
+
+    public DesktopIconMover(JInternalFrame.JDesktopIcon icon) {
+        if (icon == null) {
+            throw new NullPointerException("Icon cannot be null");
+        }
+        this.icon = icon;
+        this.parent = icon.getParent();
+        if (this.parent != null) {
+            parentBounds = this.parent.getBounds();
+        }
+    }
+
+    public void installListeners() {
+        if (frame != null) {
+            frame.addPropertyChangeListener(this);
+        } else {
+            icon.addPropertyChangeListener(this);
+        }
+        addComponentListener();
+    }
+
+    public void uninstallListeners() {
+        if (frame != null) {
+            frame.removePropertyChangeListener(this);
+        } else {
+            icon.removePropertyChangeListener(this);
+        }
+        removeComponentListener();
+    }
+
+    public void propertyChange(PropertyChangeEvent evt) {
+        String propName = evt.getPropertyName();
+        if ("ancestor".equals(propName)) {
+            Component newAncestor = (Component) evt.getNewValue();
+
+            // Remove component listener if parent is changing
+            Component probablyNewParent = getCurrentParent();
+            if ((probablyNewParent != null) &&
+                    (!probablyNewParent.equals(parent))) {
+                removeComponentListener();
+                parent = probablyNewParent;
+            }
+
+            if (newAncestor == null) {
+                removeComponentListener();
+            } else {
+                addComponentListener();
+            }
+
+            // Update parentBounds
+            if (parent != null) {
+                parentBounds = parent.getBounds();
+            } else {
+                parentBounds = null;
+            }
+        } else if (JInternalFrame.IS_CLOSED_PROPERTY.equals(propName)) {
+            removeComponentListener();
+        }
+    }
+
+    private void addComponentListener() {
+        if (!componentListenerAdded && (parent != null)) {
+            parent.addComponentListener(this);
+            componentListenerAdded = true;
+        }
+    }
+
+    private void removeComponentListener() {
+        if ((parent != null) && componentListenerAdded) {
+            parent.removeComponentListener(this);
+            componentListenerAdded = false;
+        }
+    }
+
+    private Component getCurrentParent() {
+        if (frame != null) {
+            return frame.getParent();
+        } else {
+            return icon.getParent();
+        }
+    }
+
+    public void componentResized(ComponentEvent e) {
+        if ((parent == null) || (parentBounds == null)) {
+            return;
+        }
+
+        Rectangle parentNewBounds = parent.getBounds();
+        if ((parentNewBounds == null) || parentNewBounds.equals(parentBounds)) {
+            return;
+        }
+
+        // Move desktop icon only in up-down direction
+        int newIconY = icon.getLocation().y +
+                (parentNewBounds.height - parentBounds.height);
+        icon.setLocation(icon.getLocation().x, newIconY);
+
+        parentBounds = parentNewBounds;
+    }
+
+    public void componentMoved(ComponentEvent e) {
+    }
+
+    public void componentShown(ComponentEvent e) {
+    }
+
+    public void componentHidden(ComponentEvent e) {
+    }
+}
--- a/jdk/src/share/classes/javax/swing/plaf/basic/DragRecognitionSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/DragRecognitionSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -73,8 +73,7 @@
      * Returns whether or not the event is potentially part of a drag sequence.
      */
     public static boolean mousePressed(MouseEvent me) {
-        return ((DragRecognitionSupport)getDragRecognitionSupport()).
-            mousePressedImpl(me);
+        return getDragRecognitionSupport().mousePressedImpl(me);
     }
 
     /**
@@ -82,16 +81,14 @@
      * that started the recognition. Otherwise, return null.
      */
     public static MouseEvent mouseReleased(MouseEvent me) {
-        return ((DragRecognitionSupport)getDragRecognitionSupport()).
-            mouseReleasedImpl(me);
+        return getDragRecognitionSupport().mouseReleasedImpl(me);
     }
 
     /**
      * Returns whether or not a drag gesture recognition is ongoing.
      */
     public static boolean mouseDragged(MouseEvent me, BeforeDrag bd) {
-        return ((DragRecognitionSupport)getDragRecognitionSupport()).
-            mouseDraggedImpl(me, bd);
+        return getDragRecognitionSupport().mouseDraggedImpl(me, bd);
     }
 
     private void clearState() {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/LazyActionMap.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/LazyActionMap.java	Wed Jul 05 16:42:37 2017 +0200
@@ -142,7 +142,7 @@
             Object loader = _loader;
 
             _loader = null;
-            Class klass = (Class)loader;
+            Class<?> klass = (Class<?>)loader;
             try {
                 Method method = klass.getDeclaredMethod("loadActionMap",
                                       new Class[] { LazyActionMap.class });
--- a/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Wed Jul 05 16:42:37 2017 +0200
@@ -387,9 +387,9 @@
          * that it is wrapped inside a <code>doPrivileged</code> call.
          */
         protected Font getPrivilegedFont(final int key) {
-            return (Font)java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                    public Object run() {
+            return java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<Font>() {
+                    public Font run() {
                         return Font.getFont(getDefaultPropertyName(key));
                     }
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalBumps.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalBumps.java	Wed Jul 05 16:42:37 2017 +0200
@@ -49,7 +49,7 @@
     protected Color shadowColor;
     protected Color backColor;
 
-    protected static Vector buffers = new Vector();
+    protected static Vector<BumpBuffer> buffers = new Vector<BumpBuffer>();
     protected BumpBuffer buffer;
 
     public MetalBumps( Dimension bumpArea ) {
@@ -81,10 +81,7 @@
         }
         BumpBuffer result = null;
 
-        Enumeration elements = buffers.elements();
-
-        while ( elements.hasMoreElements() ) {
-            BumpBuffer aBuffer = (BumpBuffer)elements.nextElement();
+        for (BumpBuffer aBuffer : buffers) {
             if ( aBuffer.hasSameConfiguration(gc, aTopColor, aShadowColor,
                                               aBackColor)) {
                 result = aBuffer;
@@ -120,8 +117,7 @@
 
     public void paintIcon( Component c, Graphics g, int x, int y ) {
         GraphicsConfiguration gc = (g instanceof Graphics2D) ?
-                                     (GraphicsConfiguration)((Graphics2D)g).
-                                     getDeviceConfiguration() : null;
+                ((Graphics2D) g).getDeviceConfiguration() : null;
 
         buffer = getBuffer(gc, topColor, shadowColor, backColor);
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -782,7 +782,7 @@
                 } else if (s.equals("componentOrientation")) {
                     ComponentOrientation o = (ComponentOrientation)e.getNewValue();
                     JFileChooser cc = (JFileChooser)e.getSource();
-                    if (o != (ComponentOrientation)e.getOldValue()) {
+                    if (o != e.getOldValue()) {
                         cc.applyComponentOrientation(o);
                     }
                 } else if (s == "FileChooser.useShellFolder") {
@@ -927,7 +927,7 @@
      * Data model for a type-face selection combo-box.
      */
     protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
-        Vector directories = new Vector();
+        Vector<File> directories = new Vector<File>();
         int[] depths = null;
         File selectedDirectory = null;
         JFileChooser chooser = getFileChooser();
@@ -966,7 +966,7 @@
             // Get the canonical (full) path. This has the side
             // benefit of removing extraneous chars from the path,
             // for example /foo/bar/ becomes /foo/bar
-            File canonical = null;
+            File canonical;
             try {
                 canonical = ShellFolder.getNormalizedFile(directory);
             } catch (IOException e) {
@@ -979,7 +979,7 @@
                 File sf = useShellFolder ? ShellFolder.getShellFolder(canonical)
                                          : canonical;
                 File f = sf;
-                Vector path = new Vector(10);
+                Vector<File> path = new Vector<File>(10);
                 do {
                     path.addElement(f);
                 } while ((f = f.getParentFile()) != null);
@@ -987,7 +987,7 @@
                 int pathCount = path.size();
                 // Insert chain at appropriate place in vector
                 for (int i = 0; i < pathCount; i++) {
-                    f = (File)path.get(i);
+                    f = path.get(i);
                     if (directories.contains(f)) {
                         int topIndex = directories.indexOf(f);
                         for (int j = i-1; j >= 0; j--) {
@@ -1006,12 +1006,12 @@
         private void calculateDepths() {
             depths = new int[directories.size()];
             for (int i = 0; i < depths.length; i++) {
-                File dir = (File)directories.get(i);
+                File dir = directories.get(i);
                 File parent = dir.getParentFile();
                 depths[i] = 0;
                 if (parent != null) {
                     for (int j = i-1; j >= 0; j--) {
-                        if (parent.equals((File)directories.get(j))) {
+                        if (parent.equals(directories.get(j))) {
                             depths[i] = depths[j] + 1;
                             break;
                         }
@@ -1110,8 +1110,8 @@
             FileFilter currentFilter = getFileChooser().getFileFilter();
             boolean found = false;
             if(currentFilter != null) {
-                for(int i=0; i < filters.length; i++) {
-                    if(filters[i] == currentFilter) {
+                for (FileFilter filter : filters) {
+                    if (filter == currentFilter) {
                         found = true;
                     }
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -598,7 +598,7 @@
             }
 
             // Some calculations that are needed more than once later on.
-            int oneHalf = (int)(iconSize / 2); // 16 -> 8
+            int oneHalf = iconSize / 2; // 16 -> 8
 
             g.translate(x, y);
 
@@ -1502,7 +1502,7 @@
 
         // PENDING: Replace this class with CachedPainter.
 
-        Vector images = new Vector(1, 1);
+        Vector<ImageGcPair> images = new Vector<ImageGcPair>(1, 1);
         ImageGcPair currentImageGcPair;
 
         class ImageGcPair {
@@ -1514,12 +1514,8 @@
             }
 
             boolean hasSameConfiguration(GraphicsConfiguration newGC) {
-                if (((newGC != null) && (newGC.equals(gc))) ||
-                    ((newGC == null) && (gc == null)))
-                {
-                    return true;
-                }
-                return false;
+                return ((newGC != null) && (newGC.equals(gc))) ||
+                        ((newGC == null) && (gc == null));
             }
 
         }
@@ -1528,9 +1524,7 @@
             if ((currentImageGcPair == null) ||
                 !(currentImageGcPair.hasSameConfiguration(newGC)))
             {
-                Enumeration elements = images.elements();
-                while (elements.hasMoreElements()) {
-                    ImageGcPair imgGcPair = (ImageGcPair)elements.nextElement();
+                for (ImageGcPair imgGcPair : images) {
                     if (imgGcPair.hasSameConfiguration(newGC)) {
                         currentImageGcPair = imgGcPair;
                         return imgGcPair.image;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -191,7 +191,7 @@
         extends BasicInternalFrameTitlePane.PropertyChangeHandler
     {
         public void propertyChange(PropertyChangeEvent evt) {
-            String prop = (String)evt.getPropertyName();
+            String prop = evt.getPropertyName();
             if( prop.equals(JInternalFrame.IS_SELECTED_PROPERTY) ) {
                 Boolean b = (Boolean)evt.getNewValue();
                 iconButton.putClientProperty("paintActive", b);
@@ -242,7 +242,7 @@
             }
 
             // Compute height.
-            int height = 0;
+            int height;
             if (isPalette) {
                 height = paletteTitleHeight;
             } else {
@@ -410,7 +410,7 @@
         g.drawLine ( width - 1, 0 , width -1, 0);
 
 
-        int titleLength = 0;
+        int titleLength;
         int xOffset = leftToRight ? 5 : width - 5;
         String frameTitle = frame.getTitle();
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -2208,9 +2208,9 @@
                 if (methodName == null) {
                     return c.newInstance();
                 }
-                Method method = (Method)AccessController.doPrivileged(
-                    new PrivilegedAction() {
-                    public Object run() {
+                Method method = AccessController.doPrivileged(
+                    new PrivilegedAction<Method>() {
+                    public Method run() {
                         Method[] methods = c.getDeclaredMethods();
                         for (int counter = methods.length - 1; counter >= 0;
                              counter--) {
@@ -2273,7 +2273,7 @@
         }
     }
 
-    static ReferenceQueue queue = new ReferenceQueue();
+    static ReferenceQueue<LookAndFeel> queue = new ReferenceQueue<LookAndFeel>();
 
     static void flushUnreferenced() {
         AATextListener aatl;
@@ -2283,7 +2283,7 @@
     }
 
     static class AATextListener
-        extends WeakReference implements PropertyChangeListener {
+        extends WeakReference<LookAndFeel> implements PropertyChangeListener {
 
         private String key = SunToolkit.DESKTOPFONTHINTS;
 
@@ -2294,7 +2294,7 @@
         }
 
         public void propertyChange(PropertyChangeEvent pce) {
-            LookAndFeel laf = (LookAndFeel)get();
+            LookAndFeel laf = get();
             if (laf == null || laf != UIManager.getLookAndFeel()) {
                 dispose();
                 return;
@@ -2318,8 +2318,8 @@
         private static void updateWindowUI(Window window) {
             SwingUtilities.updateComponentTreeUI(window);
             Window ownedWins[] = window.getOwnedWindows();
-            for (int i=0; i < ownedWins.length; i++) {
-                updateWindowUI(ownedWins[i]);
+            for (Window w : ownedWins) {
+                updateWindowUI(w);
             }
         }
 
@@ -2328,8 +2328,8 @@
          */
         private static void updateAllUIs() {
             Frame appFrames[] = Frame.getFrames();
-            for (int j=0; j < appFrames.length; j++) {
-                updateWindowUI(appFrames[j]);
+            for (Frame frame : appFrames) {
+                updateWindowUI(frame);
             }
         }
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -164,15 +164,15 @@
                 }
             } else if(model.isSelected()) {
                 if(b.isRolloverEnabled() && model.isRollover()) {
-                        altIcon = (Icon) b.getRolloverSelectedIcon();
+                        altIcon = b.getRolloverSelectedIcon();
                         if (altIcon == null) {
-                                altIcon = (Icon) b.getSelectedIcon();
+                                altIcon = b.getSelectedIcon();
                         }
                 } else {
-                        altIcon = (Icon) b.getSelectedIcon();
+                        altIcon = b.getSelectedIcon();
                 }
             } else if(b.isRolloverEnabled() && model.isRollover()) {
-                altIcon = (Icon) b.getRolloverIcon();
+                altIcon = b.getRolloverIcon();
             }
 
             if(altIcon == null) {
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -27,23 +27,13 @@
 
 import javax.swing.plaf.basic.BasicSliderUI;
 
-import java.awt.Component;
-import java.awt.Container;
 import java.awt.Graphics;
 import java.awt.Dimension;
 import java.awt.Rectangle;
-import java.awt.Point;
-import java.awt.Insets;
 import java.awt.Color;
-import java.io.Serializable;
-import java.awt.IllegalComponentStateException;
-import java.awt.Polygon;
 import java.beans.*;
 
-import javax.swing.border.AbstractBorder;
-
 import javax.swing.*;
-import javax.swing.event.*;
 import javax.swing.plaf.*;
 
 /**
@@ -131,10 +121,7 @@
 
         scrollListener.setScrollByBlock( false );
 
-        Object sliderFillProp = c.getClientProperty( SLIDER_FILL );
-        if ( sliderFillProp != null ) {
-            filledSlider = ((Boolean)sliderFillProp).booleanValue();
-        }
+        prepareFilledSliderField();
     }
 
     protected PropertyChangeListener createPropertyChangeListener( JSlider slider ) {
@@ -145,18 +132,23 @@
         public void propertyChange( PropertyChangeEvent e ) {  // listen for slider fill
             super.propertyChange( e );
 
-            String name = e.getPropertyName();
-            if ( name.equals( SLIDER_FILL ) ) {
-                if ( e.getNewValue() != null ) {
-                    filledSlider = ((Boolean)e.getNewValue()).booleanValue();
-                }
-                else {
-                    filledSlider = false;
-                }
+            if (e.getPropertyName().equals(SLIDER_FILL)) {
+                prepareFilledSliderField();
             }
         }
     }
 
+    private void prepareFilledSliderField() {
+        // Use true for Ocean theme
+        filledSlider = MetalLookAndFeel.usingOcean();
+
+        Object sliderFillProp = slider.getClientProperty(SLIDER_FILL);
+
+        if (sliderFillProp != null) {
+            filledSlider = ((Boolean) sliderFillProp).booleanValue();
+        }
+    }
+
     public void paintThumb(Graphics g)  {
         Rectangle knobBounds = thumbRect;
 
@@ -173,21 +165,10 @@
     }
 
     /**
-     * If <code>chooseFirst</code>is true, <code>c1</code> is returned,
-     * otherwise <code>c2</code>.
-     */
-    private Color chooseColor(boolean chooseFirst, Color c1, Color c2) {
-        if (chooseFirst) {
-            return c2;
-        }
-        return c1;
-    }
-
-    /**
      * Returns a rectangle enclosing the track that will be painted.
      */
     private Rectangle getPaintTrackRect() {
-        int trackLeft = 0, trackRight = 0, trackTop = 0, trackBottom = 0;
+        int trackLeft = 0, trackRight, trackTop = 0, trackBottom;
         if (slider.getOrientation() == JSlider.HORIZONTAL) {
             trackBottom = (trackRect.height - 1) - getThumbOverhang();
             trackTop = trackBottom - (getTrackWidth() - 1);
@@ -223,8 +204,8 @@
 
         int trackLeft = 0;
         int trackTop = 0;
-        int trackRight = 0;
-        int trackBottom = 0;
+        int trackRight;
+        int trackBottom;
 
         // Draw the track
         if ( slider.getOrientation() == JSlider.HORIZONTAL ) {
@@ -266,11 +247,11 @@
 
         // Draw the fill
         if ( filledSlider ) {
-            int middleOfThumb = 0;
-            int fillTop = 0;
-            int fillLeft = 0;
-            int fillBottom = 0;
-            int fillRight = 0;
+            int middleOfThumb;
+            int fillTop;
+            int fillLeft;
+            int fillBottom;
+            int fillRight;
 
             if ( slider.getOrientation() == JSlider.HORIZONTAL ) {
                 middleOfThumb = thumbRect.x + (thumbRect.width / 2);
@@ -314,8 +295,7 @@
             }
             else {
                 g.setColor( MetalLookAndFeel.getControlShadow() );
-                g.fillRect( fillLeft, fillTop,
-                            fillRight - fillLeft, trackBottom - trackTop );
+                g.fillRect(fillLeft, fillTop, fillRight - fillLeft, fillBottom - fillTop);
             }
         }
 
@@ -336,105 +316,137 @@
         int w = paintRect.width;
         int h = paintRect.height;
 
-        if (!slider.isEnabled()) {
-            g.setColor(MetalLookAndFeel.getControlShadow());
-            g.drawRect(0, 0, w - 1, h - 1);
-        }
-        else if (slider.getOrientation() == JSlider.HORIZONTAL) {
-            int middleOfThumb = thumbRect.x + (thumbRect.width / 2) -
-                                paintRect.x;
-            int fillMinX;
-            int fillMaxX;
+        if (slider.getOrientation() == JSlider.HORIZONTAL) {
+            int middleOfThumb = thumbRect.x + thumbRect.width / 2 - paintRect.x;
+
+            if (slider.isEnabled()) {
+                int fillMinX;
+                int fillMaxX;
+
+                if (middleOfThumb > 0) {
+                    g.setColor(drawInverted ? MetalLookAndFeel.getControlDarkShadow() :
+                            MetalLookAndFeel.getPrimaryControlDarkShadow());
+
+                    g.drawRect(0, 0, middleOfThumb - 1, h - 1);
+                }
+
+                if (middleOfThumb < w) {
+                    g.setColor(drawInverted ? MetalLookAndFeel.getPrimaryControlDarkShadow() :
+                            MetalLookAndFeel.getControlDarkShadow());
+
+                    g.drawRect(middleOfThumb, 0, w - middleOfThumb - 1, h - 1);
+                }
 
-            if (middleOfThumb > 0) {
-                g.setColor(chooseColor(drawInverted,
-                           MetalLookAndFeel.getPrimaryControlDarkShadow(),
-                           MetalLookAndFeel.getControlDarkShadow()));
-               g.drawRect(0, 0, middleOfThumb - 1, h - 1);
-            }
-            if (middleOfThumb < w) {
-                g.setColor(chooseColor(drawInverted,
-                           MetalLookAndFeel.getControlDarkShadow(),
-                           MetalLookAndFeel.getPrimaryControlDarkShadow()));
-                g.drawRect(middleOfThumb, 0, w - middleOfThumb - 1, h - 1);
-            }
-            g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
-            if (drawInverted) {
-                fillMinX = middleOfThumb;
-                fillMaxX = w - 2;
-                g.drawLine(1, 1, middleOfThumb, 1);
-            }
-            else {
-                fillMinX = 1;
-                fillMaxX = middleOfThumb;
-                g.drawLine(middleOfThumb, 1, w - 1, 1);
-            }
-            if (h == 6) {
-                g.setColor(MetalLookAndFeel.getWhite());
-                g.drawLine(fillMinX, 1, fillMaxX, 1);
-                g.setColor(sliderAltTrackColor);
-                g.drawLine(fillMinX, 2, fillMaxX, 2);
+                if (filledSlider) {
+                    g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
+                    if (drawInverted) {
+                        fillMinX = middleOfThumb;
+                        fillMaxX = w - 2;
+                        g.drawLine(1, 1, middleOfThumb, 1);
+                    } else {
+                        fillMinX = 1;
+                        fillMaxX = middleOfThumb;
+                        g.drawLine(middleOfThumb, 1, w - 1, 1);
+                    }
+                    if (h == 6) {
+                        g.setColor(MetalLookAndFeel.getWhite());
+                        g.drawLine(fillMinX, 1, fillMaxX, 1);
+                        g.setColor(sliderAltTrackColor);
+                        g.drawLine(fillMinX, 2, fillMaxX, 2);
+                        g.setColor(MetalLookAndFeel.getControlShadow());
+                        g.drawLine(fillMinX, 3, fillMaxX, 3);
+                        g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
+                        g.drawLine(fillMinX, 4, fillMaxX, 4);
+                    }
+                }
+            } else {
                 g.setColor(MetalLookAndFeel.getControlShadow());
-                g.drawLine(fillMinX, 3, fillMaxX, 3);
-                g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
-                g.drawLine(fillMinX, 4, fillMaxX, 4);
-            }
-        }
-        else {
-            int middleOfThumb = thumbRect.y + (thumbRect.height / 2) -
-                                paintRect.y;
-            int fillMinY;
-            int fillMaxY;
 
-            if (middleOfThumb > 0) {
-                g.setColor(chooseColor(drawInverted,
-                           MetalLookAndFeel.getControlDarkShadow(),
-                           MetalLookAndFeel.getPrimaryControlDarkShadow()));
-                g.drawRect(0, 0, w - 1, middleOfThumb - 1);
-            }
-            if (middleOfThumb < h) {
-                g.setColor(chooseColor(drawInverted,
-                           MetalLookAndFeel.getPrimaryControlDarkShadow(),
-                           MetalLookAndFeel.getControlDarkShadow()));
-                g.drawRect(0, middleOfThumb, w - 1, h - middleOfThumb - 1);
-            }
-            g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
-            if (drawInverted()) {
-                fillMinY = 1;
-                fillMaxY = middleOfThumb;
-                if (leftToRight) {
-                    g.drawLine(1, middleOfThumb, 1, h - 1);
+                if (middleOfThumb > 0) {
+                    if (!drawInverted && filledSlider) {
+                        g.fillRect(0, 0, middleOfThumb - 1, h - 1);
+                    } else {
+                        g.drawRect(0, 0, middleOfThumb - 1, h - 1);
+                    }
                 }
-                else {
-                    g.drawLine(w - 2, middleOfThumb, w - 2, h - 1);
+
+                if (middleOfThumb < w) {
+                    if (drawInverted && filledSlider) {
+                        g.fillRect(middleOfThumb, 0, w - middleOfThumb - 1, h - 1);
+                    } else {
+                        g.drawRect(middleOfThumb, 0, w - middleOfThumb - 1, h - 1);
+                    }
                 }
             }
-            else {
-                fillMinY = middleOfThumb;
-                fillMaxY = h - 2;
-                if (leftToRight) {
-                    g.drawLine(1, 1, 1, middleOfThumb);
+        } else {
+            int middleOfThumb = thumbRect.y + (thumbRect.height / 2) - paintRect.y;
+
+            if (slider.isEnabled()) {
+                int fillMinY;
+                int fillMaxY;
+
+                if (middleOfThumb > 0) {
+                    g.setColor(drawInverted ? MetalLookAndFeel.getPrimaryControlDarkShadow() :
+                            MetalLookAndFeel.getControlDarkShadow());
+
+                    g.drawRect(0, 0, w - 1, middleOfThumb - 1);
                 }
-                else {
-                    g.drawLine(w - 2, 1, w - 2, middleOfThumb);
+
+                if (middleOfThumb < h) {
+                    g.setColor(drawInverted ? MetalLookAndFeel.getControlDarkShadow() :
+                            MetalLookAndFeel.getPrimaryControlDarkShadow());
+
+                    g.drawRect(0, middleOfThumb, w - 1, h - middleOfThumb - 1);
                 }
-            }
-            if (w == 6) {
-                g.setColor(chooseColor(!leftToRight,
-                           MetalLookAndFeel.getWhite(),
-                           MetalLookAndFeel.getPrimaryControlShadow()));
-                g.drawLine(1, fillMinY, 1, fillMaxY);
-                g.setColor(chooseColor(!leftToRight, sliderAltTrackColor,
-                           MetalLookAndFeel.getControlShadow()));
-                g.drawLine(2, fillMinY, 2, fillMaxY);
-                g.setColor(chooseColor(!leftToRight,
-                           MetalLookAndFeel.getControlShadow(),
-                           sliderAltTrackColor));
-                g.drawLine(3, fillMinY, 3, fillMaxY);
-                g.setColor(chooseColor(!leftToRight,
-                           MetalLookAndFeel.getPrimaryControlShadow(),
-                           MetalLookAndFeel.getWhite()));
-                g.drawLine(4, fillMinY, 4, fillMaxY);
+
+                if (filledSlider) {
+                    g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
+                    if (drawInverted()) {
+                        fillMinY = 1;
+                        fillMaxY = middleOfThumb;
+                        if (leftToRight) {
+                            g.drawLine(1, middleOfThumb, 1, h - 1);
+                        } else {
+                            g.drawLine(w - 2, middleOfThumb, w - 2, h - 1);
+                        }
+                    } else {
+                        fillMinY = middleOfThumb;
+                        fillMaxY = h - 2;
+                        if (leftToRight) {
+                            g.drawLine(1, 1, 1, middleOfThumb);
+                        } else {
+                            g.drawLine(w - 2, 1, w - 2, middleOfThumb);
+                        }
+                    }
+                    if (w == 6) {
+                        g.setColor(leftToRight ? MetalLookAndFeel.getWhite() : MetalLookAndFeel.getPrimaryControlShadow());
+                        g.drawLine(1, fillMinY, 1, fillMaxY);
+                        g.setColor(leftToRight ? sliderAltTrackColor : MetalLookAndFeel.getControlShadow());
+                        g.drawLine(2, fillMinY, 2, fillMaxY);
+                        g.setColor(leftToRight ? MetalLookAndFeel.getControlShadow() : sliderAltTrackColor);
+                        g.drawLine(3, fillMinY, 3, fillMaxY);
+                        g.setColor(leftToRight ? MetalLookAndFeel.getPrimaryControlShadow() : MetalLookAndFeel.getWhite());
+                        g.drawLine(4, fillMinY, 4, fillMaxY);
+                    }
+                }
+            } else {
+                g.setColor(MetalLookAndFeel.getControlShadow());
+
+                if (middleOfThumb > 0) {
+                    if (drawInverted && filledSlider) {
+                        g.fillRect(0, 0, w - 1, middleOfThumb - 1);
+                    } else {
+                        g.drawRect(0, 0, w - 1, middleOfThumb - 1);
+                    }
+                }
+
+                if (middleOfThumb < h) {
+                    if (!drawInverted && filledSlider) {
+                        g.fillRect(0, middleOfThumb, w - 1, h - middleOfThumb - 1);
+                    } else {
+                        g.drawRect(0, middleOfThumb, w - 1, h - middleOfThumb - 1);
+                    }
+                }
             }
         }
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -61,7 +61,7 @@
      * instances of JToolBars and JMenuBars and is used to find
      * JToolBars/JMenuBars that border each other.
      */
-    private static java.util.List components = new ArrayList();
+    private static List<WeakReference<JComponent>> components = new ArrayList<WeakReference<JComponent>>();
 
     /**
      * This protected field is implemenation specific. Do not access directly
@@ -95,7 +95,7 @@
             // typed to throw an NPE.
             throw new NullPointerException("JComponent must be non-null");
         }
-        components.add(new WeakReference(c));
+        components.add(new WeakReference<JComponent>(c));
     }
 
     /**
@@ -105,8 +105,7 @@
         for (int counter = components.size() - 1; counter >= 0; counter--) {
             // Search for the component, removing any flushed references
             // along the way.
-            WeakReference ref = (WeakReference)components.get(counter);
-            Object target = ((WeakReference)components.get(counter)).get();
+            JComponent target = components.get(counter).get();
 
             if (target == c || target == null) {
                 components.remove(counter);
--- a/jdk/src/share/classes/javax/swing/plaf/synth/DefaultMenuLayout.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/DefaultMenuLayout.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,19 +47,22 @@
         super(target, axis);
     }
 
-    public void invalidateLayout(Container target) {
+    public Dimension preferredLayoutSize(Container target) {
         if (target instanceof JPopupMenu) {
-            SynthPopupMenuUI popupUI = (SynthPopupMenuUI)((JPopupMenu)target).
-                                  getUI();
-            popupUI.resetAlignmentHints();
+            JPopupMenu popupMenu = (JPopupMenu) target;
+
+            popupMenu.putClientProperty(
+                    SynthMenuItemLayoutHelper.MAX_ACC_OR_ARROW_WIDTH, null);
+            sun.swing.MenuItemLayoutHelper.clearUsedClientProperties(popupMenu);
+
+            if (popupMenu.getComponentCount() == 0) {
+                return new Dimension(0, 0);
+            }
         }
+
+        // Make BoxLayout recalculate cached preferred sizes
         super.invalidateLayout(target);
-    }
 
-    public Dimension preferredLayoutSize(Container target) {
-        if (target instanceof JPopupMenu && target.getComponentCount() == 0) {
-            return new Dimension(0, 0);
-        }
         return super.preferredLayoutSize(target);
     }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -63,7 +63,7 @@
     /**
      * Maps from a List (BakedArrayList to be precise) to the merged style.
      */
-    private Map _resolvedStyles;
+    private Map<BakedArrayList, SynthStyle> _resolvedStyles;
 
     /**
      * Used if there are no styles matching a widget.
@@ -74,7 +74,7 @@
     DefaultSynthStyleFactory() {
         _tmpList = new BakedArrayList(5);
         _styles = new ArrayList<StyleAssociation>();
-        _resolvedStyles = new HashMap();
+        _resolvedStyles = new HashMap<BakedArrayList, SynthStyle>();
     }
 
     public synchronized void addStyle(DefaultSynthStyle style,
@@ -138,7 +138,7 @@
      * Fetches any styles that match the passed into arguments into
      * <code>matches</code>.
      */
-    private void getMatchingStyles(java.util.List matches, JComponent c,
+    private void getMatchingStyles(List matches, JComponent c,
                                    Region id) {
         String idName = id.getLowerCaseName();
         String cName = c.getName();
@@ -166,7 +166,7 @@
     /**
      * Caches the specified style.
      */
-    private void cacheStyle(java.util.List styles, SynthStyle style) {
+    private void cacheStyle(List styles, SynthStyle style) {
         BakedArrayList cachedStyles = new BakedArrayList(styles);
 
         _resolvedStyles.put(cachedStyles, style);
@@ -175,11 +175,11 @@
     /**
      * Returns the cached style from the passed in arguments.
      */
-    private SynthStyle getCachedStyle(java.util.List styles) {
+    private SynthStyle getCachedStyle(List styles) {
         if (styles.size() == 0) {
             return null;
         }
-        return (SynthStyle)_resolvedStyles.get(styles);
+        return _resolvedStyles.get(styles);
     }
 
     /**
@@ -187,7 +187,7 @@
      * is reverse sorted, that is the most recently added style found to
      * match will be first.
      */
-    private SynthStyle mergeStyles(java.util.List styles) {
+    private SynthStyle mergeStyles(List styles) {
         int size = styles.size();
 
         if (size == 0) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/ImagePainter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/ImagePainter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -66,7 +66,7 @@
             Paint9Painter painter;
             if (cacheRef == null || (painter = cacheRef.get()) == null) {
                 painter = new Paint9Painter(30);
-                cacheRef = new WeakReference(painter);
+                cacheRef = new WeakReference<Paint9Painter>(painter);
                 AppContext.getAppContext().put(CACHE_KEY, cacheRef);
             }
             return painter;
--- a/jdk/src/share/classes/javax/swing/plaf/synth/Region.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/Region.java	Wed Jul 05 16:42:37 2017 +0200
@@ -67,8 +67,8 @@
  * @author Scott Violet
  */
 public class Region {
-    private static final Map uiToRegionMap = new HashMap();
-    private static final Map lowerCaseNameMap = new HashMap();
+    private static final Map<String, Region> uiToRegionMap = new HashMap<String, Region>();
+    private static final Map<Region, String> lowerCaseNameMap = new HashMap<Region, String>();
 
     /**
      * ArrowButton's are special types of buttons that also render a
@@ -451,15 +451,11 @@
 
 
     static Region getRegion(JComponent c) {
-        return (Region)uiToRegionMap.get(c.getUIClassID());
+        return uiToRegionMap.get(c.getUIClassID());
     }
 
     static void registerUIs(UIDefaults table) {
-        Iterator uis = uiToRegionMap.keySet().iterator();
-
-        while (uis.hasNext()) {
-            Object key = uis.next();
-
+        for (String key : uiToRegionMap.keySet()) {
             table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel");
         }
     }
@@ -521,7 +517,7 @@
      */
     String getLowerCaseName() {
         synchronized(lowerCaseNameMap) {
-            String lowerCaseName = (String)lowerCaseNameMap.get(this);
+            String lowerCaseName = lowerCaseNameMap.get(this);
             if (lowerCaseName == null) {
                 lowerCaseName = getName().toLowerCase();
                 lowerCaseNameMap.put(this, lowerCaseName);
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -262,7 +262,7 @@
      * Returns the default icon. This should NOT callback
      * to the JComponent.
      *
-     * @param b AbstractButton the iocn is associated with
+     * @param b AbstractButton the icon is associated with
      * @return default icon
      */
 
@@ -445,9 +445,7 @@
      * Returns the Icon used in calculating the pref/min/max size.
      */
     protected Icon getSizingIcon(AbstractButton b) {
-        // NOTE: this is slightly different than BasicButtonUI, where it
-        // would just use getIcon, but this should be ok.
-        Icon icon = (b.isEnabled()) ? b.getIcon() : b.getDisabledIcon();
+        Icon icon = getEnabledIcon(b, b.getIcon());
         if (icon == null) {
             icon = getDefaultIcon(b);
         }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -336,7 +336,7 @@
                     return oldValue;
                 } else {
                     // Must take the value from the editor and get the value and cast it to the new type.
-                    Class cls = oldValue.getClass();
+                    Class<?> cls = oldValue.getClass();
                     try {
                         Method method = cls.getMethod("valueOf", new Class[]{String.class});
                         newValue = method.invoke(oldValue, new Object[] { editor.getText()});
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthContext.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthContext.java	Wed Jul 05 16:42:37 2017 +0200
@@ -39,7 +39,7 @@
  * @author Scott Violet
  */
 public class SynthContext {
-    private static final Map contextMap;
+    private static final Map<Class, List<SynthContext>> contextMap;
 
     private JComponent component;
     private Region region;
@@ -48,7 +48,7 @@
 
 
     static {
-        contextMap = new HashMap();
+        contextMap = new HashMap<Class, List<SynthContext>>();
     }
 
 
@@ -58,13 +58,13 @@
         SynthContext context = null;
 
         synchronized(contextMap) {
-            java.util.List instances = (java.util.List)contextMap.get(type);
+            List<SynthContext> instances = contextMap.get(type);
 
             if (instances != null) {
                 int size = instances.size();
 
                 if (size > 0) {
-                    context = (SynthContext)instances.remove(size - 1);
+                    context = instances.remove(size - 1);
                 }
             }
         }
@@ -81,11 +81,10 @@
 
     static void releaseContext(SynthContext context) {
         synchronized(contextMap) {
-            java.util.List instances = (java.util.List)contextMap.get(
-                                       context.getClass());
+            List<SynthContext> instances = contextMap.get(context.getClass());
 
             if (instances == null) {
-                instances = new ArrayList(5);
+                instances = new ArrayList<SynthContext>(5);
                 contextMap.put(context.getClass(), instances);
             }
             instances.add(context);
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -45,8 +45,8 @@
      * I would prefer to use UIResource instad of this.
      * Unfortunately Boolean is a final class
      */
-    private Boolean localTrue = new Boolean(true);
-    private Boolean localFalse = new Boolean(false);
+    private Boolean localTrue = Boolean.TRUE;
+    private Boolean localFalse = Boolean.FALSE;
 
     /**
      * Creates a UI for the JTextPane.
@@ -69,7 +69,7 @@
             c.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,
                                 localTrue);
         }
-        updateStyle((JTextComponent)getComponent());
+        updateStyle(getComponent());
     }
 
     protected void uninstallDefaults() {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 package javax.swing.plaf.synth;
 
 import sun.swing.SwingUtilities2;
+import sun.swing.MenuItemLayoutHelper;
+
 import java.awt.*;
 import javax.swing.*;
 import javax.swing.plaf.basic.BasicHTML;
@@ -411,12 +413,204 @@
     }
 
 
+     /**
+      * A quick note about how preferred sizes are calculated... Generally
+      * speaking, SynthPopupMenuUI will run through the list of its children
+      * (from top to bottom) and ask each for its preferred size.  Each menu
+      * item will add up the max width of each element (icons, text,
+      * accelerator spacing, accelerator text or arrow icon) encountered thus
+      * far, so by the time all menu items have been calculated, we will
+      * know the maximum (preferred) menu item size for that popup menu.
+      * Later when it comes time to paint each menu item, we can use those
+      * same accumulated max element sizes in order to layout the item.
+      */
+    static Dimension getPreferredMenuItemSize(SynthContext context,
+           SynthContext accContext, JComponent c,
+           Icon checkIcon, Icon arrowIcon, int defaultTextIconGap,
+           String acceleratorDelimiter, boolean useCheckAndArrow,
+           String propertyPrefix) {
+
+         JMenuItem mi = (JMenuItem) c;
+         SynthMenuItemLayoutHelper lh = new SynthMenuItemLayoutHelper(
+                 context, accContext, mi, checkIcon, arrowIcon,
+                 MenuItemLayoutHelper.createMaxRect(), defaultTextIconGap,
+                 acceleratorDelimiter, SynthLookAndFeel.isLeftToRight(mi),
+                 useCheckAndArrow, propertyPrefix);
+
+         Dimension result = new Dimension();
+
+         // Calculate the result width
+         int gap = lh.getGap();
+         result.width = 0;
+         MenuItemLayoutHelper.addMaxWidth(lh.getCheckSize(), gap, result);
+         MenuItemLayoutHelper.addMaxWidth(lh.getLabelSize(), gap, result);
+         MenuItemLayoutHelper.addWidth(lh.getMaxAccOrArrowWidth(), 5 * gap, result);
+         // The last gap is unnecessary
+         result.width -= gap;
+
+         // Calculate the result height
+         result.height = MenuItemLayoutHelper.max(lh.getCheckSize().getHeight(),
+                 lh.getLabelSize().getHeight(), lh.getAccSize().getHeight(),
+                 lh.getArrowSize().getHeight());
+
+         // Take into account menu item insets
+         Insets insets = lh.getMenuItem().getInsets();
+         if (insets != null) {
+             result.width += insets.left + insets.right;
+             result.height += insets.top + insets.bottom;
+         }
+
+         // if the width is even, bump it up one. This is critical
+         // for the focus dash lhne to draw properly
+         if (result.width % 2 == 0) {
+             result.width++;
+         }
+
+         // if the height is even, bump it up one. This is critical
+         // for the text to center properly
+         if (result.height % 2 == 0) {
+             result.height++;
+         }
+
+         return result;
+     }
+
+    static void applyInsets(Rectangle rect, Insets insets) {
+        if (insets != null) {
+            rect.x += insets.left;
+            rect.y += insets.top;
+            rect.width -= (insets.right + rect.x);
+            rect.height -= (insets.bottom + rect.y);
+        }
+    }
+
+    static void paint(SynthContext context, SynthContext accContext, Graphics g,
+               Icon checkIcon, Icon arrowIcon, String acceleratorDelimiter,
+               int defaultTextIconGap, String propertyPrefix) {
+        JMenuItem mi = (JMenuItem) context.getComponent();
+        SynthStyle style = context.getStyle();
+        g.setFont(style.getFont(context));
+
+        Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
+        applyInsets(viewRect, mi.getInsets());
+
+        SynthMenuItemLayoutHelper lh = new SynthMenuItemLayoutHelper(
+                context, accContext, mi, checkIcon,
+                arrowIcon, viewRect, defaultTextIconGap, acceleratorDelimiter,
+                SynthLookAndFeel.isLeftToRight(mi),
+                MenuItemLayoutHelper.useCheckAndArrow(mi), propertyPrefix);
+        MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
+
+        paintMenuItem(g, lh, lr);
+    }
+
+    static void paintMenuItem(Graphics g, SynthMenuItemLayoutHelper lh,
+                              MenuItemLayoutHelper.LayoutResult lr) {
+        // Save original graphics font and color
+        Font holdf = g.getFont();
+        Color holdc = g.getColor();
+
+        paintBackground(g, lh);
+        paintCheckIcon(g, lh, lr);
+        paintIcon(g, lh, lr);
+        paintText(g, lh, lr);
+        paintAccText(g, lh, lr);
+        paintArrowIcon(g, lh, lr);
+
+        // Restore original graphics font and color
+        g.setColor(holdc);
+        g.setFont(holdf);
+    }
+
+    static void paintBackground(Graphics g, SynthMenuItemLayoutHelper lh) {
+        paintBackground(lh.getContext(), g, lh.getMenuItem());
+    }
+
+    static void paintBackground(SynthContext context, Graphics g, JComponent c) {
+        context.getPainter().paintMenuItemBackground(context, g, 0, 0,
+                c.getWidth(), c.getHeight());
+    }
+
+    static void paintIcon(Graphics g, SynthMenuItemLayoutHelper lh,
+                          MenuItemLayoutHelper.LayoutResult lr) {
+        if (lh.getIcon() != null) {
+            Icon icon;
+            JMenuItem mi = lh.getMenuItem();
+            ButtonModel model = mi.getModel();
+            if (!model.isEnabled()) {
+                icon = mi.getDisabledIcon();
+            } else if (model.isPressed() && model.isArmed()) {
+                icon = mi.getPressedIcon();
+                if (icon == null) {
+                    // Use default icon
+                    icon = mi.getIcon();
+                }
+            } else {
+                icon = mi.getIcon();
+            }
+
+            if (icon != null) {
+                Rectangle iconRect = lr.getIconRect();
+                SynthIcon.paintIcon(icon, lh.getContext(), g, iconRect.x,
+                        iconRect.y, iconRect.width, iconRect.height);
+            }
+        }
+    }
+
+    static void paintCheckIcon(Graphics g, SynthMenuItemLayoutHelper lh,
+                               MenuItemLayoutHelper.LayoutResult lr) {
+        if (lh.getCheckIcon() != null) {
+            Rectangle checkRect = lr.getCheckRect();
+            SynthIcon.paintIcon(lh.getCheckIcon(), lh.getContext(), g,
+                    checkRect.x, checkRect.y, checkRect.width, checkRect.height);
+        }
+    }
+
+    static void paintAccText(Graphics g, SynthMenuItemLayoutHelper lh,
+                             MenuItemLayoutHelper.LayoutResult lr) {
+        String accText = lh.getAccText();
+        if (accText != null && !accText.equals("")) {
+            g.setColor(lh.getAccStyle().getColor(lh.getAccContext(),
+                    ColorType.TEXT_FOREGROUND));
+            g.setFont(lh.getAccStyle().getFont(lh.getAccContext()));
+            lh.getAccGraphicsUtils().paintText(lh.getAccContext(), g, accText,
+                    lr.getAccRect().x, lr.getAccRect().y, -1);
+        }
+    }
+
+    static void paintText(Graphics g, SynthMenuItemLayoutHelper lh,
+                          MenuItemLayoutHelper.LayoutResult lr) {
+        if (!lh.getText().equals("")) {
+            if (lh.getHtmlView() != null) {
+                // Text is HTML
+                lh.getHtmlView().paint(g, lr.getTextRect());
+            } else {
+                // Text isn't HTML
+                g.setColor(lh.getStyle().getColor(
+                        lh.getContext(), ColorType.TEXT_FOREGROUND));
+                g.setFont(lh.getStyle().getFont(lh.getContext()));
+                lh.getGraphicsUtils().paintText(lh.getContext(), g, lh.getText(),
+                        lr.getTextRect().x, lr.getTextRect().y,
+                        lh.getMenuItem().getDisplayedMnemonicIndex());
+            }
+        }
+    }
+
+    static void paintArrowIcon(Graphics g, SynthMenuItemLayoutHelper lh,
+                               MenuItemLayoutHelper.LayoutResult lr) {
+        if (lh.getArrowIcon() != null) {
+            Rectangle arrowRect = lr.getArrowRect();
+            SynthIcon.paintIcon(lh.getArrowIcon(), lh.getContext(), g,
+                    arrowRect.x, arrowRect.y, arrowRect.width, arrowRect.height);
+        }
+    }
+
     /**
      * Wraps a SynthIcon around the Icon interface, forwarding calls to
      * the SynthIcon with a given SynthContext.
      */
     private static class SynthIconWrapper implements Icon {
-        private static final java.util.List CACHE = new java.util.ArrayList(1);
+        private static final java.util.List<SynthIconWrapper> CACHE = new java.util.ArrayList<SynthIconWrapper>(1);
 
         private SynthIcon synthIcon;
         private SynthContext context;
@@ -425,8 +619,7 @@
             synchronized(CACHE) {
                 int size = CACHE.size();
                 if (size > 0) {
-                    SynthIconWrapper wrapper = (SynthIconWrapper)CACHE.remove(
-                                               size - 1);
+                    SynthIconWrapper wrapper = CACHE.remove(size - 1);
                     wrapper.reset(icon, context);
                     return wrapper;
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -197,25 +197,25 @@
 
     protected void addSystemMenuItems(JPopupMenu menu) {
         // PENDING: this should all be localizable!
-        JMenuItem mi = (JMenuItem)menu.add(restoreAction);
+        JMenuItem mi = menu.add(restoreAction);
         mi.setMnemonic('R');
-        mi = (JMenuItem)menu.add(moveAction);
+        mi = menu.add(moveAction);
         mi.setMnemonic('M');
-        mi = (JMenuItem)menu.add(sizeAction);
+        mi = menu.add(sizeAction);
         mi.setMnemonic('S');
-        mi = (JMenuItem)menu.add(iconifyAction);
+        mi = menu.add(iconifyAction);
         mi.setMnemonic('n');
-        mi = (JMenuItem)menu.add(maximizeAction);
+        mi = menu.add(maximizeAction);
         mi.setMnemonic('x');
         menu.add(new JSeparator());
-        mi = (JMenuItem)menu.add(closeAction);
+        mi = menu.add(closeAction);
         mi.setMnemonic('C');
     }
 
     protected void showSystemMenu() {
         Insets insets = frame.getInsets();
         if (!frame.isIcon()) {
-            systemPopupMenu.show(frame, insets.left, getY() + getHeight());
+            systemPopupMenu.show(frame, menuButton.getX(), getY() + getHeight());
         } else {
             systemPopupMenu.show(menuButton,
                 getX() - insets.left - insets.right,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -107,7 +107,7 @@
      * Map of defaults table entries. This is populated via the load
      * method.
      */
-    private Map defaultsMap;
+    private Map<String, Object> defaultsMap;
 
     private Handler _handler;
 
@@ -308,8 +308,8 @@
             children = ((Container)c).getComponents();
         }
         if (children != null) {
-            for(int i = 0; i < children.length; i++) {
-                updateStyles(children[i]);
+            for (Component child : children) {
+                updateStyles(child);
             }
         }
     }
@@ -581,7 +581,7 @@
         }
 
         if (defaultsMap == null) {
-            defaultsMap = new HashMap();
+            defaultsMap = new HashMap<String, Object>();
         }
 
         new SynthParser().parse(input, (DefaultSynthStyleFactory) factory,
@@ -611,7 +611,7 @@
         }
 
         if (defaultsMap == null) {
-            defaultsMap = new HashMap();
+            defaultsMap = new HashMap<String, Object>();
         }
 
         InputStream input = url.openStream();
@@ -771,7 +771,7 @@
      */
     private static Object getAATextInfo() {
         String language = Locale.getDefault().getLanguage();
-        String desktop = (String)
+        String desktop =
             AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
 
         boolean isCjkLocale = (Locale.CHINESE.getLanguage().equals(language) ||
@@ -786,7 +786,7 @@
         return aaTextInfo;
     }
 
-    private static ReferenceQueue queue = new ReferenceQueue();
+    private static ReferenceQueue<LookAndFeel> queue = new ReferenceQueue<LookAndFeel>();
 
     private static void flushUnreferenced() {
         AATextListener aatl;
@@ -796,7 +796,7 @@
     }
 
     private static class AATextListener
-        extends WeakReference implements PropertyChangeListener {
+        extends WeakReference<LookAndFeel> implements PropertyChangeListener {
         private String key = SunToolkit.DESKTOPFONTHINTS;
 
         AATextListener(LookAndFeel laf) {
@@ -812,7 +812,7 @@
                 return;
             }
 
-            LookAndFeel laf = (LookAndFeel) get();
+            LookAndFeel laf = get();
             if (laf == null || laf != UIManager.getLookAndFeel()) {
                 dispose();
                 return;
@@ -835,8 +835,8 @@
         private static void updateWindowUI(Window window) {
             updateStyles(window);
             Window ownedWins[] = window.getOwnedWindows();
-            for (int i = 0; i < ownedWins.length; i++) {
-                updateWindowUI(ownedWins[i]);
+            for (Window w : ownedWins) {
+                updateWindowUI(w);
             }
         }
 
@@ -845,8 +845,8 @@
          */
         private static void updateAllUIs() {
             Frame appFrames[] = Frame.getFrames();
-            for (int i = 0; i < appFrames.length; i++) {
-                updateWindowUI(appFrames[i]);
+            for (Frame frame : appFrames) {
+                updateWindowUI(frame);
             }
         }
 
@@ -909,7 +909,7 @@
                 // register it on the new one.
                 KeyboardFocusManager manager =
                     (KeyboardFocusManager)evt.getSource();
-                if (((Boolean)newValue).equals(Boolean.FALSE)) {
+                if (newValue.equals(Boolean.FALSE)) {
                     manager.removePropertyChangeListener(_handler);
                 }
                 else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuItemLayoutHelper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,308 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing.plaf.synth;
+
+import sun.swing.StringUIClientPropertyKey;
+import sun.swing.MenuItemLayoutHelper;
+import sun.swing.plaf.synth.SynthIcon;
+
+import javax.swing.*;
+import javax.swing.text.View;
+import java.awt.*;
+
+/**
+ * Calculates preferred size and layouts synth menu items.
+ *
+ * All JMenuItems (and JMenus) include enough space for the insets
+ * plus one or more elements.  When we say "label" below, we mean
+ * "icon and/or text."
+ *
+ * Cases to consider for SynthMenuItemUI (visualized here in a
+ * LTR orientation; the RTL case would be reversed):
+ *                   label
+ *      check icon + label
+ *      check icon + label + accelerator
+ *                   label + accelerator
+ *
+ * Cases to consider for SynthMenuUI (again visualized here in a
+ * LTR orientation):
+ *                   label + arrow
+ *
+ * Note that in the above scenarios, accelerator and arrow icon are
+ * mutually exclusive.  This means that if a popup menu contains a mix
+ * of JMenus and JMenuItems, we only need to allow enough space for
+ * max(maxAccelerator, maxArrow), and both accelerators and arrow icons
+ * can occupy the same "column" of space in the menu.
+ */
+class SynthMenuItemLayoutHelper extends MenuItemLayoutHelper {
+
+    public static final StringUIClientPropertyKey MAX_ACC_OR_ARROW_WIDTH =
+            new StringUIClientPropertyKey("maxAccOrArrowWidth");
+
+    public static final ColumnAlignment LTR_ALIGNMENT_1 =
+            new ColumnAlignment(
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT
+            );
+    public static final ColumnAlignment LTR_ALIGNMENT_2 =
+            new ColumnAlignment(
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT,
+                    SwingConstants.RIGHT
+            );
+    public static final ColumnAlignment RTL_ALIGNMENT_1 =
+            new ColumnAlignment(
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.LEFT,
+                    SwingConstants.LEFT
+            );
+    public static final ColumnAlignment RTL_ALIGNMENT_2 =
+            new ColumnAlignment(
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.RIGHT,
+                    SwingConstants.LEFT
+            );
+
+    private SynthContext context;
+    private SynthContext accContext;
+    private SynthStyle style;
+    private SynthStyle accStyle;
+    private SynthGraphicsUtils gu;
+    private SynthGraphicsUtils accGu;
+    private boolean alignAcceleratorText;
+    private int maxAccOrArrowWidth;
+
+    public SynthMenuItemLayoutHelper(SynthContext context, SynthContext accContext,
+                                     JMenuItem mi, Icon checkIcon, Icon arrowIcon,
+                                     Rectangle viewRect, int gap, String accDelimiter,
+                                     boolean isLeftToRight, boolean useCheckAndArrow,
+                                     String propertyPrefix) {
+        this.context = context;
+        this.accContext = accContext;
+        this.style = context.getStyle();
+        this.accStyle = accContext.getStyle();
+        this.gu = style.getGraphicsUtils(context);
+        this.accGu = accStyle.getGraphicsUtils(accContext);
+        this.alignAcceleratorText = getAlignAcceleratorText(propertyPrefix);
+        reset(mi, checkIcon, arrowIcon, viewRect, gap, accDelimiter,
+              isLeftToRight, style.getFont(context), accStyle.getFont(accContext),
+              useCheckAndArrow, propertyPrefix);
+        setLeadingGap(0);
+    }
+
+    private boolean getAlignAcceleratorText(String propertyPrefix) {
+        return style.getBoolean(context,
+                propertyPrefix + ".alignAcceleratorText", true);
+    }
+
+    protected void calcWidthsAndHeights() {
+        // iconRect
+        if (getIcon() != null) {
+            getIconSize().setWidth(SynthIcon.getIconWidth(getIcon(), context));
+            getIconSize().setHeight(SynthIcon.getIconHeight(getIcon(), context));
+        }
+
+        // accRect
+        if (!getAccText().equals("")) {
+             getAccSize().setWidth(accGu.computeStringWidth(getAccContext(),
+                    getAccFontMetrics().getFont(), getAccFontMetrics(),
+                    getAccText()));
+            getAccSize().setHeight(getAccFontMetrics().getHeight());
+        }
+
+        // textRect
+        if (getText() == null) {
+            setText("");
+        } else if (!getText().equals("")) {
+            if (getHtmlView() != null) {
+                // Text is HTML
+                getTextSize().setWidth(
+                        (int) getHtmlView().getPreferredSpan(View.X_AXIS));
+                getTextSize().setHeight(
+                        (int) getHtmlView().getPreferredSpan(View.Y_AXIS));
+            } else {
+                // Text isn't HTML
+                getTextSize().setWidth(gu.computeStringWidth(context,
+                        getFontMetrics().getFont(), getFontMetrics(),
+                        getText()));
+                getTextSize().setHeight(getFontMetrics().getHeight());
+            }
+        }
+
+        if (useCheckAndArrow()) {
+            // checkIcon
+            if (getCheckIcon() != null) {
+                getCheckSize().setWidth(
+                        SynthIcon.getIconWidth(getCheckIcon(), context));
+                getCheckSize().setHeight(
+                        SynthIcon.getIconHeight(getCheckIcon(), context));
+            }
+            // arrowRect
+            if (getArrowIcon() != null) {
+                getArrowSize().setWidth(
+                        SynthIcon.getIconWidth(getArrowIcon(), context));
+                getArrowSize().setHeight(
+                        SynthIcon.getIconHeight(getArrowIcon(), context));
+            }
+        }
+
+        // labelRect
+        if (isColumnLayout()) {
+            getLabelSize().setWidth(getIconSize().getWidth()
+                    + getTextSize().getWidth() + getGap());
+            getLabelSize().setHeight(MenuItemLayoutHelper.max(
+                    getCheckSize().getHeight(),
+                    getIconSize().getHeight(),
+                    getTextSize().getHeight(),
+                    getAccSize().getHeight(),
+                    getArrowSize().getHeight()));
+        } else {
+            Rectangle textRect = new Rectangle();
+            Rectangle iconRect = new Rectangle();
+            gu.layoutText(context, getFontMetrics(), getText(), getIcon(),
+                    getHorizontalAlignment(), getVerticalAlignment(),
+                    getHorizontalTextPosition(), getVerticalTextPosition(),
+                    getViewRect(), iconRect, textRect, getGap());
+            textRect.width += getLeftTextExtraWidth() + getRightTextExtraWidth();
+            Rectangle labelRect = iconRect.union(textRect);
+            getLabelSize().setHeight(labelRect.height);
+            getLabelSize().setWidth(labelRect.width);
+        }
+    }
+
+    protected void calcMaxWidths() {
+        calcMaxWidth(getCheckSize(), MAX_CHECK_WIDTH);
+        maxAccOrArrowWidth =
+                calcMaxValue(MAX_ACC_OR_ARROW_WIDTH, getArrowSize().getWidth());
+        maxAccOrArrowWidth =
+                calcMaxValue(MAX_ACC_OR_ARROW_WIDTH, getAccSize().getWidth());
+
+        if (isColumnLayout()) {
+            calcMaxWidth(getIconSize(), MAX_ICON_WIDTH);
+            calcMaxWidth(getTextSize(), MAX_TEXT_WIDTH);
+            int curGap = getGap();
+            if ((getIconSize().getMaxWidth() == 0)
+                    || (getTextSize().getMaxWidth() == 0)) {
+                curGap = 0;
+            }
+            getLabelSize().setMaxWidth(
+                    calcMaxValue(MAX_LABEL_WIDTH, getIconSize().getMaxWidth()
+                            + getTextSize().getMaxWidth() + curGap));
+        } else {
+            // We shouldn't use current icon and text widths
+            // in maximal widths calculation for complex layout.
+            getIconSize().setMaxWidth(getParentIntProperty(
+                    MAX_ICON_WIDTH));
+            calcMaxWidth(getLabelSize(), MAX_LABEL_WIDTH);
+            // If maxLabelWidth is wider
+            // than the widest icon + the widest text + gap,
+            // we should update the maximal text witdh
+            int candidateTextWidth = getLabelSize().getMaxWidth() -
+                    getIconSize().getMaxWidth();
+            if (getIconSize().getMaxWidth() > 0) {
+                candidateTextWidth -= getGap();
+            }
+            getTextSize().setMaxWidth(calcMaxValue(
+                    MAX_TEXT_WIDTH, candidateTextWidth));
+        }
+    }
+
+    public SynthContext getContext() {
+        return context;
+    }
+
+    public SynthContext getAccContext() {
+        return accContext;
+    }
+
+    public SynthStyle getStyle() {
+        return style;
+    }
+
+    public SynthStyle getAccStyle() {
+        return accStyle;
+    }
+
+    public SynthGraphicsUtils getGraphicsUtils() {
+        return gu;
+    }
+
+    public SynthGraphicsUtils getAccGraphicsUtils() {
+        return accGu;
+    }
+
+    public boolean alignAcceleratorText() {
+        return alignAcceleratorText;
+    }
+
+    public int getMaxAccOrArrowWidth() {
+        return maxAccOrArrowWidth;
+    }
+
+    protected void prepareForLayout(LayoutResult lr) {
+        lr.getCheckRect().width = getCheckSize().getMaxWidth();
+        // An item can have an arrow or a check icon at once
+        if (useCheckAndArrow() && (!"".equals(getAccText()))) {
+            lr.getAccRect().width = maxAccOrArrowWidth;
+        } else {
+            lr.getArrowRect().width = maxAccOrArrowWidth;
+        }
+    }
+
+    public ColumnAlignment getLTRColumnAlignment() {
+        if (alignAcceleratorText()) {
+            return LTR_ALIGNMENT_2;
+        } else {
+            return LTR_ALIGNMENT_1;
+        }
+    }
+
+    public ColumnAlignment getRTLColumnAlignment() {
+        if (alignAcceleratorText()) {
+            return RTL_ALIGNMENT_2;
+        } else {
+            return RTL_ALIGNMENT_1;
+        }
+    }
+
+    protected void layoutIconAndTextInLabelRect(LayoutResult lr) {
+        lr.setTextRect(new Rectangle());
+        lr.setIconRect(new Rectangle());
+        gu.layoutText(context, getFontMetrics(), getText(), getIcon(),
+                getHorizontalAlignment(), getVerticalAlignment(),
+                getHorizontalTextPosition(), getVerticalTextPosition(),
+                lr.getLabelRect(), lr.getIconRect(), lr.getTextRect(), getGap());
+    }
+}
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuItemUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuItemUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 import javax.swing.plaf.basic.*;
 import javax.swing.text.View;
 import sun.swing.plaf.synth.*;
-import sun.swing.SwingUtilities2;
+import sun.swing.MenuItemLayoutHelper;
 
 
 /**
@@ -59,542 +59,16 @@
         return new SynthMenuItemUI();
     }
 
-    //
-    // The next handful of static methods are used by both SynthMenuUI
-    // and SynthMenuItemUI. This is necessitated by SynthMenuUI not
-    // extending SynthMenuItemUI.
-    //
-
-    /*
-     * All JMenuItems (and JMenus) include enough space for the insets
-     * plus one or more elements.  When we say "icon(s)" below, we mean
-     * "check/radio indicator and/or user icon."  If both are defined for
-     * a given menu item, then in a LTR orientation the check/radio indicator
-     * is on the left side followed by the user icon to the right; it is
-     * just the opposite in a RTL orientation.
-     *
-     * Cases to consider for SynthMenuItemUI (visualized here in a
-     * LTR orientation; the RTL case would be reversed):
-     *                text
-     *      icon(s) + text
-     *      icon(s) + text + accelerator
-     *                text + accelerator
-     *
-     * Cases to consider for SynthMenuUI (again visualized here in a
-     * LTR orientation):
-     *                text       + arrow
-     *   (user)icon + text       + arrow
-     *
-     * Note that in the above scenarios, accelerator and arrow icon are
-     * mutually exclusive.  This means that if a popup menu contains a mix
-     * of JMenus and JMenuItems, we only need to allow enough space for
-     * max(maxAccelerator, maxArrow), and both accelerators and arrow icons
-     * can occupy the same "column" of space in the menu.
-     *
-     * A quick note about how preferred sizes are calculated... Generally
-     * speaking, SynthPopupMenuUI will run through the list of its children
-     * (from top to bottom) and ask each for its preferred size.  Each menu
-     * item will add up the max width of each element (icons, text,
-     * accelerator spacing, accelerator text or arrow icon) encountered thus
-     * far, so by the time all menu items have been calculated, we will
-     * know the maximum (preferred) menu item size for that popup menu.
-     * Later when it comes time to paint each menu item, we can use those
-     * same accumulated max element sizes in order to layout the item.
-     */
-    static Dimension getPreferredMenuItemSize(SynthContext context,
-           SynthContext accContext, JComponent c,
-           Icon checkIcon, Icon arrowIcon, int defaultTextIconGap,
-           String acceleratorDelimiter) {
-        JMenuItem b = (JMenuItem) c;
-        Icon icon = (Icon) b.getIcon();
-        String text = b.getText();
-        KeyStroke accelerator =  b.getAccelerator();
-        String acceleratorText = "";
-
-        if (accelerator != null) {
-            int modifiers = accelerator.getModifiers();
-            if (modifiers > 0) {
-                acceleratorText = KeyEvent.getKeyModifiersText(modifiers);
-                acceleratorText += acceleratorDelimiter;
-            }
-            int keyCode = accelerator.getKeyCode();
-            if (keyCode != 0) {
-                acceleratorText += KeyEvent.getKeyText(keyCode);
-            } else {
-                acceleratorText += accelerator.getKeyChar();
-            }
-        }
-
-        Font font = context.getStyle().getFont(context);
-        FontMetrics fm = b.getFontMetrics(font);
-        FontMetrics fmAccel = b.getFontMetrics(accContext.getStyle().
-                                               getFont(accContext));
-
-        resetRects();
-
-        layoutMenuItem(
-                  context, fm, accContext, text, fmAccel, acceleratorText,
-                  icon, checkIcon, arrowIcon, b.getVerticalAlignment(),
-                  b.getHorizontalAlignment(), b.getVerticalTextPosition(),
-                  b.getHorizontalTextPosition(), viewRect, iconRect, textRect,
-                  acceleratorRect, checkIconRect, arrowIconRect,
-                  text == null ? 0 : defaultTextIconGap, defaultTextIconGap);
-
-        r.setBounds(textRect);
-
-        int totalIconWidth = 0;
-        int maxIconHeight = 0;
-        if (icon != null) {
-            // Add in the user icon
-            totalIconWidth += iconRect.width;
-            if (textRect.width > 0) {
-                // Allow for some room between the user icon and the text
-                totalIconWidth += defaultTextIconGap;
-            }
-            maxIconHeight = Math.max(iconRect.height, maxIconHeight);
-        }
-        if (checkIcon != null) {
-            // Add in the checkIcon
-            totalIconWidth += checkIconRect.width;
-            if (textRect.width > 0 || icon != null) {
-                // Allow for some room between the check/radio indicator
-                // and the text (or user icon, if both are specified)
-                totalIconWidth += defaultTextIconGap;
-            }
-            maxIconHeight = Math.max(checkIconRect.height, maxIconHeight);
-        }
-
-        int arrowWidth = 0;
-        if (arrowIcon != null) {
-            // Add in the arrowIcon
-            arrowWidth += defaultTextIconGap;
-            arrowWidth += arrowIconRect.width;
-            maxIconHeight = Math.max(arrowIconRect.height, maxIconHeight);
-        }
-
-        int accelSpacing = 0;
-        if (acceleratorRect.width > 0) {
-            // Allow for some room between the text and the accelerator
-            accelSpacing += 4*defaultTextIconGap;
-        }
-
-        // Take text and all icons into account when determining height
-        r.height = Math.max(r.height, maxIconHeight);
-
-        // To make the accelerator texts appear in a column,
-        // find the widest MenuItem text and the widest accelerator text.
-
-        // Get the parent, which stores the information.
-        Container parent = b.getParent();
-
-        if (parent instanceof JPopupMenu) {
-            SynthPopupMenuUI popupUI = (SynthPopupMenuUI)SynthLookAndFeel.
-                             getUIOfType(((JPopupMenu)parent).getUI(),
-                                         SynthPopupMenuUI.class);
-
-            if (popupUI != null) {
-                // This gives us the widest MenuItem text encountered thus
-                // far in the parent JPopupMenu
-                r.width = popupUI.adjustTextWidth(r.width);
-
-                // Add in the widest icon (includes both user and
-                // check/radio icons) encountered thus far
-                r.width += popupUI.adjustIconWidth(totalIconWidth);
-
-                // Add in the widest text/accelerator spacing
-                // encountered thus far
-                r.width += popupUI.adjustAccelSpacingWidth(accelSpacing);
-
-                // Add in the widest accelerator text (or arrow)
-                // encountered thus far (at least one of these values
-                // will always be zero, so we combine them here to
-                // avoid double counting)
-                int totalAccelOrArrow = acceleratorRect.width + arrowWidth;
-                r.width += popupUI.adjustAcceleratorWidth(totalAccelOrArrow);
-            }
-        }
-        else if (parent != null && !(b instanceof JMenu &&
-                                     ((JMenu)b).isTopLevelMenu())) {
-            r.width +=
-                totalIconWidth + accelSpacing +
-                acceleratorRect.width + arrowWidth;
-        }
-
-        Insets insets = b.getInsets();
-        if(insets != null) {
-            r.width += insets.left + insets.right;
-            r.height += insets.top + insets.bottom;
-        }
-
-        // if the width is even, bump it up one. This is critical
-        // for the focus dash line to draw properly
-        if(r.width%2 == 0) {
-            r.width++;
-        }
-
-        // if the height is even, bump it up one. This is critical
-        // for the text to center properly
-        if(r.height%2 == 0) {
-            r.height++;
-        }
-        return r.getSize();
-    }
-
-    static void paint(SynthContext context, SynthContext accContext,
-                      Graphics g, Icon checkIcon, Icon arrowIcon,
-                      String acceleratorDelimiter,
-                      int defaultTextIconGap) {
-        JComponent c = context.getComponent();
-        JMenuItem b = (JMenuItem)c;
-        ButtonModel model = b.getModel();
-        Insets i = b.getInsets();
-
-        resetRects();
-
-        viewRect.setBounds(0, 0, b.getWidth(), b.getHeight());
-
-        viewRect.x += i.left;
-        viewRect.y += i.top;
-        viewRect.width -= (i.right + viewRect.x);
-        viewRect.height -= (i.bottom + viewRect.y);
-
-        SynthStyle style = context.getStyle();
-        Font f = style.getFont(context);
-        g.setFont(f);
-        FontMetrics fm = SwingUtilities2.getFontMetrics(c, g, f);
-        FontMetrics accFM = SwingUtilities2.getFontMetrics(c, g,
-                                 accContext.getStyle().
-                                             getFont(accContext));
-
-        // get Accelerator text
-        KeyStroke accelerator =  b.getAccelerator();
-        String acceleratorText = "";
-        if (accelerator != null) {
-            int modifiers = accelerator.getModifiers();
-            if (modifiers > 0) {
-                acceleratorText = KeyEvent.getKeyModifiersText(modifiers);
-                acceleratorText += acceleratorDelimiter;
-            }
-
-            int keyCode = accelerator.getKeyCode();
-            if (keyCode != 0) {
-                acceleratorText += KeyEvent.getKeyText(keyCode);
-            } else {
-                acceleratorText += accelerator.getKeyChar();
-            }
-        }
-
-        // Layout the text and icon
-        String text = layoutMenuItem(context, fm, accContext,
-            b.getText(), accFM, acceleratorText, b.getIcon(),
-            checkIcon, arrowIcon,
-            b.getVerticalAlignment(), b.getHorizontalAlignment(),
-            b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
-            viewRect, iconRect, textRect, acceleratorRect,
-            checkIconRect, arrowIconRect,
-            b.getText() == null ? 0 : defaultTextIconGap,
-            defaultTextIconGap
-        );
-
-        // Paint the Check
-        if (checkIcon != null) {
-            SynthIcon.paintIcon(checkIcon, context, g, checkIconRect.x,
-                    checkIconRect.y, checkIconRect.width, checkIconRect.height);
-        }
-
-        // Paint the Icon
-        if(b.getIcon() != null) {
-            Icon icon;
-            if(!model.isEnabled()) {
-                icon = (Icon) b.getDisabledIcon();
-            } else if(model.isPressed() && model.isArmed()) {
-                icon = (Icon) b.getPressedIcon();
-                if(icon == null) {
-                    // Use default icon
-                    icon = (Icon) b.getIcon();
-                }
-            } else {
-                icon = (Icon) b.getIcon();
-            }
-
-            if (icon!=null) {
-                SynthIcon.paintIcon(icon, context, g, iconRect.x,
-                    iconRect.y, iconRect.width, iconRect.height);
-            }
-        }
-
-        // Draw the Text
-        if(text != null) {
-            View v = (View) c.getClientProperty(BasicHTML.propertyKey);
-            if (v != null) {
-                v.paint(g, textRect);
-            } else {
-                g.setColor(style.getColor(context, ColorType.TEXT_FOREGROUND));
-                g.setFont(style.getFont(context));
-                style.getGraphicsUtils(context).paintText(context, g, text,
-                        textRect.x, textRect.y, b.getDisplayedMnemonicIndex());
-            }
-        }
-
-        // Draw the Accelerator Text
-        if(acceleratorText != null && !acceleratorText.equals("")) {
-            // Get the maxAccWidth from the parent to calculate the offset.
-            int accOffset = 0;
-            Container parent = b.getParent();
-            if (parent != null && parent instanceof JPopupMenu) {
-                SynthPopupMenuUI popupUI = (SynthPopupMenuUI)
-                                       ((JPopupMenu)parent).getUI();
-
-                // Note that we can only get here for SynthMenuItemUI
-                // (not SynthMenuUI) since acceleratorText is defined,
-                // so this cast should be safe
-                SynthMenuItemUI miUI = (SynthMenuItemUI)
-                    SynthLookAndFeel.getUIOfType(b.getUI(),
-                                                 SynthMenuItemUI.class);
-
-                if (popupUI != null && miUI != null) {
-                    String prop =
-                        miUI.getPropertyPrefix() + ".alignAcceleratorText";
-                    boolean align = style.getBoolean(context, prop, true);
-
-                    // Calculate the offset, with which the accelerator texts
-                    // will be drawn.
-                    if (align) {
-                        // When align==true and we're in the LTR case,
-                        // we add an offset here so that all accelerators
-                        // will be left-justified in their own column.
-                        int max = popupUI.getMaxAcceleratorWidth();
-                        if (max > 0) {
-                            accOffset = max - acceleratorRect.width;
-                            if (!SynthLookAndFeel.isLeftToRight(c)) {
-                                // In the RTL, flip the sign so that all
-                                // accelerators will be right-justified.
-                                accOffset = -accOffset;
-                            }
-                        }
-                    } //else {
-                        // Don't need to do anything special here; in the
-                        // LTR case, the accelerator is already justified
-                        // against the right edge of the menu (and against
-                        // the left edge in the RTL case).
-                    //}
-                }
-            }
-
-            SynthStyle accStyle = accContext.getStyle();
-
-            g.setColor(accStyle.getColor(accContext,
-                                         ColorType.TEXT_FOREGROUND));
-            g.setFont(accStyle.getFont(accContext));
-            accStyle.getGraphicsUtils(accContext).paintText(
-                     accContext, g, acceleratorText, acceleratorRect.x -
-                     accOffset, acceleratorRect.y, -1);
-        }
-
-        // Paint the Arrow
-        if (arrowIcon != null) {
-            SynthIcon.paintIcon(arrowIcon, context, g, arrowIconRect.x,
-                    arrowIconRect.y, arrowIconRect.width, arrowIconRect.height);
+    public void uninstallUI(JComponent c) {
+        super.uninstallUI(c);
+        // Remove values from the parent's Client Properties.
+        JComponent p = MenuItemLayoutHelper.getMenuItemParent((JMenuItem) c);
+        if (p != null) {
+            p.putClientProperty(
+                    SynthMenuItemLayoutHelper.MAX_ACC_OR_ARROW_WIDTH, null);
         }
     }
 
-    /**
-     * Compute and return the location of the icons origin, the
-     * location of origin of the text baseline, and a possibly clipped
-     * version of the compound labels string.  Locations are computed
-     * relative to the viewRect rectangle.
-     */
-
-    private static String layoutMenuItem(
-        SynthContext context,
-        FontMetrics fm,
-        SynthContext accContext,
-        String text,
-        FontMetrics fmAccel,
-        String acceleratorText,
-        Icon icon,
-        Icon checkIcon,
-        Icon arrowIcon,
-        int verticalAlignment,
-        int horizontalAlignment,
-        int verticalTextPosition,
-        int horizontalTextPosition,
-        Rectangle viewRect,
-        Rectangle iconRect,
-        Rectangle textRect,
-        Rectangle acceleratorRect,
-        Rectangle checkIconRect,
-        Rectangle arrowIconRect,
-        int textIconGap,
-        int menuItemGap
-        )
-    {
-        // If parent is JPopupMenu, get and store it's UI
-        SynthPopupMenuUI popupUI = null;
-        JComponent b = context.getComponent();
-        Container parent = b.getParent();
-        if(parent instanceof JPopupMenu) {
-            popupUI = (SynthPopupMenuUI)SynthLookAndFeel.
-                             getUIOfType(((JPopupMenu)parent).getUI(),
-                                         SynthPopupMenuUI.class);
-        }
-
-        context.getStyle().getGraphicsUtils(context).layoutText(
-                context, fm, text, icon,horizontalAlignment, verticalAlignment,
-                horizontalTextPosition, verticalTextPosition, viewRect,
-                iconRect, textRect, textIconGap);
-
-        /* Initialize the acceleratorText bounds rectangle textRect.  If a null
-         * or and empty String was specified we substitute "" here
-         * and use 0,0,0,0 for acceleratorTextRect.
-         */
-        if( (acceleratorText == null) || acceleratorText.equals("") ) {
-            acceleratorRect.width = acceleratorRect.height = 0;
-            acceleratorText = "";
-        }
-        else {
-            SynthStyle style = accContext.getStyle();
-            acceleratorRect.width = style.getGraphicsUtils(accContext).
-                    computeStringWidth(accContext, fmAccel.getFont(), fmAccel,
-                                       acceleratorText);
-            acceleratorRect.height = fmAccel.getHeight();
-        }
-
-        // Initialize the checkIcon bounds rectangle width & height.
-        if (checkIcon != null) {
-            checkIconRect.width = SynthIcon.getIconWidth(checkIcon,
-                                                         context);
-            checkIconRect.height = SynthIcon.getIconHeight(checkIcon,
-                                                           context);
-        }
-        else {
-            checkIconRect.width = checkIconRect.height = 0;
-        }
-
-        // Initialize the arrowIcon bounds rectangle width & height.
-        if (arrowIcon != null) {
-            arrowIconRect.width = SynthIcon.getIconWidth(arrowIcon,
-                                                         context);
-            arrowIconRect.height = SynthIcon.getIconHeight(arrowIcon,
-                                                           context);
-        } else {
-            arrowIconRect.width = arrowIconRect.height = 0;
-        }
-
-        // Note: layoutText() has already left room for
-        // the user icon, so no need to adjust textRect below
-        // to account for the user icon.  However, we do have to
-        // reposition textRect when the check icon is visible.
-
-        Rectangle labelRect = iconRect.union(textRect);
-        if( SynthLookAndFeel.isLeftToRight(context.getComponent()) ) {
-            // Position the check and user icons
-            iconRect.x = viewRect.x;
-            if (checkIcon != null) {
-                checkIconRect.x = viewRect.x;
-                iconRect.x += menuItemGap + checkIconRect.width;
-                textRect.x += menuItemGap + checkIconRect.width;
-            }
-
-            // Position the arrow icon
-            arrowIconRect.x =
-                viewRect.x + viewRect.width - arrowIconRect.width;
-
-            // Position the accelerator text rect
-            acceleratorRect.x =
-                viewRect.x + viewRect.width - acceleratorRect.width;
-
-            /* Align icons and text horizontally */
-            if(popupUI != null) {
-                int thisTextOffset = popupUI.adjustTextOffset(textRect.x
-                                                              - viewRect.x);
-                textRect.x = thisTextOffset + viewRect.x;
-
-                if(icon != null) {
-                    // REMIND: The following code currently assumes the
-                    // default (TRAILING) horizontalTextPosition, which means
-                    // it will always place the icon to the left of the text.
-                    // Other values of horizontalTextPosition aren't very
-                    // useful for menu items, so we ignore them for now, but
-                    // someday we might want to fix this situation.
-                    int thisIconOffset =
-                        popupUI.adjustIconOffset(iconRect.x - viewRect.x);
-                    iconRect.x = thisIconOffset + viewRect.x;
-                }
-            }
-        } else {
-            // Position the accelerator text rect
-            acceleratorRect.x = viewRect.x;
-
-            // Position the arrow icon
-            arrowIconRect.x = viewRect.x;
-
-            // Position the check and user icons
-            iconRect.x =
-                viewRect.x + viewRect.width - iconRect.width;
-            if (checkIcon != null) {
-                checkIconRect.x =
-                    viewRect.x + viewRect.width - checkIconRect.width;
-                textRect.x -= menuItemGap + checkIconRect.width;
-                iconRect.x -= menuItemGap + checkIconRect.width;
-            }
-
-            /* Align icons and text horizontally */
-            if(popupUI != null) {
-                int thisTextOffset = viewRect.x + viewRect.width
-                                     - textRect.x - textRect.width;
-                thisTextOffset = popupUI.adjustTextOffset(thisTextOffset);
-                textRect.x = viewRect.x + viewRect.width
-                             - thisTextOffset - textRect.width;
-                if(icon != null) {
-                    // REMIND: The following code currently assumes the
-                    // default (TRAILING) horizontalTextPosition, which means
-                    // it will always place the icon to the right of the text.
-                    // Other values of horizontalTextPosition aren't very
-                    // useful for menu items, so we ignore them for now, but
-                    // someday we might want to fix this situation.
-                    int thisIconOffset = viewRect.x + viewRect.width
-                                         - iconRect.x - iconRect.width;
-                    thisIconOffset =
-                        popupUI.adjustIconOffset(thisIconOffset);
-                    iconRect.x = viewRect.x + viewRect.width
-                                 - thisIconOffset - iconRect.width;
-                }
-            }
-        }
-
-        // Align the accelerator text and all icons vertically
-        // with the center of the label rect.
-        int midY = labelRect.y + (labelRect.height/2);
-        iconRect.y        = midY - (iconRect.height/2);
-        acceleratorRect.y = midY - (acceleratorRect.height/2);
-        arrowIconRect.y   = midY - (arrowIconRect.height/2);
-        checkIconRect.y   = midY - (checkIconRect.height/2);
-
-        return text;
-    }
-
-    // these rects are used for painting and preferredsize calculations.
-    // they used to be regenerated constantly.  Now they are reused.
-    static Rectangle iconRect = new Rectangle();
-    static Rectangle textRect = new Rectangle();
-    static Rectangle acceleratorRect = new Rectangle();
-    static Rectangle checkIconRect = new Rectangle();
-    static Rectangle arrowIconRect = new Rectangle();
-    static Rectangle viewRect = new Rectangle(Short.MAX_VALUE,Short.MAX_VALUE);
-    static Rectangle r = new Rectangle();
-
-    private static void resetRects() {
-        iconRect.setBounds(0, 0, 0, 0);
-        textRect.setBounds(0, 0, 0, 0);
-        acceleratorRect.setBounds(0, 0, 0, 0);
-        checkIconRect.setBounds(0, 0, 0, 0);
-        arrowIconRect.setBounds(0, 0, 0, 0);
-        viewRect.setBounds(0,0,Short.MAX_VALUE, Short.MAX_VALUE);
-        r.setBounds(0, 0, 0, 0);
-    }
-
-
     protected void installDefaults() {
         updateStyle(menuItem);
     }
@@ -718,9 +192,11 @@
                                                      int defaultTextIconGap) {
         SynthContext context = getContext(c);
         SynthContext accContext = getContext(c, Region.MENU_ITEM_ACCELERATOR);
-        Dimension value = getPreferredMenuItemSize(context, accContext,
-                  c, checkIcon, arrowIcon, defaultTextIconGap,
-                  acceleratorDelimiter);
+        Dimension value = SynthGraphicsUtils.getPreferredMenuItemSize(
+                context, accContext, c, checkIcon, arrowIcon,
+                defaultTextIconGap, acceleratorDelimiter,
+                MenuItemLayoutHelper.useCheckAndArrow(menuItem),
+                getPropertyPrefix());
         context.dispose();
         accContext.dispose();
         return value;
@@ -751,14 +227,13 @@
         String prefix = getPropertyPrefix();
         Icon checkIcon = style.getIcon(context, prefix + ".checkIcon");
         Icon arrowIcon = style.getIcon(context, prefix + ".arrowIcon");
-        paint(context, accContext, g, checkIcon, arrowIcon,
-              acceleratorDelimiter, defaultTextIconGap);
+        SynthGraphicsUtils.paint(context, accContext, g, checkIcon, arrowIcon,
+              acceleratorDelimiter, defaultTextIconGap, getPropertyPrefix());
         accContext.dispose();
     }
 
     void paintBackground(SynthContext context, Graphics g, JComponent c) {
-        context.getPainter().paintMenuItemBackground(context, g, 0, 0,
-                                                c.getWidth(), c.getHeight());
+        SynthGraphicsUtils.paintBackground(context, g, c);
     }
 
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
 import java.util.Arrays;
 import java.util.ArrayList;
 import sun.swing.plaf.synth.SynthUI;
-
+import sun.swing.MenuItemLayoutHelper;
 
 /**
  * Synth's MenuUI.
@@ -86,7 +86,7 @@
             acceleratorDelimiter = style.getString(context, prefix +
                                             ".acceleratorDelimiter", "+");
 
-            if (useCheckAndArrow()) {
+            if (MenuItemLayoutHelper.useCheckAndArrow(menuItem)) {
                 checkIcon = style.getIcon(context, prefix + ".checkIcon");
                 arrowIcon = style.getIcon(context, prefix + ".arrowIcon");
             } else {
@@ -111,6 +111,16 @@
         accContext.dispose();
     }
 
+    public void uninstallUI(JComponent c) {
+        super.uninstallUI(c);
+        // Remove values from the parent's Client Properties.
+        JComponent p = MenuItemLayoutHelper.getMenuItemParent((JMenuItem) c);
+        if (p != null) {
+            p.putClientProperty(
+                    SynthMenuItemLayoutHelper.MAX_ACC_OR_ARROW_WIDTH, null);
+        }
+    }
+
     protected void uninstallDefaults() {
         SynthContext context = getContext(menuItem, ENABLED);
         style.uninstallDefaults(context);
@@ -182,9 +192,11 @@
                                                      int defaultTextIconGap) {
         SynthContext context = getContext(c);
         SynthContext accContext = getContext(c, Region.MENU_ITEM_ACCELERATOR);
-        Dimension value = SynthMenuItemUI.getPreferredMenuItemSize(
-                  context, accContext, c, checkIcon, arrowIcon,
-                  defaultTextIconGap, acceleratorDelimiter);
+        Dimension value = SynthGraphicsUtils.getPreferredMenuItemSize(
+                context, accContext, c, checkIcon, arrowIcon,
+                defaultTextIconGap, acceleratorDelimiter,
+                MenuItemLayoutHelper.useCheckAndArrow(menuItem),
+                getPropertyPrefix());
         context.dispose();
         accContext.dispose();
         return value;
@@ -211,21 +223,12 @@
     protected void paint(SynthContext context, Graphics g) {
         SynthContext accContext = getContext(menuItem,
                                              Region.MENU_ITEM_ACCELERATOR);
-        SynthStyle style = context.getStyle();
-        Icon checkIcon;
-        Icon arrowIcon;
-        if (useCheckAndArrow()) {
-            // Refetch the appropriate icons for the current state
-            String prefix = getPropertyPrefix();
-            checkIcon = style.getIcon(context, prefix + ".checkIcon");
-            arrowIcon = style.getIcon(context, prefix + ".arrowIcon");
-        } else {
-            // Not needed in this case
-            checkIcon = null;
-            arrowIcon = null;
-        }
-        SynthMenuItemUI.paint(context, accContext, g, checkIcon, arrowIcon,
-                              acceleratorDelimiter, defaultTextIconGap);
+        // Refetch the appropriate check indicator for the current state
+        String prefix = getPropertyPrefix();
+        Icon checkIcon = style.getIcon(context, prefix + ".checkIcon");
+        Icon arrowIcon = style.getIcon(context, prefix + ".arrowIcon");
+        SynthGraphicsUtils.paint(context, accContext, g, checkIcon, arrowIcon,
+              acceleratorDelimiter, defaultTextIconGap, getPropertyPrefix());
         accContext.dispose();
     }
 
@@ -239,8 +242,4 @@
             updateStyle((JMenu)e.getSource());
         }
     }
-
-    private boolean useCheckAndArrow() {
-        return !((JMenu)menuItem).isTopLevelMenu();
-    }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Wed Jul 05 16:42:37 2017 +0200
@@ -40,6 +40,7 @@
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.StringTokenizer;
@@ -136,7 +137,7 @@
      * Array of state infos for the current style. These are pushed to the
      * style when </style> is received.
      */
-    private java.util.List _stateInfos;
+    private List<ParsedSynthStyle.StateInfo> _stateInfos;
 
     /**
      * Current style.
@@ -151,7 +152,7 @@
     /**
      * Bindings for the current InputMap
      */
-    private java.util.List _inputMapBindings;
+    private List<String> _inputMapBindings;
 
     /**
      * ID for the input map. This is cached as
@@ -177,30 +178,30 @@
     /**
      * List of ColorTypes. This is populated in startColorType.
      */
-    private java.util.List _colorTypes;
+    private List<ColorType> _colorTypes;
 
     /**
      * defaultsPropertys are placed here.
      */
-    private Map _defaultsMap;
+    private Map<String, Object> _defaultsMap;
 
     /**
      * List of SynthStyle.Painters that will be applied to the current style.
      */
-    private java.util.List _stylePainters;
+    private List<ParsedSynthStyle.PainterInfo> _stylePainters;
 
     /**
      * List of SynthStyle.Painters that will be applied to the current state.
      */
-    private java.util.List _statePainters;
+    private List<ParsedSynthStyle.PainterInfo> _statePainters;
 
     SynthParser() {
         _mapping = new HashMap<String,Object>();
-        _stateInfos = new ArrayList();
-        _colorTypes = new ArrayList();
-        _inputMapBindings = new ArrayList();
-        _stylePainters = new ArrayList();
-        _statePainters = new ArrayList();
+        _stateInfos = new ArrayList<ParsedSynthStyle.StateInfo>();
+        _colorTypes = new ArrayList<ColorType>();
+        _inputMapBindings = new ArrayList<String>();
+        _stylePainters = new ArrayList<ParsedSynthStyle.PainterInfo>();
+        _statePainters = new ArrayList<ParsedSynthStyle.PainterInfo>();
     }
 
     /**
@@ -219,7 +220,7 @@
     public void parse(InputStream inputStream,
                       DefaultSynthStyleFactory factory,
                       URL urlResourceBase, Class<?> classResourceBase,
-                      Map defaultsMap)
+                      Map<String, Object> defaultsMap)
                       throws ParseException, IllegalArgumentException {
         if (inputStream == null || factory == null ||
             (urlResourceBase == null && classResourceBase == null)) {
@@ -333,7 +334,7 @@
      * type type, this will throw an exception.
      */
     private Object lookup(String key, Class type) throws SAXException {
-        Object value = null;
+        Object value;
         if (_handler != null) {
             if ((value = _handler.lookup(key)) != null) {
                 return checkCast(value, type);
@@ -423,15 +424,12 @@
     private void endStyle() throws SAXException {
         int size = _stylePainters.size();
         if (size > 0) {
-            _style.setPainters((ParsedSynthStyle.PainterInfo[])
-                  _stylePainters.toArray(new ParsedSynthStyle.
-                  PainterInfo[size]));
+            _style.setPainters(_stylePainters.toArray(new ParsedSynthStyle.PainterInfo[size]));
             _stylePainters.clear();
         }
         size = _stateInfos.size();
         if (size > 0) {
-            _style.setStateInfo((ParsedSynthStyle.StateInfo[])_stateInfos.
-                 toArray(new ParsedSynthStyle.StateInfo[size]));
+            _style.setStateInfo(_stateInfos.toArray(new ParsedSynthStyle.StateInfo[size]));
             _stateInfos.clear();
         }
         _style = null;
@@ -501,9 +499,7 @@
     private void endState() throws SAXException {
         int size = _statePainters.size();
         if (size > 0) {
-            _stateInfo.setPainters((ParsedSynthStyle.PainterInfo[])
-                  _statePainters.toArray(new ParsedSynthStyle.
-                  PainterInfo[size]));
+            _stateInfo.setPainters(_statePainters.toArray(new ParsedSynthStyle.PainterInfo[size]));
             _statePainters.clear();
         }
         _stateInfo = null;
@@ -684,8 +680,7 @@
             int max = 0;
             for (int counter = _colorTypes.size() - 1; counter >= 0;
                      counter--) {
-                max = Math.max(max, ((ColorType)_colorTypes.get(counter)).
-                               getID());
+                max = Math.max(max, _colorTypes.get(counter).getID());
             }
             if (colors == null || colors.length <= max) {
                 Color[] newColors = new Color[max + 1];
@@ -696,7 +691,7 @@
             }
             for (int counter = _colorTypes.size() - 1; counter >= 0;
                      counter--) {
-                colors[((ColorType)_colorTypes.get(counter)).getID()] = color;
+                colors[_colorTypes.get(counter).getID()] = color;
             }
             _stateInfo.setColors(colors);
         }
@@ -705,7 +700,7 @@
     private void startProperty(AttributeList attributes,
                                Object property) throws SAXException {
         Object value = null;
-        Object key = null;
+        String key = null;
         // Type of the value: 0=idref, 1=boolean, 2=dimension, 3=insets,
         // 4=integer,5=string
         int iType = 0;
@@ -1027,7 +1022,7 @@
         }
     }
 
-    private void addPainterOrMerge(java.util.List painters, String method,
+    private void addPainterOrMerge(List<ParsedSynthStyle.PainterInfo> painters, String method,
                                    SynthPainter painter, int direction) {
         ParsedSynthStyle.PainterInfo painterInfo;
         painterInfo = new ParsedSynthStyle.PainterInfo(method,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthPopupMenuUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthPopupMenuUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,34 +58,6 @@
  */
 class SynthPopupMenuUI extends BasicPopupMenuUI implements
                 PropertyChangeListener, SynthUI {
-    /**
-     * Maximum size of the text portion of the children menu items.
-     */
-    private int maxTextWidth;
-
-    /**
-     * Maximum size of the icon portion of the children menu items.
-     */
-    private int maxIconWidth;
-
-    /**
-     * Maximum size of the spacing between the text and accelerator
-     * portions of the children menu items.
-     */
-    private int maxAccelSpacingWidth;
-
-    /**
-     * Maximum size of the text for the accelerator portion of the children
-     * menu items.
-     */
-    private int maxAcceleratorWidth;
-
-    /*
-     * Maximum icon and text offsets of the children menu items.
-     */
-    private int maxTextOffset;
-    private int maxIconOffset;
-
     private SynthStyle style;
 
     public static ComponentUI createUI(JComponent x) {
@@ -153,90 +125,6 @@
         return SynthLookAndFeel.getComponentState(c);
     }
 
-    /**
-     * Resets the max text and accerator widths,
-     * text and icon offsets.
-     */
-    void resetAlignmentHints() {
-        maxTextWidth = maxIconWidth
-                     = maxAccelSpacingWidth = maxAcceleratorWidth
-                     = maxTextOffset = maxIconOffset = 0;
-    }
-
-    /**
-     * Adjusts the width needed to display the maximum menu item string.
-     *
-     * @param width Text width.
-     * @return max width
-     */
-    int adjustTextWidth(int width) {
-        maxTextWidth = Math.max(maxTextWidth, width);
-        return maxTextWidth;
-    }
-
-    /**
-     * Adjusts the width needed to display the maximum menu item icon.
-     *
-     * @param width Icon width.
-     * @return max width
-     */
-    int adjustIconWidth(int width) {
-        maxIconWidth = Math.max(maxIconWidth, width);
-        return maxIconWidth;
-    }
-
-    /**
-     * Adjusts the width needed to pad between the maximum menu item
-     * text and accelerator.
-     *
-     * @param width Spacing width.
-     * @return max width
-     */
-    int adjustAccelSpacingWidth(int width) {
-        maxAccelSpacingWidth = Math.max(maxAccelSpacingWidth, width);
-        return maxAccelSpacingWidth;
-    }
-
-    /**
-     * Adjusts the width needed to display the maximum accelerator.
-     *
-     * @param width Text width.
-     * @return max width
-     */
-    int adjustAcceleratorWidth(int width) {
-        maxAcceleratorWidth = Math.max(maxAcceleratorWidth, width);
-        return maxAcceleratorWidth;
-    }
-
-    /**
-     * Maximum size needed to display accelerators of children menu items.
-     */
-    int getMaxAcceleratorWidth() {
-        return maxAcceleratorWidth;
-    }
-
-    /**
-     * Adjusts the text offset needed to align text horizontally.
-     *
-     * @param offset Text offset
-     * @return max offset
-     */
-    int adjustTextOffset(int offset) {
-        maxTextOffset = Math.max(maxTextOffset, offset);
-        return maxTextOffset;
-    }
-
-   /**
-    * Adjusts the icon offset needed to align icons horizontally
-    *
-    * @param offset Icon offset
-    * @return max offset
-    */
-    int adjustIconOffset(int offset) {
-        maxIconOffset = Math.max(maxIconOffset, offset);
-        return maxIconOffset;
-    }
-
     public void update(Graphics g, JComponent c) {
         SynthContext context = getContext(c);
 
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -48,13 +48,13 @@
      * Keys to use for forward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusForwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusForwardTraversalKeys;
 
     /**
      * Keys to use for backward focus traversal when the JComponent is
      * managing focus.
      */
-    private static Set managingFocusBackwardTraversalKeys;
+    private static Set<KeyStroke> managingFocusBackwardTraversalKeys;
 
     /**
      * Style for the JSplitPane.
@@ -96,7 +96,7 @@
 
         // focus forward traversal key
         if (managingFocusForwardTraversalKeys==null) {
-            managingFocusForwardTraversalKeys = new HashSet();
+            managingFocusForwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusForwardTraversalKeys.add(
                 KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
         }
@@ -104,7 +104,7 @@
                                         managingFocusForwardTraversalKeys);
         // focus backward traversal key
         if (managingFocusBackwardTraversalKeys==null) {
-            managingFocusBackwardTraversalKeys = new HashSet();
+            managingFocusBackwardTraversalKeys = new HashSet<KeyStroke>();
             managingFocusBackwardTraversalKeys.add(
                 KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
         }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthStyle.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthStyle.java	Wed Jul 05 16:42:37 2017 +0200
@@ -53,7 +53,7 @@
     /**
      * Contains the default values for certain properties.
      */
-    private static Map DEFAULT_VALUES;
+    private static Map<Object, Object> DEFAULT_VALUES;
 
     /**
      * Shared SynthGraphics.
@@ -715,7 +715,7 @@
     private static Object getDefaultValue(Object key) {
         synchronized(SynthStyle.class) {
             if (DEFAULT_VALUES == null) {
-                DEFAULT_VALUES = new HashMap();
+                DEFAULT_VALUES = new HashMap<Object, Object>();
                 populateDefaultValues();
             }
             Object value = DEFAULT_VALUES.get(key);
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -66,7 +66,7 @@
     protected void installDefaults() {
         // Installs the text cursor on the component
         super.installDefaults();
-        updateStyle((JTextComponent)getComponent());
+        updateStyle(getComponent());
     }
 
     protected void uninstallDefaults() {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -232,7 +232,7 @@
     protected void installDefaults() {
         // Installs the text cursor on the component
         super.installDefaults();
-        updateStyle((JTextComponent)getComponent());
+        updateStyle(getComponent());
         getComponent().addFocusListener(this);
     }
 
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -390,7 +390,7 @@
     }
 
     private Rectangle getDropLineRect(JTree.DropLocation loc) {
-        Rectangle rect = null;
+        Rectangle rect;
         TreePath path = loc.getPath();
         int index = loc.getChildIndex();
         boolean ltr = tree.getComponentOrientation().isLeftToRight();
@@ -523,7 +523,7 @@
         // Don't paint the renderer if editing this row.
         boolean selected = tree.isRowSelected(row);
 
-        JTree.DropLocation dropLocation = (JTree.DropLocation)tree.getDropLocation();
+        JTree.DropLocation dropLocation = tree.getDropLocation();
         boolean isDrop = dropLocation != null
                          && dropLocation.getChildIndex() == -1
                          && path == dropLocation.getPath();
--- a/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -176,8 +176,7 @@
      * @since 1.4
      */
     public TableModelListener[] getTableModelListeners() {
-        return (TableModelListener[])listenerList.getListeners(
-                TableModelListener.class);
+        return listenerList.getListeners(TableModelListener.class);
     }
 
 //
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -681,9 +681,9 @@
         if (anArray == null) {
             return null;
         }
-        Vector v = new Vector(anArray.length);
-        for (int i=0; i < anArray.length; i++) {
-            v.addElement(anArray[i]);
+        Vector<Object> v = new Vector<Object>(anArray.length);
+        for (Object o : anArray) {
+            v.addElement(o);
         }
         return v;
     }
@@ -698,9 +698,9 @@
         if (anArray == null) {
             return null;
         }
-        Vector v = new Vector(anArray.length);
-        for (int i=0; i < anArray.length; i++) {
-            v.addElement(convertToVector(anArray[i]));
+        Vector<Vector> v = new Vector<Vector>(anArray.length);
+        for (Object[] o : anArray) {
+            v.addElement(convertToVector(o));
         }
         return v;
     }
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Wed Jul 05 16:42:37 2017 +0200
@@ -123,15 +123,15 @@
 
         if (defaultI18NProperty == null) {
             // determine default setting for i18n support
-            Object o = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                    public Object run() {
+            String o = java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<String>() {
+                    public String run() {
                         return System.getProperty(I18NProperty);
                     }
                 }
             );
             if (o != null) {
-                defaultI18NProperty = Boolean.valueOf((String)o);
+                defaultI18NProperty = Boolean.valueOf(o);
             } else {
                 defaultI18NProperty = Boolean.FALSE;
             }
@@ -163,7 +163,7 @@
      */
     public Dictionary<Object,Object> getDocumentProperties() {
         if (documentProperties == null) {
-            documentProperties = new Hashtable(2);
+            documentProperties = new Hashtable<Object, Object>(2);
         }
         return documentProperties;
     }
@@ -467,8 +467,7 @@
      * @since 1.4
      */
     public DocumentListener[] getDocumentListeners() {
-        return (DocumentListener[])listenerList.getListeners(
-                DocumentListener.class);
+        return listenerList.getListeners(DocumentListener.class);
     }
 
     /**
@@ -508,8 +507,7 @@
      * @since 1.4
      */
     public UndoableEditListener[] getUndoableEditListeners() {
-        return (UndoableEditListener[])listenerList.getListeners(
-                UndoableEditListener.class);
+        return listenerList.getListeners(UndoableEditListener.class);
     }
 
     /**
@@ -610,7 +608,7 @@
             DefaultDocumentEvent chng =
                     new DefaultDocumentEvent(offs, len, DocumentEvent.EventType.REMOVE);
 
-            boolean isComposedTextElement = false;
+            boolean isComposedTextElement;
             // Check whether the position of interest is the composed text
             isComposedTextElement = Utilities.isComposedTextElement(this, offs);
 
@@ -1051,7 +1049,7 @@
         byte levels[] = calculateBidiLevels( firstPStart, lastPEnd );
 
 
-        Vector newElements = new Vector();
+        Vector<Element> newElements = new Vector<Element>();
 
         // Calculate the first span of characters in the affected range with
         // the same bidi level.  If this level is the same as the level of the
@@ -1831,7 +1829,6 @@
                     }
                     out.println("["+contentStr+"]");
                 } catch (BadLocationException e) {
-                        ;
                 }
 
             } else {
@@ -2460,7 +2457,7 @@
             if(nchildren == 0)
                 return null;
 
-            Vector tempVector = new Vector(nchildren);
+            Vector<AbstractElement> tempVector = new Vector<AbstractElement>(nchildren);
 
             for(int counter = 0; counter < nchildren; counter++)
                 tempVector.addElement(children[counter]);
@@ -2749,7 +2746,7 @@
             // if the number of changes gets too great, start using
             // a hashtable for to locate the change for a given element.
             if ((changeLookup == null) && (edits.size() > 10)) {
-                changeLookup = new Hashtable();
+                changeLookup = new Hashtable<Element, ElementChange>();
                 int n = edits.size();
                 for (int i = 0; i < n; i++) {
                     Object o = edits.elementAt(i);
@@ -2918,7 +2915,7 @@
          */
         public DocumentEvent.ElementChange getChange(Element elem) {
             if (changeLookup != null) {
-                return (DocumentEvent.ElementChange) changeLookup.get(elem);
+                return changeLookup.get(elem);
             }
             int n = edits.size();
             for (int i = 0; i < n; i++) {
@@ -2937,7 +2934,7 @@
 
         private int offset;
         private int length;
-        private Hashtable changeLookup;
+        private Hashtable<Element, ElementChange> changeLookup;
         private DocumentEvent.EventType type;
 
     }
--- a/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -25,6 +25,7 @@
 package javax.swing.text;
 
 import java.util.*;
+import java.util.List;
 import java.awt.*;
 import javax.swing.SwingUtilities;
 import javax.swing.event.DocumentEvent;
@@ -58,7 +59,7 @@
      */
     public AsyncBoxView(Element elem, int axis) {
         super(elem);
-        stats = new ArrayList();
+        stats = new ArrayList<ChildState>();
         this.axis = axis;
         locator = new ChildLocator();
         flushTask = new FlushTask();
@@ -197,7 +198,7 @@
     protected ChildState getChildState(int index) {
         synchronized(stats) {
             if ((index >= 0) && (index < stats.size())) {
-                return (ChildState) stats.get(index);
+                return stats.get(index);
             }
             return null;
         }
@@ -357,7 +358,7 @@
         synchronized(stats) {
             // remove the replaced state records
             for (int i = 0; i < length; i++) {
-                ChildState cs = (ChildState)stats.remove(offset);
+                ChildState cs = stats.remove(offset);
                 float csSpan = cs.getMajorSpan();
 
                 cs.getChildView().setParent(null);
@@ -863,7 +864,7 @@
     /**
      * The children and their layout statistics.
      */
-    java.util.List stats;
+    List<ChildState> stats;
 
     /**
      * Current span along the major axis.  This
@@ -1110,7 +1111,7 @@
          */
         int updateChildOffsets(float targetOffset) {
             int n = getViewCount();
-            int targetIndex = n - 1;;
+            int targetIndex = n - 1;
             int pos = lastValidOffset.getChildView().getStartOffset();
             int startIndex = getViewIndex(pos, Position.Bias.Forward);
             float start = lastValidOffset.getMajorOffset();
@@ -1394,7 +1395,6 @@
         private float min;
         private float pref;
         private float max;
-        private float align;
         private boolean minorValid;
 
         // major axis
--- a/jdk/src/share/classes/javax/swing/text/ComponentView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ComponentView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -27,6 +27,7 @@
 import java.awt.*;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.util.Set;
 import javax.swing.SwingUtilities;
 import javax.swing.event.*;
 
@@ -434,7 +435,7 @@
         /**
          * Shows or hides this component depending on the value of parameter
          * <code>b</code>.
-         * @param <code>b</code>  If <code>true</code>, shows this component;
+         * @param b If <code>true</code>, shows this component;
          * otherwise, hides this component.
          * @see #isVisible
          * @since JDK1.1
@@ -480,7 +481,7 @@
             return yalign;
         }
 
-        public java.util.Set getFocusTraversalKeys(int id) {
+        public Set<AWTKeyStroke> getFocusTraversalKeys(int id) {
             return KeyboardFocusManager.getCurrentKeyboardFocusManager().
                     getDefaultFocusTraversalKeys(id);
         }
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Wed Jul 05 16:42:37 2017 +0200
@@ -774,8 +774,7 @@
      * @since 1.4
      */
     public ChangeListener[] getChangeListeners() {
-        return (ChangeListener[])listenerList.getListeners(
-                ChangeListener.class);
+        return listenerList.getListeners(ChangeListener.class);
     }
 
     /**
@@ -1330,7 +1329,7 @@
         if (this.dot != this.mark && component != null) {
             Clipboard clip = getSystemSelection();
             if (clip != null) {
-                String selectedText = null;
+                String selectedText;
                 if (component instanceof JPasswordField
                     && component.getClientProperty("JPasswordField.cutCopyAllowed") !=
                     Boolean.TRUE) {
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -68,7 +68,7 @@
     private boolean commitOnEdit;
 
     /** Class used to create new instances. */
-    private Class valueClass;
+    private Class<?> valueClass;
 
     /** NavigationFilter that forwards calls back to DefaultFormatter. */
     private NavigationFilter navigationFilter;
@@ -231,7 +231,7 @@
      * @return Object representation of text
      */
     public Object stringToValue(String string) throws ParseException {
-        Class vc = getValueClass();
+        Class<?> vc = getValueClass();
         JFormattedTextField ftf = getFormattedTextField();
 
         if (vc == null && ftf != null) {
--- a/jdk/src/share/classes/javax/swing/text/DefaultHighlighter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultHighlighter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,7 +56,7 @@
         // PENDING(prinz) - should cull ranges not visible
         int len = highlights.size();
         for (int i = 0; i < len; i++) {
-            HighlightInfo info = (HighlightInfo) highlights.elementAt(i);
+            HighlightInfo info = highlights.elementAt(i);
             if (!(info instanceof LayeredHighlightInfo)) {
                 // Avoid allocing unless we need it.
                 Rectangle a = component.getBounds();
@@ -66,7 +66,7 @@
                 a.width -= insets.left + insets.right;
                 a.height -= insets.top + insets.bottom;
                 for (; i < len; i++) {
-                    info = (HighlightInfo)highlights.elementAt(i);
+                    info = highlights.elementAt(i);
                     if (!(info instanceof LayeredHighlightInfo)) {
                         Highlighter.HighlightPainter p = info.getPainter();
                         p.paint(g, info.getStartOffset(), info.getEndOffset(),
@@ -159,7 +159,7 @@
                 int p0 = -1;
                 int p1 = -1;
                 for (int i = 0; i < len; i++) {
-                    HighlightInfo hi = (HighlightInfo)highlights.elementAt(i);
+                    HighlightInfo hi = highlights.elementAt(i);
                     if (hi instanceof LayeredHighlightInfo) {
                         LayeredHighlightInfo info = (LayeredHighlightInfo)hi;
                         minX = Math.min(minX, info.x);
@@ -195,7 +195,7 @@
                 int p0 = Integer.MAX_VALUE;
                 int p1 = 0;
                 for (int i = 0; i < len; i++) {
-                    HighlightInfo info = (HighlightInfo) highlights.elementAt(i);
+                    HighlightInfo info = highlights.elementAt(i);
                     p0 = Math.min(p0, info.p0.getOffset());
                     p1 = Math.max(p1, info.p1.getOffset());
                 }
@@ -282,7 +282,7 @@
                                        Shape viewBounds,
                                        JTextComponent editor, View view) {
         for (int counter = highlights.size() - 1; counter >= 0; counter--) {
-            Object tag = highlights.elementAt(counter);
+            HighlightInfo tag = highlights.elementAt(counter);
             if (tag instanceof LayeredHighlightInfo) {
                 LayeredHighlightInfo lhi = (LayeredHighlightInfo)tag;
                 int start = lhi.getStartOffset();
@@ -333,7 +333,7 @@
 
     private final static Highlighter.Highlight[] noHighlights =
             new Highlighter.Highlight[0];
-    private Vector highlights = new Vector();  // Vector<HighlightInfo>
+    private Vector<HighlightInfo> highlights = new Vector<HighlightInfo>();
     private JTextComponent component;
     private boolean drawsLayeredHighlights;
     private SafeDamager safeDamager = new SafeDamager();
@@ -573,8 +573,8 @@
      * call.
      */
     class SafeDamager implements Runnable {
-        private Vector p0 = new Vector(10);
-        private Vector p1 = new Vector(10);
+        private Vector<Position> p0 = new Vector<Position>(10);
+        private Vector<Position> p1 = new Vector<Position>(10);
         private Document lastDoc = null;
 
         /**
@@ -589,8 +589,8 @@
                     int len = p0.size();
                     for (int i = 0; i < len; i++){
                         mapper.damageRange(component,
-                                ((Position)p0.get(i)).getOffset(),
-                                ((Position)p1.get(i)).getOffset());
+                                p0.get(i).getOffset(),
+                                p1.get(i).getOffset());
                     }
                 }
             }
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Wed Jul 05 16:42:37 2017 +0200
@@ -84,7 +84,7 @@
      */
     public DefaultStyledDocument(Content c, StyleContext styles) {
         super(c, styles);
-        listeningStyles = new Vector();
+        listeningStyles = new Vector<Style>();
         buffer = new ElementBuffer(createDefaultRoot());
         Style defaultStyle = styles.getStyle(StyleContext.DEFAULT_STYLE);
         setLogicalStyle(0, defaultStyle);
@@ -349,7 +349,7 @@
             int prevStartOffset = prevLeaf.getStartOffset();
             BranchElement prevParent = (BranchElement) prevLeaf.getParentElement();
             int prevIndex = prevParent.getElementIndex(prevStartOffset);
-            Element newElem = null;
+            Element newElem;
             newElem = createLeafElement(prevParent, prevLeaf.getAttributes(),
                                             prevStartOffset, lastEndOffset);
             Element[] prevRemoved = { prevLeaf };
@@ -511,7 +511,7 @@
             AttributeSet sCopy = s.copyAttributes();
 
             // PENDING(prinz) - this isn't a very efficient way to iterate
-            int lastEnd = Integer.MAX_VALUE;
+            int lastEnd;
             for (int pos = offset; pos < (offset + length); pos = lastEnd) {
                 Element run = getCharacterElement(pos);
                 lastEnd = run.getEndOffset();
@@ -597,7 +597,7 @@
      * @return the element
      */
     public Element getParagraphElement(int pos) {
-        Element e = null;
+        Element e;
         for (e = getDefaultRootElement(); ! e.isLeaf(); ) {
             int index = e.getElementIndex(pos);
             e = e.getElement(index);
@@ -614,7 +614,7 @@
      * @return the element
      */
     public Element getCharacterElement(int pos) {
-        Element e = null;
+        Element e;
         for (e = getDefaultRootElement(); ! e.isLeaf(); ) {
             int index = e.getElementIndex(pos);
             e = e.getElement(index);
@@ -655,7 +655,7 @@
 
         try {
             Segment s = new Segment();
-            Vector parseBuffer = new Vector();
+            Vector<ElementSpec> parseBuffer = new Vector<ElementSpec>();
             ElementSpec lastStartSpec = null;
             boolean insertingAfterNewline = false;
             short lastStartDirection = ElementSpec.OriginateDirection;
@@ -670,8 +670,7 @@
                                    offset, endOffset);
                     for(int counter = parseBuffer.size() - 1; counter >= 0;
                         counter--) {
-                        ElementSpec spec = (ElementSpec)parseBuffer.
-                                            elementAt(counter);
+                        ElementSpec spec = parseBuffer.elementAt(counter);
                         if(spec.getType() == ElementSpec.StartTagType) {
                             lastStartSpec = spec;
                             break;
@@ -709,7 +708,7 @@
                                            n - lastOffset));
             }
 
-            ElementSpec first = (ElementSpec) parseBuffer.firstElement();
+            ElementSpec first = parseBuffer.firstElement();
 
             int docLength = getLength();
 
@@ -750,7 +749,7 @@
             // direction isn't originate, and the element at endOffset
             // is a leaf.
             if(insertingAtBoundry && endOffset < docLength) {
-                ElementSpec last = (ElementSpec) parseBuffer.lastElement();
+                ElementSpec last = parseBuffer.lastElement();
                 if(last.getType() == ElementSpec.ContentType &&
                    last.getDirection() != ElementSpec.JoinPreviousDirection &&
                    ((lastStartSpec == null && (paragraph == pParagraph ||
@@ -772,7 +771,7 @@
             else if(!insertingAtBoundry && lastStartSpec != null &&
                     lastStartSpec.getDirection() ==
                     ElementSpec.JoinFractureDirection) {
-                ElementSpec last = (ElementSpec) parseBuffer.lastElement();
+                ElementSpec last = parseBuffer.lastElement();
                 if(last.getType() == ElementSpec.ContentType &&
                    last.getDirection() != ElementSpec.JoinPreviousDirection &&
                    attr.isEqual(cattr)) {
@@ -805,7 +804,7 @@
      * necessarily create the last start spec).
      */
     short createSpecsForInsertAfterNewline(Element paragraph,
-                    Element pParagraph, AttributeSet pattr, Vector parseBuffer,
+            Element pParagraph, AttributeSet pattr, Vector<ElementSpec> parseBuffer,
                                                  int offset, int endOffset) {
         // Need to find the common parent of pParagraph and paragraph.
         if(paragraph.getParentElement() == pParagraph.getParentElement()) {
@@ -825,8 +824,8 @@
         else {
             // Will only happen for text with more than 2 levels.
             // Find the common parent of a paragraph and pParagraph
-            Vector leftParents = new Vector();
-            Vector rightParents = new Vector();
+            Vector<Element> leftParents = new Vector<Element>();
+            Vector<Element> rightParents = new Vector<Element>();
             Element e = pParagraph;
             while(e != null) {
                 leftParents.addElement(e);
@@ -847,11 +846,10 @@
                                               (null, ElementSpec.EndTagType));
                 }
                 // And the starts.
-                ElementSpec spec = null;
+                ElementSpec spec;
                 for(int counter = rightParents.size() - 1;
                     counter >= 0; counter--) {
-                    spec = new ElementSpec(((Element)rightParents.
-                                   elementAt(counter)).getAttributes(),
+                    spec = new ElementSpec(rightParents.elementAt(counter).getAttributes(),
                                    ElementSpec.StartTagType);
                     if(counter > 0)
                         spec.setDirection(ElementSpec.JoinNextDirection);
@@ -1007,7 +1005,7 @@
             if (listenerList.getListenerCount(DocumentListener.class) == 0) {
                 for (int counter = listeningStyles.size() - 1; counter >= 0;
                      counter--) {
-                    ((Style)listeningStyles.elementAt(counter)).
+                    listeningStyles.elementAt(counter).
                                     removeChangeListener(styleChangeListener);
                 }
                 listeningStyles.removeAllElements();
@@ -1077,7 +1075,7 @@
 
     private void readObject(ObjectInputStream s)
             throws ClassNotFoundException, IOException {
-        listeningStyles = new Vector();
+        listeningStyles = new Vector<Style>();
         s.defaultReadObject();
         // Reinstall style listeners.
         if (styleContextChangeListener == null &&
@@ -1101,7 +1099,7 @@
     protected ElementBuffer buffer;
 
     /** Styles listening to. */
-    private transient Vector listeningStyles;
+    private transient Vector<Style> listeningStyles;
 
     /** Listens to Styles. */
     private transient ChangeListener styleChangeListener;
@@ -1401,8 +1399,8 @@
          */
         public ElementBuffer(Element root) {
             this.root = root;
-            changes = new Vector();
-            path = new Stack();
+            changes = new Vector<ElemChanges>();
+            path = new Stack<ElemChanges>();
         }
 
         /**
@@ -1454,7 +1452,7 @@
                 elem = child;
                 index = elem.getElementIndex(0);
             }
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             Element child = ec.parent.getElement(ec.index);
             ec.added.addElement(createLeafElement(ec.parent,
                                 child.getAttributes(), getLength(),
@@ -1646,7 +1644,7 @@
                 index = e.getElementIndex(offs);
             }
 
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             Element child = ec.parent.getElement(ec.index);
             // make sure there is something to do... if the
             // offset is already at a boundary then there is
@@ -1722,15 +1720,14 @@
         void endEdits(DefaultDocumentEvent de) {
             int n = changes.size();
             for (int i = 0; i < n; i++) {
-                ElemChanges ec = (ElemChanges) changes.elementAt(i);
+                ElemChanges ec = changes.elementAt(i);
                 Element[] removed = new Element[ec.removed.size()];
                 ec.removed.copyInto(removed);
                 Element[] added = new Element[ec.added.size()];
                 ec.added.copyInto(added);
                 int index = ec.index;
                 ((BranchElement) ec.parent).replace(index, removed.length, added);
-                ElementEdit ee = new ElementEdit((BranchElement) ec.parent,
-                                                 index, removed, added);
+                ElementEdit ee = new ElementEdit(ec.parent, index, removed, added);
                 de.addEdit(ee);
             }
 
@@ -1767,12 +1764,12 @@
             this.endOffset = offset + length;
             pos = offset;
             if (changes == null) {
-                changes = new Vector();
+                changes = new Vector<ElemChanges>();
             } else {
                 changes.removeAllElements();
             }
             if (path == null) {
-                path = new Stack();
+                path = new Stack<ElemChanges>();
             } else {
                 path.removeAllElements();
             }
@@ -1799,7 +1796,7 @@
         }
 
         void pop() {
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             path.pop();
             if ((ec.added.size() > 0) || (ec.removed.size() > 0)) {
                 changes.addElement(ec);
@@ -1808,7 +1805,7 @@
                 if(e.getElementCount() == 0) {
                     // if we pushed a branch element that didn't get
                     // used, make sure its not marked as having been added.
-                    ec = (ElemChanges) path.peek();
+                    ec = path.peek();
                     ec.added.removeElement(e);
                 }
             }
@@ -1822,7 +1819,7 @@
         }
 
         void insertElement(ElementSpec es) {
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             switch(es.getType()) {
             case ElementSpec.StartTagType:
                 switch(es.getDirection()) {
@@ -1930,7 +1927,7 @@
                 int index0 = elem.getElementIndex(rmOffs0);
                 int index1 = elem.getElementIndex(rmOffs1);
                 push(elem, index0);
-                ElemChanges ec = (ElemChanges)path.peek();
+                ElemChanges ec = path.peek();
 
                 // if the range is contained by one element,
                 // we just forward the request
@@ -2068,7 +2065,7 @@
                 if (rj.getStartOffset() == rmOffs1) {
                     rj = null;
                 }
-                Vector children = new Vector();
+                Vector<Element> children = new Vector<Element>();
 
                 // transfer the left
                 for (int i = 0; i < ljIndex; i++) {
@@ -2142,7 +2139,7 @@
             }
             Element e = createBranchElement(parent, clonee.getAttributes());
             int n = clonee.getElementCount();
-            ArrayList childrenList = new ArrayList(n);
+            ArrayList<Element> childrenList = new ArrayList<Element>(n);
             for (int i = 0; i < n; i++) {
                 Element elem = clonee.getElement(i);
                 if (elem.getStartOffset() < rmOffs0 || elem.getEndOffset() > rmOffs1) {
@@ -2150,7 +2147,7 @@
                 }
             }
             Element[] children = new Element[childrenList.size()];
-            children = (Element[])childrenList.toArray(children);
+            children = childrenList.toArray(children);
             ((BranchElement)e).replace(0, 0, children);
             return e;
         }
@@ -2355,7 +2352,7 @@
          */
         void fractureDeepestLeaf(ElementSpec[] specs) {
             // Split the bottommost leaf. It will be recreated elsewhere.
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             Element child = ec.parent.getElement(ec.index);
             // Inserts at offset 0 do not need to recreate child (it would
             // have a length of 0!).
@@ -2380,7 +2377,7 @@
          */
         void insertFirstContent(ElementSpec[] specs) {
             ElementSpec firstSpec = specs[0];
-            ElemChanges ec = (ElemChanges) path.peek();
+            ElemChanges ec = path.peek();
             Element child = ec.parent.getElement(ec.index);
             int firstEndOffset = offset + firstSpec.getLength();
             boolean isOnlyContent = (specs.length == 1);
@@ -2463,8 +2460,8 @@
         transient int offset;
         transient int length;
         transient int endOffset;
-        transient Vector changes;  // Vector<ElemChanges>
-        transient Stack path;      // Stack<ElemChanges>
+        transient Vector<ElemChanges> changes;
+        transient Stack<ElemChanges> path;
         transient boolean insertOp;
 
         transient boolean recreateLeafs; // For insert.
@@ -2494,8 +2491,8 @@
                 this.parent = parent;
                 this.index = index;
                 this.isFracture = isFracture;
-                added = new Vector();
-                removed = new Vector();
+                added = new Vector<Element>();
+                removed = new Vector<Element>();
             }
 
             public String toString() {
@@ -2504,8 +2501,8 @@
 
             Element parent;
             int index;
-            Vector added;
-            Vector removed;
+            Vector<Element> added;
+            Vector<Element> removed;
             boolean isFracture;
         }
 
@@ -2611,7 +2608,7 @@
         /* This has an implicit reference to the handler object.  */
         private class DocReference extends WeakReference<DefaultStyledDocument> {
 
-            DocReference(DefaultStyledDocument d, ReferenceQueue q) {
+            DocReference(DefaultStyledDocument d, ReferenceQueue<DefaultStyledDocument> q) {
                 super(d, q);
             }
 
@@ -2624,19 +2621,19 @@
         }
 
         /** Class-specific reference queues.  */
-        private final static Map<Class, ReferenceQueue> queueMap
-                = new HashMap<Class, ReferenceQueue>();
+        private final static Map<Class, ReferenceQueue<DefaultStyledDocument>> queueMap
+                = new HashMap<Class, ReferenceQueue<DefaultStyledDocument>>();
 
         /** A weak reference to the document object.  */
         private DocReference doc;
 
         AbstractChangeHandler(DefaultStyledDocument d) {
             Class c = getClass();
-            ReferenceQueue q;
+            ReferenceQueue<DefaultStyledDocument> q;
             synchronized (queueMap) {
                 q = queueMap.get(c);
                 if (q == null) {
-                    q = new ReferenceQueue();
+                    q = new ReferenceQueue<DefaultStyledDocument>();
                     queueMap.put(c, q);
                 }
             }
@@ -2650,7 +2647,7 @@
          */
         static List<ChangeListener> getStaleListeners(ChangeListener l) {
             List<ChangeListener> staleListeners = new ArrayList<ChangeListener>();
-            ReferenceQueue q = queueMap.get(l.getClass());
+            ReferenceQueue<DefaultStyledDocument> q = queueMap.get(l.getClass());
 
             if (q != null) {
                 DocReference r;
--- a/jdk/src/share/classes/javax/swing/text/ElementIterator.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ElementIterator.java	Wed Jul 05 16:42:37 2017 +0200
@@ -72,7 +72,7 @@
 
 
     private Element root;
-    private Stack elementStack = null;
+    private Stack<StackItem> elementStack = null;
 
     /**
      * The StackItem class stores the element
@@ -148,9 +148,9 @@
         try {
             ElementIterator it = new ElementIterator(root);
             if (elementStack != null) {
-                it.elementStack = new Stack();
+                it.elementStack = new Stack<StackItem>();
                 for (int i = 0; i < elementStack.size(); i++) {
-                    StackItem item = (StackItem)elementStack.elementAt(i);
+                    StackItem item = elementStack.elementAt(i);
                     StackItem clonee = (StackItem)item.clone();
                     it.elementStack.push(clonee);
                 }
@@ -173,7 +173,7 @@
             return null;
         }
 
-        elementStack = new Stack();
+        elementStack = new Stack<StackItem>();
         if (root.getElementCount() != 0) {
             elementStack.push(new StackItem(root));
         }
@@ -209,7 +209,7 @@
           get a handle to the element on top of the stack.
         */
         if (! elementStack.empty()) {
-            StackItem item = (StackItem)elementStack.peek();
+            StackItem item = elementStack.peek();
             Element elem = item.getElement();
             int index = item.getIndex();
             // self reference
@@ -247,7 +247,7 @@
 
         // get a handle to the element on top of the stack
 
-        StackItem item = (StackItem)elementStack.peek();
+        StackItem item = elementStack.peek();
         Element elem = item.getElement();
         int index = item.getIndex();
 
@@ -272,7 +272,7 @@
             if (!elementStack.isEmpty()) {
                 /* Increment the child index for the item that
                    is now on top of the stack. */
-                StackItem top = (StackItem)elementStack.peek();
+                StackItem top = elementStack.peek();
                 top.incrementIndex();
                 /* We now want to return its next child, therefore
                    call next() recursively. */
@@ -300,7 +300,7 @@
 
         // get a handle to the element on top of the stack
         //
-        StackItem item = (StackItem)elementStack.peek();
+        StackItem item = elementStack.peek();
         Element elem = item.getElement();
         int index = item.getIndex();
 
@@ -320,8 +320,8 @@
             /* We need to return either the item
                below the top item or one of the
                former's children. */
-            Object top = elementStack.pop();
-            item = (StackItem)elementStack.peek();
+            StackItem top = elementStack.pop();
+            item = elementStack.peek();
 
             // restore the top item.
             elementStack.push(top);
--- a/jdk/src/share/classes/javax/swing/text/FlowView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/FlowView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -184,9 +184,9 @@
         final int faxis = getFlowAxis();
         int newSpan;
         if (faxis == X_AXIS) {
-            newSpan = (int)width;
+            newSpan = width;
         } else {
-            newSpan = (int)height;
+            newSpan = height;
         }
         if (layoutSpan != newSpan) {
             layoutChanged(faxis);
@@ -197,7 +197,7 @@
         // repair the flow if necessary
         if (! isLayoutValid(faxis)) {
             final int heightAxis = getAxis();
-            int oldFlowHeight = (int)((heightAxis == X_AXIS)? getWidth() : getHeight());
+            int oldFlowHeight = (heightAxis == X_AXIS)? getWidth() : getHeight();
             strategy.layout(this);
             int newFlowHeight = (int) getPreferredSpan(heightAxis);
             if (oldFlowHeight != newFlowHeight) {
--- a/jdk/src/share/classes/javax/swing/text/GapContent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/GapContent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -83,7 +83,7 @@
 
         marks = new MarkVector();
         search = new MarkData(0);
-        queue = new ReferenceQueue();
+        queue = new ReferenceQueue<StickyPosition>();
     }
 
     /**
@@ -262,13 +262,13 @@
      * it.  The update table holds only a reference
      * to this data.
      */
-    final class MarkData extends WeakReference {
+    final class MarkData extends WeakReference<StickyPosition> {
 
         MarkData(int index) {
             super(null);
             this.index = index;
         }
-        MarkData(int index, StickyPosition position, ReferenceQueue queue) {
+        MarkData(int index, StickyPosition position, ReferenceQueue<? super StickyPosition> queue) {
             super(position, queue);
             this.index = index;
         }
@@ -287,7 +287,7 @@
         }
 
         StickyPosition getPosition() {
-            return (StickyPosition)get();
+            return get();
         }
         int index;
     }
@@ -329,7 +329,7 @@
      */
     private transient int unusedMarks = 0;
 
-    private transient ReferenceQueue queue;
+    private transient ReferenceQueue<StickyPosition> queue;
 
     final static int GROWTH_SIZE = 1024 * 512;
 
@@ -535,7 +535,7 @@
             return 0;
         }
 
-        int cmp = 0;
+        int cmp;
         MarkData last = marks.elementAt(upper);
         cmp = compare(o, last);
         if (cmp > 0)
@@ -691,7 +691,7 @@
         s.defaultReadObject();
         marks = new MarkVector();
         search = new MarkData(0);
-        queue = new ReferenceQueue();
+        queue = new ReferenceQueue<StickyPosition>();
     }
 
 
--- a/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -27,6 +27,7 @@
 import java.awt.event.ActionEvent;
 import java.io.*;
 import java.text.*;
+import java.text.AttributedCharacterIterator.Attribute;
 import java.util.*;
 import javax.swing.*;
 import javax.swing.text.*;
@@ -352,13 +353,13 @@
             updateMask();
         }
 
-        Map attrs = getAttributes(offset);
+        Map<Attribute, Object> attrs = getAttributes(offset);
 
         if (attrs != null && attrs.size() > 0) {
-            ArrayList al = new ArrayList();
+            ArrayList<Attribute> al = new ArrayList<Attribute>();
 
             al.addAll(attrs.keySet());
-            return (Format.Field[])al.toArray(EMPTY_FIELD_ARRAY);
+            return al.toArray(EMPTY_FIELD_ARRAY);
         }
         return EMPTY_FIELD_ARRAY;
     }
@@ -440,7 +441,7 @@
     /**
      * Returns a Set of the attribute identifiers at <code>index</code>.
      */
-    Map getAttributes(int index) {
+    Map<Attribute, Object> getAttributes(int index) {
         if (isValidMask()) {
             AttributedCharacterIterator iterator = getIterator();
 
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -386,7 +386,7 @@
      * @since 1.4
      */
     public CaretListener[] getCaretListeners() {
-        return (CaretListener[])listenerList.getListeners(CaretListener.class);
+        return listenerList.getListeners(CaretListener.class);
     }
 
     /**
@@ -1171,16 +1171,15 @@
      * @param actions the set of actions
      */
     public static void loadKeymap(Keymap map, KeyBinding[] bindings, Action[] actions) {
-        Hashtable h = new Hashtable();
-        for (int i = 0; i < actions.length; i++) {
-            Action a = actions[i];
+        Hashtable<String, Action> h = new Hashtable<String, Action>();
+        for (Action a : actions) {
             String value = (String)a.getValue(Action.NAME);
             h.put((value!=null ? value:""), a);
         }
-        for (int i = 0; i < bindings.length; i++) {
-            Action a = (Action) h.get(bindings[i].actionName);
+        for (KeyBinding binding : bindings) {
+            Action a = h.get(binding.actionName);
             if (a != null) {
-                map.addActionForKeyStroke(bindings[i].key, a);
+                map.addActionForKeyStroke(binding.key, a);
             }
         }
     }
@@ -1192,11 +1191,11 @@
      * invoked from within a <code>doPrivileged</code>, and it is also
      * assumed <code>klass</code> extends <code>JTextComponent</code>.
      */
-    private static Boolean isProcessInputMethodEventOverridden(Class klass) {
+    private static Boolean isProcessInputMethodEventOverridden(Class<?> klass) {
         if (klass == JTextComponent.class) {
             return Boolean.FALSE;
         }
-        Boolean retValue = (Boolean)overrideMap.get(klass.getName());
+        Boolean retValue = overrideMap.get(klass.getName());
 
         if (retValue != null) {
             return retValue;
@@ -2053,7 +2052,7 @@
      */
     public boolean getScrollableTracksViewportWidth() {
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getWidth() > getPreferredSize().width);
+            return (getParent().getWidth() > getPreferredSize().width);
         }
         return false;
     }
@@ -2073,7 +2072,7 @@
      */
     public boolean getScrollableTracksViewportHeight() {
         if (getParent() instanceof JViewport) {
-            return (((JViewport)getParent()).getHeight() > getPreferredSize().height);
+            return (getParent().getHeight() > getPreferredSize().height);
         }
         return false;
     }
@@ -3033,7 +3032,7 @@
                 StyledDocument sdoc = (StyledDocument)model;
                 return sdoc.getParagraphElement(index);
             } else {
-                Element para = null;
+                Element para;
                 for (para = model.getDefaultRootElement(); ! para.isLeaf(); ) {
                     int pos = para.getElementIndex(index);
                     para = para.getElement(pos);
@@ -3535,7 +3534,7 @@
                 throw new BadLocationException("Location out of bounds", index);
             }
             // locate the Element at index
-            Element indexElement = null;
+            Element indexElement;
             // locate the Element at our index/offset
             int elementIndex = -1;        // test for initialization
             for (indexElement = model.getDefaultRootElement();
@@ -3553,7 +3552,7 @@
             // find the first Element before/after ours w/the same AttributeSet
             // if we are already at edge of the first element in our parent
             // then return that edge
-            Element edgeElement = indexElement;
+            Element edgeElement;
             switch (direction) {
             case -1:
             case 1:
@@ -3903,7 +3902,7 @@
      * Maps from class name to Boolean indicating if
      * <code>processInputMethodEvent</code> has been overriden.
      */
-    private static Map overrideMap;
+    private static Map<String, Boolean> overrideMap;
 
     /**
      * Returns a string representation of this <code>JTextComponent</code>.
@@ -4007,9 +4006,9 @@
         }
         private DataFlavor getFlavor(DataFlavor[] flavors) {
             if (flavors != null) {
-                for (int counter = 0; counter < flavors.length; counter++) {
-                    if (flavors[counter].equals(DataFlavor.stringFlavor)) {
-                        return flavors[counter];
+                for (DataFlavor flavor : flavors) {
+                    if (flavor.equals(DataFlavor.stringFlavor)) {
+                        return flavor;
                     }
                 }
             }
@@ -4065,7 +4064,7 @@
         DefaultKeymap(String nm, Keymap parent) {
             this.nm = nm;
             this.parent = parent;
-            bindings = new Hashtable();
+            bindings = new Hashtable<KeyStroke, Action>();
         }
 
         /**
@@ -4095,7 +4094,7 @@
         }
 
         public Action getAction(KeyStroke key) {
-            Action a = (Action) bindings.get(key);
+            Action a = bindings.get(key);
             if ((a == null) && (parent != null)) {
                 a = parent.getAction(key);
             }
@@ -4105,8 +4104,8 @@
         public KeyStroke[] getBoundKeyStrokes() {
             KeyStroke[] keys = new KeyStroke[bindings.size()];
             int i = 0;
-            for (Enumeration e = bindings.keys() ; e.hasMoreElements() ;) {
-                keys[i++] = (KeyStroke) e.nextElement();
+            for (Enumeration<KeyStroke> e = bindings.keys() ; e.hasMoreElements() ;) {
+                keys[i++] = e.nextElement();
             }
             return keys;
         }
@@ -4114,8 +4113,8 @@
         public Action[] getBoundActions() {
             Action[] actions = new Action[bindings.size()];
             int i = 0;
-            for (Enumeration e = bindings.elements() ; e.hasMoreElements() ;) {
-                actions[i++] = (Action) e.nextElement();
+            for (Enumeration<Action> e = bindings.elements() ; e.hasMoreElements() ;) {
+                actions[i++] = e.nextElement();
             }
             return actions;
         }
@@ -4126,13 +4125,12 @@
             }
             KeyStroke[] retValue = null;
             // Determine local bindings first.
-            Vector keyStrokes = null;
-            for (Enumeration enum_ = bindings.keys();
-                 enum_.hasMoreElements();) {
-                Object key = enum_.nextElement();
+            Vector<KeyStroke> keyStrokes = null;
+            for (Enumeration<KeyStroke> keys = bindings.keys(); keys.hasMoreElements();) {
+                KeyStroke key = keys.nextElement();
                 if (bindings.get(key) == a) {
                     if (keyStrokes == null) {
-                        keyStrokes = new Vector();
+                        keyStrokes = new Vector<KeyStroke>();
                     }
                     keyStrokes.addElement(key);
                 }
@@ -4153,7 +4151,7 @@
                     }
                     if (rCount > 0 && rCount < pStrokes.length) {
                         if (keyStrokes == null) {
-                            keyStrokes = new Vector();
+                            keyStrokes = new Vector<KeyStroke>();
                         }
                         for (int counter = pStrokes.length - 1; counter >= 0;
                              counter--) {
@@ -4218,7 +4216,7 @@
 
         String nm;
         Keymap parent;
-        Hashtable bindings;
+        Hashtable<KeyStroke, Action> bindings;
         Action defaultAction;
     }
 
@@ -4507,8 +4505,7 @@
     //
     public InputMethodRequests getInputMethodRequests() {
         if (inputMethodRequestsHandler == null) {
-            inputMethodRequestsHandler =
-                (InputMethodRequests)new InputMethodRequestsHandler();
+            inputMethodRequestsHandler = new InputMethodRequestsHandler();
             Document doc = getDocument();
             if (doc != null) {
                 doc.addDocumentListener((DocumentListener)inputMethodRequestsHandler);
@@ -4923,16 +4920,16 @@
     //
     private boolean isProcessInputMethodEventOverridden() {
         if (overrideMap == null) {
-            overrideMap = Collections.synchronizedMap(new HashMap());
+            overrideMap = Collections.synchronizedMap(new HashMap<String, Boolean>());
         }
-        Boolean retValue = (Boolean)overrideMap.get(getClass().getName());
+        Boolean retValue = overrideMap.get(getClass().getName());
 
         if (retValue != null) {
             return retValue.booleanValue();
         }
-        Boolean ret = (Boolean)AccessController.doPrivileged(new
-                       PrivilegedAction() {
-            public Object run() {
+        Boolean ret = AccessController.doPrivileged(new
+                       PrivilegedAction<Boolean>() {
+            public Boolean run() {
                 return isProcessInputMethodEventOverridden(
                                 JTextComponent.this.getClass());
             }
--- a/jdk/src/share/classes/javax/swing/text/LayoutQueue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/LayoutQueue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -35,7 +35,7 @@
  */
 public class LayoutQueue {
 
-    Vector tasks;
+    Vector<Runnable> tasks;
     Thread worker;
 
     static LayoutQueue defaultQueue;
@@ -44,7 +44,7 @@
      * Construct a layout queue.
      */
     public LayoutQueue() {
-        tasks = new Vector();
+        tasks = new Vector<Runnable>();
     }
 
     /**
@@ -90,7 +90,7 @@
                 return null;
             }
         }
-        Runnable work = (Runnable) tasks.firstElement();
+        Runnable work = tasks.firstElement();
         tasks.removeElementAt(0);
         return work;
     }
--- a/jdk/src/share/classes/javax/swing/text/MaskFormatter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/MaskFormatter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -446,7 +446,7 @@
      */
     private Object stringToValue(String value, boolean completeMatch) throws
                          ParseException {
-        int errorOffset = -1;
+        int errorOffset;
 
         if ((errorOffset = getInvalidOffset(value, completeMatch)) == -1) {
             if (!getValueContainsLiteralCharacters()) {
@@ -498,8 +498,8 @@
      */
     private void updateInternalMask() throws ParseException {
         String mask = getMask();
-        ArrayList fixed = new ArrayList();
-        ArrayList temp = fixed;
+        ArrayList<MaskCharacter> fixed = new ArrayList<MaskCharacter>();
+        ArrayList<MaskCharacter> temp = fixed;
 
         if (mask != null) {
             for (int counter = 0, maxCounter = mask.length();
--- a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -299,10 +299,7 @@
             if (attrs.get(NumberFormat.Field.SIGN) != null) {
                 size--;
             }
-            if (size == 0) {
-                return true;
-            }
-            return false;
+            return size == 0;
         }
         return true;
     }
@@ -315,10 +312,7 @@
     boolean isNavigatable(int index) {
         if (!super.isNavigatable(index)) {
             // Don't skip the decimal, it causes wierd behavior
-            if (getBufferedChar(index) == getDecimalSeparator()) {
-                return true;
-            }
-            return false;
+            return getBufferedChar(index) == getDecimalSeparator();
         }
         return true;
     }
@@ -341,11 +335,7 @@
                 Map attrs = iterator.getAttributes();
 
                 if (attrs != null && attrs.size() > 0) {
-                    Iterator keys = attrs.keySet().iterator();
-
-                    while (keys.hasNext()) {
-                        Object key = keys.next();
-
+                    for (Object key : attrs.keySet()) {
                         if (key instanceof NumberFormat.Field) {
                             return (NumberFormat.Field)key;
                         }
@@ -461,7 +451,7 @@
                     }
                 }
                 if (string != null) {
-                    Class valueClass = getValueClass();
+                    Class<?> valueClass = getValueClass();
 
                     if (valueClass == null) {
                         valueClass = value.getClass();
--- a/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Wed Jul 05 16:42:37 2017 +0200
@@ -318,7 +318,7 @@
     }
 
     private AbstractElement defaultRoot;
-    private Vector added = new Vector();     // Vector<Element>
-    private Vector removed = new Vector();   // Vector<Element>
+    private Vector<Element> added = new Vector<Element>();
+    private Vector<Element> removed = new Vector<Element>();
     private transient Segment s;
 }
--- a/jdk/src/share/classes/javax/swing/text/SegmentCache.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/SegmentCache.java	Wed Jul 05 16:42:37 2017 +0200
@@ -48,7 +48,7 @@
     /**
      * A list of the currently unused Segments.
      */
-    private List segments;
+    private List<Segment> segments;
 
 
     /**
@@ -80,7 +80,7 @@
      * Creates and returns a SegmentCache.
      */
     public SegmentCache() {
-        segments = new ArrayList(11);
+        segments = new ArrayList<Segment>(11);
     }
 
     /**
@@ -92,7 +92,7 @@
             int size = segments.size();
 
             if (size > 0) {
-                return (Segment)segments.remove(size - 1);
+                return segments.remove(size - 1);
             }
         }
         return new CachedSegment();
--- a/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,7 +56,7 @@
      */
     public static final AttributeSet EMPTY = new EmptyAttributeSet();
 
-    private transient Hashtable table = new Hashtable(3);
+    private transient Hashtable<Object, Object> table = new Hashtable<Object, Object>(3);
 
     /**
      * Creates a new attribute set.
@@ -73,7 +73,7 @@
         addAttributes(source);
     }
 
-    private SimpleAttributeSet(Hashtable table) {
+    private SimpleAttributeSet(Hashtable<Object, Object> table) {
         this.table = table;
     }
 
@@ -341,7 +341,7 @@
     private void readObject(ObjectInputStream s)
       throws ClassNotFoundException, IOException {
         s.defaultReadObject();
-        table = new Hashtable(3);
+        table = new Hashtable<Object, Object>(3);
         StyleContext.readAttributeSet(s, this);
     }
 
--- a/jdk/src/share/classes/javax/swing/text/StringContent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -174,7 +174,7 @@
         // some small documents won't have any sticky positions
         // at all, so the buffer is created lazily.
         if (marks == null) {
-            marks = new Vector();
+            marks = new Vector<PosRec>();
         }
         return new StickyPosition(offset);
     }
@@ -226,7 +226,7 @@
         }
         int n = marks.size();
         for (int i = 0; i < n; i++) {
-            PosRec mark = (PosRec) marks.elementAt(i);
+            PosRec mark = marks.elementAt(i);
             if (mark.unused) {
                 // this record is no longer used, get rid of it
                 marks.removeElementAt(i);
@@ -241,7 +241,7 @@
     synchronized void updateMarksForRemove(int offset, int length) {
         int n = marks.size();
         for (int i = 0; i < n; i++) {
-            PosRec mark = (PosRec) marks.elementAt(i);
+            PosRec mark = marks.elementAt(i);
             if (mark.unused) {
                 // this record is no longer used, get rid of it
                 marks.removeElementAt(i);
@@ -276,7 +276,7 @@
         int end = offset + length;
         Vector placeIn = (v == null) ? new Vector() : v;
         for (int i = 0; i < n; i++) {
-            PosRec mark = (PosRec) marks.elementAt(i);
+            PosRec mark = marks.elementAt(i);
             if (mark.unused) {
                 // this record is no longer used, get rid of it
                 marks.removeElementAt(i);
@@ -312,7 +312,7 @@
     private static final char[] empty = new char[0];
     private char[] data;
     private int count;
-    transient Vector marks;
+    transient Vector<PosRec> marks;
 
     /**
      * holds the data for a mark... separately from
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java	Wed Jul 05 16:42:37 2017 +0200
@@ -246,7 +246,7 @@
      */
     public Font getFont(String family, int style, int size) {
         fontSearch.setValue(family, style, size);
-        Font f = (Font) fontTable.get(fontSearch);
+        Font f = fontTable.get(fontSearch);
         if (f == null) {
             // haven't seen this one yet.
             Style defaultStyle =
@@ -517,12 +517,11 @@
         // PENDING(prinz) should consider finding a alternative to
         // generating extra garbage on search key.
         SmallAttributeSet key = createSmallAttributeSet(search);
-        WeakReference reference = (WeakReference)attributesPool.get(key);
+        WeakReference<SmallAttributeSet> reference = attributesPool.get(key);
         SmallAttributeSet a;
-        if (reference == null
-            || (a = (SmallAttributeSet)reference.get()) == null) {
+        if (reference == null || (a = reference.get()) == null) {
             a = key;
-            attributesPool.put(a, new WeakReference(a));
+            attributesPool.put(a, new WeakReference<SmallAttributeSet>(a));
         }
         return a;
     }
@@ -547,9 +546,7 @@
     public String toString() {
         removeUnusedSets();
         String s = "";
-        Iterator iterator = attributesPool.keySet().iterator();
-        while (iterator.hasNext()) {
-            SmallAttributeSet set = (SmallAttributeSet)iterator.next();
+        for (SmallAttributeSet set : attributesPool.keySet()) {
             s = s + set + "\n";
         }
         return s;
@@ -676,8 +673,8 @@
     public static void registerStaticAttributeKey(Object key) {
         String ioFmt = key.getClass().getName() + "." + key.toString();
         if (freezeKeyMap == null) {
-            freezeKeyMap = new Hashtable();
-            thawKeyMap = new Hashtable();
+            freezeKeyMap = new Hashtable<Object, String>();
+            thawKeyMap = new Hashtable<String, Object>();
         }
         freezeKeyMap.put(key, ioFmt);
         thawKeyMap.put(ioFmt, key);
@@ -716,10 +713,10 @@
       throws ClassNotFoundException, IOException
     {
         fontSearch = new FontKey(null, 0, 0);
-        fontTable = new Hashtable();
+        fontTable = new Hashtable<FontKey, Font>();
         search = new SimpleAttributeSet();
         attributesPool = Collections.
-            synchronizedMap(new WeakHashMap());
+                synchronizedMap(new WeakHashMap<SmallAttributeSet, WeakReference<SmallAttributeSet>>());
         s.defaultReadObject();
     }
 
@@ -731,15 +728,15 @@
      */
     public static final String DEFAULT_STYLE = "default";
 
-    private static Hashtable freezeKeyMap;
-    private static Hashtable thawKeyMap;
+    private static Hashtable<Object, String> freezeKeyMap;
+    private static Hashtable<String, Object> thawKeyMap;
 
     private Style styles;
     private transient FontKey fontSearch = new FontKey(null, 0, 0);
-    private transient Hashtable fontTable = new Hashtable();
+    private transient Hashtable<FontKey, Font> fontTable = new Hashtable<FontKey, Font>();
 
-    private transient Map attributesPool = Collections.
-        synchronizedMap(new WeakHashMap());
+    private transient Map<SmallAttributeSet, WeakReference<SmallAttributeSet>> attributesPool = Collections.
+            synchronizedMap(new WeakHashMap<SmallAttributeSet, WeakReference<SmallAttributeSet>>());
     private transient MutableAttributeSet search = new SimpleAttributeSet();
 
     /**
@@ -1176,8 +1173,8 @@
             }
         }
 
-        private Vector keys = new Vector();
-        private Vector data = new Vector();
+        private Vector<Object> keys = new Vector<Object>();
+        private Vector<Object> data = new Vector<Object>();
     }
 
     /**
@@ -1344,8 +1341,7 @@
          * @since 1.4
          */
         public ChangeListener[] getChangeListeners() {
-            return (ChangeListener[])listenerList.getListeners(
-                    ChangeListener.class);
+            return listenerList.getListeners(ChangeListener.class);
         }
 
 
--- a/jdk/src/share/classes/javax/swing/text/TableView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TableView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -76,7 +76,7 @@
      */
     public TableView(Element elem) {
         super(elem, View.Y_AXIS);
-        rows = new Vector();
+        rows = new Vector<TableRow>();
         gridValid = false;
     }
 
@@ -139,7 +139,7 @@
 
     TableRow getRow(int row) {
         if (row < rows.size()) {
-            return (TableRow) rows.elementAt(row);
+            return rows.elementAt(row);
         }
         return null;
     }
@@ -227,7 +227,7 @@
             for (int i = 0; i < n; i++) {
                 View v = getView(i);
                 if (v instanceof TableRow) {
-                    rows.addElement(v);
+                    rows.addElement((TableRow) v);
                     TableRow rv = (TableRow) v;
                     rv.clearFilledColumns();
                     rv.setRow(i);
@@ -368,8 +368,7 @@
         long min = 0;
         long pref = 0;
         long max = 0;
-        for (int i = 0; i < columnRequirements.length; i++) {
-            SizeRequirements req = columnRequirements[i];
+        for (SizeRequirements req : columnRequirements) {
             min += req.minimum;
             pref += req.preferred;
             max += req.maximum;
@@ -578,7 +577,7 @@
     int[] columnSpans;
     int[] columnOffsets;
     SizeRequirements[] columnRequirements;
-    Vector rows;
+    Vector<TableRow> rows;
     boolean gridValid;
     static final private BitSet EMPTY = new BitSet();
 
--- a/jdk/src/share/classes/javax/swing/text/TextAction.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TextAction.java	Wed Jul 05 16:42:37 2017 +0200
@@ -103,14 +103,12 @@
      * @return the augmented list
      */
     public static final Action[] augmentList(Action[] list1, Action[] list2) {
-        Hashtable h = new Hashtable();
-        for (int i = 0; i < list1.length; i++) {
-            Action a = list1[i];
+        Hashtable<String, Action> h = new Hashtable<String, Action>();
+        for (Action a : list1) {
             String value = (String)a.getValue(Action.NAME);
             h.put((value!=null ? value:""), a);
         }
-        for (int i = 0; i < list2.length; i++) {
-            Action a = list2[i];
+        for (Action a : list2) {
             String value = (String)a.getValue(Action.NAME);
             h.put((value!=null ? value:""), a);
         }
--- a/jdk/src/share/classes/javax/swing/text/TextLayoutStrategy.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TextLayoutStrategy.java	Wed Jul 05 16:42:37 2017 +0200
@@ -103,7 +103,7 @@
      * constraints for each row.  This is called by a FlowView.layout
      * to update the child views in the flow.
      *
-     * @param v the view to reflow
+     * @param fv the view to reflow
      */
     public void layout(FlowView fv) {
         super.layout(fv);
@@ -485,9 +485,9 @@
          * Returns a map with the attributes defined on the current
          * character.
          */
-        public Map getAttributes() {
+        public Map<Attribute, Object> getAttributes() {
             Object[] ka = keys.toArray();
-            Hashtable h = new Hashtable();
+            Hashtable<Attribute, Object> h = new Hashtable<Attribute, Object>();
             for (int i = 0; i < ka.length; i++) {
                 TextAttribute a = (TextAttribute) ka[i];
                 Object value = getAttribute(a);
@@ -520,16 +520,16 @@
          * iterator's text range. The set is empty if no
          * attributes are defined.
          */
-        public Set getAllAttributeKeys() {
+        public Set<Attribute> getAllAttributeKeys() {
             return keys;
         }
 
         View v;
 
-        static Set keys;
+        static Set<Attribute> keys;
 
         static {
-            keys = new HashSet();
+            keys = new HashSet<Attribute>();
             keys.add(TextAttribute.FONT);
             keys.add(TextAttribute.RUN_DIRECTION);
         }
--- a/jdk/src/share/classes/javax/swing/text/ZoneView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ZoneView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -79,7 +79,7 @@
 
     int maxZoneSize = 8 * 1024;
     int maxZonesLoaded = 3;
-    Vector loadedZones;
+    Vector<View> loadedZones;
 
     /**
      * Constructs a ZoneView.
@@ -89,7 +89,7 @@
      */
     public ZoneView(Element elem, int axis) {
         super(elem, axis);
-        loadedZones = new Vector();
+        loadedZones = new Vector<View>();
     }
 
     /**
@@ -157,7 +157,7 @@
 
     void unloadOldZones() {
         while (loadedZones.size() > getMaxZonesLoaded()) {
-            View zone = (View) loadedZones.elementAt(0);
+            View zone = loadedZones.elementAt(0);
             loadedZones.removeElementAt(0);
             unloadZone(zone);
         }
@@ -206,7 +206,7 @@
      */
     protected View createZone(int p0, int p1) {
         Document doc = getDocument();
-        View zone = null;
+        View zone;
         try {
             zone = new Zone(getElement(),
                             doc.createPosition(p0),
@@ -285,7 +285,7 @@
         // divide the old zone into a new set of bins
         Element elem = getElement();
         Document doc = elem.getDocument();
-        Vector zones = new Vector();
+        Vector<View> zones = new Vector<View>();
         int offs = offs0;
         do {
             offs0 = offs;
--- a/jdk/src/share/classes/javax/swing/text/html/AccessibleHTML.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/AccessibleHTML.java	Wed Jul 05 16:42:37 2017 +0200
@@ -456,7 +456,7 @@
         /**
          * Sets the Cursor of this object.
          *
-         * @param c the new Cursor for the object
+         * @param cursor the new Cursor for the object
          * @see #getCursor
          */
         public void setCursor(Cursor cursor) {
@@ -1076,7 +1076,7 @@
                     StyledDocument sdoc = (StyledDocument)model;
                     return sdoc.getParagraphElement(index);
                 } else {
-                    Element para = null;
+                    Element para;
                     for (para = model.getDefaultRootElement(); ! para.isLeaf(); ) {
                         int pos = para.getElementIndex(index);
                         para = para.getElement(pos);
@@ -1465,7 +1465,7 @@
             // Determine the max row/col count.
             int delta = 0;
             int maxCols = 0;
-            int rows = 0;
+            int rows;
             for (int counter = 0; counter < getChildCount(); counter++) {
                 TableRowElementInfo row = getRow(counter);
                 int prev = 0;
@@ -1929,7 +1929,7 @@
              * Returns a boolean value indicating whether the specified column
              * is selected.
              *
-             * @param r zero-based column of the table
+             * @param c zero-based column of the table
              * @return the boolean value true if the specified column is selected.
              * Otherwise, false.
              */
@@ -1966,7 +1966,7 @@
             public int [] getSelectedAccessibleRows() {
                 if (validateIfNecessary()) {
                     int nRows = getAccessibleRowCount();
-                    Vector vec = new Vector();
+                    Vector<Integer> vec = new Vector<Integer>();
 
                     for (int i = 0; i < nRows; i++) {
                         if (isAccessibleRowSelected(i)) {
@@ -1975,7 +1975,7 @@
                     }
                     int retval[] = new int[vec.size()];
                     for (int i = 0; i < retval.length; i++) {
-                        retval[i] = ((Integer)vec.elementAt(i)).intValue();
+                        retval[i] = vec.elementAt(i).intValue();
                     }
                     return retval;
                 }
@@ -1991,7 +1991,7 @@
             public int [] getSelectedAccessibleColumns() {
                 if (validateIfNecessary()) {
                     int nColumns = getAccessibleRowCount();
-                    Vector vec = new Vector();
+                    Vector<Integer> vec = new Vector<Integer>();
 
                     for (int i = 0; i < nColumns; i++) {
                         if (isAccessibleColumnSelected(i)) {
@@ -2000,7 +2000,7 @@
                     }
                     int retval[] = new int[vec.size()];
                     for (int i = 0; i < retval.length; i++) {
-                        retval[i] = ((Integer)vec.elementAt(i)).intValue();
+                        retval[i] = vec.elementAt(i).intValue();
                     }
                     return retval;
                 }
@@ -2134,15 +2134,16 @@
                 // Header information is modeled as a Hashtable of
                 // ArrayLists where each Hashtable entry represents
                 // a row containing one or more headers.
-                private Hashtable headers = new Hashtable();
+                private Hashtable<Integer, ArrayList<TableCellElementInfo>> headers =
+                        new Hashtable<Integer, ArrayList<TableCellElementInfo>>();
                 private int rowCount = 0;
                 private int columnCount = 0;
 
                 public void addHeader(TableCellElementInfo cellInfo, int rowNumber) {
                     Integer rowInteger = Integer.valueOf(rowNumber);
-                    ArrayList list = (ArrayList)headers.get(rowInteger);
+                    ArrayList<TableCellElementInfo> list = headers.get(rowInteger);
                     if (list == null) {
-                        list = new ArrayList();
+                        list = new ArrayList<TableCellElementInfo>();
                         headers.put(rowInteger, list);
                     }
                     list.add(cellInfo);
@@ -2201,9 +2202,9 @@
                 }
 
                 private TableCellElementInfo getElementInfoAt(int r, int c) {
-                    ArrayList list = (ArrayList)headers.get(Integer.valueOf(r));
+                    ArrayList<TableCellElementInfo> list = headers.get(Integer.valueOf(r));
                     if (list != null) {
-                        return (TableCellElementInfo)list.get(c);
+                        return list.get(c);
                     } else {
                         return null;
                     }
@@ -2364,7 +2365,7 @@
                  * Returns a boolean value indicating whether the specified column
                  * is selected.
                  *
-                 * @param r zero-based column of the table
+                 * @param c zero-based column of the table
                  * @return the boolean value true if the specified column is selected.
                  * Otherwise, false.
                  */
@@ -2585,7 +2586,6 @@
             private void getAccessible(ElementInfo elementInfo) {
                 if (elementInfo instanceof Accessible) {
                     accessible = (Accessible)elementInfo;
-                    return;
                 } else {
                     for (int i = 0; i < elementInfo.getChildCount(); i++) {
                         getAccessible(elementInfo.getChild(i));
@@ -2643,7 +2643,7 @@
         /**
          * The children of this ElementInfo.
          */
-        private ArrayList children;
+        private ArrayList<ElementInfo> children;
         /**
          * The Element this ElementInfo is providing information for.
          */
@@ -2754,11 +2754,11 @@
          */
         public ElementInfo getChild(int index) {
             if (validateIfNecessary()) {
-                ArrayList children = this.children;
+                ArrayList<ElementInfo> children = this.children;
 
                 if (children != null && index >= 0 &&
                                         index < children.size()) {
-                    return (ElementInfo)children.get(index);
+                    return children.get(index);
                 }
             }
             return null;
@@ -2777,7 +2777,7 @@
          */
         protected void addChild(ElementInfo child) {
             if (children == null) {
-                children = new ArrayList();
+                children = new ArrayList<ElementInfo>();
             }
             children.add(child);
         }
@@ -2927,8 +2927,8 @@
             isValid = false;
             canBeValid = first;
             if (children != null) {
-                for (int counter = 0; counter < children.size(); counter++) {
-                    ((ElementInfo)children.get(counter)).invalidate(false);
+                for (ElementInfo child : children) {
+                    child.invalidate(false);
                 }
                 children = null;
             }
--- a/jdk/src/share/classes/javax/swing/text/html/CSS.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/CSS.java	Wed Jul 05 16:42:37 2017 +0200
@@ -468,7 +468,7 @@
     public CSS() {
         baseFontSize = baseFontSizeIndex + 1;
         // setup the css conversion table
-        valueConvertor = new Hashtable();
+        valueConvertor = new Hashtable<Object, Object>();
         valueConvertor.put(CSS.Attribute.FONT_SIZE, new FontSize());
         valueConvertor.put(CSS.Attribute.FONT_FAMILY, new FontFamily());
         valueConvertor.put(CSS.Attribute.FONT_WEIGHT, new FontWeight());
@@ -637,7 +637,7 @@
      * Maps from a StyleConstants to a CSS Attribute.
      */
     Attribute styleConstantsKeyToCSSKey(StyleConstants sc) {
-        return (Attribute)styleConstantToCssMap.get(sc);
+        return styleConstantToCssMap.get(sc);
     }
 
     /**
@@ -645,7 +645,7 @@
      */
     Object styleConstantsValueToCSSValue(StyleConstants sc,
                                          Object styleValue) {
-        Object cssKey = styleConstantsKeyToCSSKey(sc);
+        Attribute cssKey = styleConstantsKeyToCSSKey(sc);
         if (cssKey != null) {
             CssValue conv = (CssValue)valueConvertor.get(cssKey);
             return conv.fromStyleConstants(sc, styleValue);
@@ -659,8 +659,7 @@
      */
     Object cssValueToStyleConstantsValue(StyleConstants key, Object value) {
         if (value instanceof CssValue) {
-            return ((CssValue)value).toStyleConstants((StyleConstants)key,
-                                                      null);
+            return ((CssValue)value).toStyleConstants(key, null);
         }
         return null;
     }
@@ -784,7 +783,7 @@
      * Convert a set of HTML attributes to an equivalent
      * set of CSS attributes.
      *
-     * @param AttributeSet containing the HTML attributes.
+     * @param htmlAttrSet AttributeSet containing the HTML attributes.
      * @return AttributeSet containing the corresponding CSS attributes.
      *        The AttributeSet will be empty if there are no mapping
      *        CSS attributes.
@@ -841,8 +840,8 @@
         return cssAttrSet;
     }
 
-    private static final Hashtable attributeMap = new Hashtable();
-    private static final Hashtable valueMap = new Hashtable();
+    private static final Hashtable<String, Attribute> attributeMap = new Hashtable<String, Attribute>();
+    private static final Hashtable<String, Value> valueMap = new Hashtable<String, Value>();
 
     /**
      * The hashtable and the static initalization block below,
@@ -854,18 +853,18 @@
      * Therefore, the value associated with each HTML.Attribute.
      * key ends up being an array of CSS.Attribute.* objects.
      */
-    private static final Hashtable htmlAttrToCssAttrMap = new Hashtable(20);
+    private static final Hashtable<HTML.Attribute, CSS.Attribute[]> htmlAttrToCssAttrMap = new Hashtable<HTML.Attribute, CSS.Attribute[]>(20);
 
     /**
      * The hashtable and static initialization that follows sets
      * up a translation from StyleConstants (i.e. the <em>well known</em>
      * attributes) to the associated CSS attributes.
      */
-    private static final Hashtable styleConstantToCssMap = new Hashtable(17);
+    private static final Hashtable<Object, Attribute> styleConstantToCssMap = new Hashtable<Object, Attribute>(17);
     /** Maps from HTML value to a CSS value. Used in internal mapping. */
-    private static final Hashtable htmlValueToCssValueMap = new Hashtable(8);
+    private static final Hashtable<String, CSS.Value> htmlValueToCssValueMap = new Hashtable<String, CSS.Value>(8);
     /** Maps from CSS value (string) to internal value. */
-    private static final Hashtable cssValueToInternalValueMap = new Hashtable(13);
+    private static final Hashtable<String, CSS.Value> cssValueToInternalValueMap = new Hashtable<String, CSS.Value>(13);
 
     static {
         // load the attribute map
@@ -995,8 +994,8 @@
         // Register all the CSS attribute keys for archival/unarchival
         Object[] keys = CSS.Attribute.allAttributes;
         try {
-            for (int i = 0; i < keys.length; i++) {
-                StyleContext.registerStaticAttributeKey(keys[i]);
+            for (Object key : keys) {
+                StyleContext.registerStaticAttributeKey(key);
             }
         } catch (Throwable e) {
             e.printStackTrace();
@@ -1005,8 +1004,8 @@
         // Register all the CSS Values for archival/unarchival
         keys = CSS.Value.allValues;
         try {
-            for (int i = 0; i < keys.length; i++) {
-                StyleContext.registerStaticAttributeKey(keys[i]);
+            for (Object key : keys) {
+                StyleContext.registerStaticAttributeKey(key);
             }
         } catch (Throwable e) {
             e.printStackTrace();
@@ -1034,7 +1033,7 @@
      *  doesn't represent a valid attribute key
      */
     public static final Attribute getAttribute(String name) {
-        return (Attribute) attributeMap.get(name);
+        return attributeMap.get(name);
     }
 
     /**
@@ -1050,7 +1049,7 @@
      *  not mean that it doesn't represent a valid CSS value
      */
     static final Value getValue(String name) {
-        return (Value) valueMap.get(name);
+        return valueMap.get(name);
     }
 
 
@@ -1159,7 +1158,7 @@
      * to a Color.
      */
     static Color stringToColor(String str) {
-      Color color = null;
+      Color color;
 
       if (str == null) {
           return null;
@@ -1299,7 +1298,7 @@
     static String[] parseStrings(String value) {
         int         current, last;
         int         length = (value == null) ? 0 : value.length();
-        Vector      temp = new Vector(4);
+        Vector<String> temp = new Vector<String>(4);
 
         current = 0;
         while (current < length) {
@@ -1423,10 +1422,10 @@
         if (cssAttrList == null || htmlAttrValue == null) {
             return;
         }
-        for (int i = 0; i < cssAttrList.length; i++) {
-            Object o = getCssValue(cssAttrList[i], htmlAttrValue);
+        for (Attribute cssAttr : cssAttrList) {
+            Object o = getCssValue(cssAttr, htmlAttrValue);
             if (o != null) {
-                cssAttrSet.addAttribute(cssAttrList[i], o);
+                cssAttrSet.addAttribute(cssAttr , o);
             }
         }
     }
@@ -1452,7 +1451,7 @@
      * @return CSS.Attribute[]
      */
     private CSS.Attribute[] getCssAttribute(HTML.Attribute hAttr) {
-        return (CSS.Attribute[])htmlAttrToCssAttrMap.get(hAttr);
+        return htmlAttrToCssAttrMap.get(hAttr);
     }
 
     /**
@@ -2599,8 +2598,8 @@
      * to an AttributeSet or returned to the developer.
      */
     static class LengthUnit implements Serializable {
-        static Hashtable lengthMapping = new Hashtable(6);
-        static Hashtable w3cLengthMapping = new Hashtable(6);
+        static Hashtable<String, Float> lengthMapping = new Hashtable<String, Float>(6);
+        static Hashtable<String, Float> w3cLengthMapping = new Hashtable<String, Float>(6);
         static {
             lengthMapping.put("pt", new Float(1f));
             // Not sure about 1.3, determined by experiementation.
@@ -2642,7 +2641,7 @@
             }
             if (length >= 2) {
                 units = value.substring(length - 2, length);
-                Float scale = (Float)lengthMapping.get(units);
+                Float scale = lengthMapping.get(units);
                 if (scale != null) {
                     try {
                         this.value = Float.valueOf(value.substring(0,
@@ -2686,10 +2685,10 @@
         }
 
         float getValue(boolean w3cLengthUnits) {
-            Hashtable mapping = (w3cLengthUnits) ? w3cLengthMapping : lengthMapping;
+            Hashtable<String, Float> mapping = (w3cLengthUnits) ? w3cLengthMapping : lengthMapping;
             float scale = 1;
             if (units != null) {
-                Float scaleFloat = (Float)mapping.get(units);
+                Float scaleFloat = mapping.get(units);
                 if (scaleFloat != null) {
                     scale = scaleFloat.floatValue();
                 }
@@ -2699,10 +2698,10 @@
         }
 
         static float getValue(float value, String units, Boolean w3cLengthUnits) {
-            Hashtable mapping = (w3cLengthUnits) ? w3cLengthMapping : lengthMapping;
+            Hashtable<String, Float> mapping = (w3cLengthUnits) ? w3cLengthMapping : lengthMapping;
             float scale = 1;
             if (units != null) {
-                Float scaleFloat = (Float)mapping.get(units);
+                Float scaleFloat = mapping.get(units);
                 if (scaleFloat != null) {
                     scale = scaleFloat.floatValue();
                 }
@@ -3089,7 +3088,7 @@
             iter.setIndex(i);
             int margin0 = lastMargin;
             int margin1 = (int) iter.getLeadingCollapseSpan();
-            totalSpacing += Math.max(margin0, margin1);;
+            totalSpacing += Math.max(margin0, margin1);
             preferred += (int) iter.getPreferredSpan(0);
             minimum += iter.getMinimumSpan(0);
             maximum += iter.getMaximumSpan(0);
@@ -3127,7 +3126,7 @@
          * of margin collapsing, and the flexibility to adjust the sizes.
          */
         long preferred = 0;
-        long currentPreferred = 0;
+        long currentPreferred;
         int lastMargin = 0;
         int totalSpacing = 0;
         int n = iter.getCount();
@@ -3199,7 +3198,7 @@
             }
         }
         // make the adjustments
-        int totalOffset = (int)iter.getBorderWidth();;
+        int totalOffset = (int)iter.getBorderWidth();
         for (int i = 0; i < n; i++) {
             iter.setIndex(i);
             iter.setOffset( iter.getOffset() + totalOffset);
@@ -3331,7 +3330,7 @@
         s.defaultReadObject();
         // Reconstruct the hashtable.
         int numValues = s.readInt();
-        valueConvertor = new Hashtable(Math.max(1, numValues));
+        valueConvertor = new Hashtable<Object, Object>(Math.max(1, numValues));
         while (numValues-- > 0) {
             Object key = s.readObject();
             Object value = s.readObject();
@@ -3372,7 +3371,7 @@
     //
 
     /** Maps from CSS key to CssValue. */
-    private transient Hashtable valueConvertor;
+    private transient Hashtable<Object, Object> valueConvertor;
 
     /** Size used for relative units. */
     private int baseFontSize;
--- a/jdk/src/share/classes/javax/swing/text/html/HRuleView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HRuleView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -67,13 +67,18 @@
             // use ALIGN_CENTER by default, so we check if the alignment
             // attribute is actually defined
             if (attr.getAttribute(StyleConstants.Alignment) != null) {
-            alignment = StyleConstants.getAlignment(attr);
+                alignment = StyleConstants.getAlignment(attr);
             }
 
             noshade = (String)eAttr.getAttribute(HTML.Attribute.NOSHADE);
             Object value = eAttr.getAttribute(HTML.Attribute.SIZE);
-            if (value != null && (value instanceof String))
-                size = Integer.parseInt((String)value);
+            if (value != null && (value instanceof String)) {
+                try {
+                    size = Integer.parseInt((String)value);
+                } catch (NumberFormatException e) {
+                    size = 1;
+                }
+            }
             value = attr.getAttribute(CSS.Attribute.WIDTH);
             if (value != null && (value instanceof CSS.LengthValue)) {
                 widthValue = (CSS.LengthValue)value;
--- a/jdk/src/share/classes/javax/swing/text/html/HTML.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTML.java	Wed Jul 05 16:42:37 2017 +0200
@@ -133,7 +133,7 @@
          *
          * @return <code>true</code> if this tag is considered to be a paragraph
          *         in the internal HTML model. <code>false</code> - otherwise.
-         * @see javax.swing.text.html.HTMLDocument#HTMLReader#ParagraphAction
+         * @see HTMLDocument.HTMLReader.ParagraphAction
          */
         boolean isParagraph() {
             return (
@@ -536,10 +536,10 @@
     // that the hashtable grew to was determined, and then that very size
     // is used.
     //
-    private static final Hashtable tagHashtable = new Hashtable(73);
+    private static final Hashtable<String, Tag> tagHashtable = new Hashtable<String, Tag>(73);
 
     /** Maps from StyleConstant key to HTML.Tag. */
-    private static final Hashtable scMapping = new Hashtable(8);
+    private static final Hashtable<Object, Tag> scMapping = new Hashtable<Object, Tag>(8);
 
     static {
 
@@ -598,8 +598,8 @@
      */
     public static Tag getTag(String tagName) {
 
-        Object t =  tagHashtable.get(tagName);
-        return (t == null ? null : (Tag)t);
+        Tag t =  tagHashtable.get(tagName);
+        return (t == null ? null : t);
     }
 
     /**
@@ -613,7 +613,7 @@
      *   <code>null</code> if not found
      */
     static Tag getTagForStyleConstantsKey(StyleConstants sc) {
-        return (Tag)scMapping.get(sc);
+        return scMapping.get(sc);
     }
 
     /**
@@ -646,7 +646,7 @@
     public static final String NULL_ATTRIBUTE_VALUE = "#DEFAULT";
 
     // size determined similar to size of tagHashtable
-    private static final Hashtable attHashtable = new Hashtable(77);
+    private static final Hashtable<String, Attribute> attHashtable = new Hashtable<String, Attribute>(77);
 
     static {
 
@@ -687,11 +687,11 @@
      * @return the <code>Attribute</code> corresponding to <code>attName</code>
      */
     public static Attribute getAttributeKey(String attName) {
-        Object a = attHashtable.get(attName);
+        Attribute a = attHashtable.get(attName);
         if (a == null) {
           return null;
         }
-        return (Attribute)a;
+        return a;
     }
 
 }
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Wed Jul 05 16:42:37 2017 +0200
@@ -745,7 +745,7 @@
      */
     private Element findFrame(String frameName) {
         ElementIterator it = new ElementIterator(this);
-        Element next = null;
+        Element next;
 
         while ((next = it.next()) != null) {
             AttributeSet attr = next.getAttributes();
@@ -891,7 +891,7 @@
 
     /**
      * Returns the Map associated with the given name.
-     * @param the name of the desired <code>Map</code>
+     * @param name the name of the desired <code>Map</code>
      * @return the <code>Map</code> or <code>null</code> if it can't
      *          be found, or if <code>name</code> is <code>null</code>
      */
@@ -1759,7 +1759,7 @@
      * Used to store button groups for radio buttons in
      * a form.
      */
-    private HashMap radioButtonGroupsMap;
+    private HashMap<String, ButtonGroup> radioButtonGroupsMap;
 
     /**
      * Document property for the number of tokens to buffer
@@ -1824,7 +1824,7 @@
     /**
      * I18N property key.
      *
-     * @see AbstractDocument.I18NProperty
+     * @see AbstractDocument#I18NProperty
      */
     private static final String I18NProperty = "i18n";
 
@@ -1915,7 +1915,7 @@
                 AttributeSet a = (AttributeSet)
                     elem.getAttributes().getAttribute(tag);
                 if (a == null) {
-                    a = (AttributeSet)elem.getAttributes();
+                    a = elem.getAttributes();
                 }
                 return a;
             }
@@ -2193,7 +2193,7 @@
             isStyleCSS = "text/css".equals(getDefaultStyleSheetType());
             this.offset = offset;
             threshold = HTMLDocument.this.getTokenThreshold();
-            tagMap = new Hashtable(57);
+            tagMap = new Hashtable<HTML.Tag, TagAction>(57);
             TagAction na = new TagAction();
             TagAction ba = new BlockAction();
             TagAction pa = new ParagraphAction();
@@ -2435,7 +2435,7 @@
                          (StyleConstants.NameAttribute) == HTML.Tag.BODY &&
                          pPath[1].getEndOffset() == length) {
                     String lastText = getText(length - 1, 1);
-                    DefaultDocumentEvent event = null;
+                    DefaultDocumentEvent event;
                     Element[] added;
                     Element[] removed;
                     int index;
@@ -2496,7 +2496,7 @@
         }
 
         private Element[] getPathTo(int offset) {
-            Stack elements = new Stack();
+            Stack<Element> elements = new Stack<Element>();
             Element e = getDefaultRootElement();
             int index;
             while (!e.isLeaf()) {
@@ -2610,7 +2610,7 @@
             else {
                 styleAttributes = null;
             }
-            TagAction action = (TagAction) tagMap.get(t);
+            TagAction action = tagMap.get(t);
 
             if (action != null) {
                 action.start(t, a);
@@ -2640,7 +2640,7 @@
                 addSpecialElement(HTML.Tag.COMMENT, sas);
             }
 
-            TagAction action = (TagAction)tagMap.get(HTML.Tag.COMMENT);
+            TagAction action = tagMap.get(HTML.Tag.COMMENT);
             if (action != null) {
                 action.start(HTML.Tag.COMMENT, new SimpleAttributeSet());
                 action.end(HTML.Tag.COMMENT);
@@ -2681,7 +2681,7 @@
                     inBlock--;
                 }
             }
-            TagAction action = (TagAction) tagMap.get(t);
+            TagAction action = tagMap.get(t);
             if (action != null) {
                 action.end(t);
             }
@@ -2707,7 +2707,7 @@
                 styleAttributes = null;
             }
 
-            TagAction action = (TagAction) tagMap.get(t);
+            TagAction action = tagMap.get(t);
             if (action != null) {
                 action.start(t, a);
                 action.end(t);
@@ -2802,7 +2802,7 @@
                 // might be defined in the FORM.
                 // for new group new ButtonGroup will be created (fix for 4529702)
                 // group name is a key in radioButtonGroupsMap
-                radioButtonGroupsMap = new HashMap();
+                radioButtonGroupsMap = new HashMap<String, ButtonGroup>();
             }
 
             public void end(HTML.Tag t) {
@@ -3015,7 +3015,7 @@
                     if (rel.equals("stylesheet") ||
                         rel.equals("alternate stylesheet")) {
                         if (styles == null) {
-                            styles = new Vector(3);
+                            styles = new Vector<Object>(3);
                         }
                         styles.addElement(t);
                         styles.addElement(a.copyAttributes());
@@ -3055,7 +3055,7 @@
             public void start(HTML.Tag t, MutableAttributeSet a) {
                 if (inHead) {
                     if (styles == null) {
-                        styles = new Vector(3);
+                        styles = new Vector<Object>(3);
                     }
                     styles.addElement(t);
                     styles.addElement(a.getAttribute(HTML.Attribute.TYPE));
@@ -3280,7 +3280,7 @@
                 String name = (String) a.getAttribute(HTML.Attribute.NAME);
                 String value = (String) a.getAttribute(HTML.Attribute.VALUE);
                 if ((name != null) && (value != null)) {
-                    ElementSpec objSpec = (ElementSpec) parseBuffer.lastElement();
+                    ElementSpec objSpec = parseBuffer.lastElement();
                     MutableAttributeSet objAttr = (MutableAttributeSet) objSpec.getAttributes();
                     objAttr.addAttribute(name, value);
                 }
@@ -3360,7 +3360,7 @@
                     int size = HTML.getIntegerAttributeValue(attr,
                                                              HTML.Attribute.SIZE,
                                                              1);
-                    boolean multiple = ((String)attr.getAttribute(HTML.Attribute.MULTIPLE) != null);
+                    boolean multiple = attr.getAttribute(HTML.Attribute.MULTIPLE) != null;
                     if ((size > 1) || multiple) {
                         OptionListModel m = new OptionListModel();
                         if (multiple) {
@@ -3460,9 +3460,9 @@
                     if (type.equals("radio")) {
                         String name = (String) attr.getAttribute(HTML.Attribute.NAME);
                         if ( radioButtonGroupsMap == null ) { //fix for 4772743
-                           radioButtonGroupsMap = new HashMap();
+                           radioButtonGroupsMap = new HashMap<String, ButtonGroup>();
                         }
-                        ButtonGroup radioButtonGroup = (ButtonGroup)radioButtonGroupsMap.get(name);
+                        ButtonGroup radioButtonGroup = radioButtonGroupsMap.get(name);
                         if (radioButtonGroup == null) {
                             radioButtonGroup = new ButtonGroup();
                             radioButtonGroupsMap.put(name,radioButtonGroup);
@@ -3604,7 +3604,7 @@
             // an open/close with no content will be removed, so we
             // add a space of content to keep the element being formed.
             ElementSpec prev = (parseBuffer.size() > 0) ?
-                (ElementSpec) parseBuffer.lastElement() : null;
+                parseBuffer.lastElement() : null;
             if (prev != null && prev.getType() == ElementSpec.StartTagType) {
                 char[] one = new char[1];
                 one[0] = ' ';
@@ -3737,7 +3737,7 @@
                 // This attemps to clean it up.
                 int removeCounter = insertTagDepthDelta;
                 while (removeCounter < 0 && size >= 0 &&
-                       ((ElementSpec)parseBuffer.elementAt(size - 1)).
+                        parseBuffer.elementAt(size - 1).
                        getType() == ElementSpec.EndTagType) {
                     parseBuffer.removeElementAt(--size);
                     removeCounter++;
@@ -3751,7 +3751,7 @@
                 // an extra \n in the middle of content.
                 int index = 0;
                 if (pushDepth > 0) {
-                    if (((ElementSpec)parseBuffer.elementAt(0)).getType() ==
+                    if (parseBuffer.elementAt(0).getType() ==
                         ElementSpec.ContentType) {
                         index++;
                     }
@@ -3759,19 +3759,19 @@
                 index += (popDepth + pushDepth);
                 int cCount = 0;
                 int cStart = index;
-                while (index < size && ((ElementSpec)parseBuffer.elementAt
-                            (index)).getType() == ElementSpec.ContentType) {
+                while (index < size && parseBuffer.elementAt
+                        (index).getType() == ElementSpec.ContentType) {
                     index++;
                     cCount++;
                 }
                 if (cCount > 1) {
-                    while (index < size && ((ElementSpec)parseBuffer.elementAt
-                               (index)).getType() == ElementSpec.EndTagType) {
+                    while (index < size && parseBuffer.elementAt
+                            (index).getType() == ElementSpec.EndTagType) {
                         index++;
                     }
                     if (index == size) {
-                        char[] lastText = ((ElementSpec)parseBuffer.elementAt
-                                           (cStart + cCount - 1)).getArray();
+                        char[] lastText = parseBuffer.elementAt
+                                (cStart + cCount - 1).getArray();
                         if (lastText.length == 1 && lastText[0] == NEWLINE[0]){
                             index = cStart + cCount - 1;
                             while (size > index) {
@@ -3785,8 +3785,7 @@
                 // Make sure there is in fact a newline
                 for (int counter = parseBuffer.size() - 1; counter >= 0;
                                    counter--) {
-                    ElementSpec spec = (ElementSpec)parseBuffer.
-                                                    elementAt(counter);
+                    ElementSpec spec = parseBuffer.elementAt(counter);
                     if (spec.getType() == ElementSpec.ContentType) {
                         if (spec.getArray()[spec.getLength() - 1] != '\n') {
                             SimpleAttributeSet attrs =new SimpleAttributeSet();
@@ -3817,7 +3816,7 @@
          * of stylesheets.
          */
         void linkCSSStyleSheet(String href) {
-            URL url = null;
+            URL url;
             try {
                 url = new URL(base, href);
             } catch (MalformedURLException mfe) {
@@ -4031,7 +4030,7 @@
          * indicating the type (may be null), and the elements following
          * it until the next HTML.Tag are the rules as Strings.
          */
-        Vector styles;
+        Vector<Object> styles;
         /** True if inside the head tag. */
         boolean inHead = false;
         /** Set to true if the style language is text/css. Since this is
@@ -4048,10 +4047,10 @@
          */
         Option option;
 
-        protected Vector<ElementSpec> parseBuffer = new Vector();    // Vector<ElementSpec>
+        protected Vector<ElementSpec> parseBuffer = new Vector<ElementSpec>();
         protected MutableAttributeSet charAttr = new TaggedAttributeSet();
-        Stack charAttrStack = new Stack();
-        Hashtable tagMap;
+        Stack<AttributeSet> charAttrStack = new Stack<AttributeSet>();
+        Hashtable<HTML.Tag, TagAction> tagMap;
         int inBlock = 0;
 
         /**
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Wed Jul 05 16:42:37 2017 +0200
@@ -898,7 +898,7 @@
             } catch (MalformedURLException m) {
                 u = null;
             }
-            HyperlinkEvent linkEvent = null;
+            HyperlinkEvent linkEvent;
 
             if (!hdoc.isFrameDocument()) {
                 linkEvent = new HyperlinkEvent(
@@ -1271,11 +1271,11 @@
                     && (parentContainer = container.getParent()) != null
                     && (parentContainer instanceof javax.swing.JViewport)) {
                     JViewport viewPort = (JViewport)parentContainer;
-                    Object cachedObject;
                     if (cachedViewPort != null) {
-                        if ((cachedObject = cachedViewPort.get()) != null) {
+                        JViewport cachedObject = cachedViewPort.get();
+                        if (cachedObject != null) {
                             if (cachedObject != viewPort) {
-                                ((JComponent)cachedObject).removeComponentListener(this);
+                                cachedObject.removeComponentListener(this);
                             }
                         } else {
                             cachedViewPort = null;
@@ -1283,7 +1283,7 @@
                     }
                     if (cachedViewPort == null) {
                         viewPort.addComponentListener(this);
-                        cachedViewPort = new WeakReference(viewPort);
+                        cachedViewPort = new WeakReference<JViewport>(viewPort);
                     }
 
                     componentVisibleWidth = viewPort.getExtentSize().width;
@@ -1295,9 +1295,9 @@
                     }
                 } else {
                     if (cachedViewPort != null) {
-                        Object cachedObject;
-                        if ((cachedObject = cachedViewPort.get()) != null) {
-                            ((JComponent)cachedObject).removeComponentListener(this);
+                        JViewport cachedObject = cachedViewPort.get();
+                        if (cachedObject != null) {
+                            cachedObject.removeComponentListener(this);
                         }
                         cachedViewPort = null;
                     }
@@ -1351,7 +1351,7 @@
              * we need to keep this reference in order to remove BodyBoxView from viewPort listeners.
              *
              */
-            private Reference cachedViewPort = null;
+            private Reference<JViewport> cachedViewPort = null;
             private boolean isListening = false;
             private int viewVisibleWidth = Integer.MAX_VALUE;
             private int componentVisibleWidth = Integer.MAX_VALUE;
@@ -1928,7 +1928,7 @@
             int prevEndOffset = -1;
 
             // highlight the next link or object after the current caret position
-            Element nextElement = null;
+            Element nextElement;
             while ((nextElement = ei.next()) != null) {
                 String name = nextElement.getName();
                 AttributeSet attr = nextElement.getAttributes();
@@ -1969,7 +1969,6 @@
                 comp.setCaretPosition(prevStartOffset);
                 moveCaretPosition(comp, kit, prevStartOffset, prevEndOffset);
                 kit.prevHypertextOffset = prevStartOffset;
-                return;
             }
         }
 
@@ -2113,7 +2112,7 @@
             if (view != null && view instanceof ObjectView) {
                 Component comp = ((ObjectView)view).getComponent();
                 if (comp != null && comp instanceof Accessible) {
-                    AccessibleContext ac = ((Accessible)comp).getAccessibleContext();
+                    AccessibleContext ac = comp.getAccessibleContext();
                     if (ac != null) {
                         AccessibleAction aa = ac.getAccessibleAction();
                         if (aa != null) {
@@ -2207,7 +2206,7 @@
             // invoke the next link or object action
             String urlString = null;
             String objString = null;
-            Element currentElement = null;
+            Element currentElement;
             while ((currentElement = ei.next()) != null) {
                 String name = currentElement.getName();
                 AttributeSet attr = currentElement.getAttributes();
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLWriter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLWriter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -46,7 +46,7 @@
      * Stores all elements for which end tags have to
      * be emitted.
      */
-    private Stack blockElementStack = new Stack();
+    private Stack<Element> blockElementStack = new Stack<Element>();
     private boolean inContent = false;
     private boolean inPre = false;
     /** When inPre is true, this will indicate the end offset of the pre
@@ -62,12 +62,12 @@
      * character level attributes.  Examples include
      * &lt;b&gt;, &lt;i&gt;, &lt;font&gt;, and &lt;a&gt;.
      */
-    private Vector tags = new Vector(10);
+    private Vector<HTML.Tag> tags = new Vector<HTML.Tag>(10);
 
     /**
      * Values for the tags.
      */
-    private Vector tagValues = new Vector(10);
+    private Vector<Object> tagValues = new Vector<Object>(10);
 
     /**
      * Used when writing out content.
@@ -77,7 +77,7 @@
     /*
      * This is used in closeOutUnwantedEmbeddedTags.
      */
-    private Vector tagsToRemove = new Vector(10);
+    private Vector<HTML.Tag> tagsToRemove = new Vector<HTML.Tag>(10);
 
     /**
      * Set to true after the head has been output.
@@ -133,7 +133,7 @@
     public void write() throws IOException, BadLocationException {
         ElementIterator it = getElementIterator();
         Element current = null;
-        Element next = null;
+        Element next;
 
         wroteHead = false;
         setCurrentLineLength(0);
@@ -169,7 +169,7 @@
                        item on top of the stack, is the parent of the
                        next.
                     */
-                    Element top = (Element)blockElementStack.peek();
+                    Element top = blockElementStack.peek();
                     while (top != next.getParentElement()) {
                         /*
                            pop() will return top.
@@ -183,7 +183,7 @@
                             }
                             endTag(top);
                         }
-                        top = (Element)blockElementStack.peek();
+                        top = blockElementStack.peek();
                     }
                 } else if (current.getParentElement() == next.getParentElement()) {
                     /*
@@ -191,7 +191,7 @@
                        is correct.  But, we need to make sure that if current is
                        on the stack, we pop it off, and put out its end tag.
                     */
-                    Element top = (Element)blockElementStack.peek();
+                    Element top = blockElementStack.peek();
                     if (top == current) {
                         blockElementStack.pop();
                         endTag(top);
@@ -219,7 +219,7 @@
             endTag(current);
         }
         while (!blockElementStack.empty()) {
-            current = (Element)blockElementStack.pop();
+            current = blockElementStack.pop();
             if (!synthesizedElement(current)) {
                 AttributeSet attrs = current.getAttributes();
                 if (!matchNameAttribute(attrs, HTML.Tag.PRE) &&
@@ -308,7 +308,7 @@
             //
             if (nameTag != null && endTag != null &&
                 (endTag instanceof String) &&
-                ((String)endTag).equals("true")) {
+                endTag.equals("true")) {
                 outputEndTag = true;
             }
 
@@ -769,7 +769,7 @@
         int size = tags.size();
         // First, find all the tags that need to be removed.
         for (int i = size - 1; i >= 0; i--) {
-            t = (HTML.Tag)tags.elementAt(i);
+            t = tags.elementAt(i);
             tValue = tagValues.elementAt(i);
             if ((attr == null) || noMatchForTagInAttributes(attr, t, tValue)) {
                 firstIndex = i;
@@ -780,7 +780,7 @@
             // Then close them out.
             boolean removeAll = ((size - firstIndex) == tagsToRemove.size());
             for (int i = size - 1; i >= firstIndex; i--) {
-                t = (HTML.Tag)tags.elementAt(i);
+                t = tags.elementAt(i);
                 if (removeAll || tagsToRemove.contains(t)) {
                     tags.removeElementAt(i);
                     tagValues.removeElementAt(i);
@@ -794,7 +794,7 @@
             // as we closed them out, but they should remain open.
             size = tags.size();
             for (int i = firstIndex; i < size; i++) {
-                t = (HTML.Tag)tags.elementAt(i);
+                t = tags.elementAt(i);
                 write('<');
                 write(t.toString());
                 Object o = tagValues.elementAt(i);
@@ -813,11 +813,8 @@
      * false
      */
     private boolean isFormElementWithContent(AttributeSet attr) {
-        if (matchNameAttribute(attr, HTML.Tag.TEXTAREA) ||
-            matchNameAttribute(attr, HTML.Tag.SELECT)) {
-            return true;
-        }
-        return false;
+        return matchNameAttribute(attr, HTML.Tag.TEXTAREA) ||
+                matchNameAttribute(attr, HTML.Tag.SELECT);
     }
 
 
--- a/jdk/src/share/classes/javax/swing/text/html/Map.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/Map.java	Wed Jul 05 16:42:37 2017 +0200
@@ -41,10 +41,10 @@
     /** Name of the Map. */
     private String           name;
     /** An array of AttributeSets. */
-    private Vector           areaAttributes;
+    private Vector<AttributeSet>           areaAttributes;
     /** An array of RegionContainments, will slowly grow to match the
      * length of areaAttributes as needed. */
-    private Vector           areas;
+    private Vector<RegionContainment>           areas;
 
     public Map() {
     }
@@ -68,7 +68,7 @@
             return;
         }
         if (areaAttributes == null) {
-            areaAttributes = new Vector(2);
+            areaAttributes = new Vector<AttributeSet>(2);
         }
         areaAttributes.addElement(as.copyAttributes());
     }
@@ -81,8 +81,7 @@
             int numAreas = (areas != null) ? areas.size() : 0;
             for (int counter = areaAttributes.size() - 1; counter >= 0;
                  counter--) {
-                if (((AttributeSet)areaAttributes.elementAt(counter)).
-                    isEqual(as)){
+                if (areaAttributes.elementAt(counter).isEqual(as)){
                     areaAttributes.removeElementAt(counter);
                     if (counter < numAreas) {
                         areas.removeElementAt(counter);
@@ -121,17 +120,16 @@
             int      numAreas = (areas != null) ? areas.size() : 0;
 
             if (areas == null) {
-                areas = new Vector(numAttributes);
+                areas = new Vector<RegionContainment>(numAttributes);
             }
             for (int counter = 0; counter < numAttributes; counter++) {
                 if (counter >= numAreas) {
                     areas.addElement(createRegionContainment
-                            ((AttributeSet)areaAttributes.elementAt(counter)));
+                            (areaAttributes.elementAt(counter)));
                 }
-                RegionContainment       rc = (RegionContainment)areas.
-                                             elementAt(counter);
+                RegionContainment rc = areas.elementAt(counter);
                 if (rc != null && rc.contains(x, y, width, height)) {
-                    return (AttributeSet)areaAttributes.elementAt(counter);
+                    return areaAttributes.elementAt(counter);
                 }
             }
         }
--- a/jdk/src/share/classes/javax/swing/text/html/MinimalHTMLWriter.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/MinimalHTMLWriter.java	Wed Jul 05 16:42:37 2017 +0200
@@ -97,7 +97,7 @@
      * Maps from style name as held by the Document, to the archived
      * style name (style name written out). These may differ.
      */
-    private Hashtable styleNameMapping;
+    private Hashtable<String, String> styleNameMapping;
 
     /**
      * Creates a new MinimalHTMLWriter.
@@ -134,7 +134,7 @@
      *
      */
     public void write() throws IOException, BadLocationException {
-        styleNameMapping = new Hashtable();
+        styleNameMapping = new Hashtable<String, String>();
         writeStartTag("<html>");
         writeHeader();
         writeBody();
@@ -296,7 +296,7 @@
          */
         it.current();
 
-        Element next = null;
+        Element next;
 
         writeStartTag("<body>");
 
@@ -715,7 +715,7 @@
         if (styleNameMapping == null) {
             return style;
         }
-        String retValue = (String)styleNameMapping.get(style);
+        String retValue = styleNameMapping.get(style);
         return (retValue == null) ? style : retValue;
     }
 
--- a/jdk/src/share/classes/javax/swing/text/html/OptionListModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/OptionListModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -108,8 +108,7 @@
      * @since 1.4
      */
     public ListSelectionListener[] getListSelectionListeners() {
-        return (ListSelectionListener[])listenerList.getListeners(
-                ListSelectionListener.class);
+        return listenerList.getListeners(ListSelectionListener.class);
     }
 
     /**
@@ -131,7 +130,7 @@
 
     /**
      * @param firstIndex The first index in the interval.
-     * @param index1 The last index in the interval.
+     * @param lastIndex The last index in the interval.
      * @param isAdjusting True if this is the final change in a series of them.
      * @see EventListenerList
      */
@@ -528,8 +527,8 @@
             anchorIndex = leadIndex;
         }
 
-        int oldMin = Math.min(this.anchorIndex, this.leadIndex);;
-        int oldMax = Math.max(this.anchorIndex, this.leadIndex);;
+        int oldMin = Math.min(this.anchorIndex, this.leadIndex);
+        int oldMax = Math.max(this.anchorIndex, this.leadIndex);
         int newMin = Math.min(anchorIndex, leadIndex);
         int newMax = Math.max(anchorIndex, leadIndex);
         if (value.get(this.anchorIndex)) {
--- a/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java	Wed Jul 05 16:42:37 2017 +0200
@@ -164,7 +164,7 @@
     public StyleSheet() {
         super();
         selectorMapping = new SelectorMapping(0);
-        resolvedStyles = new Hashtable();
+        resolvedStyles = new Hashtable<String, ResolvedStyle>();
         if (css == null) {
             css = new CSS();
         }
@@ -190,7 +190,7 @@
 
         try {
             // Build an array of all the parent elements.
-            Vector searchContext = sb.getVector();
+            Vector<Element> searchContext = sb.getVector();
 
             for (Element p = e; p != null; p = p.getParentElement()) {
                 searchContext.addElement(p);
@@ -205,7 +205,7 @@
 
             // >= 1 as the HTML.Tag for the 0th element is passed in.
             for (int counter = n - 1; counter >= 1; counter--) {
-                e = (Element)searchContext.elementAt(counter);
+                e = searchContext.elementAt(counter);
                 attr = e.getAttributes();
                 name = attr.getAttribute(StyleConstants.NameAttribute);
                 eName = name.toString();
@@ -225,7 +225,7 @@
                 cacheLookup.append(' ');
             }
             cacheLookup.append(t.toString());
-            e = (Element)searchContext.elementAt(0);
+            e = searchContext.elementAt(0);
             attr = e.getAttributes();
             if (e.isLeaf()) {
                 // For leafs, we use the second tier attributes.
@@ -368,10 +368,9 @@
                 if (rule != null) {
                     mapping.setStyle(null);
                     if (resolvedStyles.size() > 0) {
-                        Enumeration values = resolvedStyles.elements();
+                        Enumeration<ResolvedStyle> values = resolvedStyles.elements();
                         while (values.hasMoreElements()) {
-                            ResolvedStyle style = (ResolvedStyle)values.
-                                                    nextElement();
+                            ResolvedStyle style = values.nextElement();
                             style.removeStyle(rule);
                         }
                     }
@@ -392,7 +391,7 @@
     public void addStyleSheet(StyleSheet ss) {
         synchronized(this) {
             if (linkedStyleSheets == null) {
-                linkedStyleSheets = new Vector();
+                linkedStyleSheets = new Vector<StyleSheet>();
             }
             if (!linkedStyleSheets.contains(ss)) {
                 int index = 0;
@@ -828,7 +827,7 @@
         /**
          * Creates a new attribute set based on a supplied set of attributes.
          *
-         * @param source the set of attributes
+         * @param attrs the set of attributes
          */
         public SmallConversionSet(AttributeSet attrs) {
             super(attrs);
@@ -1045,9 +1044,9 @@
      */
     private synchronized void linkStyleSheetAt(StyleSheet ss, int index) {
         if (resolvedStyles.size() > 0) {
-            Enumeration values = resolvedStyles.elements();
+            Enumeration<ResolvedStyle> values = resolvedStyles.elements();
             while (values.hasMoreElements()) {
-                ResolvedStyle rule = (ResolvedStyle)values.nextElement();
+                ResolvedStyle rule = values.nextElement();
                 rule.insertExtendedStyleAt(ss.getRule(rule.getName()),
                                            index);
             }
@@ -1061,9 +1060,9 @@
      */
     private synchronized void unlinkStyleSheet(StyleSheet ss, int index) {
         if (resolvedStyles.size() > 0) {
-            Enumeration values = resolvedStyles.elements();
+            Enumeration<ResolvedStyle> values = resolvedStyles.elements();
             while (values.hasMoreElements()) {
-                ResolvedStyle rule = (ResolvedStyle)values.nextElement();
+                ResolvedStyle rule = values.nextElement();
                 rule.removeExtendedStyleAt(index);
             }
         }
@@ -1076,7 +1075,7 @@
     String[] getSimpleSelectors(String selector) {
         selector = cleanSelectorString(selector);
         SearchBuffer sb = SearchBuffer.obtainSearchBuffer();
-        Vector selectors = sb.getVector();
+        Vector<String> selectors = sb.getVector();
         int lastIndex = 0;
         int length = selector.length();
         while (lastIndex != -1) {
@@ -1256,7 +1255,7 @@
     private synchronized Style getResolvedStyle(String selector,
                                                 Vector elements,
                                                 HTML.Tag t) {
-        Style retStyle = (Style)resolvedStyles.get(selector);
+        Style retStyle = resolvedStyles.get(selector);
         if (retStyle == null) {
             retStyle = createResolvedStyle(selector, elements, t);
         }
@@ -1268,7 +1267,7 @@
      * create the resolved style, if necessary.
      */
     private synchronized Style getResolvedStyle(String selector) {
-        Style retStyle = (Style)resolvedStyles.get(selector);
+        Style retStyle = resolvedStyles.get(selector);
         if (retStyle == null) {
             retStyle = createResolvedStyle(selector);
         }
@@ -1280,15 +1279,14 @@
      * such that <code>elements</code> will remain ordered by
      * specificity.
      */
-    private void addSortedStyle(SelectorMapping mapping, Vector elements) {
+    private void addSortedStyle(SelectorMapping mapping, Vector<SelectorMapping> elements) {
         int       size = elements.size();
 
         if (size > 0) {
             int     specificity = mapping.getSpecificity();
 
             for (int counter = 0; counter < size; counter++) {
-                if (specificity >= ((SelectorMapping)elements.elementAt
-                                    (counter)).getSpecificity()) {
+                if (specificity >= elements.elementAt(counter).getSpecificity()) {
                     elements.insertElementAt(mapping, counter);
                     return;
                 }
@@ -1303,10 +1301,10 @@
      * any child mappings for any of the Elements in <code>elements</code>.
      */
     private synchronized void getStyles(SelectorMapping parentMapping,
-                           Vector styles,
+                           Vector<SelectorMapping> styles,
                            String[] tags, String[] ids, String[] classes,
                            int index, int numElements,
-                           Hashtable alreadyChecked) {
+                           Hashtable<SelectorMapping, SelectorMapping> alreadyChecked) {
         // Avoid desending the same mapping twice.
         if (alreadyChecked.contains(parentMapping)) {
             return;
@@ -1367,8 +1365,8 @@
                                       String[] tags,
                                       String[] ids, String[] classes) {
         SearchBuffer sb = SearchBuffer.obtainSearchBuffer();
-        Vector tempVector = sb.getVector();
-        Hashtable tempHashtable = sb.getHashtable();
+        Vector<SelectorMapping> tempVector = sb.getVector();
+        Hashtable<SelectorMapping, SelectorMapping> tempHashtable = sb.getHashtable();
         // Determine all the Styles that are appropriate, placing them
         // in tempVector
         try {
@@ -1418,13 +1416,11 @@
             int numStyles = tempVector.size();
             AttributeSet[] attrs = new AttributeSet[numStyles + numLinkedSS];
             for (int counter = 0; counter < numStyles; counter++) {
-                attrs[counter] = ((SelectorMapping)tempVector.
-                                  elementAt(counter)).getStyle();
+                attrs[counter] = tempVector.elementAt(counter).getStyle();
             }
             // Get the AttributeSet from linked style sheets.
             for (int counter = 0; counter < numLinkedSS; counter++) {
-                AttributeSet attr = ((StyleSheet)linkedStyleSheets.
-                                 elementAt(counter)).getRule(selector);
+                AttributeSet attr = linkedStyleSheets.elementAt(counter).getRule(selector);
                 if (attr == null) {
                     attrs[counter + numStyles] = SimpleAttributeSet.EMPTY;
                 }
@@ -1514,11 +1510,11 @@
     private Style createResolvedStyle(String selector) {
         SearchBuffer sb = SearchBuffer.obtainSearchBuffer();
         // Will contain the tags, ids, and classes, in that order.
-        Vector elements = sb.getVector();
+        Vector<String> elements = sb.getVector();
         try {
             boolean done;
             int dotIndex = 0;
-            int spaceIndex = 0;
+            int spaceIndex;
             int poundIndex = 0;
             int lastIndex = 0;
             int length = selector.length();
@@ -1640,9 +1636,9 @@
             String[] classes = new String[numTags];
             for (int index = 0, eIndex = total - 3; index < numTags;
                  index++, eIndex -= 3) {
-                tags[index] = (String)elements.elementAt(eIndex);
-                classes[index] = (String)elements.elementAt(eIndex + 1);
-                ids[index] = (String)elements.elementAt(eIndex + 2);
+                tags[index] = elements.elementAt(eIndex);
+                classes[index] = elements.elementAt(eIndex + 1);
+                ids[index] = elements.elementAt(eIndex + 2);
             }
             return createResolvedStyle(selector, tags, ids, classes);
         }
@@ -1661,9 +1657,9 @@
                                                    Style newStyle,
                                                    int specificity) {
         if (resolvedStyles.size() > 0) {
-            Enumeration values = resolvedStyles.elements();
+            Enumeration<ResolvedStyle> values = resolvedStyles.elements();
             while (values.hasMoreElements()) {
-                ResolvedStyle style = (ResolvedStyle)values.nextElement();
+                ResolvedStyle style = values.nextElement();
                 if (style.matches(selectorName)) {
                     style.insertStyle(newStyle, specificity);
                 }
@@ -1682,7 +1678,7 @@
     private static class SearchBuffer {
         /** A stack containing instances of SearchBuffer. Used in getting
          * rules. */
-        static Stack searchBuffers = new Stack();
+        static Stack<SearchBuffer> searchBuffers = new Stack<SearchBuffer>();
         // A set of temporary variables that can be used in whatever way.
         Vector vector = null;
         StringBuffer stringBuffer = null;
@@ -1696,7 +1692,7 @@
             SearchBuffer sb;
             try {
                 if(!searchBuffers.empty()) {
-                   sb = (SearchBuffer)searchBuffers.pop();
+                   sb = searchBuffers.pop();
                 } else {
                    sb = new SearchBuffer();
                 }
@@ -1922,7 +1918,7 @@
         static boolean isLeftToRight(View v) {
             boolean ret = true;
             if (isOrientationAware(v)) {
-                Container container = null;
+                Container container;
                 if (v != null && (container = v.getContainer()) != null) {
                     ret = container.getComponentOrientation().isLeftToRight();
                 }
@@ -1938,8 +1934,8 @@
          */
         static boolean isOrientationAware(View v) {
             boolean ret = false;
-            AttributeSet attr = null;
-            Object obj = null;
+            AttributeSet attr;
+            Object obj;
             if (v != null
                 && (attr = v.getElement().getAttributes()) != null
                 && (obj = attr.getAttribute(StyleConstants.NameAttribute)) instanceof HTML.Tag
@@ -1953,7 +1949,7 @@
             return ret;
         }
 
-        static enum HorizontalMargin { LEFT, RIGHT };
+        static enum HorizontalMargin { LEFT, RIGHT }
 
         /**
          * for <dir>, <menu>, <ul> etc.
@@ -2362,7 +2358,7 @@
          * @param itemNum number to format
          */
         String formatAlphaNumerals(int itemNum) {
-            String result = "";
+            String result;
 
             if (itemNum > 26) {
                 result = formatAlphaNumerals(itemNum / 26) +
@@ -2411,7 +2407,7 @@
          * Converts the item number into a roman numeral
          *
          * @param level position
-         * @param num   digit to format
+         * @param digit digit to format
          */
         String formatRomanDigit(int level, int digit) {
             String result = "";
@@ -2625,7 +2621,7 @@
             // implementation.
             Document doc = v.getDocument();
             SearchBuffer sb = SearchBuffer.obtainSearchBuffer();
-            Vector muxList = sb.getVector();
+            Vector<AttributeSet> muxList = sb.getVector();
             try {
                 if (doc instanceof HTMLDocument) {
                     StyleSheet styles = StyleSheet.this;
@@ -2641,8 +2637,8 @@
                         while (keys.hasMoreElements()) {
                             Object key = keys.nextElement();
                             if (key instanceof HTML.Tag) {
-                                if ((HTML.Tag)key  == HTML.Tag.A) {
-                                    Object o = a.getAttribute((HTML.Tag)key);
+                                if (key == HTML.Tag.A) {
+                                    Object o = a.getAttribute(key);
                                 /**
                                    In the case of an A tag, the css rules
                                    apply only for tags that have their
@@ -3059,10 +3055,10 @@
             SelectorMapping retValue = null;
 
             if (children != null) {
-                retValue = (SelectorMapping)children.get(selector);
+                retValue = children.get(selector);
             }
             else if (create) {
-                children = new HashMap(7);
+                children = new HashMap<String, SelectorMapping>(7);
             }
             if (retValue == null && create) {
                 int specificity = getChildSpecificity(selector);
@@ -3121,7 +3117,7 @@
          * Any sub selectors. Key will be String, and value will be
          * another SelectorMapping.
          */
-        private HashMap children;
+        private HashMap<String, SelectorMapping> children;
     }
 
 
@@ -3138,11 +3134,11 @@
 
     /** Maps from selector (as a string) to Style that includes all
      * relevant styles. */
-    private Hashtable resolvedStyles;
+    private Hashtable<String, ResolvedStyle> resolvedStyles;
 
     /** Vector of StyleSheets that the rules are to reference.
      */
-    private Vector linkedStyleSheets;
+    private Vector<StyleSheet> linkedStyleSheets;
 
     /** Where the style sheet was found. Used for relative imports. */
     private URL base;
@@ -3279,7 +3275,7 @@
         public void endRule() {
             int n = selectors.size();
             for (int i = 0; i < n; i++) {
-                String[] selector = (String[]) selectors.elementAt(i);
+                String[] selector = selectors.elementAt(i);
                 if (selector.length > 0) {
                     StyleSheet.this.addRule(selector, declaration, isLink);
                 }
@@ -3296,8 +3292,8 @@
         }
 
 
-        Vector selectors = new Vector();
-        Vector selectorTokens = new Vector();
+        Vector<String[]> selectors = new Vector<String[]>();
+        Vector<String> selectorTokens = new Vector<String>();
         /** Name of the current property. */
         String propertyName;
         MutableAttributeSet declaration = new SimpleAttributeSet();
--- a/jdk/src/share/classes/javax/swing/text/html/TableView.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/TableView.java	Wed Jul 05 16:42:37 2017 +0200
@@ -48,7 +48,7 @@
      */
     public TableView(Element elem) {
         super(elem, View.Y_AXIS);
-        rows = new Vector();
+        rows = new Vector<RowView>();
         gridValid = false;
         captionIndex = -1;
         totalColumnRequirements = new SizeRequirements();
@@ -127,14 +127,14 @@
 
     RowView getRow(int row) {
         if (row < rows.size()) {
-            return (RowView) rows.elementAt(row);
+            return rows.elementAt(row);
         }
         return null;
     }
 
     protected View getViewAtPoint(int x, int y, Rectangle alloc) {
         int n = getViewCount();
-        View v = null;
+        View v;
         Rectangle allocation = new Rectangle();
         for (int i = 0; i < n; i++) {
             allocation.setBounds(alloc);
@@ -273,7 +273,7 @@
             for (int i = 0; i < n; i++) {
                 View v = getView(i);
                 if (v instanceof RowView) {
-                    rows.addElement(v);
+                    rows.addElement((RowView) v);
                     RowView rv = (RowView) v;
                     rv.clearFilledColumns();
                     rv.rowIndex = rows.size() - 1;
@@ -990,7 +990,7 @@
     RowIterator rowIterator = new RowIterator();
     ColumnIterator colIterator = new ColumnIterator();
 
-    Vector rows;
+    Vector<RowView> rows;
 
     // whether to display comments inside table or not.
     boolean skipComments = false;
--- a/jdk/src/share/classes/javax/swing/text/html/parser/AttributeList.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/AttributeList.java	Wed Jul 05 16:42:37 2017 +0200
@@ -129,7 +129,7 @@
     /**
      * Create a hashtable of attribute types.
      */
-    static Hashtable attributeTypes = new Hashtable();
+    static Hashtable<Object, Object> attributeTypes = new Hashtable<Object, Object>();
 
     static void defineAttributeType(String nm, int val) {
         Integer num = Integer.valueOf(val);
--- a/jdk/src/share/classes/javax/swing/text/html/parser/DTD.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/DTD.java	Wed Jul 05 16:42:37 2017 +0200
@@ -104,7 +104,7 @@
      *   <code>name</code> <code>String</code>
      */
     public Entity getEntity(String name) {
-        return (Entity)entityHash.get(name);
+        return entityHash.get(name);
     }
 
     /**
@@ -113,7 +113,7 @@
      *    <code>ch</code> character
      */
     public Entity getEntity(int ch) {
-        return (Entity)entityHash.get(Integer.valueOf(ch));
+        return entityHash.get(Integer.valueOf(ch));
     }
 
     /**
@@ -137,7 +137,7 @@
      *   <code>name</code>, which may be newly created
      */
     public Element getElement(String name) {
-        Element e = (Element)elementHash.get(name);
+        Element e = elementHash.get(name);
         if (e == null) {
             e = new Element(name, elements.size());
             elements.addElement(e);
@@ -154,7 +154,7 @@
      *   <code>index</code>
      */
     public Element getElement(int index) {
-        return (Element)elements.elementAt(index);
+        return elements.elementAt(index);
     }
 
     /**
@@ -170,7 +170,7 @@
      *   if not found
      */
     public Entity defineEntity(String name, int type, char data[]) {
-        Entity ent = (Entity)entityHash.get(name);
+        Entity ent = entityHash.get(name);
         if (ent == null) {
             ent = new Entity(name, type, data);
             entityHash.put(name, ent);
@@ -259,8 +259,7 @@
         BitSet excl = null;
         if (exclusions != null && exclusions.length > 0) {
             excl = new BitSet();
-            for (int i = 0; i < exclusions.length; i++) {
-                String str = exclusions[i];
+            for (String str : exclusions) {
                 if (str.length() > 0) {
                     excl.set(getElement(str).getIndex());
                 }
@@ -269,8 +268,7 @@
         BitSet incl = null;
         if (inclusions != null && inclusions.length > 0) {
             incl = new BitSet();
-            for (int i = 0; i < inclusions.length; i++) {
-                String str = inclusions[i];
+            for (String str : inclusions) {
                 if (str.length() > 0) {
                     incl.set(getElement(str).getIndex());
                 }
@@ -285,9 +283,9 @@
      * @return the new <code>AttributeList</code>
      */
     protected AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) {
-        Vector vals = null;
+        Vector<String> vals = null;
         if (values != null) {
-            vals = new Vector();
+            vals = new Vector<String>();
             for (StringTokenizer s = new StringTokenizer(values, "|") ; s.hasMoreTokens() ;) {
                 String str = s.nextToken();
                 if (str.length() > 0) {
@@ -318,7 +316,7 @@
     /**
      * The hashtable of DTDs.
      */
-    static Hashtable dtdHash = new Hashtable();
+    static Hashtable<String, DTD> dtdHash = new Hashtable<String, DTD>();
 
   public static void putDTDHash(String name, DTD dtd) {
     dtdHash.put(name, dtd);
@@ -334,7 +332,7 @@
      */
     public static DTD getDTD(String name) throws IOException {
         name = name.toLowerCase();
-        DTD dtd = (DTD)dtdHash.get(name);
+        DTD dtd = dtdHash.get(name);
         if (dtd == null)
           dtd = new DTD(name);
 
@@ -432,10 +430,10 @@
             int modifier = in.readByte();
             short valueId = in.readShort();
             String value = (valueId == -1) ? null : names[valueId];
-            Vector values = null;
+            Vector<String> values = null;
             short numValues = in.readShort();
             if (numValues > 0) {
-                values = new Vector(numValues);
+                values = new Vector<String>(numValues);
                 for (int i = 0; i < numValues; i++) {
                     values.addElement(names[in.readShort()]);
                 }
--- a/jdk/src/share/classes/javax/swing/text/html/parser/Element.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/Element.java	Wed Jul 05 16:42:37 2017 +0200
@@ -159,7 +159,7 @@
     }
 
 
-    static Hashtable contentTypes = new Hashtable();
+    static Hashtable<String, Integer> contentTypes = new Hashtable<String, Integer>();
 
     static {
         contentTypes.put("CDATA", Integer.valueOf(CDATA));
@@ -169,7 +169,7 @@
     }
 
     public static int name2type(String nm) {
-        Integer val = (Integer)contentTypes.get(nm);
+        Integer val = contentTypes.get(nm);
         return (val != null) ? val.intValue() : 0;
     }
 }
--- a/jdk/src/share/classes/javax/swing/text/html/parser/Entity.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/Entity.java	Wed Jul 05 16:42:37 2017 +0200
@@ -107,7 +107,7 @@
     }
 
 
-    static Hashtable entityTypes = new Hashtable();
+    static Hashtable<String, Integer> entityTypes = new Hashtable<String, Integer>();
 
     static {
         entityTypes.put("PUBLIC", Integer.valueOf(PUBLIC));
@@ -133,7 +133,7 @@
      *   to "CDATA", if none exists
      */
     public static int name2type(String nm) {
-        Integer i = (Integer)entityTypes.get(nm);
+        Integer i = entityTypes.get(nm);
         return (i == null) ? CDATA : i.intValue();
     }
 }
--- a/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java	Wed Jul 05 16:42:37 2017 +0200
@@ -649,12 +649,10 @@
 
         if (!strict) {
             ContentModel content = stack.contentModel();
-            Vector elemVec = new Vector();
+            Vector<Element> elemVec = new Vector<Element>();
             if (content != null) {
                 content.getElements(elemVec);
-                for (Enumeration v = elemVec.elements(); v.hasMoreElements();) {
-                    Element e = (Element)v.nextElement();
-
+                for (Element e : elemVec) {
                     // Ensure that this element has not been included as
                     // part of the exclusions in the DTD.
                     //
@@ -1349,9 +1347,9 @@
                 continue;
             }
 
-            AttributeList att = null;
-            String attname = null;
-            String attvalue = null;
+            AttributeList att;
+            String attname;
+            String attvalue;
 
             if (parseIdentifier(true)) {
                 attname = getString(0);
@@ -1549,7 +1547,7 @@
      * Parse a start or end tag.
      */
     void parseTag() throws IOException {
-        Element elem = null;
+        Element elem;
         boolean net = false;
         boolean warned = false;
         boolean unknown = false;
--- a/jdk/src/share/classes/javax/swing/text/html/parser/TagStack.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/TagStack.java	Wed Jul 05 16:42:37 2017 +0200
@@ -124,22 +124,6 @@
         return (exclusions != null) && exclusions.get(elem.getIndex());
     }
 
-    /**
-     * Update the Vector elemVec with all the elements that
-     * are part of the inclusions listed in DTD for the element
-     * currently on the TagStack.
-     */
-    boolean included(Vector elemVec, DTD dtd) {
-
-        for (int i = 0 ; i < inclusions.size(); i++) {
-            if (inclusions.get(i)) {
-                elemVec.addElement(dtd.getElement(i));
-                System.out.println("Element add thru' inclusions: " + dtd.getElement(i).getName());
-            }
-        }
-        return (!elemVec.isEmpty());
-    }
-
 
     /**
      * Advance the state by reducing the given element.
--- a/jdk/src/share/classes/javax/swing/text/rtf/MockAttributeSet.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/MockAttributeSet.java	Wed Jul 05 16:42:37 2017 +0200
@@ -35,7 +35,7 @@
 class MockAttributeSet
     implements AttributeSet, MutableAttributeSet
 {
-    public Dictionary backing;
+    public Dictionary<Object, Object> backing;
 
     public boolean isEmpty()
     {
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFAttributes.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFAttributes.java	Wed Jul 05 16:42:37 2017 +0200
@@ -36,7 +36,7 @@
     static RTFAttribute attributes[];
 
     static {
-        Vector a = new Vector();
+        Vector<RTFAttribute> a = new Vector<RTFAttribute>();
         int CHR = RTFAttribute.D_CHARACTER;
         int PGF = RTFAttribute.D_PARAGRAPH;
         int SEC = RTFAttribute.D_SECTION;
@@ -131,14 +131,13 @@
         attributes = attrs;
     }
 
-    static Dictionary attributesByKeyword()
+    static Dictionary<String, RTFAttribute> attributesByKeyword()
     {
-        Dictionary d = new Hashtable(attributes.length);
-        int i, m;
+        Dictionary<String, RTFAttribute> d = new Hashtable<String, RTFAttribute>(attributes.length);
 
-        m = attributes.length;
-        for(i = 0; i < m; i++)
-            d.put(attributes[i].rtfName(), attributes[i]);
+        for (RTFAttribute attribute : attributes) {
+            d.put(attribute.rtfName(), attribute);
+        }
 
         return d;
     }
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFGenerator.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFGenerator.java	Wed Jul 05 16:42:37 2017 +0200
@@ -52,11 +52,11 @@
 {
     /* These dictionaries map Colors, font names, or Style objects
        to Integers */
-    Dictionary colorTable;
+    Dictionary<Object, Integer> colorTable;
     int colorCount;
-    Dictionary fontTable;
+    Dictionary<String, Integer> fontTable;
     int fontCount;
-    Dictionary styleTable;
+    Dictionary<AttributeSet, Integer> styleTable;
     int styleCount;
 
     /* where all the text is going */
@@ -90,7 +90,7 @@
        would require allocating an object for every character
        written (slow!). */
     static class CharacterKeywordPair
-      { public char character; public String keyword; };
+      { public char character; public String keyword; }
     static protected CharacterKeywordPair[] textKeywords;
 
     static {
@@ -98,7 +98,7 @@
 
         Dictionary textKeywordDictionary = RTFReader.textKeywords;
         Enumeration keys = textKeywordDictionary.keys();
-        Vector tempPairs = new Vector();
+        Vector<CharacterKeywordPair> tempPairs = new Vector<CharacterKeywordPair>();
         while(keys.hasMoreElements()) {
             CharacterKeywordPair pair = new CharacterKeywordPair();
             pair.keyword = (String)keys.nextElement();
@@ -133,14 +133,14 @@
 
 public RTFGenerator(OutputStream to)
 {
-    colorTable = new Hashtable();
+    colorTable = new Hashtable<Object, Integer>();
     colorTable.put(defaultRTFColor, Integer.valueOf(0));
     colorCount = 1;
 
-    fontTable = new Hashtable();
+    fontTable = new Hashtable<String, Integer>();
     fontCount = 0;
 
-    styleTable = new Hashtable();
+    styleTable = new Hashtable<AttributeSet, Integer>();
     /* TODO: put default style in style table */
     styleCount = 0;
 
@@ -197,7 +197,7 @@
 private void tallyStyles(AttributeSet a) {
     while (a != null) {
         if (a instanceof Style) {
-            Integer aNum = (Integer)styleTable.get(a);
+            Integer aNum = styleTable.get(a);
             if (aNum == null) {
                 styleCount = styleCount + 1;
                 aNum = new Integer(styleCount);
@@ -225,7 +225,7 @@
 {
     while(a != null) {
         if (a instanceof Style) {
-            Integer aNum = (Integer)styleTable.get(a);
+            Integer aNum = styleTable.get(a);
             if (aNum != null) {
                 if (domain == null ||
                     domain.equals(a.getAttribute(Constants.StyleType)))
@@ -319,11 +319,11 @@
 
     /* write font table */
     String[] sortedFontTable = new String[fontCount];
-    Enumeration fonts = fontTable.keys();
+    Enumeration<String> fonts = fontTable.keys();
     String font;
     while(fonts.hasMoreElements()) {
-        font = (String)fonts.nextElement();
-        Integer num = (Integer)(fontTable.get(font));
+        font = fonts.nextElement();
+        Integer num = fontTable.get(font);
         sortedFontTable[num.intValue()] = font;
     }
     writeBegingroup();
@@ -344,7 +344,7 @@
         Color color;
         while(colors.hasMoreElements()) {
             color = (Color)colors.nextElement();
-            Integer num = (Integer)(colorTable.get(color));
+            Integer num = colorTable.get(color);
             sortedColorTable[num.intValue()] = color;
         }
         writeBegingroup();
@@ -366,10 +366,10 @@
     if (styleCount > 1) {
         writeBegingroup();
         writeControlWord("stylesheet");
-        Enumeration styles = styleTable.keys();
+        Enumeration<AttributeSet> styles = styleTable.keys();
         while(styles.hasMoreElements()) {
             Style style = (Style)styles.nextElement();
-            int styleNumber = ((Integer)styleTable.get(style)).intValue();
+            int styleNumber = styleTable.get(style).intValue();
             writeBegingroup();
             String styleType = (String)style.getAttribute(Constants.StyleType);
             if (styleType == null)
@@ -398,7 +398,7 @@
 
             basis = style.getResolveParent();
             if (basis != null && basis instanceof Style) {
-                Integer basedOn = (Integer)styleTable.get(basis);
+                Integer basedOn = styleTable.get(basis);
                 if (basedOn != null) {
                     writeControlWord("sbasedon", basedOn.intValue());
                 }
@@ -406,7 +406,7 @@
 
             Style nextStyle = (Style)style.getAttribute(Constants.StyleNext);
             if (nextStyle != null) {
-                Integer nextNum = (Integer)styleTable.get(nextStyle);
+                Integer nextNum = styleTable.get(nextStyle);
                 if (nextNum != null) {
                     writeControlWord("snext", nextNum.intValue());
                 }
@@ -725,7 +725,7 @@
 
     if ((parm = attrDiff(current, newAttributes,
                          StyleConstants.FontFamily, null)) != null) {
-        Number fontNum = (Number)fontTable.get(parm);
+        Integer fontNum = fontTable.get(parm);
         writeControlWord("f", fontNum.intValue());
     }
 
@@ -746,7 +746,7 @@
         if (parm == MagicToken)
             colorNum = 0;
         else
-            colorNum = ((Number)colorTable.get(parm)).intValue();
+            colorNum = colorTable.get(parm).intValue();
         writeControlWord("cb", colorNum);
     }
 
@@ -756,7 +756,7 @@
         if (parm == MagicToken)
             colorNum = 0;
         else
-            colorNum = ((Number)colorTable.get(parm)).intValue();
+            colorNum = colorTable.get(parm).intValue();
         writeControlWord("cf", colorNum);
     }
 }
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFParser.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFParser.java	Wed Jul 05 16:42:37 2017 +0200
@@ -92,7 +92,7 @@
   // table of non-text characters in rtf
   static final boolean rtfSpecialsTable[];
   static {
-    rtfSpecialsTable = (boolean[])noSpecialsTable.clone();
+    rtfSpecialsTable = noSpecialsTable.clone();
     rtfSpecialsTable['\n'] = true;
     rtfSpecialsTable['\r'] = true;
     rtfSpecialsTable['{'] = true;
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFReader.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFReader.java	Wed Jul 05 16:42:37 2017 +0200
@@ -54,7 +54,7 @@
   /** Miscellaneous information about the parser's state. This
    *  dictionary is saved and restored when an RTF group begins
    *  or ends. */
-  Dictionary parserState;   /* Current parser state */
+  Dictionary<Object, Object> parserState;   /* Current parser state */
   /** This is the "dst" item from parserState. rtfDestination
    *  is the current rtf destination. It is cached in an instance
    *  variable for speed. */
@@ -63,7 +63,7 @@
   MutableAttributeSet documentAttributes;
 
   /** This Dictionary maps Integer font numbers to String font names. */
-  Dictionary fontTable;
+  Dictionary<Integer, String> fontTable;
   /** This array maps color indices to Color objects. */
   Color[] colorTable;
   /** This array maps character style numbers to Style objects. */
@@ -86,7 +86,7 @@
    *  Unicode character. */
   int skippingCharacters;
 
-  static private Dictionary straightforwardAttributes;
+  static private Dictionary<String, RTFAttribute> straightforwardAttributes;
   static {
       straightforwardAttributes = RTFAttributes.attributesByKeyword();
   }
@@ -96,9 +96,9 @@
   /* this should be final, but there's a bug in javac... */
   /** textKeywords maps RTF keywords to single-character strings,
    *  for those keywords which simply insert some text. */
-  static Dictionary textKeywords = null;
+  static Dictionary<String, String> textKeywords = null;
   static {
-      textKeywords = new Hashtable();
+      textKeywords = new Hashtable<String, String>();
       textKeywords.put("\\",         "\\");
       textKeywords.put("{",          "{");
       textKeywords.put("}",          "}");
@@ -129,10 +129,10 @@
   static final String TabAlignmentKey = "tab_alignment";
   static final String TabLeaderKey = "tab_leader";
 
-  static Dictionary characterSets;
+  static Dictionary<String, char[]> characterSets;
   static boolean useNeXTForAnsi = false;
   static {
-      characterSets = new Hashtable();
+      characterSets = new Hashtable<String, char[]>();
   }
 
 /* TODO: per-font font encodings ( \fcharset control word ) ? */
@@ -148,8 +148,8 @@
     int i;
 
     target = destination;
-    parserState = new Hashtable();
-    fontTable = new Hashtable();
+    parserState = new Hashtable<Object, Object>();
+    fontTable = new Hashtable<Integer, String>();
 
     rtfversion = -1;
 
@@ -220,7 +220,7 @@
     Object oldSaveState = parserState.get("_savedState");
     if (oldSaveState != null)
         parserState.remove("_savedState");
-    Dictionary saveState = (Dictionary)((Hashtable)parserState).clone();
+    Dictionary<String, Object> saveState = (Dictionary<String, Object>)((Hashtable)parserState).clone();
     if (oldSaveState != null)
         saveState.put("_savedState", oldSaveState);
     parserState.put("_savedState", saveState);
@@ -242,7 +242,7 @@
         skippingCharacters = 0;
     }
 
-    Dictionary restoredState = (Dictionary)parserState.get("_savedState");
+    Dictionary<Object, Object> restoredState = (Dictionary<Object, Object>)parserState.get("_savedState");
     Destination restoredDestination = (Destination)restoredState.get("dst");
     if (restoredDestination != rtfDestination) {
         rtfDestination.close(); /* allow the destination to clean up */
@@ -281,7 +281,7 @@
     while(docProps.hasMoreElements()) {
         Object propName = docProps.nextElement();
         target.putProperty(propName,
-                           documentAttributes.getAttribute((String)propName));
+                           documentAttributes.getAttribute(propName));
     }
 
     /* RTFParser should have ensured that all our groups are closed */
@@ -301,7 +301,7 @@
  */
 public boolean handleKeyword(String keyword)
 {
-    Object item;
+    String item;
     boolean ignoreGroupIfUnknownKeywordSave = ignoreGroupIfUnknownKeyword;
 
     if (skippingCharacters > 0) {
@@ -312,7 +312,7 @@
     ignoreGroupIfUnknownKeyword = false;
 
     if ((item = textKeywords.get(keyword)) != null) {
-        handleText((String)item);
+        handleText(item);
         return true;
     }
 
@@ -556,14 +556,12 @@
 getCharacterSet(final String name)
     throws IOException
 {
-    char[] set;
-
-    set = (char [])characterSets.get(name);
+    char[] set = characterSets.get(name);
     if (set == null) {
       InputStream charsetStream;
-      charsetStream = (InputStream)java.security.AccessController.
-                      doPrivileged(new java.security.PrivilegedAction() {
-          public Object run() {
+      charsetStream = java.security.AccessController.
+              doPrivileged(new java.security.PrivilegedAction<InputStream>() {
+          public InputStream run() {
               return RTFReader.class.getResourceAsStream
                                      ("charsets/" + name + ".txt");
           }
@@ -686,7 +684,7 @@
 class FonttblDestination implements Destination
 {
     int nextFontNumber;
-    Object fontNumberKey = null;
+    Integer fontNumberKey = null;
     String nextFontFamily;
 
     public void handleBinaryBlob(byte[] data)
@@ -716,7 +714,6 @@
 
         nextFontNumber = -1;
         nextFontFamily = null;
-        return;
     }
 
     public boolean handleKeyword(String keyword)
@@ -747,10 +744,10 @@
        dump its contents to the debugging log. */
     public void close()
     {
-        Enumeration nums = fontTable.keys();
+        Enumeration<Integer> nums = fontTable.keys();
         warning("Done reading font table.");
         while(nums.hasMoreElements()) {
-            Integer num = (Integer)nums.nextElement();
+            Integer num = nums.nextElement();
             warning("Number " + num + ": " + fontTable.get(num));
         }
     }
@@ -761,19 +758,19 @@
 class ColortblDestination implements Destination
 {
     int red, green, blue;
-    Vector proTemTable;
+    Vector<Color> proTemTable;
 
     public ColortblDestination()
     {
         red = 0;
         green = 0;
         blue = 0;
-        proTemTable = new Vector();
+        proTemTable = new Vector<Color>();
     }
 
     public void handleText(String text)
     {
-        int index = 0;
+        int index;
 
         for (index = 0; index < text.length(); index ++) {
             if (text.charAt(index) == ';') {
@@ -823,11 +820,11 @@
     extends DiscardingDestination
     implements Destination
 {
-    Dictionary definedStyles;
+    Dictionary<Integer, StyleDefiningDestination> definedStyles;
 
     public StylesheetDestination()
     {
-        definedStyles = new Hashtable();
+        definedStyles = new Hashtable<Integer, StyleDefiningDestination>();
     }
 
     public void begingroup()
@@ -837,19 +834,18 @@
 
     public void close()
     {
-        Vector chrStyles, pgfStyles, secStyles;
-        chrStyles = new Vector();
-        pgfStyles = new Vector();
-        secStyles = new Vector();
-        Enumeration styles = definedStyles.elements();
+        Vector<Style> chrStyles = new Vector<Style>();
+        Vector<Style> pgfStyles = new Vector<Style>();
+        Vector<Style> secStyles = new Vector<Style>();
+        Enumeration<StyleDefiningDestination> styles = definedStyles.elements();
         while(styles.hasMoreElements()) {
             StyleDefiningDestination style;
             Style defined;
-            style = (StyleDefiningDestination)styles.nextElement();
+            style = styles.nextElement();
             defined = style.realize();
             warning("Style "+style.number+" ("+style.styleName+"): "+defined);
             String stype = (String)defined.getAttribute(Constants.StyleType);
-            Vector toSet;
+            Vector<Style> toSet;
             if (stype.equals(Constants.STSection)) {
                 toSet = secStyles;
             } else if (stype.equals(Constants.STCharacter)) {
@@ -989,7 +985,7 @@
 
             if (basedOn != STYLENUMBER_NONE) {
                 StyleDefiningDestination styleDest;
-                styleDest = (StyleDefiningDestination)definedStyles.get(Integer.valueOf(basedOn));
+                styleDest = definedStyles.get(Integer.valueOf(basedOn));
                 if (styleDest != null && styleDest != this) {
                     basis = styleDest.realize();
                 }
@@ -1016,7 +1012,7 @@
 
             if (nextStyle != STYLENUMBER_NONE) {
                 StyleDefiningDestination styleDest;
-                styleDest = (StyleDefiningDestination)definedStyles.get(Integer.valueOf(nextStyle));
+                styleDest = definedStyles.get(Integer.valueOf(nextStyle));
                 if (styleDest != null) {
                     next = styleDest.realize();
                 }
@@ -1122,9 +1118,8 @@
         }
 
         {
-            Object item = straightforwardAttributes.get(keyword);
-            if (item != null) {
-                RTFAttribute attr = (RTFAttribute)item;
+            RTFAttribute attr = straightforwardAttributes.get(keyword);
+            if (attr != null) {
                 boolean ok;
 
                 switch(attr.domain()) {
@@ -1191,9 +1186,8 @@
         }
 
         {
-            Object item = straightforwardAttributes.get(keyword);
-            if (item != null) {
-                RTFAttribute attr = (RTFAttribute)item;
+            RTFAttribute attr = straightforwardAttributes.get(keyword);
+            if (attr != null) {
                 boolean ok;
 
                 switch(attr.domain()) {
@@ -1267,12 +1261,12 @@
             parserState.remove("tab_leader");
 
             TabStop newStop = new TabStop(tabPosition, tabAlignment, tabLeader);
-            Dictionary tabs;
+            Dictionary<Object, Object> tabs;
             Integer stopCount;
 
-            tabs = (Dictionary)parserState.get("_tabs");
+            tabs = (Dictionary<Object, Object>)parserState.get("_tabs");
             if (tabs == null) {
-                tabs = new Hashtable();
+                tabs = new Hashtable<Object, Object>();
                 parserState.put("_tabs", tabs);
                 stopCount = Integer.valueOf(1);
             } else {
@@ -1369,7 +1363,7 @@
         /* note setFontFamily() can not handle a null font */
         String fontFamily;
         if (fontnum != null)
-            fontFamily = (String)fontTable.get(fontnum);
+            fontFamily = fontTable.get(fontnum);
         else
             fontFamily = null;
         if (fontFamily != null)
@@ -1474,9 +1468,9 @@
 
         handleKeyword("fs", 24);  /* 12 pt. */
 
-        Enumeration attributes = straightforwardAttributes.elements();
+        Enumeration<RTFAttribute> attributes = straightforwardAttributes.elements();
         while(attributes.hasMoreElements()) {
-            RTFAttribute attr = (RTFAttribute)attributes.nextElement();
+            RTFAttribute attr = attributes.nextElement();
             if (attr.domain() == RTFAttribute.D_CHARACTER)
                 attr.setDefault(characterAttributes);
         }
@@ -1498,9 +1492,9 @@
         StyleConstants.setAlignment(paragraphAttributes,
                                     StyleConstants.ALIGN_LEFT);
 
-        Enumeration attributes = straightforwardAttributes.elements();
+        Enumeration<RTFAttribute> attributes = straightforwardAttributes.elements();
         while(attributes.hasMoreElements()) {
-            RTFAttribute attr = (RTFAttribute)attributes.nextElement();
+            RTFAttribute attr = attributes.nextElement();
             if (attr.domain() == RTFAttribute.D_PARAGRAPH)
                 attr.setDefault(characterAttributes);
         }
@@ -1511,9 +1505,9 @@
      *  \sectd keyword. */
     protected void resetSectionAttributes()
     {
-        Enumeration attributes = straightforwardAttributes.elements();
+        Enumeration<RTFAttribute> attributes = straightforwardAttributes.elements();
         while(attributes.hasMoreElements()) {
-            RTFAttribute attr = (RTFAttribute)attributes.nextElement();
+            RTFAttribute attr = attributes.nextElement();
             if (attr.domain() == RTFAttribute.D_SECTION)
                 attr.setDefault(characterAttributes);
         }
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Wed Jul 05 16:42:37 2017 +0200
@@ -551,7 +551,7 @@
 
     // Serialization support.
     private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector      values = new Vector();
+        Vector<Object> values = new Vector<Object>();
 
         s.defaultWriteObject();
         // Save the realEditor, if its Serializable.
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -453,8 +453,7 @@
      * @since 1.4
      */
     public TreeModelListener[] getTreeModelListeners() {
-        return (TreeModelListener[])listenerList.getListeners(
-                TreeModelListener.class);
+        return listenerList.getListeners(TreeModelListener.class);
     }
 
     /**
@@ -652,7 +651,7 @@
 
     // Serialization support.
     private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector      values = new Vector();
+        Vector<Object> values = new Vector<Object>();
 
         s.defaultWriteObject();
         // Save the root, if its Serializable.
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Wed Jul 05 16:42:37 2017 +0200
@@ -61,7 +61,7 @@
  *
  * @author Scott Violet
  */
-public class DefaultTreeSelectionModel extends Object implements Cloneable, Serializable, TreeSelectionModel
+public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeSelectionModel
 {
     /** Property name for selectionMode. */
     public static final String          SELECTION_MODE_PROPERTY = "selectionMode";
@@ -98,8 +98,8 @@
     /** Used to make sure the paths are unique, will contain all the paths
      * in <code>selection</code>.
      */
-    private Hashtable                       uniquePaths;
-    private Hashtable                       lastPaths;
+    private Hashtable<TreePath, Boolean>    uniquePaths;
+    private Hashtable<TreePath, Boolean>    lastPaths;
     private TreePath[]                      tempPaths;
 
 
@@ -111,8 +111,8 @@
         listSelectionModel = new DefaultListSelectionModel();
         selectionMode = DISCONTIGUOUS_TREE_SELECTION;
         leadIndex = leadRow = -1;
-        uniquePaths = new Hashtable();
-        lastPaths = new Hashtable();
+        uniquePaths = new Hashtable<TreePath, Boolean>();
+        lastPaths = new Hashtable<TreePath, Boolean>();
         tempPaths = new TreePath[1];
     }
 
@@ -245,7 +245,7 @@
             }
 
             TreePath         beginLeadPath = leadPath;
-            Vector           cPaths = new Vector(newCount + oldCount);
+            Vector<PathPlaceHolder> cPaths = new Vector<PathPlaceHolder>(newCount + oldCount);
             List<TreePath> newSelectionAsList =
                     new ArrayList<TreePath>(newCount);
 
@@ -276,7 +276,7 @@
 
             selection = newSelection;
 
-            Hashtable      tempHT = uniquePaths;
+            Hashtable<TreePath, Boolean>  tempHT = uniquePaths;
 
             uniquePaths = lastPaths;
             lastPaths = tempHT;
@@ -348,7 +348,7 @@
                 int               counter, validCount;
                 int               oldCount;
                 TreePath          beginLeadPath = leadPath;
-                Vector            cPaths = null;
+                Vector<PathPlaceHolder>  cPaths = null;
 
                 if(selection == null)
                     oldCount = 0;
@@ -363,7 +363,7 @@
                         if (uniquePaths.get(paths[counter]) == null) {
                             validCount++;
                             if(cPaths == null)
-                                cPaths = new Vector();
+                                cPaths = new Vector<PathPlaceHolder>();
                             cPaths.addElement(new PathPlaceHolder
                                               (paths[counter], true));
                             uniquePaths.put(paths[counter], Boolean.TRUE);
@@ -388,12 +388,11 @@
                     if(validCount != paths.length) {
                         /* Some of the paths in paths are already in
                            the selection. */
-                        Enumeration   newPaths = lastPaths.keys();
+                        Enumeration<TreePath> newPaths = lastPaths.keys();
 
                         counter = oldCount;
                         while (newPaths.hasMoreElements()) {
-                            newSelection[counter++] = (TreePath)newPaths.
-                                                      nextElement();
+                            newSelection[counter++] = newPaths.nextElement();
                         }
                     }
                     else {
@@ -448,7 +447,7 @@
                 clearSelection();
             }
             else {
-                Vector      pathsToRemove = null;
+                Vector<PathPlaceHolder> pathsToRemove = null;
 
                 /* Find the paths that can be removed. */
                 for (int removeCounter = paths.length - 1; removeCounter >= 0;
@@ -456,7 +455,7 @@
                     if(paths[removeCounter] != null) {
                         if (uniquePaths.get(paths[removeCounter]) != null) {
                             if(pathsToRemove == null)
-                                pathsToRemove = new Vector(paths.length);
+                                pathsToRemove = new Vector<PathPlaceHolder>(paths.length);
                             uniquePaths.remove(paths[removeCounter]);
                             pathsToRemove.addElement(new PathPlaceHolder
                                          (paths[removeCounter], false));
@@ -471,14 +470,13 @@
                         selection = null;
                     }
                     else {
-                        Enumeration          pEnum = uniquePaths.keys();
+                        Enumeration<TreePath> pEnum = uniquePaths.keys();
                         int                  validCount = 0;
 
                         selection = new TreePath[selection.length -
                                                 removeCount];
                         while (pEnum.hasMoreElements()) {
-                            selection[validCount++] = (TreePath)pEnum.
-                                                          nextElement();
+                            selection[validCount++] = pEnum.nextElement();
                         }
                     }
                     if (leadPath != null &&
@@ -613,8 +611,7 @@
      * @since 1.4
      */
     public TreeSelectionListener[] getTreeSelectionListeners() {
-        return (TreeSelectionListener[])listenerList.getListeners(
-                TreeSelectionListener.class);
+        return listenerList.getListeners(TreeSelectionListener.class);
     }
 
     /**
@@ -1081,7 +1078,7 @@
         PathPlaceHolder        placeholder;
 
         for(int counter = 0; counter < cPathCount; counter++) {
-            placeholder = (PathPlaceHolder)changedPaths.elementAt(counter);
+            placeholder = changedPaths.elementAt(counter);
             newness[counter] = placeholder.isNew;
             paths[counter] = placeholder.path;
         }
@@ -1177,8 +1174,8 @@
         clone.listenerList = new EventListenerList();
         clone.listSelectionModel = (DefaultListSelectionModel)
             listSelectionModel.clone();
-        clone.uniquePaths = new Hashtable();
-        clone.lastPaths = new Hashtable();
+        clone.uniquePaths = new Hashtable<TreePath, Boolean>();
+        clone.lastPaths = new Hashtable<TreePath, Boolean>();
         clone.tempPaths = new TreePath[1];
         return clone;
     }
--- a/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Wed Jul 05 16:42:37 2017 +0200
@@ -64,21 +64,21 @@
     /**
      * Maps from TreePath to a FHTreeStateNode.
      */
-    private Hashtable          treePathMapping;
+    private Hashtable<TreePath, FHTreeStateNode> treePathMapping;
 
     /**
      * Used for getting path/row information.
      */
     private SearchInfo         info;
 
-    private Stack              tempStacks;
+    private Stack<Stack<TreePath>> tempStacks;
 
 
     public FixedHeightLayoutCache() {
         super();
-        tempStacks = new Stack();
+        tempStacks = new Stack<Stack<TreePath>>();
         boundsBuffer = new Rectangle();
-        treePathMapping = new Hashtable();
+        treePathMapping = new Hashtable<TreePath, FHTreeStateNode>();
         info = new SearchInfo();
         setRowHeight(1);
     }
@@ -592,7 +592,7 @@
      * return null, if you to create a node use getNodeForPath.
      */
     private FHTreeStateNode getMapping(TreePath path) {
-        return (FHTreeStateNode)treePathMapping.get(path);
+        return treePathMapping.get(path);
     }
 
     /**
@@ -695,13 +695,13 @@
                 return null;
 
             // Check all the parent paths, until a match is found.
-            Stack                paths;
+            Stack<TreePath> paths;
 
             if(tempStacks.size() == 0) {
-                paths = new Stack();
+                paths = new Stack<TreePath>();
             }
             else {
-                paths = (Stack)tempStacks.pop();
+                paths = tempStacks.pop();
             }
 
             try {
@@ -714,7 +714,7 @@
                         // Found a match, create entries for all paths in
                         // paths.
                         while(node != null && paths.size() > 0) {
-                            path = (TreePath)paths.pop();
+                            path = paths.pop();
                             node = node.createChildFor(path.
                                                        getLastPathComponent());
                         }
--- a/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,7 +56,7 @@
      * The array of nodes that are currently visible, in the order they
      * are displayed.
      */
-    private Vector            visibleNodes;
+    private Vector<Object> visibleNodes;
 
     /**
      * This is set to true if one of the entries has an invalid size.
@@ -79,20 +79,20 @@
     /**
      * Maps from <code>TreePath</code> to a <code>TreeStateNode</code>.
      */
-    private Hashtable         treePathMapping;
+    private Hashtable<TreePath, TreeStateNode> treePathMapping;
 
     /**
      * A stack of stacks.
      */
-    private Stack             tempStacks;
+    private Stack<Stack<TreePath>> tempStacks;
 
 
     public VariableHeightLayoutCache() {
         super();
-        tempStacks = new Stack();
-        visibleNodes = new Vector();
+        tempStacks = new Stack<Stack<TreePath>>();
+        visibleNodes = new Vector<Object>();
         boundsBuffer = new Rectangle();
-        treePathMapping = new Hashtable();
+        treePathMapping = new Hashtable<TreePath, TreeStateNode>();
     }
 
     /**
@@ -704,7 +704,7 @@
      * return null, if you to create a node use getNodeForPath.
      */
     private TreeStateNode getMapping(TreePath path) {
-        return (TreeStateNode)treePathMapping.get(path);
+        return treePathMapping.get(path);
     }
 
     /**
@@ -824,13 +824,13 @@
             }
 
             // Check all the parent paths, until a match is found.
-            Stack                paths;
+            Stack<TreePath> paths;
 
             if(tempStacks.size() == 0) {
-                paths = new Stack();
+                paths = new Stack<TreePath>();
             }
             else {
-                paths = (Stack)tempStacks.pop();
+                paths = tempStacks.pop();
             }
 
             try {
@@ -843,7 +843,7 @@
                         // Found a match, create entries for all paths in
                         // paths.
                         while(node != null && paths.size() > 0) {
-                            path = (TreePath)paths.pop();
+                            path = paths.pop();
                             node.getLoadedChildren(shouldCreate);
 
                             int            childIndex = treeModel.
--- a/jdk/src/share/classes/javax/swing/undo/StateEdit.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/undo/StateEdit.java	Wed Jul 05 16:42:37 2017 +0200
@@ -116,7 +116,7 @@
 
     protected void init (StateEditable anObject, String name) {
         this.object = anObject;
-        this.preState = new Hashtable(11);
+        this.preState = new Hashtable<Object, Object>(11);
         this.object.storeState(this.preState);
         this.postState = null;
         this.undoRedoName = name;
@@ -133,7 +133,7 @@
      * ends the edit.
      */
     public void end() {
-        this.postState = new Hashtable(11);
+        this.postState = new Hashtable<Object, Object>(11);
         this.object.storeState(this.postState);
         this.removeRedundantState();
     }
@@ -170,7 +170,7 @@
      * Remove redundant key/values in state hashtables.
      */
     protected void removeRedundantState() {
-        Vector uselessKeys = new Vector();
+        Vector<Object> uselessKeys = new Vector<Object>();
         Enumeration myKeys = preState.keys();
 
         // Locate redundant state
--- a/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -166,12 +166,10 @@
      * @see AbstractUndoableEdit#die
      */
     public synchronized void discardAllEdits() {
-        Enumeration cursor = edits.elements();
-        while (cursor.hasMoreElements()) {
-            UndoableEdit e = (UndoableEdit)cursor.nextElement();
+        for (UndoableEdit e : edits) {
             e.die();
         }
-        edits = new Vector();
+        edits = new Vector<UndoableEdit>();
         indexOfNextAdd = 0;
         // PENDING(rjrjr) when vector grows a removeRange() method
         // (expected in JDK 1.2), trimEdits() will be nice and
@@ -240,7 +238,7 @@
 //          System.out.println("Trimming " + from + " " + to + " with index " +
 //                           indexOfNextAdd);
             for (int i = to; from <= i; i--) {
-                UndoableEdit e = (UndoableEdit)edits.elementAt(i);
+                UndoableEdit e = edits.elementAt(i);
 //              System.out.println("JUM: Discarding " +
 //                                 e.getUndoPresentationName());
                 e.die();
@@ -293,7 +291,7 @@
     protected UndoableEdit editToBeUndone() {
         int i = indexOfNextAdd;
         while (i > 0) {
-            UndoableEdit edit = (UndoableEdit)edits.elementAt(--i);
+            UndoableEdit edit = edits.elementAt(--i);
             if (edit.isSignificant()) {
                 return edit;
             }
@@ -314,7 +312,7 @@
         int i = indexOfNextAdd;
 
         while (i < count) {
-            UndoableEdit edit = (UndoableEdit)edits.elementAt(i++);
+            UndoableEdit edit = edits.elementAt(i++);
             if (edit.isSignificant()) {
                 return edit;
             }
@@ -333,7 +331,7 @@
     protected void undoTo(UndoableEdit edit) throws CannotUndoException {
         boolean done = false;
         while (!done) {
-            UndoableEdit next = (UndoableEdit)edits.elementAt(--indexOfNextAdd);
+            UndoableEdit next = edits.elementAt(--indexOfNextAdd);
             next.undo();
             done = next == edit;
         }
@@ -349,7 +347,7 @@
     protected void redoTo(UndoableEdit edit) throws CannotRedoException {
         boolean done = false;
         while (!done) {
-            UndoableEdit next = (UndoableEdit)edits.elementAt(indexOfNextAdd++);
+            UndoableEdit next = edits.elementAt(indexOfNextAdd++);
             next.redo();
             done = next == edit;
         }
--- a/jdk/src/share/classes/javax/swing/undo/UndoableEditSupport.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/undo/UndoableEditSupport.java	Wed Jul 05 16:42:37 2017 +0200
@@ -89,8 +89,7 @@
      * @since 1.4
      */
     public synchronized UndoableEditListener[] getUndoableEditListeners() {
-        return (UndoableEditListener[])(listeners.toArray(
-                new UndoableEditListener[0]));
+        return listeners.toArray(new UndoableEditListener[0]);
     }
 
     /**
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -19,7 +19,10 @@
  *
  */
 /*
- * $Id: DigesterOutputStream.java,v 1.1.2.2 2005/08/12 18:15:35 mullan Exp $
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DigesterOutputStream.java,v 1.2 2008/07/24 15:20:31 mullan Exp $
  */
 package org.jcp.xml.dsig.internal;
 
@@ -35,10 +38,11 @@
 /**
  * This class has been modified slightly to use java.security.MessageDigest
  * objects as input, rather than
- * org.apache.xml.security.algorithms.MessageDigestAlgorithm objects.
+ * com.sun.org.apache.xml.internal.security.algorithms.MessageDigestAlgorithm objects.
  * It also optionally caches the input bytes.
  *
  * @author raul
+ * @author Sean Mullan
  */
 public class DigesterOutputStream extends OutputStream {
     private boolean buffer = false;
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -24,15 +24,14 @@
 import javax.crypto.Mac;
 
 /**
- * Derived from Apache sources and changed to use Mac objects
- * objects instead of org.apache.xml.security.algorithms.SignatureAlgorithm
- * objects.
+ * Derived from Apache sources and changed to use Mac objects instead of
+ * com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithm objects.
  *
  * @author raul
+ * @author Sean Mullan
  *
  */
 public class MacOutputStream extends ByteArrayOutputStream {
-    private final static byte none[]="error".getBytes();
     private final Mac mac;
 
     public MacOutputStream(Mac mac) {
@@ -40,22 +39,20 @@
     }
 
     /** @inheritDoc */
-    public byte[] toByteArray() {
-        return none;
-    }
-
-    /** @inheritDoc */
     public void write(byte[] arg0)  {
+        super.write(arg0, 0, arg0.length);
         mac.update(arg0);
     }
 
     /** @inheritDoc */
     public void write(int arg0) {
-        mac.update((byte)arg0);
+        super.write(arg0);
+        mac.update((byte) arg0);
     }
 
     /** @inheritDoc */
     public void write(byte[] arg0, int arg1, int arg2) {
-        mac.update(arg0,arg1,arg2);
+        super.write(arg0, arg1, arg2);
+        mac.update(arg0, arg1, arg2);
     }
 }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/SignerOutputStream.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/SignerOutputStream.java	Wed Jul 05 16:42:37 2017 +0200
@@ -19,7 +19,10 @@
  *
  */
 /*
- * $Id: SignerOutputStream.java,v 1.1.2.2 2005/08/12 18:01:58 mullan Exp $
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: SignerOutputStream.java,v 1.2 2008/07/24 15:20:31 mullan Exp $
  */
 package org.jcp.xml.dsig.internal;
 
@@ -29,10 +32,11 @@
 
 /**
  * Derived from Apache sources and changed to use java.security.Signature
- * objects as input instead of org.apache.xml.security.algorithms.SignatureAlgorithm
+ * objects as input instead of com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithm
  * objects.
  *
  * @author raul
+ * @author Sean Mullan
  */
 public class SignerOutputStream extends ByteArrayOutputStream {
     private final Signature sig;
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: ApacheCanonicalizer.java,v 1.17 2005/09/19 18:20:04 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: ApacheCanonicalizer.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -53,6 +52,10 @@
 
 public abstract class ApacheCanonicalizer extends TransformService {
 
+    static {
+        com.sun.org.apache.xml.internal.security.Init.init();
+    }
+
     private static Logger log = Logger.getLogger("org.jcp.xml.dsig.internal.dom");
     protected Canonicalizer apacheCanonicalizer;
     private Transform apacheTransform;
@@ -235,13 +238,9 @@
         }
 
         try {
-            if (os != null) {
-                in = apacheTransform.performTransform(in, os);
-                if (!in.isNodeSet() && !in.isElement()) {
-                    return null;
-                }
-            } else {
-                in = apacheTransform.performTransform(in);
+            in = apacheTransform.performTransform(in, os);
+            if (!in.isNodeSet() && !in.isElement()) {
+                return null;
             }
             if (in.isOctetStream()) {
                 return new ApacheOctetStreamData(in);
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: ApacheData.java,v 1.4 2005/05/10 18:15:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: ApacheData.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: ApacheNodeSetData.java,v 1.4 2005/05/10 18:15:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: ApacheNodeSetData.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -83,7 +82,7 @@
             boolean skipNode = false;
             while (it.hasNext() && !skipNode) {
                 NodeFilter nf = (NodeFilter) it.next();
-                if (!nf.isNodeInclude(currentNode)) {
+                if (nf.isNodeInclude(currentNode)!=1) {
                     skipNode = true;
                 }
             }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: ApacheOctetStreamData.java,v 1.4 2005/05/10 18:15:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: ApacheOctetStreamData.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: ApacheTransform.java,v 1.23 2005/09/15 14:29:03 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: ApacheTransform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -54,6 +53,10 @@
  */
 public abstract class ApacheTransform extends TransformService {
 
+    static {
+        com.sun.org.apache.xml.internal.security.Init.init();
+    }
+
     private static Logger log = Logger.getLogger("org.jcp.xml.dsig.internal.dom");
     private Transform apacheTransform;
     protected Document ownerDoc;
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMBase64Transform.java,v 1.14 2005/05/10 18:15:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMBase64Transform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,79 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2008 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMCanonicalXMLC14N11Method.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
+ */
+package org.jcp.xml.dsig.internal.dom;
+
+import javax.xml.crypto.*;
+import javax.xml.crypto.dsig.*;
+import javax.xml.crypto.dsig.spec.TransformParameterSpec;
+
+import java.security.InvalidAlgorithmParameterException;
+
+import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
+import com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException;
+
+/**
+ * DOM-based implementation of CanonicalizationMethod for Canonical XML 1.1
+ * (with or without comments). Uses Apache XML-Sec Canonicalizer.
+ *
+ * @author Sean Mullan
+ */
+public final class DOMCanonicalXMLC14N11Method extends ApacheCanonicalizer {
+
+    public static final String C14N_11 = "http://www.w3.org/2006/12/xml-c14n11";
+    public static final String C14N_11_WITH_COMMENTS
+        = "http://www.w3.org/2006/12/xml-c14n11#WithComments";
+
+    public void init(TransformParameterSpec params)
+        throws InvalidAlgorithmParameterException {
+        if (params != null) {
+            throw new InvalidAlgorithmParameterException("no parameters " +
+                "should be specified for Canonical XML 1.1 algorithm");
+        }
+    }
+
+    public Data transform(Data data, XMLCryptoContext xc)
+        throws TransformException {
+
+        // ignore comments if dereferencing same-document URI that requires
+        // you to omit comments, even if the Transform says otherwise -
+        // this is to be compliant with section 4.3.3.3 of W3C Rec.
+        if (data instanceof DOMSubTreeData) {
+            DOMSubTreeData subTree = (DOMSubTreeData) data;
+            if (subTree.excludeComments()) {
+                try {
+                    apacheCanonicalizer = Canonicalizer.getInstance(C14N_11);
+                } catch (InvalidCanonicalizerException ice) {
+                    throw new TransformException
+                        ("Couldn't find Canonicalizer for: " +
+                         C14N_11 + ": " + ice.getMessage(), ice);
+                }
+            }
+        }
+
+        return canonicalize(data, xc);
+    }
+}
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMCanonicalXMLC14NMethod.java,v 1.24.4.1 2005/08/12 15:27:49 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMCanonicalXMLC14NMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,34 +1,34 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMCanonicalizationMethod.java,v 1.25 2005/05/10 18:15:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMCanonicalizationMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
 import java.io.OutputStream;
 import java.security.InvalidAlgorithmParameterException;
+import java.security.Provider;
 
 import org.w3c.dom.Element;
 
@@ -60,9 +60,9 @@
      *
      * @param cmElem a CanonicalizationMethod element
      */
-    public DOMCanonicalizationMethod(Element cmElem, XMLCryptoContext context)
-        throws MarshalException{
-        super(cmElem, context);
+    public DOMCanonicalizationMethod(Element cmElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
+        super(cmElem, context, provider);
     }
 
     /**
@@ -75,7 +75,7 @@
      *     additional context (may be <code>null</code> if not applicable)
      * @return the canonicalized data
      * @throws NullPointerException if <code>data</code> is <code>null</code>
-     * @throws XMLSignatureException if an unexpected error occurs while
+     * @throws TransformException if an unexpected error occurs while
      *    canonicalizing the data
      */
     public Data canonicalize(Data data, XMLCryptoContext xc)
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMCryptoBinary.java,v 1.14 2005/05/12 19:28:29 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMCryptoBinary.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMDigestMethod.java,v 1.17 2005/05/10 18:15:32 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMDigestMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -127,7 +126,7 @@
 
     /**
      * Unmarshals <code>DigestMethodParameterSpec</code> from the specified
-     * <code>Element</code>. By default, this method throws an exception since
+     * <code>Element</code>.  By default, this method throws an exception since
      * most DigestMethod algorithms do not have parameters. Subclasses should
      * override it if they have parameters.
      *
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMEnvelopedTransform.java,v 1.16 2005/05/10 18:15:32 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMEnvelopedTransform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMExcC14NMethod.java,v 1.28 2005/09/23 20:20:41 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMExcC14NMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -104,7 +103,7 @@
         Element excElem = DOMUtils.createElement
             (ownerDoc, "InclusiveNamespaces",
              CanonicalizationMethod.EXCLUSIVE, prefix);
-        if (prefix == null) {
+        if (prefix == null || prefix.length() == 0) {
             excElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
                 CanonicalizationMethod.EXCLUSIVE);
         } else {
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMHMACSignatureMethod.java,v 1.17 2005/09/15 14:29:04 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMHMACSignatureMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMKeyInfo.java,v 1.19 2005/05/12 19:28:30 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMKeyInfo.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -33,6 +32,7 @@
 import javax.xml.crypto.dsig.keyinfo.KeyInfo;
 import javax.xml.crypto.dom.*;
 
+import java.security.Provider;
 import java.util.*;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -82,10 +82,10 @@
     /**
      * Creates a <code>DOMKeyInfo</code> from XML.
      *
-     * @param input XML input
+     * @param kiElem KeyInfo element
      */
-    public DOMKeyInfo(Element kiElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMKeyInfo(Element kiElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         // get Id attribute, if specified
         id = DOMUtils.getAttributeValue(kiElem, "Id");
 
@@ -112,7 +112,10 @@
             } else if (localName.equals("KeyValue")) {
                 content.add(new DOMKeyValue(childElem));
             } else if (localName.equals("RetrievalMethod")) {
-                content.add(new DOMRetrievalMethod(childElem, context));
+                content.add
+                    (new DOMRetrievalMethod(childElem, context, provider));
+            } else if (localName.equals("PGPData")) {
+                content.add(new DOMPGPData(childElem));
             } else { //may be MgmtData, SPKIData or element from other namespace
                 content.add(new javax.xml.crypto.dom.DOMStructure((childElem)));
             }
@@ -139,7 +142,7 @@
         Element kiElem = DOMUtils.createElement
             (DOMUtils.getOwnerDocument(pNode), "KeyInfo",
              XMLSignature.XMLNS, dsPrefix);
-        if (dsPrefix == null) {
+        if (dsPrefix == null || dsPrefix.length() == 0) {
             kiElem.setAttributeNS
                 ("http://www.w3.org/2000/xmlns/", "xmlns", XMLSignature.XMLNS);
         } else {
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,34 +1,34 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMKeyInfoFactory.java,v 1.24 2005/09/23 20:18:50 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMKeyInfoFactory.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
 import java.math.BigInteger;
-import java.security.*;
+import java.security.KeyException;
+import java.security.PublicKey;
 import java.util.List;
 import javax.xml.crypto.*;
 import javax.xml.crypto.dsig.*;
@@ -45,7 +45,6 @@
  */
 public final class DOMKeyInfoFactory extends KeyInfoFactory {
 
-
     public DOMKeyInfoFactory() { }
 
     public KeyInfo newKeyInfo(List content) {
@@ -135,7 +134,7 @@
                 "support DOM Level 2 and be namespace aware");
         }
         if (tag.equals("KeyInfo")) {
-            return new DOMKeyInfo(element, null);
+            return new DOMKeyInfo(element, null, getProvider());
         } else {
             throw new MarshalException("invalid KeyInfo tag: " + tag);
         }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMKeyName.java,v 1.12 2005/05/10 18:15:32 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMKeyName.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMKeyValue.java,v 1.18 2005/05/10 18:15:33 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMKeyValue.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMManifest.java,v 1.16 2005/05/12 19:28:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMManifest.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -31,6 +30,7 @@
 import javax.xml.crypto.dom.DOMCryptoContext;
 import javax.xml.crypto.dsig.*;
 
+import java.security.Provider;
 import java.util.*;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -83,13 +83,13 @@
      *
      * @param manElem a Manifest element
      */
-    public DOMManifest(Element manElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMManifest(Element manElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         this.id = DOMUtils.getAttributeValue(manElem, "Id");
         Element refElem = DOMUtils.getFirstChildElement(manElem);
         List refs = new ArrayList();
         while (refElem != null) {
-            refs.add(new DOMReference(refElem, context));
+            refs.add(new DOMReference(refElem, context, provider));
             refElem = DOMUtils.getNextSiblingElement(refElem);
         }
         this.references = Collections.unmodifiableList(refs);
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMPGPData.java,v 1.18 2005/05/12 19:28:31 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMPGPData.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,28 +1,26 @@
 /*
- * Portions Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2005 The Apache Software Foundation.
  *
- * 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.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
  *
- * 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).
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
  */
-
+/*
+ * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
 /*
  * ===========================================================================
  *
@@ -31,7 +29,7 @@
  * ===========================================================================
  */
 /*
- * $Id: DOMReference.java,v 1.40 2005/09/19 18:27:04 mullan Exp $
+ * $Id: DOMReference.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -67,13 +65,27 @@
 public final class DOMReference extends DOMStructure
     implements Reference, DOMURIReference {
 
+   /**
+    * Look up useC14N11 system property. If true, an explicit C14N11 transform
+    * will be added if necessary when generating the signature. See section
+    * 3.1.1 of http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/ for more info.
+    *
+    * If true, overrides the same property if set in the XMLSignContext.
+    */
+    private static boolean useC14N11 =
+        AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+            public Boolean run() {
+                return Boolean.getBoolean
+                    ("com.sun.org.apache.xml.internal.security.useC14N11");
+            }
+        });
+
     private static Logger log = Logger.getLogger("org.jcp.xml.dsig.internal.dom");
 
     private final DigestMethod digestMethod;
     private final String id;
-    private final List appliedTransforms;
     private final List transforms;
-    private final List allTransforms;
+    private List allTransforms;
     private final Data appliedTransformData;
     private Attr here;
     private final String uri;
@@ -87,6 +99,7 @@
     private Data derefData;
     private InputStream dis;
     private MessageDigest md;
+    private Provider provider;
 
     /**
      * Creates a <code>Reference</code> from the specified parameters.
@@ -104,24 +117,25 @@
      *    not of type <code>Transform</code>
      */
     public DOMReference(String uri, String type, DigestMethod dm,
-        List transforms, String id) {
-        this(uri, type, dm, null, null, transforms, id, null);
-    }
-
-    public DOMReference(String uri, String type, DigestMethod dm,
-        List appliedTransforms, Data result, List transforms, String id) {
-        this(uri, type, dm, appliedTransforms, result, transforms, id, null);
+        List transforms, String id, Provider provider) {
+        this(uri, type, dm, null, null, transforms, id, null, provider);
     }
 
     public DOMReference(String uri, String type, DigestMethod dm,
         List appliedTransforms, Data result, List transforms, String id,
-        byte[] digestValue){
+        Provider provider) {
+        this(uri, type, dm, appliedTransforms,
+             result, transforms, id, null, provider);
+    }
+
+    public DOMReference(String uri, String type, DigestMethod dm,
+        List appliedTransforms, Data result, List transforms, String id,
+        byte[] digestValue, Provider provider) {
         if (dm == null) {
             throw new NullPointerException("DigestMethod must be non-null");
         }
-        if (appliedTransforms == null || appliedTransforms.isEmpty()) {
-            this.appliedTransforms = Collections.EMPTY_LIST;
-        } else {
+        this.allTransforms = new ArrayList();
+        if (appliedTransforms != null) {
             List transformsCopy = new ArrayList(appliedTransforms);
             for (int i = 0, size = transformsCopy.size(); i < size; i++) {
                 if (!(transformsCopy.get(i) instanceof Transform)) {
@@ -129,10 +143,9 @@
                         ("appliedTransforms["+i+"] is not a valid type");
                 }
             }
-            this.appliedTransforms =
-                Collections.unmodifiableList(transformsCopy);
+            this.allTransforms = transformsCopy;
         }
-        if (transforms == null || transforms.isEmpty()) {
+        if (transforms == null) {
             this.transforms = Collections.EMPTY_LIST;
         } else {
             List transformsCopy = new ArrayList(transforms);
@@ -142,11 +155,9 @@
                         ("transforms["+i+"] is not a valid type");
                 }
             }
-            this.transforms = Collections.unmodifiableList(transformsCopy);
+            this.transforms = transformsCopy;
+            this.allTransforms.addAll(transformsCopy);
         }
-        List all = new ArrayList(this.appliedTransforms);
-        all.addAll(this.transforms);
-        this.allTransforms = Collections.unmodifiableList(all);
         this.digestMethod = dm;
         this.uri = uri;
         if ((uri != null) && (!uri.equals(""))) {
@@ -163,6 +174,7 @@
             this.digested = true;
         }
         this.appliedTransformData = result;
+        this.provider = provider;
     }
 
     /**
@@ -170,15 +182,16 @@
      *
      * @param refElem a Reference element
      */
-    public DOMReference(Element refElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMReference(Element refElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         // unmarshal Transforms, if specified
         Element nextSibling = DOMUtils.getFirstChildElement(refElem);
         List transforms = new ArrayList(5);
         if (nextSibling.getLocalName().equals("Transforms")) {
             Element transformElem = DOMUtils.getFirstChildElement(nextSibling);
             while (transformElem != null) {
-                transforms.add(new DOMTransform(transformElem, context));
+                transforms.add
+                    (new DOMTransform(transformElem, context, provider));
                 transformElem = DOMUtils.getNextSiblingElement(transformElem);
             }
             nextSibling = DOMUtils.getNextSiblingElement(nextSibling);
@@ -203,15 +216,10 @@
         this.type = DOMUtils.getAttributeValue(refElem, "Type");
         this.here = refElem.getAttributeNodeNS(null, "URI");
         this.refElem = refElem;
-
-        if (transforms.isEmpty()) {
-            this.transforms = Collections.EMPTY_LIST;
-        } else {
-            this.transforms = Collections.unmodifiableList(transforms);
-        }
-        this.appliedTransforms = Collections.EMPTY_LIST;
+        this.transforms = transforms;
         this.allTransforms = transforms;
         this.appliedTransformData = null;
+        this.provider = provider;
     }
 
     public DigestMethod getDigestMethod() {
@@ -231,7 +239,7 @@
     }
 
     public List getTransforms() {
-        return allTransforms;
+        return Collections.unmodifiableList(allTransforms);
     }
 
     public byte[] getDigestValue() {
@@ -259,17 +267,13 @@
         DOMUtils.setAttribute(refElem, "Type", type);
 
         // create and append Transforms element
-        if (!transforms.isEmpty() || !appliedTransforms.isEmpty()) {
+        if (!allTransforms.isEmpty()) {
             Element transformsElem = DOMUtils.createElement
                 (ownerDoc, "Transforms", XMLSignature.XMLNS, dsPrefix);
             refElem.appendChild(transformsElem);
-            for (int i = 0, size = appliedTransforms.size(); i < size; i++) {
+            for (int i = 0, size = allTransforms.size(); i < size; i++) {
                 DOMStructure transform =
-                    (DOMStructure) appliedTransforms.get(i);
-                transform.marshal(transformsElem, dsPrefix, context);
-            }
-            for (int i = 0, size = transforms.size(); i < size; i++) {
-                DOMStructure transform = (DOMStructure) transforms.get(i);
+                    (DOMStructure) allTransforms.get(i);
                 transform.marshal(transformsElem, dsPrefix, context);
             }
         }
@@ -416,21 +420,62 @@
         try {
             if (data != null) {
                 XMLSignatureInput xi;
+                // explicitly use C14N 1.1 when generating signature
+                // first check system property, then context property
+                boolean c14n11 = useC14N11;
+                String c14nalg = CanonicalizationMethod.INCLUSIVE;
+                if (context instanceof XMLSignContext) {
+                    if (!c14n11) {
+                        Boolean prop = (Boolean) context.getProperty
+                            ("com.sun.org.apache.xml.internal.security.useC14N11");
+                        c14n11 = (prop != null && prop.booleanValue() == true);
+                        if (c14n11) {
+                            c14nalg = "http://www.w3.org/2006/12/xml-c14n11";
+                        }
+                    } else {
+                        c14nalg = "http://www.w3.org/2006/12/xml-c14n11";
+                    }
+                }
                 if (data instanceof ApacheData) {
                     xi = ((ApacheData) data).getXMLSignatureInput();
                 } else if (data instanceof OctetStreamData) {
                     xi = new XMLSignatureInput
                         (((OctetStreamData)data).getOctetStream());
                 } else if (data instanceof NodeSetData) {
-                    TransformService spi = TransformService.getInstance
-                        (CanonicalizationMethod.INCLUSIVE, "DOM");
+                    TransformService spi = null;
+                    try {
+                        spi = TransformService.getInstance(c14nalg, "DOM");
+                    } catch (NoSuchAlgorithmException nsae) {
+                        spi = TransformService.getInstance
+                            (c14nalg, "DOM", provider);
+                    }
                     data = spi.transform(data, context);
                     xi = new XMLSignatureInput
                         (((OctetStreamData)data).getOctetStream());
                 } else {
                     throw new XMLSignatureException("unrecognized Data type");
                 }
-                xi.updateOutputStream(os);
+                if (context instanceof XMLSignContext && c14n11
+                    && !xi.isOctetStream() && !xi.isOutputStreamSet()) {
+                    DOMTransform t = new DOMTransform
+                        (TransformService.getInstance(c14nalg, "DOM"));
+                    Element transformsElem = null;
+                    String dsPrefix = DOMUtils.getSignaturePrefix(context);
+                    if (allTransforms.isEmpty()) {
+                        transformsElem = DOMUtils.createElement(
+                            refElem.getOwnerDocument(),
+                            "Transforms", XMLSignature.XMLNS, dsPrefix);
+                        refElem.insertBefore(transformsElem,
+                            DOMUtils.getFirstChildElement(refElem));
+                    } else {
+                        transformsElem = DOMUtils.getFirstChildElement(refElem);
+                    }
+                    t.marshal(transformsElem, dsPrefix, (DOMCryptoContext) context);
+                    allTransforms.add(t);
+                    xi.updateOutputStream(os, true);
+                } else {
+                    xi.updateOutputStream(os);
+                }
             }
             os.flush();
             if (cache != null && cache.booleanValue() == true) {
@@ -466,7 +511,7 @@
             Arrays.equals(digestValue, oref.getDigestValue());
 
         return (digestMethod.equals(oref.getDigestMethod()) && idsEqual &&
-            urisEqual && typesEqual && transforms.equals(oref.getTransforms()));
+            urisEqual && typesEqual && allTransforms.equals(oref.getTransforms()));
     }
 
     boolean isDigested() {
@@ -486,7 +531,7 @@
                     };
                 } catch (Exception e) {
                     // log a warning
-                    log.log(Level.WARNING,
+                            log.log(Level.WARNING,
                         "cannot cache dereferenced data: " + e);
                     return null;
                 }
@@ -499,7 +544,7 @@
                   (xsi.getOctetStream(), xsi.getSourceURI(), xsi.getMIMEType());
                 } catch (IOException ioe) {
                     // log a warning
-                    log.log(Level.WARNING,
+                            log.log(Level.WARNING,
                         "cannot cache dereferenced data: " + ioe);
                     return null;
                 }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,28 +1,26 @@
 /*
- * Portions Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2005 The Apache Software Foundation.
  *
- * 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.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
  *
- * 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).
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
  */
-
+/*
+ * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
 /*
  * ===========================================================================
  *
@@ -31,13 +29,14 @@
  * ===========================================================================
  */
 /*
- * $Id: DOMRetrievalMethod.java,v 1.24 2005/05/12 19:28:32 mullan Exp $
+ * $Id: DOMRetrievalMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
 import java.io.ByteArrayInputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.security.Provider;
 import java.util.*;
 import javax.xml.crypto.*;
 import javax.xml.crypto.dsig.*;
@@ -116,8 +115,8 @@
      *
      * @param rmElem a RetrievalMethod element
      */
-    public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         // get URI and Type attributes
         uri = DOMUtils.getAttributeValue(rmElem, "URI");
         type = DOMUtils.getAttributeValue(rmElem, "Type");
@@ -132,7 +131,8 @@
             Element transformElem =
                 DOMUtils.getFirstChildElement(transformsElem);
             while (transformElem != null) {
-                transforms.add(new DOMTransform(transformElem, context));
+                transforms.add
+                    (new DOMTransform(transformElem, context, provider));
                 transformElem = DOMUtils.getNextSiblingElement(transformElem);
             }
         }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,32 +1,28 @@
 /*
- * Portions Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2004 The Apache Software Foundation.
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
  */
 /*
- * $Id: DOMSignatureMethod.java,v 1.20.4.1 2005/08/12 14:23:49 mullan Exp $
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMSignatureMethod.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -226,7 +222,11 @@
         }
         if (signature == null) {
             try {
-                signature = Signature.getInstance(getSignatureAlgorithm());
+                Provider p = (Provider) context.getProperty
+                    ("org.jcp.xml.dsig.internal.dom.SignatureProvider");
+                signature = (p == null)
+                    ? Signature.getInstance(getSignatureAlgorithm())
+                    : Signature.getInstance(getSignatureAlgorithm(), p);
             } catch (NoSuchAlgorithmException nsae) {
                 throw new XMLSignatureException(nsae);
             }
@@ -274,7 +274,11 @@
         }
         if (signature == null) {
             try {
-                signature = Signature.getInstance(getSignatureAlgorithm());
+                Provider p = (Provider) context.getProperty
+                    ("org.jcp.xml.dsig.internal.dom.SignatureProvider");
+                signature = (p == null)
+                    ? Signature.getInstance(getSignatureAlgorithm())
+                    : Signature.getInstance(getSignatureAlgorithm(), p);
             } catch (NoSuchAlgorithmException nsae) {
                 throw new XMLSignatureException(nsae);
             }
@@ -302,7 +306,7 @@
 
     /**
      * Marshals the algorithm-specific parameters to an Element and
-     * appends it to the specified parent element.  By default, this method
+     * appends it to the specified parent element. By default, this method
      * throws an exception since most SignatureMethod algorithms do not have
      * parameters. Subclasses should override it if they have parameters.
      *
@@ -360,7 +364,6 @@
     private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[])
         throws IOException {
 
-        // THIS CODE IS COPIED FROM APACHE (see copyright at top of file)
         byte rLength = asn1Bytes[3];
         int i;
 
@@ -401,7 +404,6 @@
     private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[])
         throws IOException {
 
-        // THIS CODE IS COPIED FROM APACHE (see copyright at top of file)
         if (xmldsigBytes.length != 40) {
             throw new IOException("Invalid XMLDSIG format of DSA signature");
         }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMSignatureProperties.java,v 1.12 2005/05/12 19:28:32 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMSignatureProperties.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMSignatureProperty.java,v 1.14 2005/05/12 19:28:32 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMSignatureProperty.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMSignedInfo.java,v 1.30 2005/09/23 20:14:07 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMSignedInfo.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -37,6 +36,7 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.security.Provider;
 import java.util.*;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -126,8 +126,8 @@
      *
      * @param siElem a SignedInfo element
      */
-    public DOMSignedInfo(Element siElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMSignedInfo(Element siElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         localSiElem = siElem;
         ownerDoc = siElem.getOwnerDocument();
 
@@ -136,7 +136,8 @@
 
         // unmarshal CanonicalizationMethod
         Element cmElem = DOMUtils.getFirstChildElement(siElem);
-        canonicalizationMethod = new DOMCanonicalizationMethod(cmElem, context);
+        canonicalizationMethod = new DOMCanonicalizationMethod
+            (cmElem, context, provider);
 
         // unmarshal SignatureMethod
         Element smElem = DOMUtils.getNextSiblingElement(cmElem);
@@ -146,7 +147,7 @@
         ArrayList refList = new ArrayList(5);
         Element refElem = DOMUtils.getNextSiblingElement(smElem);
         while (refElem != null) {
-            refList.add(new DOMReference(refElem, context));
+            refList.add(new DOMReference(refElem, context, provider));
             refElem = DOMUtils.getNextSiblingElement(refElem);
         }
         references = Collections.unmodifiableList(refList);
@@ -188,9 +189,8 @@
 
         DOMSubTreeData subTree = new DOMSubTreeData(localSiElem, true);
 
-        OctetStreamData data = null;
         try {
-            data = (OctetStreamData) ((DOMCanonicalizationMethod)
+            Data data = ((DOMCanonicalizationMethod)
                 canonicalizationMethod).canonicalize(subTree, context, os);
         } catch (TransformException te) {
             throw new XMLSignatureException(te);
@@ -205,9 +205,11 @@
             char[] siBytes = new char[signedInfoBytes.length];
             try {
                 isr.read(siBytes);
-            } catch (IOException ioex) {} //ignore since this is logging code
-            log.log(Level.FINE, "Canonicalized SignedInfo:\n"
-                + new String(siBytes));
+                log.log(Level.FINE, "Canonicalized SignedInfo:\n"
+                    + new String(siBytes));
+            } catch (IOException ioex) {
+                log.log(Level.FINE, "IOException reading SignedInfo bytes");
+            }
             log.log(Level.FINE, "Data to be signed/verified:"
                 + Base64.encode(signedInfoBytes));
         }
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMStructure.java,v 1.11 2005/05/10 18:15:34 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMStructure.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMSubTreeData.java,v 1.2 2005/09/15 14:29:04 mullan Exp $
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMSubTreeData.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,35 +1,35 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMTransform.java,v 1.25 2005/05/10 18:15:34 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMTransform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
 import java.io.OutputStream;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
 import java.security.spec.AlgorithmParameterSpec;
 
 import org.w3c.dom.Document;
@@ -68,14 +68,17 @@
      *
      * @param transElem a Transform element
      */
-    public DOMTransform(Element transElem, XMLCryptoContext context)
-        throws MarshalException {
-        Document ownerDoc = transElem.getOwnerDocument();
+    public DOMTransform(Element transElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         String algorithm = DOMUtils.getAttributeValue(transElem, "Algorithm");
         try {
             spi = TransformService.getInstance(algorithm, "DOM");
-        } catch (NoSuchAlgorithmException e) {
-            throw new MarshalException(e);
+        } catch (NoSuchAlgorithmException e1) {
+            try {
+                spi = TransformService.getInstance(algorithm, "DOM", provider);
+            } catch (NoSuchAlgorithmException e2) {
+                throw new MarshalException(e2);
+            }
         }
         try {
             spi.init(new javax.xml.crypto.dom.DOMStructure(transElem), context);
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMURIDereferencer.java,v 1.19 2005/09/23 20:09:34 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMURIDereferencer.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -83,11 +82,9 @@
             // this is a bit of a hack to check for registered
             // IDRefs and manually register them with Apache's IdResolver
             // map which includes builtin schema knowledge of DSig/Enc IDs
-            if (context instanceof XMLSignContext) {
-                Node referencedElem = dcc.getElementById(id);
-                if (referencedElem != null) {
-                    IdResolver.registerElementById((Element) referencedElem, id);
-                }
+            Node referencedElem = dcc.getElementById(id);
+            if (referencedElem != null) {
+                IdResolver.registerElementById((Element) referencedElem, id);
             }
         }
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMUtils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMUtils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMUtils.java,v 1.18 2005/05/12 19:28:34 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMUtils.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -77,7 +76,8 @@
      */
     public static Element createElement(Document doc, String tag, String nsURI,
         String prefix) {
-        String qName = prefix == null ? tag : prefix + ":" + tag;
+        String qName = (prefix == null || prefix.length() == 0)
+                       ? tag : prefix + ":" + tag;
         return doc.createElementNS(nsURI, qName);
     }
 
@@ -327,6 +327,7 @@
             XPathType type = (XPathType) types.get(i);
             XPathType otype = (XPathType) otypes.get(i);
             if (!type.getExpression().equals(otype.getExpression()) ||
+                !type.getNamespaceMap().equals(otype.getNamespaceMap()) ||
                 type.getFilter() != otype.getFilter()) {
                 return false;
             }
@@ -341,8 +342,8 @@
 
     private static boolean paramsEqual(XPathFilterParameterSpec spec1,
         XPathFilterParameterSpec spec2) {
-
-        return spec1.getXPath().equals(spec2.getXPath());
+        return (spec1.getXPath().equals(spec2.getXPath()) &&
+            spec1.getNamespaceMap().equals(spec2.getNamespaceMap()));
     }
 
     private static boolean paramsEqual(XSLTTransformParameterSpec spec1,
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMX509Data.java,v 1.20 2005/05/12 19:28:34 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMX509Data.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -53,7 +52,7 @@
 public final class DOMX509Data extends DOMStructure implements X509Data {
 
     private final List content;
-    private CertificateFactory cf; //FIX - make this static?
+    private CertificateFactory cf;
 
     /**
      * Creates a DOMX509Data.
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMX509IssuerSerial.java,v 1.13 2005/05/10 18:15:35 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMX509IssuerSerial.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMXMLObject.java,v 1.16 2005/05/12 19:28:35 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMXMLObject.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -31,6 +30,7 @@
 import javax.xml.crypto.dom.DOMCryptoContext;
 import javax.xml.crypto.dsig.*;
 
+import java.security.Provider;
 import java.util.*;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -87,8 +87,8 @@
      * @param objElem an Object element
      * @throws MarshalException if there is an error when unmarshalling
      */
-    public DOMXMLObject(Element objElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMXMLObject(Element objElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         // unmarshal attributes
         this.encoding = DOMUtils.getAttributeValue(objElem, "Encoding");
         this.id = DOMUtils.getAttributeValue(objElem, "Id");
@@ -103,7 +103,7 @@
                 Element childElem = (Element) child;
                 String tag = childElem.getLocalName();
                 if (tag.equals("Manifest")) {
-                    content.add(new DOMManifest(childElem, context));
+                    content.add(new DOMManifest(childElem, context, provider));
                     continue;
                 } else if (tag.equals("SignatureProperties")) {
                     content.add(new DOMSignatureProperties(childElem));
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,28 +1,26 @@
 /*
- * Portions Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2005 The Apache Software Foundation.
  *
- * 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.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
  *
- * 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).
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
  */
-
+/*
+ * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
 /*
  * ===========================================================================
  *
@@ -31,7 +29,7 @@
  * ===========================================================================
  */
 /*
- * $Id: DOMXMLSignature.java,v 1.42 2005/09/23 20:29:04 mullan Exp $
+ * $Id: DOMXMLSignature.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -45,6 +43,7 @@
 import java.io.*;
 import java.security.InvalidKeyException;
 import java.security.Key;
+import java.security.Provider;
 import java.util.Collections;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -128,8 +127,8 @@
      * @param sigElem Signature element
      * @throws MarshalException if XMLSignature cannot be unmarshalled
      */
-    public DOMXMLSignature(Element sigElem, XMLCryptoContext context)
-        throws MarshalException {
+    public DOMXMLSignature(Element sigElem, XMLCryptoContext context,
+        Provider provider) throws MarshalException {
         localSigElem = sigElem;
         ownerDoc = localSigElem.getOwnerDocument();
 
@@ -138,7 +137,7 @@
 
         // unmarshal SignedInfo
         Element siElem = DOMUtils.getFirstChildElement(localSigElem);
-        si = new DOMSignedInfo(siElem, context);
+        si = new DOMSignedInfo(siElem, context, provider);
 
         // unmarshal SignatureValue
         Element sigValElem = DOMUtils.getNextSiblingElement(siElem);
@@ -147,7 +146,7 @@
         // unmarshal KeyInfo, if specified
         Element nextSibling = DOMUtils.getNextSiblingElement(sigValElem);
         if (nextSibling != null && nextSibling.getLocalName().equals("KeyInfo")) {
-            ki = new DOMKeyInfo(nextSibling, context);
+            ki = new DOMKeyInfo(nextSibling, context, provider);
             nextSibling = DOMUtils.getNextSiblingElement(nextSibling);
         }
 
@@ -157,7 +156,8 @@
         } else {
             List tempObjects = new ArrayList();
             while (nextSibling != null) {
-                tempObjects.add(new DOMXMLObject(nextSibling, context));
+                tempObjects.add
+                    (new DOMXMLObject(nextSibling, context, provider));
                 nextSibling = DOMUtils.getNextSiblingElement(nextSibling);
             }
             objects = Collections.unmodifiableList(tempObjects);
@@ -201,9 +201,7 @@
             (ownerDoc, "Signature", XMLSignature.XMLNS, dsPrefix);
 
         // append xmlns attribute
-        //XXX I think this is supposed to be automatically inserted when
-        //XXX serializing a DOM2 tree, but doesn't seem to work with JAXP/Xalan
-        if (dsPrefix == null) {
+        if (dsPrefix == null || dsPrefix.length() == 0) {
             sigElem.setAttributeNS
                 ("http://www.w3.org/2000/xmlns/", "xmlns", XMLSignature.XMLNS);
         } else {
@@ -301,7 +299,7 @@
                             Reference ref = (Reference) manRefs.get(k);
                             boolean refValid = ref.validate(vc);
                             if (log.isLoggable(Level.FINE)) {
-                               log.log(Level.FINE, "Manifest ref["
+                                log.log(Level.FINE, "Manifest ref["
                                     + ref.getURI() + "] is valid: " + refValid);
                             }
                             validateMans &= refValid;
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMXMLSignatureFactory.java,v 1.21 2005/09/23 19:59:11 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMXMLSignatureFactory.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -33,7 +32,8 @@
 import javax.xml.crypto.dsig.keyinfo.*;
 import javax.xml.crypto.dsig.spec.*;
 
-import java.security.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.NoSuchAlgorithmException;
 import java.security.spec.AlgorithmParameterSpec;
 import java.util.List;
 import org.w3c.dom.Document;
@@ -67,7 +67,7 @@
 
     public Reference newReference(String uri, DigestMethod dm, List transforms,
         String type, String id) {
-        return new DOMReference(uri, type, dm, transforms, id);
+        return new DOMReference(uri, type, dm, transforms, id, getProvider());
     }
 
     public Reference newReference(String uri, DigestMethod dm,
@@ -83,7 +83,7 @@
             throw new NullPointerException("result cannot be null");
         }
         return new DOMReference
-            (uri, type, dm, appliedTransforms, result, transforms, id);
+            (uri, type, dm, appliedTransforms, result, transforms, id, getProvider());
     }
 
     public Reference newReference(String uri, DigestMethod dm, List transforms,
@@ -92,7 +92,7 @@
             throw new NullPointerException("digestValue cannot be null");
         }
         return new DOMReference
-            (uri, type, dm, null, null, transforms, id, digestValue);
+            (uri, type, dm, null, null, transforms, id, digestValue, getProvider());
     }
 
     public SignedInfo newSignedInfo(CanonicalizationMethod cm,
@@ -170,7 +170,7 @@
                 "support DOM Level 2 and be namespace aware");
         }
         if (tag.equals("Signature")) {
-            return new DOMXMLSignature(element, context);
+            return new DOMXMLSignature(element, context, getProvider());
         } else {
             throw new MarshalException("invalid Signature tag: " + tag);
         }
@@ -235,7 +235,12 @@
     public Transform newTransform(String algorithm,
         TransformParameterSpec params) throws NoSuchAlgorithmException,
         InvalidAlgorithmParameterException {
-        TransformService spi = TransformService.getInstance(algorithm, "DOM");
+        TransformService spi;
+        try {
+            spi = TransformService.getInstance(algorithm, "DOM");
+        } catch (NoSuchAlgorithmException nsae) {
+            spi = TransformService.getInstance(algorithm, "DOM", getProvider());
+        }
         spi.init(params);
         return new DOMTransform(spi);
     }
@@ -243,7 +248,12 @@
     public Transform newTransform(String algorithm,
         XMLStructure params) throws NoSuchAlgorithmException,
         InvalidAlgorithmParameterException {
-        TransformService spi = TransformService.getInstance(algorithm, "DOM");
+        TransformService spi;
+        try {
+            spi = TransformService.getInstance(algorithm, "DOM");
+        } catch (NoSuchAlgorithmException nsae) {
+            spi = TransformService.getInstance(algorithm, "DOM", getProvider());
+        }
         if (params == null) {
             spi.init(null);
         } else {
@@ -255,7 +265,12 @@
     public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
         C14NMethodParameterSpec params) throws NoSuchAlgorithmException,
         InvalidAlgorithmParameterException {
-        TransformService spi = TransformService.getInstance(algorithm, "DOM");
+        TransformService spi;
+        try {
+            spi = TransformService.getInstance(algorithm, "DOM");
+        } catch (NoSuchAlgorithmException nsae) {
+            spi = TransformService.getInstance(algorithm, "DOM", getProvider());
+        }
         spi.init(params);
         return new DOMCanonicalizationMethod(spi);
     }
@@ -263,7 +278,12 @@
     public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
         XMLStructure params) throws NoSuchAlgorithmException,
         InvalidAlgorithmParameterException {
-        TransformService spi = TransformService.getInstance(algorithm, "DOM");
+        TransformService spi;
+        try {
+            spi = TransformService.getInstance(algorithm, "DOM");
+        } catch (NoSuchAlgorithmException nsae) {
+            spi = TransformService.getInstance(algorithm, "DOM", getProvider());
+        }
         if (params == null) {
             spi.init(null);
         } else {
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,28 +1,23 @@
 /*
- * Portions Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2005 The Apache 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).
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
  */
-
 /*
  * ===========================================================================
  *
@@ -31,7 +26,10 @@
  * ===========================================================================
  */
 /*
- * $Id: DOMXPathFilter2Transform.java,v 1.18 2005/09/19 18:30:30 mullan Exp $
+ * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMXPathFilter2Transform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -129,7 +127,8 @@
         XPathFilter2ParameterSpec xp =
             (XPathFilter2ParameterSpec) getParameterSpec();
         String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
-        String qname = (prefix == null) ? "xmlns" : "xmlns:" + prefix;
+        String qname = (prefix == null || prefix.length() == 0)
+                       ? "xmlns" : "xmlns:" + prefix;
         List list = xp.getXPathList();
         for (int i = 0, size = list.size(); i < size; i++) {
             XPathType xpathType = (XPathType) list.get(i);
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMXPathTransform.java,v 1.16 2005/05/12 19:28:35 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMXPathTransform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: DOMXSLTTransform.java,v 1.15 2005/05/10 18:15:36 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: DOMXSLTTransform.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,29 +1,28 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
  */
 /*
- * $Id: Utils.java,v 1.14 2005/09/23 19:49:20 mullan Exp $
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: Utils.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,28 +1,23 @@
 /*
- * Portions Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2005 The Apache 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).
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
  */
-
 /*
  * ===========================================================================
  *
@@ -31,7 +26,10 @@
  * ===========================================================================
  */
 /*
- * $Id: XMLDSigRI.java,v 1.7 2005/05/12 19:28:36 mullan Exp $
+ * Portions copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+/*
+ * $Id: XMLDSigRI.java,v 1.2 2008/07/24 15:20:32 mullan Exp $
  */
 package org.jcp.xml.dsig.internal.dom;
 
@@ -86,6 +84,22 @@
                 CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS +
                 " MechanismType", "DOM");
 
+        // Inclusive C14N 1.1
+        map.put((String)"TransformService." +
+                "http://www.w3.org/2006/12/xml-c14n11",
+                "org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method");
+        map.put((String)"TransformService." +
+                "http://www.w3.org/2006/12/xml-c14n11" +
+                " MechanismType", "DOM");
+
+        // InclusiveWithComments C14N 1.1
+        map.put((String)"TransformService." +
+                "http://www.w3.org/2006/12/xml-c14n11#WithComments",
+                "org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method");
+        map.put((String)"TransformService." +
+                "http://www.w3.org/2006/12/xml-c14n11#WithComments" +
+                " MechanismType", "DOM");
+
         // Exclusive C14N
         map.put((String) "TransformService." + CanonicalizationMethod.EXCLUSIVE,
                 "org.jcp.xml.dsig.internal.dom.DOMExcC14NMethod");
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/package.html	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<html>
-<body>
-Contains the classes of the Reference Implementation of JSR 105.
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/awt/EventQueueDelegate.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt;
+
+import java.awt.AWTEvent;
+import java.awt.EventQueue;
+
+
+public class EventQueueDelegate {
+    private static final Object EVENT_QUEUE_DELEGATE_KEY =
+        new StringBuilder("EventQueueDelegate.Delegate");
+
+    public static void setDelegate(Delegate delegate) {
+        AppContext.getAppContext().put(EVENT_QUEUE_DELEGATE_KEY, delegate);
+    }
+    public static Delegate getDelegate() {
+        return
+          (Delegate) AppContext.getAppContext().get(EVENT_QUEUE_DELEGATE_KEY);
+    }
+    public interface Delegate {
+        /**
+         * This method allows for changing {@code EventQueue} events order.
+         *
+         * @param eventQueue current {@code EventQueue}
+         * @return next {@code event} for the {@code EventDispatchThread}
+         */
+
+        public AWTEvent getNextEvent(EventQueue eventQueue) throws InterruptedException;
+
+        /**
+         * Notifies delegate before EventQueue.dispatch method.
+         *
+         * Note: this method may mutate the event
+         *
+         * @param event  to be dispatched by {@code dispatch} method
+         * @return handle to be passed to {@code afterDispatch} method
+         */
+        public Object beforeDispatch(AWTEvent event) throws InterruptedException;
+
+        /**
+         * Notifies delegate after EventQueue.dispatch method.
+         *
+         * @param event {@code event} dispatched by the {@code dispatch} method
+         * @param handle object which came from {@code beforeDispatch} method
+         */
+        public void afterDispatch(AWTEvent event, Object handle) throws InterruptedException;
+    }
+}
--- a/jdk/src/share/classes/sun/awt/im/CompositionArea.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/awt/im/CompositionArea.java	Wed Jul 05 16:42:37 2017 +0200
@@ -56,7 +56,8 @@
  * @author JavaSoft International
  */
 
-public class CompositionArea extends JPanel implements InputMethodListener {
+// This class is final due to the 6607310 fix. Refer to the CR for details.
+public final class CompositionArea extends JPanel implements InputMethodListener {
 
     private CompositionAreaHandler handler;
 
--- a/jdk/src/share/classes/sun/awt/im/InputContext.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/awt/im/InputContext.java	Wed Jul 05 16:42:37 2017 +0200
@@ -297,7 +297,7 @@
          */
         synchronized (source.getTreeLock()) {
             synchronized (this) {
-                if (source instanceof CompositionArea) {
+                if ("sun.awt.im.CompositionArea".equals(source.getClass().getName())) {
                     // no special handling for this one
                 } else if (getComponentWindow(source) instanceof InputMethodWindow) {
                     // no special handling for this one either
--- a/jdk/src/share/classes/sun/awt/im/InputMethodManager.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/awt/im/InputMethodManager.java	Wed Jul 05 16:42:37 2017 +0200
@@ -358,6 +358,7 @@
         AppContext requesterAppContext = SunToolkit.targetToAppContext(requester);
         synchronized (lock) {
             SunToolkit.postEvent(requesterAppContext, event);
+            lock.wait();
         }
 
         Throwable eventThrowable = event.getThrowable();
--- a/jdk/src/share/classes/sun/launcher/LauncherHelp.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package sun.launcher;
-
-/*
- *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
- *  If you write code that depends on this, you do so at your own
- *  risk.  This code and its internal interfaces are subject to change
- *  or deletion without notice.</b>
- *
- */
-
-/**
- * A utility package for the java(1), javaw(1) launchers.
- */
-import java.io.File;
-import java.io.PrintStream;
-import java.util.ResourceBundle;
-import java.text.MessageFormat;
-
-public class LauncherHelp {
-
-    private static final String defaultBundleName = "sun.launcher.resources.launcher";
-    private static ResourceBundle javarb = ResourceBundle.getBundle(defaultBundleName);
-
-    private static StringBuilder outBuf = new StringBuilder();
-
-    /** Creates a new instance of LauncherHelp, keep it a singleton */
-    private LauncherHelp(){}
-
-
-    /**
-     * A private helper method to get a localized message and also
-     * apply any arguments that we might pass.
-     */
-    private static String getLocalizedMessage(String key, Object... args) {
-        String msg = javarb.getString(key);
-        return (args != null) ? MessageFormat.format(msg, args) : msg;
-    }
-
-    /**
-     * The java -help message is split into 3 parts, an invariant, followed
-     * by a set of platform dependent variant messages, finally an invariant
-     * set of lines.
-     * This method initializes the help message for the first time, and also
-     * assembles the invariant header part of the message.
-     */
-    static void initHelpMessage(String progname) {
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.header", (progname == null) ? "java" : progname ));
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.datamodel", 32));
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.datamodel", 64));
-    }
-
-    /**
-     * Appends the vm selection messages to the header, already created.
-     * initHelpSystem must already be called.
-     */
-    static void appendVmSelectMessage(String vm1, String vm2) {
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.vmselect", vm1, vm2));
-    }
-
-    /**
-     * Appends the vm synoym message to the header, already created.
-     * initHelpSystem must be called before using this method.
-     */
-    static void appendVmSynonymMessage(String vm1, String vm2) {
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.hotspot", vm1, vm2));
-    }
-
-    /**
-     * Appends the vm Ergo message to the header, already created.
-     * initHelpSystem must be called before using this method.
-     */
-    static void appendVmErgoMessage(boolean isServerClass, String vm) {
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.ergo.message1", vm));
-        outBuf = (isServerClass)
-             ? outBuf.append(",\n" + getLocalizedMessage("java.launcher.ergo.message2") + "\n\n")
-             : outBuf.append(".\n\n");
-    }
-
-    /**
-     * Appends the last invariant part to the previously created messages,
-     * and finishes up the printing to the desired output stream.
-     * initHelpSystem must be called before using this method.
-     */
-    static void printHelpMessage(boolean printToStderr) {
-        PrintStream ostream = (printToStderr) ? System.err : System.out;
-        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.footer",  File.pathSeparator));
-        ostream.println(outBuf.toString());
-    }
-
-    /**
-     * Prints the Xusage text to the desired output stream.
-     */
-    static void printXUsageMessage(boolean printToStderr) {
-        PrintStream ostream =  (printToStderr) ? System.err : System.out;
-        ostream.println(getLocalizedMessage("java.launcher.X.usage",  File.pathSeparator));
-    }
-
-    /* Test code */
-    public static void main(String[] args) {
-        initHelpMessage("java");
-        appendVmSelectMessage("-client", "client");
-        appendVmSelectMessage("-server", "server");
-        appendVmSynonymMessage("-hotspot", "client");
-        appendVmErgoMessage(true, "server");
-        printHelpMessage(true);
-
-        System.err.println("------------------------------------");
-
-        printXUsageMessage(true);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/launcher/LauncherHelper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,233 @@
+
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.launcher;
+
+/*
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  If you write code that depends on this, you do so at your own
+ *  risk.  This code and its internal interfaces are subject to change
+ *  or deletion without notice.</b>
+ *
+ */
+
+/**
+ * A utility package for the java(1), javaw(1) launchers.
+ * The following are helper methods that the native launcher uses
+ * to perform checks etc. using JNI, see src/share/bin/java.c
+ */
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ResourceBundle;
+import java.text.MessageFormat;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+public enum LauncherHelper {
+    INSTANCE;
+    private static final String defaultBundleName =
+            "sun.launcher.resources.launcher";
+    private static ResourceBundle javarb =
+            ResourceBundle.getBundle(defaultBundleName);
+    private static final String MAIN_CLASS = "Main-Class";
+
+    private static StringBuilder outBuf = new StringBuilder();
+
+    /**
+     * A private helper method to get a localized message and also
+     * apply any arguments that we might pass.
+     */
+    private static String getLocalizedMessage(String key, Object... args) {
+        String msg = javarb.getString(key);
+        return (args != null) ? MessageFormat.format(msg, args) : msg;
+    }
+
+    /**
+     * The java -help message is split into 3 parts, an invariant, followed
+     * by a set of platform dependent variant messages, finally an invariant
+     * set of lines.
+     * This method initializes the help message for the first time, and also
+     * assembles the invariant header part of the message.
+     */
+    static void initHelpMessage(String progname) {
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.header",
+                (progname == null) ? "java" : progname ));
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.datamodel",
+                32));
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.datamodel",
+                64));
+    }
+
+    /**
+     * Appends the vm selection messages to the header, already created.
+     * initHelpSystem must already be called.
+     */
+    static void appendVmSelectMessage(String vm1, String vm2) {
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.vmselect",
+                vm1, vm2));
+    }
+
+    /**
+     * Appends the vm synoym message to the header, already created.
+     * initHelpSystem must be called before using this method.
+     */
+    static void appendVmSynonymMessage(String vm1, String vm2) {
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.hotspot",
+                vm1, vm2));
+    }
+
+    /**
+     * Appends the vm Ergo message to the header, already created.
+     * initHelpSystem must be called before using this method.
+     */
+    static void appendVmErgoMessage(boolean isServerClass, String vm) {
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.ergo.message1",
+                vm));
+        outBuf = (isServerClass)
+             ? outBuf.append(",\n" +
+                getLocalizedMessage("java.launcher.ergo.message2") + "\n\n")
+             : outBuf.append(".\n\n");
+    }
+
+    /**
+     * Appends the last invariant part to the previously created messages,
+     * and finishes up the printing to the desired output stream.
+     * initHelpSystem must be called before using this method.
+     */
+    static void printHelpMessage(boolean printToStderr) {
+        PrintStream ostream = (printToStderr) ? System.err : System.out;
+        outBuf = outBuf.append(getLocalizedMessage("java.launcher.opt.footer",
+                File.pathSeparator));
+        ostream.println(outBuf.toString());
+    }
+
+    /**
+     * Prints the Xusage text to the desired output stream.
+     */
+    static void printXUsageMessage(boolean printToStderr) {
+        PrintStream ostream =  (printToStderr) ? System.err : System.out;
+        ostream.println(getLocalizedMessage("java.launcher.X.usage",
+                File.pathSeparator));
+    }
+
+    static String getMainClassFromJar(String jarname) throws IOException {
+        JarFile jarFile = null;
+        try {
+            jarFile = new JarFile(jarname);
+            Manifest manifest = jarFile.getManifest();
+            if (manifest == null) {
+                throw new IOException("manifest not found in " + jarname);
+            }
+            Attributes mainAttrs = manifest.getMainAttributes();
+            if (mainAttrs == null) {
+                throw new IOException("no main mainifest attributes, in " +
+                        jarname);
+            }
+            return mainAttrs.getValue(MAIN_CLASS).trim();
+        } finally {
+            if (jarFile != null) {
+                jarFile.close();
+            }
+        }
+    }
+
+    /**
+     * This method does the following:
+     * 1. gets the classname from a Jar's manifest, if necessary
+     * 2. loads the class using the System ClassLoader
+     * 3. ensures the availability and accessibility of the main method,
+     *    using signatureDiagnostic method.
+     *    a. does the class exist
+     *    b. is there a main
+     *    c. is the main public
+     *    d. is the main static
+     *    c. does the main take a String array for args
+     * 4. and off we go......
+     *
+     * @param printToStderr
+     * @param isJar
+     * @param name
+     * @return
+     * @throws java.io.IOException
+     */
+    public static Object checkAndLoadMain(boolean printToStderr,
+            boolean isJar, String name) throws IOException {
+        // get the class name
+        String classname = (isJar) ? getMainClassFromJar(name) : name;
+        classname = classname.replace('/', '.');
+        ClassLoader loader = ClassLoader.getSystemClassLoader();
+        Class<?> clazz = null;
+        PrintStream ostream = (printToStderr) ? System.err : System.out;
+        try {
+            clazz = loader.loadClass(classname);
+        } catch (ClassNotFoundException cnfe) {
+            ostream.println(getLocalizedMessage("java.launcher.cls.error1", classname));
+            NoClassDefFoundError ncdfe = new NoClassDefFoundError(classname);
+            ncdfe.initCause(cnfe);
+            throw ncdfe;
+        }
+        signatureDiagnostic(ostream, clazz);
+        return clazz;
+    }
+
+    static void signatureDiagnostic(PrintStream ostream, Class<?> clazz) {
+        String classname = clazz.getName();
+        Method method = null;
+        try {
+            method = clazz.getMethod("main", String[].class);
+        } catch (Exception e) {
+            ostream.println(getLocalizedMessage("java.launcher.cls.error4",
+                    classname));
+            throw new RuntimeException("Main method not found in " + classname);
+        }
+        /*
+         * getMethod (above) will choose the correct method, based
+         * on its name and parameter type, however, we still have to
+         * ensure that the method is static and returns a void.
+         */
+        int mod = method.getModifiers();
+        if (!Modifier.isStatic(mod)) {
+            ostream.println(getLocalizedMessage("java.launcher.cls.error2",
+                    "static", classname));
+            throw new RuntimeException("Main method is not static in class " +
+                    classname);
+        }
+        Class<?> rType = method.getReturnType();
+        if (!rType.isPrimitive() || !rType.getName().equals("void")) {
+            ostream.println(getLocalizedMessage("java.launcher.cls.error3",
+                    classname));
+            throw new RuntimeException("Main method must return a value" +
+                    " of type void in class " +
+                    classname);
+        }
+        return;
+    }
+}
--- a/jdk/src/share/classes/sun/launcher/resources/launcher.properties	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/launcher/resources/launcher.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -99,3 +99,18 @@
 \    -Xshare:auto      use shared class data if possible (default)\n\
 \    -Xshare:on        require using shared class data, otherwise fail.\n\n\
 The -X options are non-standard and subject to change without notice.\n
+
+java.launcher.cls.error1=\
+    Error: Could not find main class {0}
+java.launcher.cls.error2=\
+    Error: Main method is not {0} in class {1}, please define the main method as:\n\
+\   public static void main(String[] args)
+java.launcher.cls.error3=\
+    Error: Main method must return a value of type void in class {0}, please \n\
+    define the main method as:\n\
+\   public static void main(String[] args)
+java.launcher.cls.error4=\
+    Error: Main method not found in class {0}, please define the main method as:\n\
+\   public static void main(String[] args)
+
+
--- a/jdk/src/share/classes/sun/net/ConnectionResetException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/ConnectionResetException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,10 +30,11 @@
 /**
  * Thrown to indicate a connection reset.
  *
- * @since   1.4
+ * @since   1.4.1
  */
 public
 class ConnectionResetException extends SocketException {
+    private static final long serialVersionUID = -7633185991801851556L;
 
     public ConnectionResetException(String msg) {
         super(msg);
--- a/jdk/src/share/classes/sun/net/ProgressEvent.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/ProgressEvent.java	Wed Jul 05 16:42:37 2017 +0200
@@ -32,6 +32,7 @@
  *
  * @author Stanley Man-Kit Ho
  */
+@SuppressWarnings("serial")  // never serialized
 public class ProgressEvent extends EventObject  {
     // URL of the stream
     private URL url;
--- a/jdk/src/share/classes/sun/net/TelnetProtocolException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/TelnetProtocolException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1995 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 
 public class TelnetProtocolException extends IOException {
+    private static final long serialVersionUID = 8509127047257111343L;
+
     public TelnetProtocolException(String s) {
         super(s);
     }
--- a/jdk/src/share/classes/sun/net/ftp/FtpLoginException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/ftp/FtpLoginException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1995 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @author      Jonathan Payne
  */
 public class FtpLoginException extends FtpProtocolException {
+    private static final long serialVersionUID = 2218162403237941536L;
+
     FtpLoginException(String s) {
         super(s);
     }
--- a/jdk/src/share/classes/sun/net/ftp/FtpProtocolException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/ftp/FtpProtocolException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1994-1995 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1994-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
  * @author      Jonathan Payne
  */
 public class FtpProtocolException extends IOException {
+    private static final long serialVersionUID = 5978077070276545054L;
+
     FtpProtocolException(String s) {
         super(s);
     }
--- a/jdk/src/share/classes/sun/net/httpserver/HttpError.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/httpserver/HttpError.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
  * A Http error
  */
 class HttpError extends RuntimeException {
+    private static final long serialVersionUID = 8769596371344178179L;
+
     public HttpError (String msg) {
         super (msg);
     }
--- a/jdk/src/share/classes/sun/net/httpserver/StreamClosedException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/httpserver/StreamClosedException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,4 +28,5 @@
 import java.io.*;
 
 class StreamClosedException extends IOException {
+    private static final long serialVersionUID = -4485921499356327937L;
 }
--- a/jdk/src/share/classes/sun/net/smtp/SmtpProtocolException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/smtp/SmtpProtocolException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
  * an SMTP session.
  */
 public class SmtpProtocolException extends IOException {
+    private static final long serialVersionUID = -7547136771133814908L;
+
     SmtpProtocolException(String s) {
         super(s);
     }
--- a/jdk/src/share/classes/sun/net/www/ApplicationLaunchException.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/www/ApplicationLaunchException.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
  */
 
 public class ApplicationLaunchException extends Exception {
+    private static final long serialVersionUID = -4782286141289536883L;
+
     public ApplicationLaunchException(String reason) {
         super(reason);
     }
--- a/jdk/src/share/classes/sun/net/www/http/KeepAliveStreamCleaner.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/www/http/KeepAliveStreamCleaner.java	Wed Jul 05 16:42:37 2017 +0200
@@ -43,6 +43,7 @@
  * @author Chris Hegarty
  */
 
+@SuppressWarnings("serial")  // never serialized
 public class KeepAliveStreamCleaner extends LinkedBlockingQueue<KeepAliveCleanerEntry> implements Runnable
 {
     // maximum amount of remaining data that we will try to cleanup
--- a/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Wed Jul 05 16:42:37 2017 +0200
@@ -59,6 +59,8 @@
     // instances as a result of a single authorization (for multiple domains)
 
     static class Parameters implements java.io.Serializable {
+        private static final long serialVersionUID = -3584543755194526252L;
+
         private boolean serverQop; // server proposed qop=auth
         private String opaque;
         private String cnonce;
--- a/jdk/src/share/classes/sun/swing/AccessibleMethod.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/AccessibleMethod.java	Wed Jul 05 16:42:37 2017 +0200
@@ -114,7 +114,7 @@
 
     /** The action used to fetch the method and make it accessible */
     private static class AccessMethodAction implements PrivilegedExceptionAction<Method> {
-        private final Class klass;
+        private final Class<?> klass;
         private final String methodName;
         private final Class[] paramTypes;
 
--- a/jdk/src/share/classes/sun/swing/FilePane.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/FilePane.java	Wed Jul 05 16:42:37 2017 +0200
@@ -308,44 +308,80 @@
     }
 
     public void setViewType(int viewType) {
-        int oldValue = this.viewType;
-        if (viewType == oldValue) {
+        if (viewType == this.viewType) {
             return;
         }
+
+        int oldValue = this.viewType;
         this.viewType = viewType;
 
+        JPanel createdViewPanel = null;
+        Component newFocusOwner = null;
+
         switch (viewType) {
           case VIEWTYPE_LIST:
             if (viewPanels[viewType] == null) {
-                JPanel p = fileChooserUIAccessor.createList();
-                if (p == null) {
-                    p = createList();
+                createdViewPanel = fileChooserUIAccessor.createList();
+                if (createdViewPanel == null) {
+                    createdViewPanel = createList();
                 }
-                setViewPanel(viewType, p);
+
+                list = (JList) findChildComponent(createdViewPanel, JList.class);
+                if (listSelectionModel == null) {
+                    listSelectionModel = list.getSelectionModel();
+                    if (detailsTable != null) {
+                        detailsTable.setSelectionModel(listSelectionModel);
+                    }
+                } else {
+                    list.setSelectionModel(listSelectionModel);
+                }
             }
             list.setLayoutOrientation(JList.VERTICAL_WRAP);
+            newFocusOwner = list;
             break;
 
           case VIEWTYPE_DETAILS:
             if (viewPanels[viewType] == null) {
-                JPanel p = fileChooserUIAccessor.createDetailsView();
-                if (p == null) {
-                    p = createDetailsView();
+                createdViewPanel = fileChooserUIAccessor.createDetailsView();
+                if (createdViewPanel == null) {
+                    createdViewPanel = createDetailsView();
                 }
-                setViewPanel(viewType, p);
+
+                detailsTable = (JTable) findChildComponent(createdViewPanel, JTable.class);
+                detailsTable.setRowHeight(Math.max(detailsTable.getFont().getSize() + 4, 16 + 1));
+                if (listSelectionModel != null) {
+                    detailsTable.setSelectionModel(listSelectionModel);
+                }
             }
+            newFocusOwner = detailsTable;
             break;
         }
-        JPanel oldViewPanel = currentViewPanel;
+
+        if (createdViewPanel != null) {
+            viewPanels[viewType] = createdViewPanel;
+            recursivelySetInheritsPopupMenu(createdViewPanel, true);
+        }
+
+        boolean isFocusOwner = false;
+
+        if (currentViewPanel != null) {
+            Component owner = DefaultKeyboardFocusManager.
+                    getCurrentKeyboardFocusManager().getPermanentFocusOwner();
+
+            isFocusOwner = owner == detailsTable || owner == list;
+
+            remove(currentViewPanel);
+        }
+
         currentViewPanel = viewPanels[viewType];
-        if (currentViewPanel != oldViewPanel) {
-            if (oldViewPanel != null) {
-                remove(oldViewPanel);
-            }
-            add(currentViewPanel, BorderLayout.CENTER);
-            revalidate();
-            repaint();
+        add(currentViewPanel, BorderLayout.CENTER);
+
+        if (isFocusOwner && newFocusOwner != null) {
+            newFocusOwner.requestFocusInWindow();
         }
+
+        revalidate();
+        repaint();
         updateViewMenu();
         firePropertyChange("viewType", oldValue, viewType);
     }
@@ -385,42 +421,6 @@
         }
     }
 
-    public void setViewPanel(int viewType, JPanel viewPanel) {
-        viewPanels[viewType] = viewPanel;
-        recursivelySetInheritsPopupMenu(viewPanel, true);
-
-        switch (viewType) {
-          case VIEWTYPE_LIST:
-            list = (JList)findChildComponent(viewPanels[viewType], JList.class);
-            if (listSelectionModel == null) {
-                listSelectionModel = list.getSelectionModel();
-                if (detailsTable != null) {
-                    detailsTable.setSelectionModel(listSelectionModel);
-                }
-            } else {
-                list.setSelectionModel(listSelectionModel);
-            }
-            break;
-
-          case VIEWTYPE_DETAILS:
-            detailsTable = (JTable)findChildComponent(viewPanels[viewType], JTable.class);
-            detailsTable.setRowHeight(Math.max(detailsTable.getFont().getSize() + 4, 16+1));
-            if (listSelectionModel != null) {
-                detailsTable.setSelectionModel(listSelectionModel);
-            }
-            break;
-        }
-        if (this.viewType == viewType) {
-            if (currentViewPanel != null) {
-                remove(currentViewPanel);
-            }
-            currentViewPanel = viewPanel;
-            add(currentViewPanel, BorderLayout.CENTER);
-            revalidate();
-            repaint();
-        }
-    }
-
     protected void installDefaults() {
         Locale l = getFileChooser().getLocale();
 
@@ -546,8 +546,7 @@
 
     public static void addActionsToMap(ActionMap map, Action[] actions) {
         if (map != null && actions != null) {
-            for (int i = 0; i < actions.length; i++) {
-                Action a = actions[i];
+            for (Action a : actions) {
                 String cmd = (String)a.getValue(Action.ACTION_COMMAND_KEY);
                 if (cmd == null) {
                     cmd = (String)a.getValue(Action.NAME);
@@ -715,13 +714,13 @@
             visibleColumns.toArray(columns);
             columnMap = Arrays.copyOf(columnMap, columns.length);
 
-            List<RowSorter.SortKey> sortKeys =
+            List<? extends RowSorter.SortKey> sortKeys =
                     (rowSorter == null) ? null : rowSorter.getSortKeys();
             fireTableStructureChanged();
             restoreSortKeys(sortKeys);
         }
 
-        private void restoreSortKeys(List<RowSorter.SortKey> sortKeys) {
+        private void restoreSortKeys(List<? extends RowSorter.SortKey> sortKeys) {
             if (sortKeys != null) {
                 // check if preserved sortKeys are valid for this folder
                 for (int i = 0; i < sortKeys.size(); i++) {
@@ -886,7 +885,7 @@
         return rowSorter;
     }
 
-    private class DetailsTableRowSorter extends TableRowSorter {
+    private class DetailsTableRowSorter extends TableRowSorter<TableModel> {
         public DetailsTableRowSorter() {
             setModelWrapper(new SorterModelWrapper());
         }
@@ -906,8 +905,8 @@
             updateComparators(detailsTableModel.getColumns());
         }
 
-        private class SorterModelWrapper extends ModelWrapper {
-            public Object getModel() {
+        private class SorterModelWrapper extends ModelWrapper<TableModel, Integer> {
+            public TableModel getModel() {
                 return getDetailsTableModel();
             }
 
@@ -923,7 +922,7 @@
                 return FilePane.this.getModel().getElementAt(row);
             }
 
-            public Object getIdentifier(int row) {
+            public Integer getIdentifier(int row) {
                 return row;
             }
         }
@@ -1718,9 +1717,9 @@
     private void updateViewMenu() {
         if (viewMenu != null) {
             Component[] comps = viewMenu.getMenuComponents();
-            for (int i = 0; i < comps.length; i++) {
-                if (comps[i] instanceof JRadioButtonMenuItem) {
-                    JRadioButtonMenuItem mi = (JRadioButtonMenuItem)comps[i];
+            for (Component comp : comps) {
+                if (comp instanceof JRadioButtonMenuItem) {
+                    JRadioButtonMenuItem mi = (JRadioButtonMenuItem) comp;
                     if (((ViewTypeAction)mi.getAction()).viewType == viewType) {
                         mi.setSelected(true);
                     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/swing/MenuItemLayoutHelper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,1338 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.swing;
+
+import static sun.swing.SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET;
+
+import javax.swing.*;
+import javax.swing.plaf.basic.BasicHTML;
+import javax.swing.text.View;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Calculates preferred size and layouts menu items.
+ */
+public class MenuItemLayoutHelper {
+
+    /* Client Property keys for calculation of maximal widths */
+    public static final StringUIClientPropertyKey MAX_ARROW_WIDTH =
+                        new StringUIClientPropertyKey("maxArrowWidth");
+    public static final StringUIClientPropertyKey MAX_CHECK_WIDTH =
+                        new StringUIClientPropertyKey("maxCheckWidth");
+    public static final StringUIClientPropertyKey MAX_ICON_WIDTH =
+                        new StringUIClientPropertyKey("maxIconWidth");
+    public static final StringUIClientPropertyKey MAX_TEXT_WIDTH =
+                        new StringUIClientPropertyKey("maxTextWidth");
+    public static final StringUIClientPropertyKey MAX_ACC_WIDTH =
+                        new StringUIClientPropertyKey("maxAccWidth");
+    public static final StringUIClientPropertyKey MAX_LABEL_WIDTH =
+                        new StringUIClientPropertyKey("maxLabelWidth");
+
+    private JMenuItem mi;
+    private JComponent miParent;
+
+    private Font font;
+    private Font accFont;
+    private FontMetrics fm;
+    private FontMetrics accFm;
+
+    private Icon icon;
+    private Icon checkIcon;
+    private Icon arrowIcon;
+    private String text;
+    private String accText;
+
+    private boolean isColumnLayout;
+    private boolean useCheckAndArrow;
+    private boolean isLeftToRight;
+    private boolean isTopLevelMenu;
+    private View htmlView;
+
+    private int verticalAlignment;
+    private int horizontalAlignment;
+    private int verticalTextPosition;
+    private int horizontalTextPosition;
+    private int gap;
+    private int leadingGap;
+    private int afterCheckIconGap;
+    private int minTextOffset;
+
+    private int leftTextExtraWidth;
+    private int rightTextExtraWidth;
+
+    private Rectangle viewRect;
+
+    private RectSize iconSize;
+    private RectSize textSize;
+    private RectSize accSize;
+    private RectSize checkSize;
+    private RectSize arrowSize;
+    private RectSize labelSize;
+
+    /**
+     * The empty protected constructor is necessary for derived classes.
+     */
+    protected MenuItemLayoutHelper() {
+    }
+
+    public MenuItemLayoutHelper(JMenuItem mi, Icon checkIcon, Icon arrowIcon,
+                      Rectangle viewRect, int gap, String accDelimiter,
+                      boolean isLeftToRight, Font font, Font accFont,
+                      boolean useCheckAndArrow, String propertyPrefix) {
+        reset(mi, checkIcon, arrowIcon, viewRect, gap, accDelimiter,
+              isLeftToRight, font, accFont, useCheckAndArrow, propertyPrefix);
+    }
+
+    protected void reset(JMenuItem mi, Icon checkIcon, Icon arrowIcon,
+                      Rectangle viewRect, int gap, String accDelimiter,
+                      boolean isLeftToRight, Font font, Font accFont,
+                      boolean useCheckAndArrow, String propertyPrefix) {
+        this.mi = mi;
+        this.miParent = getMenuItemParent(mi);
+        this.accText = getAccText(accDelimiter);
+        this.verticalAlignment = mi.getVerticalAlignment();
+        this.horizontalAlignment = mi.getHorizontalAlignment();
+        this.verticalTextPosition = mi.getVerticalTextPosition();
+        this.horizontalTextPosition = mi.getHorizontalTextPosition();
+        this.useCheckAndArrow = useCheckAndArrow;
+        this.font = font;
+        this.accFont = accFont;
+        this.fm = mi.getFontMetrics(font);
+        this.accFm = mi.getFontMetrics(accFont);
+        this.isLeftToRight = isLeftToRight;
+        this.isColumnLayout = isColumnLayout(isLeftToRight,
+                horizontalAlignment, horizontalTextPosition,
+                verticalTextPosition);
+        this.isTopLevelMenu = (this.miParent == null) ? true : false;
+        this.checkIcon = checkIcon;
+        this.icon = getIcon(propertyPrefix);
+        this.arrowIcon = arrowIcon;
+        this.text = mi.getText();
+        this.gap = gap;
+        this.afterCheckIconGap = getAfterCheckIconGap(propertyPrefix);
+        this.minTextOffset = getMinTextOffset(propertyPrefix);
+        this.htmlView = (View) mi.getClientProperty(BasicHTML.propertyKey);
+        this.viewRect = viewRect;
+
+        this.iconSize = new RectSize();
+        this.textSize = new RectSize();
+        this.accSize = new RectSize();
+        this.checkSize = new RectSize();
+        this.arrowSize = new RectSize();
+        this.labelSize = new RectSize();
+        calcExtraWidths();
+        calcWidthsAndHeights();
+        setOriginalWidths();
+        calcMaxWidths();
+
+        this.leadingGap = getLeadingGap(propertyPrefix);
+        calcMaxTextOffset(viewRect);
+    }
+
+    private void calcExtraWidths() {
+        leftTextExtraWidth = getLeftExtraWidth(text);
+        rightTextExtraWidth = getRightExtraWidth(text);
+    }
+
+    private int getLeftExtraWidth(String str) {
+        int lsb = SwingUtilities2.getLeftSideBearing(mi, fm, str);
+        if (lsb < 0) {
+            return -lsb;
+        } else {
+            return 0;
+        }
+    }
+
+    private int getRightExtraWidth(String str) {
+        int rsb = SwingUtilities2.getRightSideBearing(mi, fm, str);
+        if (rsb > 0) {
+            return rsb;
+        } else {
+            return 0;
+        }
+    }
+
+    private void setOriginalWidths() {
+        iconSize.origWidth = iconSize.width;
+        textSize.origWidth = textSize.width;
+        accSize.origWidth = accSize.width;
+        checkSize.origWidth = checkSize.width;
+        arrowSize.origWidth = arrowSize.width;
+    }
+
+    private String getAccText(String acceleratorDelimiter) {
+        String accText = "";
+        KeyStroke accelerator = mi.getAccelerator();
+        if (accelerator != null) {
+            int modifiers = accelerator.getModifiers();
+            if (modifiers > 0) {
+                accText = KeyEvent.getKeyModifiersText(modifiers);
+                accText += acceleratorDelimiter;
+            }
+            int keyCode = accelerator.getKeyCode();
+            if (keyCode != 0) {
+                accText += KeyEvent.getKeyText(keyCode);
+            } else {
+                accText += accelerator.getKeyChar();
+            }
+        }
+        return accText;
+    }
+
+    private Icon getIcon(String propertyPrefix) {
+        // In case of column layout, .checkIconFactory is defined for this UI,
+        // the icon is compatible with it and useCheckAndArrow() is true,
+        // then the icon is handled by the checkIcon.
+        Icon icon = null;
+        MenuItemCheckIconFactory iconFactory =
+                (MenuItemCheckIconFactory) UIManager.get(propertyPrefix
+                        + ".checkIconFactory");
+        if (!isColumnLayout || !useCheckAndArrow || iconFactory == null
+                || !iconFactory.isCompatible(checkIcon, propertyPrefix)) {
+            icon = mi.getIcon();
+        }
+        return icon;
+    }
+
+    private int getMinTextOffset(String propertyPrefix) {
+        int minimumTextOffset = 0;
+        Object minimumTextOffsetObject =
+                UIManager.get(propertyPrefix + ".minimumTextOffset");
+        if (minimumTextOffsetObject instanceof Integer) {
+            minimumTextOffset = (Integer) minimumTextOffsetObject;
+        }
+        return minimumTextOffset;
+    }
+
+    private int getAfterCheckIconGap(String propertyPrefix) {
+        int afterCheckIconGap = gap;
+        Object afterCheckIconGapObject =
+                UIManager.get(propertyPrefix + ".afterCheckIconGap");
+        if (afterCheckIconGapObject instanceof Integer) {
+            afterCheckIconGap = (Integer) afterCheckIconGapObject;
+        }
+        return afterCheckIconGap;
+    }
+
+    private int getLeadingGap(String propertyPrefix) {
+        if (checkSize.getMaxWidth() > 0) {
+            return getCheckOffset(propertyPrefix);
+        } else {
+            return gap; // There is no any check icon
+        }
+    }
+
+    private int getCheckOffset(String propertyPrefix) {
+        int checkIconOffset = gap;
+        Object checkIconOffsetObject =
+                UIManager.get(propertyPrefix + ".checkIconOffset");
+        if (checkIconOffsetObject instanceof Integer) {
+            checkIconOffset = (Integer) checkIconOffsetObject;
+        }
+        return checkIconOffset;
+    }
+
+    protected void calcWidthsAndHeights() {
+        // iconRect
+        if (icon != null) {
+            iconSize.width = icon.getIconWidth();
+            iconSize.height = icon.getIconHeight();
+        }
+
+        // accRect
+        if (!accText.equals("")) {
+            accSize.width = SwingUtilities2.stringWidth(mi, accFm, accText);
+            accSize.height = accFm.getHeight();
+        }
+
+        // textRect
+        if (text == null) {
+            text = "";
+        } else if (!text.equals("")) {
+            if (htmlView != null) {
+                // Text is HTML
+                textSize.width =
+                        (int) htmlView.getPreferredSpan(View.X_AXIS);
+                textSize.height =
+                        (int) htmlView.getPreferredSpan(View.Y_AXIS);
+            } else {
+                // Text isn't HTML
+                textSize.width = SwingUtilities2.stringWidth(mi, fm, text);
+                textSize.height = fm.getHeight();
+            }
+        }
+
+        if (useCheckAndArrow) {
+            // checkIcon
+            if (checkIcon != null) {
+                checkSize.width = checkIcon.getIconWidth();
+                checkSize.height = checkIcon.getIconHeight();
+            }
+            // arrowRect
+            if (arrowIcon != null) {
+                arrowSize.width = arrowIcon.getIconWidth();
+                arrowSize.height = arrowIcon.getIconHeight();
+            }
+        }
+
+        // labelRect
+        if (isColumnLayout) {
+            labelSize.width = iconSize.width + textSize.width + gap;
+            labelSize.height = max(checkSize.height, iconSize.height,
+                    textSize.height, accSize.height, arrowSize.height);
+        } else {
+            Rectangle textRect = new Rectangle();
+            Rectangle iconRect = new Rectangle();
+            SwingUtilities.layoutCompoundLabel(mi, fm, text, icon,
+                    verticalAlignment, horizontalAlignment,
+                    verticalTextPosition, horizontalTextPosition,
+                    viewRect, iconRect, textRect, gap);
+            textRect.width += leftTextExtraWidth + rightTextExtraWidth;
+            Rectangle labelRect = iconRect.union(textRect);
+            labelSize.height = labelRect.height;
+            labelSize.width = labelRect.width;
+        }
+    }
+
+    protected void calcMaxWidths() {
+        calcMaxWidth(checkSize, MAX_CHECK_WIDTH);
+        calcMaxWidth(arrowSize, MAX_ARROW_WIDTH);
+        calcMaxWidth(accSize, MAX_ACC_WIDTH);
+
+        if (isColumnLayout) {
+            calcMaxWidth(iconSize, MAX_ICON_WIDTH);
+            calcMaxWidth(textSize, MAX_TEXT_WIDTH);
+            int curGap = gap;
+            if ((iconSize.getMaxWidth() == 0)
+                    || (textSize.getMaxWidth() == 0)) {
+                curGap = 0;
+            }
+            labelSize.maxWidth =
+                    calcMaxValue(MAX_LABEL_WIDTH, iconSize.maxWidth
+                            + textSize.maxWidth + curGap);
+        } else {
+            // We shouldn't use current icon and text widths
+            // in maximal widths calculation for complex layout.
+            iconSize.maxWidth = getParentIntProperty(MAX_ICON_WIDTH);
+            calcMaxWidth(labelSize, MAX_LABEL_WIDTH);
+            // If maxLabelWidth is wider
+            // than the widest icon + the widest text + gap,
+            // we should update the maximal text witdh
+            int candidateTextWidth = labelSize.maxWidth - iconSize.maxWidth;
+            if (iconSize.maxWidth > 0) {
+                candidateTextWidth -= gap;
+            }
+            textSize.maxWidth = calcMaxValue(MAX_TEXT_WIDTH, candidateTextWidth);
+        }
+    }
+
+    protected void calcMaxWidth(RectSize rs, Object key) {
+        rs.maxWidth = calcMaxValue(key, rs.width);
+    }
+
+    /**
+     * Calculates and returns maximal value through specified parent component
+     * client property.
+     *
+     * @param propertyName name of the property, which stores the maximal value.
+     * @param value a value which pretends to be maximal
+     * @return maximal value among the parent property and the value.
+     */
+    protected int calcMaxValue(Object propertyName, int value) {
+        // Get maximal value from parent client property
+        int maxValue = getParentIntProperty(propertyName);
+        // Store new maximal width in parent client property
+        if (value > maxValue) {
+            if (miParent != null) {
+                miParent.putClientProperty(propertyName, value);
+            }
+            return value;
+        } else {
+            return maxValue;
+        }
+    }
+
+    /**
+     * Returns parent client property as int.
+     * @param propertyName name of the parent property.
+     * @return value of the property as int.
+     */
+    protected int getParentIntProperty(Object propertyName) {
+        Object value = null;
+        if (miParent != null) {
+            value = miParent.getClientProperty(propertyName);
+        }
+        if ((value == null) || !(value instanceof Integer)) {
+            value = 0;
+        }
+        return (Integer) value;
+    }
+
+    public static boolean isColumnLayout(boolean isLeftToRight,
+                                         JMenuItem mi) {
+        assert(mi != null);
+        return isColumnLayout(isLeftToRight, mi.getHorizontalAlignment(),
+                mi.getHorizontalTextPosition(), mi.getVerticalTextPosition());
+    }
+
+    /**
+     * Answers should we do column layout for a menu item or not.
+     * We do it when a user doesn't set any alignments
+     * and text positions manually, except the vertical alignment.
+     */
+    public static boolean isColumnLayout(boolean isLeftToRight,
+                                         int horizontalAlignment,
+                                         int horizontalTextPosition,
+                                         int verticalTextPosition) {
+        if (verticalTextPosition != SwingConstants.CENTER) {
+            return false;
+        }
+        if (isLeftToRight) {
+            if (horizontalAlignment != SwingConstants.LEADING
+                    && horizontalAlignment != SwingConstants.LEFT) {
+                return false;
+            }
+            if (horizontalTextPosition != SwingConstants.TRAILING
+                    && horizontalTextPosition != SwingConstants.RIGHT) {
+                return false;
+            }
+        } else {
+            if (horizontalAlignment != SwingConstants.LEADING
+                    && horizontalAlignment != SwingConstants.RIGHT) {
+                return false;
+            }
+            if (horizontalTextPosition != SwingConstants.TRAILING
+                    && horizontalTextPosition != SwingConstants.LEFT) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Calculates maximal text offset.
+     * It is required for some L&Fs (ex: Vista L&F).
+     * The offset is meaningful only for L2R column layout.
+     *
+     * @param viewRect the rectangle, the maximal text offset
+     * will be calculated for.
+     */
+    private void calcMaxTextOffset(Rectangle viewRect) {
+        if (!isColumnLayout || !isLeftToRight) {
+            return;
+        }
+
+        // Calculate the current text offset
+        int offset = viewRect.x + leadingGap + checkSize.maxWidth
+                + afterCheckIconGap + iconSize.maxWidth + gap;
+        if (checkSize.maxWidth == 0) {
+            offset -= afterCheckIconGap;
+        }
+        if (iconSize.maxWidth == 0) {
+            offset -= gap;
+        }
+
+        // maximal text offset shouldn't be less than minimal text offset;
+        if (offset < minTextOffset) {
+            offset = minTextOffset;
+        }
+
+        // Calculate and store the maximal text offset
+        calcMaxValue(SwingUtilities2.BASICMENUITEMUI_MAX_TEXT_OFFSET, offset);
+    }
+
+    /**
+     * Layout icon, text, check icon, accelerator text and arrow icon
+     * in the viewRect and return their positions.
+     *
+     * If horizontalAlignment, verticalTextPosition and horizontalTextPosition
+     * are default (user doesn't set any manually) the layouting algorithm is:
+     * Elements are layouted in the five columns:
+     * check icon + icon + text + accelerator text + arrow icon
+     *
+     * In the other case elements are layouted in the four columns:
+     * check icon + label + accelerator text + arrow icon
+     * Label is union of icon and text.
+     *
+     * The order of columns can be reversed.
+     * It depends on the menu item orientation.
+     */
+    public LayoutResult layoutMenuItem() {
+        LayoutResult lr = createLayoutResult();
+        prepareForLayout(lr);
+
+        if (isColumnLayout()) {
+            if (isLeftToRight()) {
+                doLTRColumnLayout(lr, getLTRColumnAlignment());
+            } else {
+                doRTLColumnLayout(lr, getRTLColumnAlignment());
+            }
+        } else {
+            if (isLeftToRight()) {
+                doLTRComplexLayout(lr, getLTRColumnAlignment());
+            } else {
+                doRTLComplexLayout(lr, getRTLColumnAlignment());
+            }
+        }
+
+        alignAccCheckAndArrowVertically(lr);
+        return lr;
+    }
+
+    private LayoutResult createLayoutResult() {
+        return new LayoutResult(
+                new Rectangle(iconSize.width, iconSize.height),
+                new Rectangle(textSize.width, textSize.height),
+                new Rectangle(accSize.width,  accSize.height),
+                new Rectangle(checkSize.width, checkSize.height),
+                new Rectangle(arrowSize.width, arrowSize.height),
+                new Rectangle(labelSize.width, labelSize.height)
+        );
+    }
+
+    public ColumnAlignment getLTRColumnAlignment() {
+        return ColumnAlignment.LEFT_ALIGNMENT;
+    }
+
+    public ColumnAlignment getRTLColumnAlignment() {
+        return ColumnAlignment.RIGHT_ALIGNMENT;
+    }
+
+    protected void prepareForLayout(LayoutResult lr) {
+        lr.checkRect.width = checkSize.maxWidth;
+        lr.accRect.width = accSize.maxWidth;
+        lr.arrowRect.width = arrowSize.maxWidth;
+    }
+
+    /**
+     * Aligns the accelertor text and the check and arrow icons vertically
+     * with the center of the label rect.
+     */
+    private void alignAccCheckAndArrowVertically(LayoutResult lr) {
+        lr.accRect.y = (int)(lr.labelRect.y
+                + (float)lr.labelRect.height/2
+                - (float)lr.accRect.height/2);
+        fixVerticalAlignment(lr, lr.accRect);
+        if (useCheckAndArrow) {
+            lr.arrowRect.y = (int)(lr.labelRect.y
+                    + (float)lr.labelRect.height/2
+                    - (float)lr.arrowRect.height/2);
+            lr.checkRect.y = (int)(lr.labelRect.y
+                    + (float)lr.labelRect.height/2
+                    - (float)lr.checkRect.height/2);
+            fixVerticalAlignment(lr, lr.arrowRect);
+            fixVerticalAlignment(lr, lr.checkRect);
+        }
+    }
+
+    /**
+     * Fixes vertical alignment of all menu item elements if rect.y
+     * or (rect.y + rect.height) is out of viewRect bounds
+     */
+    private void fixVerticalAlignment(LayoutResult lr, Rectangle r) {
+        int delta = 0;
+        if (r.y < viewRect.y) {
+            delta = viewRect.y - r.y;
+        } else if (r.y + r.height > viewRect.y + viewRect.height) {
+            delta = viewRect.y + viewRect.height - r.y - r.height;
+        }
+        if (delta != 0) {
+            lr.checkRect.y += delta;
+            lr.iconRect.y += delta;
+            lr.textRect.y += delta;
+            lr.accRect.y += delta;
+            lr.arrowRect.y += delta;
+            lr.labelRect.y += delta;
+        }
+    }
+
+    private void doLTRColumnLayout(LayoutResult lr, ColumnAlignment alignment) {
+        // Set maximal width for all the five basic rects
+        // (three other ones are already maximal)
+        lr.iconRect.width = iconSize.maxWidth;
+        lr.textRect.width = textSize.maxWidth;
+
+        // Set X coordinates
+        // All rects will be aligned at the left side
+        calcXPositionsLTR(viewRect.x, leadingGap, gap, lr.checkRect,
+                lr.iconRect, lr.textRect);
+
+        // Tune afterCheckIconGap
+        if (lr.checkRect.width > 0) { // there is the afterCheckIconGap
+            lr.iconRect.x += afterCheckIconGap - gap;
+            lr.textRect.x += afterCheckIconGap - gap;
+        }
+
+        calcXPositionsRTL(viewRect.x + viewRect.width, leadingGap, gap,
+                lr.arrowRect, lr.accRect);
+
+        // Take into account minimal text offset
+        int textOffset = lr.textRect.x - viewRect.x;
+        if (!isTopLevelMenu && (textOffset < minTextOffset)) {
+            lr.textRect.x += minTextOffset - textOffset;
+        }
+
+        alignRects(lr, alignment);
+
+        // Set Y coordinate for text and icon.
+        // Y coordinates for other rects
+        // will be calculated later in layoutMenuItem.
+        calcTextAndIconYPositions(lr);
+
+        // Calculate valid X and Y coordinates for labelRect
+        lr.setLabelRect(lr.textRect.union(lr.iconRect));
+    }
+
+    private void doLTRComplexLayout(LayoutResult lr, ColumnAlignment alignment) {
+        lr.labelRect.width = labelSize.maxWidth;
+
+        // Set X coordinates
+        calcXPositionsLTR(viewRect.x, leadingGap, gap, lr.checkRect,
+                lr.labelRect);
+
+        // Tune afterCheckIconGap
+        if (lr.checkRect.width > 0) { // there is the afterCheckIconGap
+            lr.labelRect.x += afterCheckIconGap - gap;
+        }
+
+        calcXPositionsRTL(viewRect.x + viewRect.width,
+                leadingGap, gap, lr.arrowRect, lr.accRect);
+
+        // Take into account minimal text offset
+        int labelOffset = lr.labelRect.x - viewRect.x;
+        if (!isTopLevelMenu && (labelOffset < minTextOffset)) {
+            lr.labelRect.x += minTextOffset - labelOffset;
+        }
+
+        alignRects(lr, alignment);
+
+        // Center labelRect vertically
+        calcLabelYPosition(lr);
+
+        layoutIconAndTextInLabelRect(lr);
+    }
+
+    private void doRTLColumnLayout(LayoutResult lr, ColumnAlignment alignment) {
+        // Set maximal width for all the five basic rects
+        // (three other ones are already maximal)
+        lr.iconRect.width = iconSize.maxWidth;
+        lr.textRect.width = textSize.maxWidth;
+
+        // Set X coordinates
+        calcXPositionsRTL(viewRect.x + viewRect.width, leadingGap, gap,
+                lr.checkRect, lr.iconRect, lr.textRect);
+
+        // Tune the gap after check icon
+        if (lr.checkRect.width > 0) { // there is the gap after check icon
+            lr.iconRect.x -= afterCheckIconGap - gap;
+            lr.textRect.x -= afterCheckIconGap - gap;
+        }
+
+        calcXPositionsLTR(viewRect.x, leadingGap, gap, lr.arrowRect,
+                lr.accRect);
+
+        // Take into account minimal text offset
+        int textOffset = (viewRect.x + viewRect.width)
+                       - (lr.textRect.x + lr.textRect.width);
+        if (!isTopLevelMenu && (textOffset < minTextOffset)) {
+            lr.textRect.x -= minTextOffset - textOffset;
+        }
+
+        alignRects(lr, alignment);
+
+        // Set Y coordinates for text and icon.
+        // Y coordinates for other rects
+        // will be calculated later in layoutMenuItem.
+        calcTextAndIconYPositions(lr);
+
+        // Calculate valid X and Y coordinate for labelRect
+        lr.setLabelRect(lr.textRect.union(lr.iconRect));
+    }
+
+    private void doRTLComplexLayout(LayoutResult lr, ColumnAlignment alignment) {
+        lr.labelRect.width = labelSize.maxWidth;
+
+        // Set X coordinates
+        calcXPositionsRTL(viewRect.x + viewRect.width, leadingGap, gap,
+                lr.checkRect, lr.labelRect);
+
+        // Tune the gap after check icon
+        if (lr.checkRect.width > 0) { // there is the gap after check icon
+            lr.labelRect.x -= afterCheckIconGap - gap;
+        }
+
+        calcXPositionsLTR(viewRect.x, leadingGap, gap, lr.arrowRect, lr.accRect);
+
+        // Take into account minimal text offset
+        int labelOffset = (viewRect.x + viewRect.width)
+                        - (lr.labelRect.x + lr.labelRect.width);
+        if (!isTopLevelMenu && (labelOffset < minTextOffset)) {
+            lr.labelRect.x -= minTextOffset - labelOffset;
+        }
+
+        alignRects(lr, alignment);
+
+        // Center labelRect vertically
+        calcLabelYPosition(lr);
+
+        layoutIconAndTextInLabelRect(lr);
+    }
+
+    private void alignRects(LayoutResult lr, ColumnAlignment alignment) {
+        alignRect(lr.checkRect, alignment.getCheckAlignment(),
+                  checkSize.getOrigWidth());
+        alignRect(lr.iconRect, alignment.getIconAlignment(),
+                  iconSize.getOrigWidth());
+        alignRect(lr.textRect, alignment.getTextAlignment(),
+                  textSize.getOrigWidth());
+        alignRect(lr.accRect, alignment.getAccAlignment(),
+                  accSize.getOrigWidth());
+        alignRect(lr.arrowRect, alignment.getArrowAlignment(),
+                  arrowSize.getOrigWidth());
+    }
+
+    private void alignRect(Rectangle rect, int alignment, int origWidth) {
+        if (alignment != SwingUtilities.LEFT) {
+            rect.x = rect.x + rect.width - origWidth;
+            rect.width = origWidth;
+        }
+    }
+
+    protected void layoutIconAndTextInLabelRect(LayoutResult lr) {
+        lr.setTextRect(new Rectangle());
+        lr.setIconRect(new Rectangle());
+        SwingUtilities.layoutCompoundLabel(
+                mi, fm, text,icon, verticalAlignment, horizontalAlignment,
+                verticalTextPosition, horizontalTextPosition, lr.labelRect,
+                lr.iconRect, lr.textRect, gap);
+    }
+
+    private void calcXPositionsLTR(int startXPos, int leadingGap,
+                                   int gap, Rectangle... rects) {
+        int curXPos = startXPos + leadingGap;
+        for (Rectangle rect : rects) {
+            rect.x = curXPos;
+            if (rect.width > 0) {
+                curXPos += rect.width + gap;
+            }
+        }
+    }
+
+    private void calcXPositionsRTL(int startXPos, int leadingGap,
+                                   int gap, Rectangle... rects) {
+        int curXPos = startXPos - leadingGap;
+        for (Rectangle rect : rects) {
+            rect.x = curXPos - rect.width;
+            if (rect.width > 0) {
+                curXPos -= rect.width + gap;
+            }
+        }
+    }
+
+   /**
+     * Sets Y coordinates of text and icon
+     * taking into account the vertical alignment
+     */
+    private void calcTextAndIconYPositions(LayoutResult lr) {
+        if (verticalAlignment == SwingUtilities.TOP) {
+            lr.textRect.y  = (int)(viewRect.y
+                    + (float)lr.labelRect.height/2
+                    - (float)lr.textRect.height/2);
+            lr.iconRect.y  = (int)(viewRect.y
+                    + (float)lr.labelRect.height/2
+                    - (float)lr.iconRect.height/2);
+        } else if (verticalAlignment == SwingUtilities.CENTER) {
+            lr.textRect.y = (int)(viewRect.y
+                    + (float)viewRect.height/2
+                    - (float)lr.textRect.height/2);
+            lr.iconRect.y = (int)(viewRect.y
+                    + (float)viewRect.height/2
+                    - (float)lr.iconRect.height/2);
+        }
+        else if (verticalAlignment == SwingUtilities.BOTTOM) {
+            lr.textRect.y = (int)(viewRect.y
+                    + viewRect.height
+                    - (float)lr.labelRect.height/2
+                    - (float)lr.textRect.height/2);
+            lr.iconRect.y = (int)(viewRect.y
+                    + viewRect.height
+                    - (float)lr.labelRect.height/2
+                    - (float)lr.iconRect.height/2);
+        }
+    }
+
+    /**
+     * Sets labelRect Y coordinate
+     * taking into account the vertical alignment
+     */
+    private void calcLabelYPosition(LayoutResult lr) {
+        if (verticalAlignment == SwingUtilities.TOP) {
+            lr.labelRect.y  = viewRect.y;
+        } else if (verticalAlignment == SwingUtilities.CENTER) {
+            lr.labelRect.y = (int)(viewRect.y
+                    + (float)viewRect.height/2
+                    - (float)lr.labelRect.height/2);
+        } else if (verticalAlignment == SwingUtilities.BOTTOM) {
+            lr.labelRect.y  = viewRect.y + viewRect.height
+                    - lr.labelRect.height;
+        }
+    }
+
+    /**
+     * Returns parent of this component if it is not a top-level menu
+     * Otherwise returns null.
+     * @param menuItem the menu item whose parent will be returned.
+     * @return parent of this component if it is not a top-level menu
+     * Otherwise returns null.
+     */
+    public static JComponent getMenuItemParent(JMenuItem menuItem) {
+        Container parent = menuItem.getParent();
+        if ((parent instanceof JComponent) &&
+             (!(menuItem instanceof JMenu) ||
+               !((JMenu)menuItem).isTopLevelMenu())) {
+            return (JComponent) parent;
+        } else {
+            return null;
+        }
+    }
+
+    public static void clearUsedParentClientProperties(JMenuItem menuItem) {
+        clearUsedClientProperties(getMenuItemParent(menuItem));
+    }
+
+    public static void clearUsedClientProperties(JComponent c) {
+        if (c != null) {
+            c.putClientProperty(MAX_ARROW_WIDTH, null);
+            c.putClientProperty(MAX_CHECK_WIDTH, null);
+            c.putClientProperty(MAX_ACC_WIDTH, null);
+            c.putClientProperty(MAX_TEXT_WIDTH, null);
+            c.putClientProperty(MAX_ICON_WIDTH, null);
+            c.putClientProperty(MAX_LABEL_WIDTH, null);
+            c.putClientProperty(BASICMENUITEMUI_MAX_TEXT_OFFSET, null);
+        }
+    }
+
+    /**
+     * Finds and returns maximal integer value in the given array.
+     * @param values array where the search will be performed.
+     * @return maximal vaule.
+     */
+    public static int max(int... values) {
+        int maxValue = Integer.MIN_VALUE;
+        for (int i : values) {
+            if (i > maxValue) {
+                maxValue = i;
+            }
+        }
+        return maxValue;
+    }
+
+    public static Rectangle createMaxRect() {
+        return new Rectangle(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
+    }
+
+    public static void addMaxWidth(RectSize size, int gap, Dimension result) {
+        if (size.maxWidth > 0) {
+            result.width += size.maxWidth + gap;
+        }
+    }
+
+    public static void addWidth(int width, int gap, Dimension result) {
+        if (width > 0) {
+            result.width += width + gap;
+        }
+    }
+
+    public JMenuItem getMenuItem() {
+        return mi;
+    }
+
+    public JComponent getMenuItemParent() {
+        return miParent;
+    }
+
+    public Font getFont() {
+        return font;
+    }
+
+    public Font getAccFont() {
+        return accFont;
+    }
+
+    public FontMetrics getFontMetrics() {
+        return fm;
+    }
+
+    public FontMetrics getAccFontMetrics() {
+        return accFm;
+    }
+
+    public Icon getIcon() {
+        return icon;
+    }
+
+    public Icon getCheckIcon() {
+        return checkIcon;
+    }
+
+    public Icon getArrowIcon() {
+        return arrowIcon;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public String getAccText() {
+        return accText;
+    }
+
+    public boolean isColumnLayout() {
+        return isColumnLayout;
+    }
+
+    public boolean useCheckAndArrow() {
+        return useCheckAndArrow;
+    }
+
+    public boolean isLeftToRight() {
+        return isLeftToRight;
+    }
+
+    public boolean isTopLevelMenu() {
+        return isTopLevelMenu;
+    }
+
+    public View getHtmlView() {
+        return htmlView;
+    }
+
+    public int getVerticalAlignment() {
+        return verticalAlignment;
+    }
+
+    public int getHorizontalAlignment() {
+        return horizontalAlignment;
+    }
+
+    public int getVerticalTextPosition() {
+        return verticalTextPosition;
+    }
+
+    public int getHorizontalTextPosition() {
+        return horizontalTextPosition;
+    }
+
+    public int getGap() {
+        return gap;
+    }
+
+    public int getLeadingGap() {
+        return leadingGap;
+    }
+
+    public int getAfterCheckIconGap() {
+        return afterCheckIconGap;
+    }
+
+    public int getMinTextOffset() {
+        return minTextOffset;
+    }
+
+    public Rectangle getViewRect() {
+        return viewRect;
+    }
+
+    public RectSize getIconSize() {
+        return iconSize;
+    }
+
+    public RectSize getTextSize() {
+        return textSize;
+    }
+
+    public RectSize getAccSize() {
+        return accSize;
+    }
+
+    public RectSize getCheckSize() {
+        return checkSize;
+    }
+
+    public RectSize getArrowSize() {
+        return arrowSize;
+    }
+
+    public RectSize getLabelSize() {
+        return labelSize;
+    }
+
+    protected void setMenuItem(JMenuItem mi) {
+        this.mi = mi;
+    }
+
+    protected void setMenuItemParent(JComponent miParent) {
+        this.miParent = miParent;
+    }
+
+    protected void setFont(Font font) {
+        this.font = font;
+    }
+
+    protected void setAccFont(Font accFont) {
+        this.accFont = accFont;
+    }
+
+    protected void setFontMetrics(FontMetrics fm) {
+        this.fm = fm;
+    }
+
+    protected void setAccFontMetrics(FontMetrics accFm) {
+        this.accFm = accFm;
+    }
+
+    protected void setIcon(Icon icon) {
+        this.icon = icon;
+    }
+
+    protected void setCheckIcon(Icon checkIcon) {
+        this.checkIcon = checkIcon;
+    }
+
+    protected void setArrowIcon(Icon arrowIcon) {
+        this.arrowIcon = arrowIcon;
+    }
+
+    protected void setText(String text) {
+        this.text = text;
+    }
+
+    protected void setAccText(String accText) {
+        this.accText = accText;
+    }
+
+    protected void setColumnLayout(boolean columnLayout) {
+        isColumnLayout = columnLayout;
+    }
+
+    protected void setUseCheckAndArrow(boolean useCheckAndArrow) {
+        this.useCheckAndArrow = useCheckAndArrow;
+    }
+
+    protected void setLeftToRight(boolean leftToRight) {
+        isLeftToRight = leftToRight;
+    }
+
+    protected void setTopLevelMenu(boolean topLevelMenu) {
+        isTopLevelMenu = topLevelMenu;
+    }
+
+    protected void setHtmlView(View htmlView) {
+        this.htmlView = htmlView;
+    }
+
+    protected void setVerticalAlignment(int verticalAlignment) {
+        this.verticalAlignment = verticalAlignment;
+    }
+
+    protected void setHorizontalAlignment(int horizontalAlignment) {
+        this.horizontalAlignment = horizontalAlignment;
+    }
+
+    protected void setVerticalTextPosition(int verticalTextPosition) {
+        this.verticalTextPosition = verticalTextPosition;
+    }
+
+    protected void setHorizontalTextPosition(int horizontalTextPosition) {
+        this.horizontalTextPosition = horizontalTextPosition;
+    }
+
+    protected void setGap(int gap) {
+        this.gap = gap;
+    }
+
+    protected void setLeadingGap(int leadingGap) {
+        this.leadingGap = leadingGap;
+    }
+
+    protected void setAfterCheckIconGap(int afterCheckIconGap) {
+        this.afterCheckIconGap = afterCheckIconGap;
+    }
+
+    protected void setMinTextOffset(int minTextOffset) {
+        this.minTextOffset = minTextOffset;
+    }
+
+    protected void setViewRect(Rectangle viewRect) {
+        this.viewRect = viewRect;
+    }
+
+    protected void setIconSize(RectSize iconSize) {
+        this.iconSize = iconSize;
+    }
+
+    protected void setTextSize(RectSize textSize) {
+        this.textSize = textSize;
+    }
+
+    protected void setAccSize(RectSize accSize) {
+        this.accSize = accSize;
+    }
+
+    protected void setCheckSize(RectSize checkSize) {
+        this.checkSize = checkSize;
+    }
+
+    protected void setArrowSize(RectSize arrowSize) {
+        this.arrowSize = arrowSize;
+    }
+
+    protected void setLabelSize(RectSize labelSize) {
+        this.labelSize = labelSize;
+    }
+
+    public int getLeftTextExtraWidth() {
+        return leftTextExtraWidth;
+    }
+
+    public int getRightTextExtraWidth() {
+        return rightTextExtraWidth;
+    }
+
+    /**
+     * Returns false if the component is a JMenu and it is a top
+     * level menu (on the menubar).
+     */
+    public static boolean useCheckAndArrow(JMenuItem menuItem) {
+        boolean b = true;
+        if ((menuItem instanceof JMenu) &&
+                (((JMenu) menuItem).isTopLevelMenu())) {
+            b = false;
+        }
+        return b;
+    }
+
+    public static class LayoutResult {
+        private Rectangle iconRect;
+        private Rectangle textRect;
+        private Rectangle accRect;
+        private Rectangle checkRect;
+        private Rectangle arrowRect;
+        private Rectangle labelRect;
+
+        public LayoutResult() {
+            iconRect = new Rectangle();
+            textRect = new Rectangle();
+            accRect = new Rectangle();
+            checkRect = new Rectangle();
+            arrowRect = new Rectangle();
+            labelRect = new Rectangle();
+        }
+
+        public LayoutResult(Rectangle iconRect, Rectangle textRect,
+                            Rectangle accRect, Rectangle checkRect,
+                            Rectangle arrowRect, Rectangle labelRect) {
+            this.iconRect = iconRect;
+            this.textRect = textRect;
+            this.accRect = accRect;
+            this.checkRect = checkRect;
+            this.arrowRect = arrowRect;
+            this.labelRect = labelRect;
+        }
+
+        public Rectangle getIconRect() {
+            return iconRect;
+        }
+
+        public void setIconRect(Rectangle iconRect) {
+            this.iconRect = iconRect;
+        }
+
+        public Rectangle getTextRect() {
+            return textRect;
+        }
+
+        public void setTextRect(Rectangle textRect) {
+            this.textRect = textRect;
+        }
+
+        public Rectangle getAccRect() {
+            return accRect;
+        }
+
+        public void setAccRect(Rectangle accRect) {
+            this.accRect = accRect;
+        }
+
+        public Rectangle getCheckRect() {
+            return checkRect;
+        }
+
+        public void setCheckRect(Rectangle checkRect) {
+            this.checkRect = checkRect;
+        }
+
+        public Rectangle getArrowRect() {
+            return arrowRect;
+        }
+
+        public void setArrowRect(Rectangle arrowRect) {
+            this.arrowRect = arrowRect;
+        }
+
+        public Rectangle getLabelRect() {
+            return labelRect;
+        }
+
+        public void setLabelRect(Rectangle labelRect) {
+            this.labelRect = labelRect;
+        }
+
+        public Map<String, Rectangle> getAllRects() {
+            Map<String, Rectangle> result = new HashMap<String, Rectangle>();
+            result.put("checkRect", checkRect);
+            result.put("iconRect", iconRect);
+            result.put("textRect", textRect);
+            result.put("accRect", accRect);
+            result.put("arrowRect", arrowRect);
+            result.put("labelRect", labelRect);
+            return result;
+        }
+    }
+
+    public static class ColumnAlignment {
+        private int checkAlignment;
+        private int iconAlignment;
+        private int textAlignment;
+        private int accAlignment;
+        private int arrowAlignment;
+
+        public static final ColumnAlignment LEFT_ALIGNMENT =
+                new ColumnAlignment(
+                        SwingConstants.LEFT,
+                        SwingConstants.LEFT,
+                        SwingConstants.LEFT,
+                        SwingConstants.LEFT,
+                        SwingConstants.LEFT
+                );
+
+        public static final ColumnAlignment RIGHT_ALIGNMENT =
+                new ColumnAlignment(
+                        SwingConstants.RIGHT,
+                        SwingConstants.RIGHT,
+                        SwingConstants.RIGHT,
+                        SwingConstants.RIGHT,
+                        SwingConstants.RIGHT
+                );
+
+        public ColumnAlignment(int checkAlignment, int iconAlignment,
+                               int textAlignment, int accAlignment,
+                               int arrowAlignment) {
+            this.checkAlignment = checkAlignment;
+            this.iconAlignment = iconAlignment;
+            this.textAlignment = textAlignment;
+            this.accAlignment = accAlignment;
+            this.arrowAlignment = arrowAlignment;
+        }
+
+        public int getCheckAlignment() {
+            return checkAlignment;
+        }
+
+        public int getIconAlignment() {
+            return iconAlignment;
+        }
+
+        public int getTextAlignment() {
+            return textAlignment;
+        }
+
+        public int getAccAlignment() {
+            return accAlignment;
+        }
+
+        public int getArrowAlignment() {
+            return arrowAlignment;
+        }
+    }
+
+    public static class RectSize {
+        private int width;
+        private int height;
+        private int origWidth;
+        private int maxWidth;
+
+        public RectSize() {
+        }
+
+        public RectSize(int width, int height, int origWidth, int maxWidth) {
+            this.width = width;
+            this.height = height;
+            this.origWidth = origWidth;
+            this.maxWidth = maxWidth;
+        }
+
+        public int getWidth() {
+            return width;
+        }
+
+        public int getHeight() {
+            return height;
+        }
+
+        public int getOrigWidth() {
+            return origWidth;
+        }
+
+        public int getMaxWidth() {
+            return maxWidth;
+        }
+
+        public void setWidth(int width) {
+            this.width = width;
+        }
+
+        public void setHeight(int height) {
+            this.height = height;
+        }
+
+        public void setOrigWidth(int origWidth) {
+            this.origWidth = origWidth;
+        }
+
+        public void setMaxWidth(int maxWidth) {
+            this.maxWidth = maxWidth;
+        }
+
+        public String toString() {
+            return "[w=" + width + ",h=" + height + ",ow="
+                    + origWidth + ",mw=" + maxWidth + "]";
+        }
+    }
+}
--- a/jdk/src/share/classes/sun/swing/SwingLazyValue.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingLazyValue.java	Wed Jul 05 16:42:37 2017 +0200
@@ -54,15 +54,14 @@
         className = c;
         methodName = m;
         if (o != null) {
-            args = (Object[])o.clone();
+            args = o.clone();
         }
     }
 
     public Object createValue(final UIDefaults table) {
         try {
-            Class c;
             Object cl;
-            c = Class.forName(className, true, null);
+            Class<?> c = Class.forName(className, true, null);
             if (methodName != null) {
                 Class[] types = getClassArray(args);
                 Method m = c.getMethod(methodName, types);
--- a/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Wed Jul 05 16:42:37 2017 +0200
@@ -460,7 +460,7 @@
             return clipString;
         }
 
-        boolean needsTextLayout = false;
+        boolean needsTextLayout;
 
         synchronized (charsBufferLock) {
             if (charsBuffer == null || charsBuffer.length < stringLength) {
@@ -715,11 +715,8 @@
         // See if coords are inside
         // ASSUME: mouse x,y will never be < cell's x,y
         assert (p.x >= cellBounds.x && p.y >= cellBounds.y);
-        if (p.x > cellBounds.x + cellBounds.width ||
-                p.y > cellBounds.y + cellBounds.height) {
-            return true;
-        }
-        return false;
+        return p.x > cellBounds.x + cellBounds.width ||
+                p.y > cellBounds.y + cellBounds.height;
     }
 
     /**
@@ -1239,12 +1236,11 @@
     private static synchronized boolean inputEvent_canAccessSystemClipboard(InputEvent ie) {
         if (inputEvent_CanAccessSystemClipboard_Field == null) {
             inputEvent_CanAccessSystemClipboard_Field =
-                (Field)AccessController.doPrivileged(
-                    new java.security.PrivilegedAction() {
-                        public Object run() {
-                            Field field = null;
+                AccessController.doPrivileged(
+                    new java.security.PrivilegedAction<Field>() {
+                        public Field run() {
                             try {
-                                field = InputEvent.class.
+                                Field field = InputEvent.class.
                                     getDeclaredField("canAccessSystemClipboard");
                                 field.setAccessible(true);
                                 return field;
@@ -1419,10 +1415,10 @@
                  * Class.getResourceAsStream just returns raw
                  * bytes, which we can convert to an image.
                  */
-                byte[] buffer = (byte[])
+                byte[] buffer =
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedAction() {
-                    public Object run() {
+                        new java.security.PrivilegedAction<byte[]>() {
+                    public byte[] run() {
                         try {
                             InputStream resource = null;
                             Class<?> srchClass = baseClass;
@@ -1489,7 +1485,7 @@
                 return true;
             }
             // Else probably Solaris or Linux in which case may be remote X11
-            Class x11Class = Class.forName("sun.awt.X11GraphicsEnvironment");
+            Class<?> x11Class = Class.forName("sun.awt.X11GraphicsEnvironment");
             Method isDisplayLocalMethod = x11Class.getMethod(
                       "isDisplayLocal", new Class[0]);
             return (Boolean)isDisplayLocalMethod.invoke(null, (Object[])null);
--- a/jdk/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Wed Jul 05 16:42:37 2017 +0200
@@ -44,7 +44,7 @@
  * @author Scott Violet
  */
 public class DefaultSynthStyle extends SynthStyle implements Cloneable {
-    private static final Object PENDING = new String("Pending");
+    private static final String PENDING = "Pending";
 
     /**
      * Should the component be opaque?
@@ -690,8 +690,8 @@
         StateInfo[] states = getStateInfo();
         if (states != null) {
             buf.append("states[");
-            for (int i = 0; i < states.length; i++) {
-                buf.append(states[i].toString()).append(',');
+            for (StateInfo state : states) {
+                buf.append(state.toString()).append(',');
             }
             buf.append(']').append(',');
         }
@@ -888,7 +888,7 @@
          * Returns the number of states that are similar between the
          * ComponentState this StateInfo represents and val.
          */
-        private final int getMatchCount(int val) {
+        private int getMatchCount(int val) {
             // This comes from BigInteger.bitCnt
             val &= state;
             val -= (0xaaaaaaaa & val) >>> 1;
--- a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Wed Jul 05 16:42:37 2017 +0200
@@ -735,7 +735,7 @@
      * Data model for a type-face selection combo-box.
      */
     protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
-        Vector directories = new Vector();
+        Vector<File> directories = new Vector<File>();
         int[] depths = null;
         File selectedDirectory = null;
         JFileChooser chooser = getFileChooser();
@@ -778,7 +778,7 @@
             // Get the canonical (full) path. This has the side
             // benefit of removing extraneous chars from the path,
             // for example /foo/bar/ becomes /foo/bar
-            File canonical = null;
+            File canonical;
             try {
                 canonical = directory.getCanonicalFile();
             } catch (IOException e) {
@@ -791,7 +791,7 @@
                 File sf = useShellFolder ? ShellFolder.getShellFolder(canonical)
                                          : canonical;
                 File f = sf;
-                Vector path = new Vector(10);
+                Vector<File> path = new Vector<File>(10);
                 do {
                     path.addElement(f);
                 } while ((f = f.getParentFile()) != null);
@@ -799,7 +799,7 @@
                 int pathCount = path.size();
                 // Insert chain at appropriate place in vector
                 for (int i = 0; i < pathCount; i++) {
-                    f = (File)path.get(i);
+                    f = path.get(i);
                     if (directories.contains(f)) {
                         int topIndex = directories.indexOf(f);
                         for (int j = i-1; j >= 0; j--) {
@@ -818,12 +818,12 @@
         private void calculateDepths() {
             depths = new int[directories.size()];
             for (int i = 0; i < depths.length; i++) {
-                File dir = (File)directories.get(i);
+                File dir = directories.get(i);
                 File parent = dir.getParentFile();
                 depths[i] = 0;
                 if (parent != null) {
                     for (int j = i-1; j >= 0; j--) {
-                        if (parent.equals((File)directories.get(j))) {
+                        if (parent.equals(directories.get(j))) {
                             depths[i] = depths[j] + 1;
                             break;
                         }
@@ -940,8 +940,8 @@
             FileFilter currentFilter = getFileChooser().getFileFilter();
             boolean found = false;
             if(currentFilter != null) {
-                for(int i=0; i < filters.length; i++) {
-                    if(filters[i] == currentFilter) {
+                for (FileFilter filter : filters) {
+                    if (filter == currentFilter) {
                         found = true;
                     }
                 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/util/calendar/TzIDOldMapping.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.util.calendar;
+
+import java.util.Map;
+import java.util.HashMap;
+
+class TzIDOldMapping {
+    static final Map<String, String> MAP = new HashMap<String, String>();
+    static {
+        String[][] oldmap = {
+            { "ACT", "Australia/Darwin" },
+            { "AET", "Australia/Sydney" },
+            { "AGT", "America/Argentina/Buenos_Aires" },
+            { "ART", "Africa/Cairo" },
+            { "AST", "America/Anchorage" },
+            { "BET", "America/Sao_Paulo" },
+            { "BST", "Asia/Dhaka" },
+            { "CAT", "Africa/Harare" },
+            { "CNT", "America/St_Johns" },
+            { "CST", "America/Chicago" },
+            { "CTT", "Asia/Shanghai" },
+            { "EAT", "Africa/Addis_Ababa" },
+            { "ECT", "Europe/Paris" },
+            { "EST", "America/New_York" },
+            { "HST", "Pacific/Honolulu" },
+            { "IET", "America/Indianapolis" },
+            { "IST", "Asia/Calcutta" },
+            { "JST", "Asia/Tokyo" },
+            { "MIT", "Pacific/Apia" },
+            { "MST", "America/Denver" },
+            { "NET", "Asia/Yerevan" },
+            { "NST", "Pacific/Auckland" },
+            { "PLT", "Asia/Karachi" },
+            { "PNT", "America/Phoenix" },
+            { "PRT", "America/Puerto_Rico" },
+            { "PST", "America/Los_Angeles" },
+            { "SST", "Pacific/Guadalcanal" },
+            { "VST", "Asia/Saigon" },
+        };
+        for (String[] pair : oldmap) {
+            MAP.put(pair[0], pair[1]);
+        }
+    }
+}
--- a/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java	Wed Jul 05 16:42:37 2017 +0200
@@ -28,10 +28,12 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.lang.ref.SoftReference;
+import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
@@ -77,6 +79,14 @@
     private static final long ABBR_MASK = 0xf00L;
     private static final int TRANSITION_NSHIFT = 12;
 
+    // Flag for supporting JDK backward compatible IDs, such as "EST".
+    private static final boolean USE_OLDMAPPING;
+    static {
+      String oldmapping = AccessController.doPrivileged(
+          new sun.security.action.GetPropertyAction("sun.timezone.ids.oldmapping", "false")).toLowerCase(Locale.ROOT);
+      USE_OLDMAPPING = (oldmapping.equals("yes") || oldmapping.equals("true"));
+    }
+
     private static final CalendarSystem gcal = CalendarSystem.getGregorianCalendar();
 
     /**
@@ -595,9 +605,21 @@
      * time zone of the ID.
      */
     public static TimeZone getTimeZone(String ID) {
-        ZoneInfo zi = null;
+        String givenID = null;
 
-        zi = ZoneInfoFile.getZoneInfo(ID);
+        /*
+         * If old JDK compatibility is specified, get the old alias
+         * name.
+         */
+        if (USE_OLDMAPPING) {
+            String compatibleID = TzIDOldMapping.MAP.get(ID);
+            if (compatibleID != null) {
+                givenID = ID;
+                ID = compatibleID;
+            }
+        }
+
+        ZoneInfo zi = ZoneInfoFile.getZoneInfo(ID);
         if (zi == null) {
             // if we can't create an object for the ID, try aliases.
             try {
@@ -616,6 +638,10 @@
                 // ignore exceptions
             }
         }
+
+        if (givenID != null && zi != null) {
+            zi.setID(givenID);
+        }
         return zi;
     }
 
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Suriname Summer Time", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Tajikistan Summer Time", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Hovd Time", "HOVT",
                                         "Hovd Summer Time", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Nepal Time", "NPT",
                                             "Nepal Summer Time", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Krasnoyarsk Time", "KRAT",
                                                "Krasnoyarsk Summer Time", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Suriname Sommerzeit", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Tadschikische Sommerzeit", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Hovd Zeit", "HOVT",
                                         "Hovd Sommerzeit", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Nepalesische Zeit", "NPT",
                                             "Nepalesische Sommerzeit", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Krasnojarsker Zeit", "KRAT",
                                                "Krasnojarsker Sommerzeit", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Hora de verano de Surinam", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Hora de verano de Tajikist\u00e1n", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Hora de Hovd", "HOVT",
                                         "Hora de verano de Hovd", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Hora de Nepal", "NPT",
                                             "Hora de verano de Nepal", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Hora de Krasnoyarsk", "KRAT",
                                                "Hora de verano de Krasnoyarsk", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Heure d'\u00e9t\u00e9 du Surinam", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Heure d'\u00e9t\u00e9 du Tadjikistan", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Heure de Hovd", "HOVT",
                                         "Heure d'\u00e9t\u00e9 de Hovd", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Heure du N\u00e9pal", "NPT",
                                             "Heure d'\u00e9t\u00e9 du N\u00e9pal", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Heure de Krasno\u00efarsk", "KRAT",
                                                "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Ora estiva di Suriname", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Ora estiva del Tagikistan", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Ora di Hovd", "HOVT",
                                         "Ora estiva di Hovd", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Ora del Nepal", "NPT",
                                             "Ora estiva del Nepal", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Ora di Krasnojarsk", "KRAT",
                                                "Ora estiva di Krasnojarsk", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "\u30bf\u30b8\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"\u30db\u30d6\u30c9\u6642\u9593", "HOVT",
                                         "\u30db\u30d6\u30c9\u590f\u6642\u9593", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"\u30cd\u30d1\u30fc\u30eb\u6642\u9593", "NPT",
                                             "\u30cd\u30d1\u30fc\u30eb\u590f\u6642\u9593", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u6642\u9593", "KRAT",
                                                "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "\ud0c0\uc9c0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Hovd \uc2dc\uac04", "HOVT",
                                         "Hovd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"\ub124\ud314 \uc2dc\uac04", "NPT",
                                             "\ub124\ud314 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc2dc\uac04", "KRAT",
                                                "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "Surinam, sommartid", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "Tadzjikistan, sommartid", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"Hovd, normaltid", "HOVT",
                                         "Hovd, sommartid", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"Nepal, normaltid", "NPT",
                                             "Nepal, sommartid", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Krasnojarsk, normaltid", "KRAT",
                                                "Krasnojarsk, sommartid", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "\u5854\u5409\u514b\u65af\u5766\u590f\u4ee4\u65f6", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"\u79d1\u5e03\u591a\u65f6\u95f4", "HOVT",
                                         "\u79d1\u5e03\u591a\u590f\u4ee4\u65f6", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"\u5c3c\u6cca\u5c14\u65f6\u95f4", "NPT",
                                             "\u5c3c\u6cca\u5c14\u590f\u4ee4\u65f6", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u65f6\u95f4", "KRAT",
                                                "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java	Wed Jul 05 16:42:37 2017 +0200
@@ -291,6 +291,7 @@
             {"America/Argentina/Mendoza", AGT},
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/San_Juan", AGT},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -329,7 +330,7 @@
             {"America/Detroit", EST},
             {"America/Dominica", AST},
             {"America/Edmonton", MST},
-            {"America/Eirunepe", ACT},
+            {"America/Eirunepe", AMT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
             {"America/Fort_Wayne", EST},
@@ -372,6 +373,7 @@
             {"America/Maceio", BRT},
             {"America/Managua", CST},
             {"America/Manaus", AMT},
+            {"America/Marigot", AST},
             {"America/Martinique", AST},
             {"America/Mazatlan", MST},
             {"America/Mendoza", AGT},
@@ -398,7 +400,7 @@
                                                  "\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST"}},
             {"America/Port-au-Prince", EST},
             {"America/Port_of_Spain", AST},
-            {"America/Porto_Acre", ACT},
+            {"America/Porto_Acre", AMT},
             {"America/Porto_Velho", AMT},
             {"America/Puerto_Rico", AST},
             {"America/Rainy_River", CST},
@@ -406,13 +408,15 @@
             {"America/Recife", BRT},
             {"America/Regina", CST},
             {"America/Resolute", EST},
-            {"America/Rio_Branco", ACT},
+            {"America/Rio_Branco", AMT},
             {"America/Rosario", AGT},
+            {"America/Santarem", BRT},
             {"America/Santiago", CLT},
             {"America/Santo_Domingo", AST},
             {"America/Sao_Paulo", BRT},
             {"America/Scoresbysund", EGT},
             {"America/Shiprock", MST},
+            {"America/St_Barthelemy", AST},
             {"America/St_Kitts", AST},
             {"America/St_Lucia", AST},
             {"America/St_Thomas", AST},
@@ -485,6 +489,7 @@
                                             "\u5854\u5409\u514b\u590f\u4ee4\u6642\u9593", "TJST"}},
             {"Asia/Gaza", EET},
             {"Asia/Harbin", CTT},
+            {"Asia/Ho_Chi_Minh", ICT},
             {"Asia/Hong_Kong", HKT},
             {"Asia/Hovd", new String[] {"\u4faf\u5fb7 (Hovd) \u6642\u9593", "HOVT",
                                         "\u4faf\u5fb7 (Hovd) \u590f\u4ee4\u6642\u9593", "HOVST"}},
@@ -502,6 +507,7 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Katmandu", new String[] {"\u5c3c\u6cca\u723e\u6642\u9593", "NPT",
                                             "\u5c3c\u6cca\u723e\u590f\u4ee4\u6642\u9593", "NPST"}},
+            {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u6642\u9593", "KRAT",
                                                "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -599,7 +605,7 @@
             {"Australia/Yancowinna", BROKEN_HILL},
             {"BET", BRT},
             {"BST", BDT},
-            {"Brazil/Acre", ACT},
+            {"Brazil/Acre", AMT},
             {"Brazil/DeNoronha", NORONHA},
             {"Brazil/East", BRT},
             {"Brazil/West", AMT},
--- a/jdk/src/share/native/sun/font/bidi/ubidi.c	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/share/native/sun/font/bidi/ubidi.c	Wed Jul 05 16:42:37 2017 +0200
@@ -384,23 +384,23 @@
         return;
     }
 
-    /* are explicit levels specified? */
-    if(embeddingLevels==NULL) {
-        /* no: determine explicit levels according to the (Xn) rules */\
-        if(getLevelsMemory(pBiDi, length)) {
-            pBiDi->levels=pBiDi->levelsMemory;
+    if (getLevelsMemory(pBiDi, length)) {
+        pBiDi->levels=pBiDi->levelsMemory;
+        /* are explicit levels specified? */
+        if(embeddingLevels==NULL) {
+            /* no: determine explicit levels according to the (Xn) rules */
             direction=resolveExplicitLevels(pBiDi);
         } else {
-            *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
-            return;
+            /* set BN for all explicit codes, check that all levels are paraLevel..UBIDI_MAX_EXPLICIT_LEVEL */
+            icu_memcpy(pBiDi->levels, embeddingLevels, length);
+            direction=checkExplicitLevels(pBiDi, pErrorCode);
+            if(U_FAILURE(*pErrorCode)) {
+                 return;
+            }
         }
     } else {
-        /* set BN for all explicit codes, check that all levels are paraLevel..UBIDI_MAX_EXPLICIT_LEVEL */
-        pBiDi->levels=embeddingLevels;
-        direction=checkExplicitLevels(pBiDi, pErrorCode);
-        if(U_FAILURE(*pErrorCode)) {
-            return;
-        }
+        *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
+        return;
     }
 
     /*
--- a/jdk/src/solaris/bin/java_md.c	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/solaris/bin/java_md.c	Wed Jul 05 16:42:37 2017 +0200
@@ -1312,3 +1312,24 @@
 {
     JLI_SetTraceLauncher();
 }
+
+/*
+ * The implementation for finding classes from the bootstrap
+ * class loader, refer to java.h
+ */
+static FindClassFromBootLoader_t *findBootClass = NULL;
+
+jclass
+FindBootStrapClass(JNIEnv *env, const char* classname)
+{
+   if (findBootClass == NULL) {
+       findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
+          "JVM_FindClassFromClassLoader");
+       if (findBootClass == NULL) {
+           JLI_ReportErrorMessage(DLL_ERROR4,
+               "JVM_FindClassFromClassLoader");
+           return NULL;
+       }
+   }
+   return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
+}
--- a/jdk/src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Wed Jul 05 16:42:37 2017 +0200
@@ -64,6 +64,7 @@
  */
 
 class NTLMAuthentication extends AuthenticationInfo {
+    private static final long serialVersionUID = -2403849171106437142L;
 
     static char NTLM_AUTH = 'N';
 
--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Wed Jul 05 16:42:37 2017 +0200
@@ -491,27 +491,6 @@
         return;
     }
 
-    /*
-     * The socket may have been closed (dup'ed) while we were
-     * poll/select. In that case SO_ERROR will return 0 making
-     * it appear that the connection has been established.
-     * To avoid any race conditions we therefore grab the
-     * fd lock, check if the socket has been closed, and
-     * set the various fields whilst holding the lock
-     */
-    fdLock = (*env)->GetObjectField(env, this, psi_fdLockID);
-    (*env)->MonitorEnter(env, fdLock);
-
-    if ((*env)->GetBooleanField(env, this, psi_closePendingID)) {
-
-        /* release fdLock */
-        (*env)->MonitorExit(env, fdLock);
-
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                            "Socket closed");
-        return;
-    }
-
     (*env)->SetIntField(env, fdObj, IO_fd_fdID, fd);
 
     /* set the remote peer address and port */
@@ -536,11 +515,6 @@
             (*env)->SetIntField(env, this, psi_localportID, localport);
         }
     }
-
-    /*
-     * Finally release fdLock
-     */
-    (*env)->MonitorExit(env, fdLock);
 }
 
 /*
--- a/jdk/src/windows/bin/java_md.c	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/windows/bin/java_md.c	Wed Jul 05 16:42:37 2017 +0200
@@ -993,9 +993,39 @@
     return rslt;
 }
 
-/* Linux only, empty on windows. */
+/* Unix only, empty on windows. */
 void SetJavaLauncherPlatformProps() {}
 
+/*
+ * The implementation for finding classes from the bootstrap
+ * class loader, refer to java.h
+ */
+static FindClassFromBootLoader_t *findBootClass = NULL;
+
+#ifdef _M_AMD64
+#define JVM_BCLOADER "JVM_FindClassFromClassLoader"
+#else
+#define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
+#endif /* _M_AMD64 */
+
+jclass FindBootStrapClass(JNIEnv *env, const char *classname)
+{
+   HMODULE hJvm;
+
+   if (findBootClass == NULL) {
+       hJvm = GetModuleHandle(JVM_DLL);
+       if (hJvm == NULL) return NULL;
+       /* need to use the demangled entry point */
+       findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
+            JVM_BCLOADER);
+       if (findBootClass == NULL) {
+          JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
+          return NULL;
+       }
+   }
+   return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
+}
+
 void
 InitLauncher(boolean javaw)
 {
--- a/jdk/src/windows/lib/tzmappings	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/src/windows/lib/tzmappings	Wed Jul 05 16:42:37 2017 +0200
@@ -65,8 +65,8 @@
 Newfoundland Standard Time:-1,81::America/St_Johns:
 Pacific SA:-1,82::America/Santiago:
 Pacific SA Standard Time:-1,82::America/Santiago:
-SA Western:-1,82::America/Caracas:
-SA Western Standard Time:-1,82::America/Caracas:
+SA Western:-1,82:BO:America/La_Paz:
+SA Western Standard Time:-1,82:BO:America/La_Paz:
 SA Pacific:-1,83::America/Bogota:
 SA Pacific Standard Time:-1,83::America/Bogota:
 US Eastern:-1,84::America/Indianapolis:
@@ -177,3 +177,4 @@
 Middle East Standard Time:909,909:LB:Asia/Beirut:
 Armenian Standard Time:910,910:AM:Asia/Yerevan:
 Montevideo Standard Time:911,911:UY:America/Montevideo:
+Venezuela Standard Time:912,912::America/Caracas:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jdi/SimulResumerTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ *  @test
+ *  @bug 6751643
+ *  @summary  ThreadReference.ownedMonitors() can return null
+ *
+ *  @author jjh
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g SimulResumerTest.java
+ *  @run main SimulResumerTest
+ */
+import com.sun.jdi.*;
+import com.sun.jdi.event.*;
+import com.sun.jdi.request.*;
+
+import java.util.*;
+
+/*
+ * This debuggee basically runs two threads each of
+ * which loop, hitting a bkpt in each iteration.
+ *
+ */
+class SimulResumerTarg extends Thread {
+    static boolean one = false;
+    static String name1 = "Thread 1";
+    static String name2 = "Thread 2";
+    static int count = 10000;
+    public static void main(String[] args) {
+        System.out.println("Howdy!");
+        SimulResumerTarg t1 = new SimulResumerTarg(name1);
+        SimulResumerTarg t2 = new SimulResumerTarg(name2);
+
+        t1.start();
+        t2.start();
+    }
+
+    public SimulResumerTarg(String name) {
+        super(name);
+    }
+
+    public void run() {
+        if (getName().equals(name1)) {
+            run1();
+        } else {
+            run2();
+        }
+    }
+
+    public void bkpt1(int i) {
+        synchronized(name1) {
+            yield();
+        }
+    }
+
+    public void run1() {
+        int i = 0;
+        while (i < count) {
+            i++;
+            bkpt1(i);
+        }
+    }
+
+    public void bkpt2(int i) {
+        synchronized(name2) {
+            yield();
+        }
+    }
+
+    public void run2() {
+        int i = 0;
+        while (i < count) {
+            i++;
+            bkpt2(i);
+        }
+    }
+}
+
+/********** test program **********/
+
+public class SimulResumerTest extends TestScaffold {
+    ReferenceType targetClass;
+    ThreadReference mainThread;
+    BreakpointRequest request1;
+    BreakpointRequest request2;
+    static volatile int bkpts = 0;
+    static int iters = 0;
+    Thread resumerThread;
+    static int waitTime = 100;
+    ThreadReference debuggeeThread1 = null;
+    ThreadReference debuggeeThread2 = null;
+
+    SimulResumerTest (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)      throws Exception {
+        new SimulResumerTest(args).startTests();
+    }
+
+    /* BreakpointEvent handler */
+
+    public void breakpointReached(BreakpointEvent event) {
+        // save ThreadRefs for the two debuggee threads
+        ThreadReference thr = event.thread();
+        if (bkpts == 0) {
+            resumerThread.start();
+            debuggeeThread1 = thr;
+            System.out.println("thr1 = " + debuggeeThread1);
+        }
+
+        if (debuggeeThread2 == null && thr != debuggeeThread1) {
+            debuggeeThread2 = thr;
+            System.out.println("thr2 = " + debuggeeThread2);
+        }
+
+        synchronized("abc") {
+            bkpts++;
+        }
+        /**
+        if (bkpts >= SimulResumerTarg.count * 2) {
+            resumerThread.interrupt();
+        }
+        *****/
+
+    }
+
+    /********** test core **********/
+
+    void check(ThreadReference thr) {
+        // This calls each ThreadReference method that could fail due to the bug
+        // that occurs if a resume is done while a call to the method is in process.
+        String kind = "";
+        if (thr != null) {
+            try {
+                kind = "ownedMonitors()";
+                System.out.println("kind = " + kind);
+                if (thr.ownedMonitors() == null) {
+                    failure("failure: ownedMonitors = null");
+                }
+
+                kind = "ownedMonitorsAndFrames()";
+                System.out.println("kind = " + kind);
+                if (thr.ownedMonitorsAndFrames() == null) {
+                    failure("failure: ownedMonitorsAndFrames = null");
+                }
+
+                kind = "currentContendedMonitor()";
+                System.out.println("kind = " + kind);
+                thr.currentContendedMonitor();
+                // no failure return value here; could cause an NPE
+
+                kind = "frames()";
+                System.out.println("kind = " + kind);
+                List<StackFrame> frames = thr.frames();
+                // no failure return value here; could cause an NPE
+
+                int nframes = frames.size();
+                if (nframes > 0) {
+                    // hmm, how could it ever be 0?
+                    kind = "frames(0, size - 1)";
+                System.out.println("kind = " + kind);
+                    thr.frames(0, frames.size() - 1);
+                }
+
+                kind = "frameCount()";
+                System.out.println("kind = " + kind);
+                if (thr.frameCount() == -1) {
+                    failure("failure: frameCount = -1");
+                }
+
+                kind = "name()";
+                System.out.println("kind = " + kind);
+                if (thr.name() == null) {
+                    failure("failure: name = null");
+                }
+
+                kind = "status()";
+                System.out.println("kind = " + kind);
+                if (thr.status() < 0) {
+                    failure("failure: status < 0");
+                }
+
+            } catch (IncompatibleThreadStateException ee) {
+                // ignore
+            } catch (VMDisconnectedException ee) {
+                // This is how we stop.  The debuggee runs to completion
+                // and we get this exception.
+                throw ee;
+            } catch (Exception ee) {
+                failure("failure: Got exception from " + kind + ": " + ee );
+            }
+        }
+    }
+
+    protected void runTests() throws Exception {
+        /*
+         * Get to the top of main()
+         * to determine targetClass and mainThread
+         */
+        BreakpointEvent bpe = startToMain("SimulResumerTarg");
+        targetClass = bpe.location().declaringType();
+        mainThread = bpe.thread();
+        EventRequestManager erm = vm().eventRequestManager();
+        final Thread mainThread = Thread.currentThread();
+
+        /*
+         * Set event requests
+         */
+        Location loc1 = findMethod(targetClass, "bkpt1", "(I)V").location();
+        Location loc2 = findMethod(targetClass, "bkpt2", "(I)V").location();
+        request1 = erm.createBreakpointRequest(loc1);
+        request2 = erm.createBreakpointRequest(loc2);
+        request1.enable();
+        request2.enable();
+
+        /*
+         * This thread will be started when we get the first bkpt.
+         */
+        resumerThread = new Thread("test resumer") {
+                public void run() {
+                    while (true) {
+                        iters++;
+                        System.out.println("bkpts = " + bkpts + ", iters = " + iters);
+                        try {
+                            Thread.sleep(waitTime);
+                            check(debuggeeThread1);
+                            check(debuggeeThread2);
+                        } catch (InterruptedException ee) {
+                            // If the test completes, this occurs.
+                            println("resumer Interrupted");
+                            break;
+                        } catch (VMDisconnectedException ee) {
+                            println("VMDisconnectedException");
+                            break;
+                        }
+                    }
+                }
+            };
+
+        /*
+         * resume the target, listening for events
+         */
+        listenUntilVMDisconnect();
+        resumerThread.interrupt();
+        /*
+         * deal with results of test
+         * if anything has called failure("foo") testFailed will be true
+         */
+        if (!testFailed) {
+            println("SimulResumerTest: passed; bkpts = " + bkpts + ", iters = " + iters);
+        } else {
+            throw new Exception("SimulResumerTest: failed; bkpts = " + bkpts + ", iters = " + iters);
+        }
+    }
+}
--- a/jdk/test/com/sun/net/httpserver/bugs/B6744329.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/com/sun/net/httpserver/bugs/B6744329.java	Wed Jul 05 16:42:37 2017 +0200
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug B6744329
+ * @bug 6744329
  * @summary  Exception in light weight Http server
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/DeleteServiceTag.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for deleting a service tag in a product registration
+ * @author  Mandy Chung
+ *
+ * @run build DeleteServiceTag Util
+ * @run main DeleteServiceTag
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class DeleteServiceTag {
+    private static RegistrationData registration;
+    private static File regFile;
+    private static Map<String, ServiceTag> stMap =
+        new LinkedHashMap<String, ServiceTag>();
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+
+    public static void main(String[] argv) throws Exception {
+        String registrationDir = System.getProperty("test.classes");
+        String servicetagDir = System.getProperty("test.src");
+
+        File original = new File(servicetagDir, "registration.xml");
+        regFile = new File(registrationDir, "registration.xml");
+        copyRegistrationXML(original, regFile);
+
+        // loads all the service tags
+        for (String f : files) {
+            File stfile = new File(servicetagDir, f);
+            ServiceTag svcTag = Util.newServiceTag(stfile);
+            stMap.put(svcTag.getInstanceURN(), svcTag);
+        }
+
+        // load the registration data with all service tags
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(regFile));
+        registration = RegistrationData.loadFromXML(in);
+
+        if (stMap.size() != files.length) {
+            throw new RuntimeException("Invalid service tag count= " +
+                stMap.size() + " expected=" + files.length);
+        }
+        // check the service tags
+        Util.checkRegistrationData(regFile.getCanonicalPath(), stMap);
+
+        // delete a service tag
+        deleteServiceTag(servicetagDir, files[0]);
+
+        System.out.println("Test passed: service tags deleted.");
+    }
+
+    private static void copyRegistrationXML(File from, File to) throws IOException {
+
+        to.delete();
+        BufferedReader reader = new BufferedReader(new FileReader(from));
+        PrintWriter writer = new PrintWriter(to);
+        try {
+            String line = null;
+            while ((line = reader.readLine()) != null) {
+                writer.println(line);
+            }
+            writer.flush();
+        } finally {
+            writer.close();
+        }
+    }
+
+    private static void deleteServiceTag(String parent, String filename) throws Exception {
+        File f = new File(parent, filename);
+        ServiceTag svcTag = Util.newServiceTag(f);
+
+        ServiceTag st = registration.removeServiceTag(svcTag.getInstanceURN());
+        if (st == null) {
+            throw new RuntimeException("RegistrationData.remove method" +
+                " returns null");
+        }
+        if (!Util.matches(st, svcTag)) {
+            throw new RuntimeException("ServiceTag added in the registration " +
+                " doesn't match.");
+        }
+        // check the service tags before storing the updated data
+        Util.checkRegistrationData(regFile.getCanonicalPath(), stMap);
+
+        ServiceTag st1 = registration.getServiceTag(svcTag.getInstanceURN());
+        if (st1 != null) {
+            throw new RuntimeException("RegistrationData.get method returns " +
+                "non-null.");
+        }
+        // Now remove the service tag from the map and store to the XML file
+        stMap.remove(svcTag.getInstanceURN());
+        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(regFile));
+        try {
+            registration.storeToXML(out);
+        } finally {
+            out.close();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/DuplicateNotFound.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for RegistrationData.removeServiceTag and
+ *          updateServiceTag.
+ * @author  Mandy Chung
+ *
+ * @run build DuplicateNotFound Util
+ * @run main DuplicateNotFound
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class DuplicateNotFound {
+    private static String servicetagDir = System.getProperty("test.src");
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+
+    private static RegistrationData registration = new RegistrationData();
+
+    public static void main(String[] argv) throws Exception {
+        ServiceTag svcTag;
+        registration.addServiceTag(loadServiceTag(files[0]));
+        registration.addServiceTag(loadServiceTag(files[1]));
+        testDuplicate(files[0]);
+        testDuplicate(files[1]);
+        testNotFound(files[2]);
+    }
+
+    private static void testDuplicate(String filename) throws Exception {
+        boolean dup = false;
+        try {
+           registration.addServiceTag(loadServiceTag(filename));
+        } catch (IllegalArgumentException e) {
+           dup = true;
+        }
+        if (!dup) {
+           throw new RuntimeException(filename +
+               " added successfully but expected to be a duplicated.");
+        }
+    }
+    private static void testNotFound(String filename) throws Exception {
+        ServiceTag st = loadServiceTag(filename);
+        ServiceTag svctag = registration.getServiceTag(st.getInstanceURN());
+        if (svctag != null) {
+           throw new RuntimeException(st.getInstanceURN() +
+               " exists but expected not found");
+        }
+
+        svctag = registration.removeServiceTag(st.getInstanceURN());
+        if (svctag != null) {
+           throw new RuntimeException(st.getInstanceURN() +
+               " exists but expected not found");
+        }
+
+        svctag = registration.updateServiceTag(st.getInstanceURN(), "testing");
+        if (svctag != null) {
+           throw new RuntimeException(st.getInstanceURN() +
+               " updated successfully but expected not found.");
+        }
+    }
+
+    private static ServiceTag loadServiceTag(String filename) throws Exception {
+        File f = new File(servicetagDir, filename);
+        return Util.newServiceTag(f);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/FindServiceTags.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for Registry.findServiceTags()
+ * @author  Mandy Chung
+ *
+ * @run build FindServiceTags SvcTagClient Util
+ * @run main FindServiceTags
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+// This test creates a few service tags in the Registry.
+// Check if the findServiceTags method returns the expected ones.
+public class FindServiceTags {
+    private static String registryDir = System.getProperty("test.classes");
+    private static String servicetagDir = System.getProperty("test.src");
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties",
+                                        "servicetag4.properties",
+                                        "servicetag5.properties"
+                                    };
+
+    private static Registry registry;
+    private static Set<ServiceTag> set = new HashSet<ServiceTag>();
+    private static Set<String> productUrns = new HashSet<String>();
+    private static int expectedUrnCount = 3;
+
+    public static void main(String[] argv) throws Exception {
+        registry = Util.getSvcTagClientRegistry();
+
+        for (String filename : files) {
+            File f = new File(servicetagDir, filename);
+            ServiceTag svcTag = Util.newServiceTag(f);
+            ServiceTag st = registry.addServiceTag(svcTag);
+
+            set.add(st);
+            productUrns.add(st.getProductURN());
+        }
+        if (productUrns.size() != expectedUrnCount) {
+            throw new RuntimeException("Unexpected number of product URNs = " +
+                productUrns.size() + " expected " + expectedUrnCount);
+        }
+        if (set.size() != files.length) {
+            throw new RuntimeException("Unexpected number of service tags = " +
+                set.size() + " expected " + files.length);
+        }
+        String purn = null;
+        for (String urn : productUrns) {
+            if (purn == null) {
+                // save the first product_urn for later use
+                purn = urn;
+            }
+            findServiceTags(urn);
+        }
+
+        // remove all service tags of purn
+        Set<ServiceTag> tags = registry.findServiceTags(purn);
+        for (ServiceTag st : tags) {
+            System.out.println("Removing service tag " + st.getInstanceURN());
+            registry.removeServiceTag(st.getInstanceURN());
+        }
+        tags = registry.findServiceTags(purn);
+        if (tags.size() != 0) {
+            throw new RuntimeException("Unexpected service tag count = " +
+                tags.size());
+        }
+
+        System.out.println("Test passed.");
+    }
+
+    private static void findServiceTags(String productUrn) throws Exception {
+        Set<ServiceTag> found = registry.findServiceTags(productUrn);
+        Set<ServiceTag> matched = new HashSet<ServiceTag>();
+        System.out.println("Finding service tags of product_urn=" +
+            productUrn);
+        for (ServiceTag st : set) {
+            if (st.getProductURN().equals(productUrn)) {
+                System.out.println(st.getInstanceURN());
+                matched.add(st);
+            }
+        }
+        if (found.size() != matched.size()) {
+            throw new RuntimeException("Unmatched service tag count = " +
+                found.size() + " expected " + matched.size());
+        }
+
+        for (ServiceTag st0 : found) {
+            ServiceTag st = null;
+            for (ServiceTag st1 : matched) {
+                if (Util.matches(st0, st1)) {
+                    st = st1;
+                    break;
+                }
+            }
+            if (st == null) {
+                System.out.println("product_urn=" + st0.getProductURN());
+                System.out.println("instance_urn=" + st0.getInstanceURN() );
+                throw new RuntimeException(st0.getInstanceURN() +
+                    " not expected in the returned list");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/InstanceUrnCheck.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for checking instance_urn
+ * @author  Mandy Chung
+ *
+ * @run build InstanceUrnCheck Util
+ * @run main InstanceUrnCheck
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class InstanceUrnCheck {
+    private static String servicetagDir = System.getProperty("test.src");
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+    private static RegistrationData registration = new RegistrationData();
+
+    public static void main(String[] argv) throws Exception {
+        for (String f : files) {
+            addServiceTag(f);
+        }
+    }
+
+   private static void addServiceTag(String filename) throws Exception {
+        File f = new File(servicetagDir, filename);
+        ServiceTag svcTag = Util.newServiceTag(f, true /* no instance_urn */);
+        ServiceTag st = registration.addServiceTag(svcTag);
+        if (!Util.matchesNoInstanceUrn(svcTag, st)) {
+            throw new RuntimeException("ServiceTag " +
+                " doesn't match.");
+        }
+        System.out.println("New service tag instance_urn=" + st.getInstanceURN());
+        if (!st.getInstanceURN().startsWith("urn:st:")) {
+            throw new RuntimeException("Invalid generated instance_urn " +
+                st.getInstanceURN());
+        }
+        if (st.getInstallerUID() != -1) {
+            throw new RuntimeException("Invalid installer_uid " +
+                st.getInstallerUID());
+        }
+        if (st.getTimestamp() == null) {
+            throw new RuntimeException("null timestamp ");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/InvalidRegistrationData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for invalid product registry
+ * @author  Mandy Chung
+ *
+ * @run build InvalidRegistrationData
+ * @run main InvalidRegistrationData
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class InvalidRegistrationData {
+    public static void main(String[] argv) throws Exception {
+        String servicetagDir = System.getProperty("test.src");
+
+        checkRegistrationData(servicetagDir, "missing-environ-field.xml");
+        checkRegistrationData(servicetagDir, "newer-registry-version.xml");
+    }
+
+    private static void checkRegistrationData(String parent, String filename)
+           throws Exception {
+        boolean thrown = false;
+        File f = new File(parent, filename);
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
+        try {
+            RegistrationData regData = RegistrationData.loadFromXML(in);
+        } catch (IllegalArgumentException e) {
+            System.out.println(e.getMessage() + " thrown expected");
+            thrown = true;
+        }
+
+        if (!thrown) {
+            throw new RuntimeException("ERROR: No IllegalArgumentException thrown");
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/InvalidServiceTag.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for ServiceTag.newServiceTag() to test invalid fields.
+ * @author  Mandy Chung
+ *
+ * @run build InvalidServiceTag
+ * @run main InvalidServiceTag
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class InvalidServiceTag {
+    private final static int MAX_CONTAINER_LEN = 64 - 1;
+    public static void main(String[] argv) throws Exception {
+        // all fields valid
+        ServiceTag st1 = ServiceTag.newInstance("product name",
+                                                "product version",
+                                                "product urn",
+                                                "product parent",
+                                                "product parent urn",
+                                                "product defined instance ID",
+                                                "product vendor",
+                                                "platform arch",
+                                                "container",
+                                                "source");
+        // empty optional field
+        ServiceTag st2 = ServiceTag.newInstance("product name",
+                                                "product version",
+                                                "product urn",
+                                                "product parent",
+                                                "",
+                                                "",
+                                                "product vendor",
+                                                "platform arch",
+                                                "container",
+                                                "source");
+        // Invalid - empty required field
+        setInvalidContainer("");
+        // Invalid - required field exceeds max length.
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i <= MAX_CONTAINER_LEN; i++) {
+            sb.append('x');
+        }
+        setInvalidContainer(sb.toString());
+        System.out.println("Test passed.");
+    }
+    private static void setInvalidContainer(String container) {
+        boolean exceptionThrown = false;
+        try {
+            ServiceTag st2 = ServiceTag.newInstance("product name",
+                                                    "product version",
+                                                    "product urn",
+                                                    "product parent",
+                                                    "product parent urn",
+                                                    "product defined instance ID",
+                                                    "product vendor",
+                                                    "platform arch",
+                                                    container,
+                                                    "source");
+        } catch (IllegalArgumentException iae) {
+            iae.printStackTrace();
+            exceptionThrown = true;
+        }
+        if (!exceptionThrown) {
+            throw new RuntimeException("IllegalArgumentException not thrown");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/JavaServiceTagTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for ServiceTag.getJavaServiceTag()
+ *          Disable creating the service tag in the system registry.
+ *          Verify the existence of registration.xml file and the
+ *          content of the service tag.
+ * @author  Mandy Chung
+ *
+ * @run build JavaServiceTagTest
+ * @run main JavaServiceTagTest
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class JavaServiceTagTest {
+    public static void main(String[] argv) throws Exception {
+        String registrationDir = System.getProperty("test.classes");
+
+        // disable calling to stclient
+        System.setProperty("servicetag.sthelper.supported", "false");
+
+        if (Registry.isSupported()) {
+            throw new RuntimeException("Registry.isSupported() should " +
+                "return false");
+        }
+        // For debugging
+        // System.setProperty("servicetag.verbose", "");
+
+        // cleanup the registration.xml and servicetag file in the test directory
+        System.setProperty("servicetag.dir.path", registrationDir);
+        File regFile = new File(registrationDir, "registration.xml");
+        regFile.delete();
+        File svcTagFile = new File(registrationDir, "servicetag");
+        svcTagFile.delete();
+
+        ServiceTag svctag = ServiceTag.getJavaServiceTag("JavaServiceTagTest");
+        checkServiceTag(svctag);
+
+        if (svcTagFile.exists()) {
+            throw new RuntimeException(svcTagFile + " should not exist.");
+        }
+
+        // registration.xml should be created
+        if (!regFile.exists()) {
+            throw new RuntimeException(regFile + " not created.");
+        }
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(regFile));
+        RegistrationData registration = RegistrationData.loadFromXML(in);
+        Set<ServiceTag> c = registration.getServiceTags();
+        if (c.size() != 1) {
+            throw new RuntimeException(regFile + " has " + c.size() +
+                " service tags. Expected 1.");
+        }
+        ServiceTag st = registration.getServiceTag(svctag.getInstanceURN());
+        if (!Util.matches(st, svctag)) {
+            throw new RuntimeException("ServiceTag " +
+                " doesn't match.");
+        }
+    }
+
+    private static void checkServiceTag(ServiceTag st) throws IOException {
+        Properties props = loadSwordfishEntries();
+        if (st.getProductURN().
+                equals(props.getProperty("servicetag.jdk.urn"))) {
+            if (!st.getProductName().
+                    equals(props.getProperty("servicetag.jdk.name"))) {
+                throw new RuntimeException("Product URN and name don't match.");
+            }
+        } else if (st.getProductURN().
+                equals(props.getProperty("servicetag.jre.urn"))) {
+            if (!st.getProductName().
+                    equals(props.getProperty("servicetag.jre.name"))) {
+                throw new RuntimeException("Product URN and name don't match.");
+            }
+        } else {
+            throw new RuntimeException("Unexpected product_urn: " +
+                st.getProductURN());
+        }
+        if (!st.getProductVersion().
+                equals(System.getProperty("java.version"))) {
+            throw new RuntimeException("Unexpected product_version: " +
+                st.getProductVersion());
+        }
+        if (!st.getProductParent().
+                equals(props.getProperty("servicetag.parent.name"))) {
+            throw new RuntimeException("Unexpected product_parent: " +
+                st.getProductParent());
+        }
+        if (!st.getProductParentURN().
+                equals(props.getProperty("servicetag.parent.urn"))) {
+            throw new RuntimeException("Unexpected product_parent_urn: " +
+                st.getProductParentURN());
+        }
+        if (!st.getPlatformArch().
+                equals(System.getProperty("os.arch"))) {
+            throw new RuntimeException("Unexpected platform_arch: " +
+                st.getPlatformArch());
+        }
+        if (!st.getProductVendor().
+                equals("Sun Microsystems")) {
+            throw new RuntimeException("Unexpected product_vendor: " +
+                st.getProductVendor());
+        }
+        if (!st.getSource().
+                equals("JavaServiceTagTest")) {
+            throw new RuntimeException("Unexpected source: " +
+                st.getSource());
+        }
+        String[] ss = st.getProductDefinedInstanceID().split(",");
+        boolean id = false;
+        boolean dir = false;
+        for (String s : ss) {
+            String[] values = s.split("=");
+            if (values[0].equals("id")) {
+                id = true;
+                String[] sss = values[1].split(" ");
+                if (!sss[0].equals(System.getProperty("java.runtime.version"))) {
+                    throw new RuntimeException("Unexpected version in id: " +
+                        sss[0]);
+                }
+                if (sss.length < 2) {
+                    throw new RuntimeException("Unexpected id=" + values[1]);
+                }
+            } else if (values[0].equals("dir")) {
+                dir = true;
+            }
+        }
+        if (!id || !dir) {
+            throw new RuntimeException("Unexpected product_defined_instance_id: " +
+                st.getProductDefinedInstanceID());
+        }
+    }
+
+    private static Properties loadSwordfishEntries()
+           throws IOException {
+        int version = sun.misc.Version.jdkMinorVersion();
+        String filename = "/com/sun/servicetag/resources/javase_" +
+                version + "_swordfish.properties";
+        InputStream in = Installer.class.getClass().getResourceAsStream(filename);
+        Properties props = new Properties();
+        try {
+            props.load(in);
+        } finally {
+            in.close();
+        }
+        return props;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/JavaServiceTagTest1.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,240 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for ServiceTag.getJavaServiceTag(String)
+ *          to verify that the registration.xml and servicetag files
+ *          are both created correctly.
+ * @author  Mandy Chung
+ *
+ * @run build JavaServiceTagTest1
+ * @run main JavaServiceTagTest1
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class JavaServiceTagTest1 {
+    private static String registrationDir = System.getProperty("test.classes");
+    private static String servicetagDir = System.getProperty("test.src");
+    private static File regFile;
+    private static File svcTagFile;
+    private static Registry registry;
+    public static void main(String[] argv) throws Exception {
+        // cleanup the registration.xml and servicetag file in the test directory
+        System.setProperty("servicetag.dir.path", registrationDir);
+        regFile = new File(registrationDir, "registration.xml");
+        regFile.delete();
+
+        svcTagFile = new File(registrationDir, "servicetag");
+        svcTagFile.delete();
+
+        registry = Util.getSvcTagClientRegistry();
+
+        // verify that only one service tag is created
+        ServiceTag st1 = testJavaServiceTag("Test1");
+
+        // getJavaServiceTag method should create a new service tag
+        // and delete the old one
+        ServiceTag st2 = testJavaServiceTag("Test2");
+        if (registry.getServiceTag(st1.getInstanceURN()) != null) {
+            throw new RuntimeException("instance_urn: " + st1.getInstanceURN() +
+                " exists but expected to be removed");
+        }
+
+        // expected to have different instance_urn
+        if (st1.getInstanceURN().equals(st2.getInstanceURN())) {
+            throw new RuntimeException("instance_urn: " + st1.getInstanceURN() +
+                " == " + st2.getInstanceURN());
+        }
+
+        // Delete the service tag from the Registry and the servicetag file
+        if (registry.removeServiceTag(st2.getInstanceURN()) == null) {
+            throw new RuntimeException("Failed to remove " +
+                st1.getInstanceURN() + " from the registry");
+        }
+        svcTagFile.delete();
+
+        // call the getJavaServiceTag(String) method again
+        // should create the servicetag file.
+        ServiceTag st3 = testJavaServiceTag("Test2");
+        if (!Util.matches(st2, st3)) {
+            System.out.println(st2);
+            System.out.println(st3);
+            throw new RuntimeException("Test Failed: Expected to be the same");
+        }
+
+    }
+
+    private static ServiceTag testJavaServiceTag(String source) throws Exception {
+        ServiceTag svctag = ServiceTag.getJavaServiceTag(source);
+        checkServiceTag(svctag, source);
+
+        // verify if registration.xml is created
+        if (!regFile.exists()) {
+            throw new RuntimeException(regFile + " not created.");
+        }
+
+        // verify the registration.xml content is the expected service tag
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(regFile));
+        RegistrationData registration = RegistrationData.loadFromXML(in);
+        Set<ServiceTag> c = registration.getServiceTags();
+        if (c.size() != 1) {
+            throw new RuntimeException(regFile + " has " + c.size() +
+                " service tags. Expected 1.");
+        }
+        ServiceTag st = registration.getServiceTag(svctag.getInstanceURN());
+        if (!Util.matches(st, svctag)) {
+            throw new RuntimeException("RegistrationData ServiceTag " +
+                " doesn't match.");
+        }
+
+        // verify the service tag added in the registry
+        st = registry.getServiceTag(svctag.getInstanceURN());
+        if (!Util.matches(st, svctag)) {
+            throw new RuntimeException("Registry ServiceTag " +
+                " doesn't match.");
+        }
+
+        // verify if servicetag file is created
+        if (!svcTagFile.exists()) {
+            throw new RuntimeException(svcTagFile + " not created.");
+        }
+
+        // verify that the servicetag file only contains one instance_urn
+        BufferedReader reader = new BufferedReader(new FileReader(svcTagFile));
+        int count = 0;
+        try {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                if (line.equals(svctag.getInstanceURN())) {
+                    count++;
+                } else {
+                    throw new RuntimeException("servicetag contains " +
+                        " unexpected instance_urn " + line);
+                }
+            }
+        } finally {
+            reader.close();
+        }
+        if (count != 1) {
+            throw new RuntimeException("servicetag contains unexpected " +
+                "number of instance_urn = " + count);
+        }
+        return svctag;
+    }
+
+    private static void checkServiceTag(ServiceTag st, String source)
+            throws IOException {
+        Properties props = loadSwordfishEntries();
+        if (st.getProductURN().
+                equals(props.getProperty("servicetag.jdk.urn"))) {
+            if (!st.getProductName().
+                    equals(props.getProperty("servicetag.jdk.name"))) {
+                throw new RuntimeException("Product URN and name don't match.");
+            }
+        } else if (st.getProductURN().
+                equals(props.getProperty("servicetag.jre.urn"))) {
+            if (!st.getProductName().
+                    equals(props.getProperty("servicetag.jre.name"))) {
+                throw new RuntimeException("Product URN and name don't match.");
+            }
+        } else {
+            throw new RuntimeException("Unexpected product_urn: " +
+                st.getProductURN());
+        }
+        if (!st.getProductVersion().
+                equals(System.getProperty("java.version"))) {
+            throw new RuntimeException("Unexpected product_version: " +
+                st.getProductVersion());
+        }
+        if (!st.getProductParent().
+                equals(props.getProperty("servicetag.parent.name"))) {
+            throw new RuntimeException("Unexpected product_parent: " +
+                st.getProductParent());
+        }
+        if (!st.getProductParentURN().
+                equals(props.getProperty("servicetag.parent.urn"))) {
+            throw new RuntimeException("Unexpected product_parent_urn: " +
+                st.getProductParentURN());
+        }
+        if (!st.getPlatformArch().
+                equals(System.getProperty("os.arch"))) {
+            throw new RuntimeException("Unexpected platform_arch: " +
+                st.getPlatformArch());
+        }
+        if (!st.getProductVendor().
+                equals("Sun Microsystems")) {
+            throw new RuntimeException("Unexpected product_vendor: " +
+                st.getProductVendor());
+        }
+        if (!st.getSource().
+                equals(source)) {
+            throw new RuntimeException("Unexpected source: " +
+                st.getSource() + " expected: " + source);
+        }
+        String[] ss = st.getProductDefinedInstanceID().split(",");
+        boolean id = false;
+        boolean dir = false;
+        for (String s : ss) {
+            String[] values = s.split("=");
+            if (values[0].equals("id")) {
+                id = true;
+                String[] sss = values[1].split(" ");
+                if (!sss[0].equals(System.getProperty("java.runtime.version"))) {
+                    throw new RuntimeException("Unexpected version in id: " +
+                        sss[0]);
+                }
+                if (sss.length < 2) {
+                    throw new RuntimeException("Unexpected id=" + values[1]);
+                }
+            } else if (values[0].equals("dir")) {
+                dir = true;
+            }
+        }
+        if (!id || !dir) {
+            throw new RuntimeException("Unexpected product_defined_instance_id: " +
+                st.getProductDefinedInstanceID());
+        }
+    }
+
+    private static Properties loadSwordfishEntries()
+           throws IOException {
+        int version = sun.misc.Version.jdkMinorVersion();
+        String filename = "/com/sun/servicetag/resources/javase_" +
+                version + "_swordfish.properties";
+        InputStream in = Installer.class.getClass().getResourceAsStream(filename);
+        Properties props = new Properties();
+        try {
+            props.load(in);
+        } finally {
+            in.close();
+        }
+        return props;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/NewRegistrationData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for Registration Data
+ * @author  Mandy Chung
+ *
+ * @run build NewRegistrationData Util
+ * @run main NewRegistrationData
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class NewRegistrationData {
+    private static RegistrationData regData;
+    private static Map<String, ServiceTag> stMap = new LinkedHashMap<String, ServiceTag>();
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+
+    public static void main(String[] argv) throws Exception {
+        String regDataDir = System.getProperty("test.classes");
+        String servicetagDir = System.getProperty("test.src");
+
+        File reg = new File(regDataDir, "registration.xml");
+        // Make sure a brand new file is created
+        reg.delete();
+
+        regData = new RegistrationData();
+        if (regData.getRegistrationURN().isEmpty()) {
+            throw new RuntimeException("Empty registration urn");
+        }
+
+        int count = 0;
+        for (String f : files) {
+            addServiceTag(servicetagDir, f, ++count);
+        }
+
+        // check if the registration data contains all service tags
+        Set<ServiceTag> c = regData.getServiceTags();
+        for (ServiceTag st : c) {
+            if (!Util.matches(st, regData.getServiceTag(st.getInstanceURN()))) {
+                throw new RuntimeException("ServiceTag added in the regData " +
+                    " doesn't match.");
+            }
+        }
+
+        // store the service tag to a file
+        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(reg));
+        try {
+            regData.storeToXML(out);
+        } finally {
+            out.close();
+        }
+
+        Util.checkRegistrationData(reg.getCanonicalPath(), stMap);
+        System.out.println("Test passed: " + count + " service tags added");
+    }
+
+    private static void addServiceTag(String parent, String filename, int count) throws Exception {
+        File f = new File(parent, filename);
+        ServiceTag svcTag = Util.newServiceTag(f);
+        regData.addServiceTag(svcTag);
+        stMap.put(svcTag.getInstanceURN(), svcTag);
+
+        Set<ServiceTag> c = regData.getServiceTags();
+        if (c.size() != count) {
+            throw new RuntimeException("Invalid service tag count= " +
+                c.size() + " expected=" + count);
+        }
+        ServiceTag st = regData.getServiceTag(svcTag.getInstanceURN());
+        if (!Util.matches(st, svcTag)) {
+            throw new RuntimeException("ServiceTag added in the regData " +
+                " doesn't match.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/SvcTagClient.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @bug     6622366
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+/**
+ * A utility class simulating stclient for testing purpose.
+ */
+public class SvcTagClient {
+    private static File xmlFile;
+    private static RegistrationData registration;
+    private static String instanceURN;
+    private static String productName;
+    private static String productVersion;
+    private static String productURN;
+    private static String productParent;
+    private static String productParentURN = ""; // optional
+    private static String productDefinedInstanceID = ""; //optional
+    private static String productVendor;
+    private static String platformArch;
+    private static String container;
+    private static String source;
+
+    // stclient exit value
+    private static final int ST_ERR_REC_NOT_FOUND = 225;
+
+    public static void main(String[] args) throws Exception {
+        String path = System.getProperty("stclient.registry.path");
+        if (path == null) {
+            System.err.println("stclient registry path missing");
+            System.exit(-1);
+        }
+        xmlFile = new File(path);
+        if (xmlFile.exists()) {
+            BufferedInputStream in = new BufferedInputStream(new FileInputStream(xmlFile));
+            registration = RegistrationData.loadFromXML(in);
+        } else {
+            registration = new RegistrationData();
+        }
+        boolean add = false;
+        boolean delete = false;
+        boolean update = false;
+        boolean get = false;
+        boolean find = false;
+
+        int count = 0;
+        while (count < args.length) {
+            String arg = args[count];
+            if (!arg.startsWith("-")) {
+                System.err.println("Invalid option:" + arg);
+                System.exit(-1);
+            }
+            if (arg.equals("-a")) {
+                add = true;
+            } else if (arg.equals("-d")) {
+                delete = true;
+            } else if (arg.equals("-u")) {
+                update = true;
+            } else if (arg.equals("-g")) {
+                get = true;
+            } else if (arg.equals("-f")) {
+                find = true;
+                productURN = "";
+            } else if (arg.equals("-t")) {
+                productURN = args[++count];
+            } else if (arg.equals("-i")) {
+                instanceURN = args[++count];
+            } else if (arg.equals("-p")) {
+                productName = args[++count];
+            } else if (arg.equals("-e")) {
+                productVersion = args[++count];
+            } else if (arg.equals("-t")) {
+                productURN = args[++count];
+            } else if (arg.equals("-F")) {
+                productParentURN = args[++count];
+            } else if (arg.equals("-P")) {
+                productParent = args[++count];
+            } else if (arg.equals("-I")) {
+                productDefinedInstanceID = args[++count];
+            } else if (arg.equals("-m")) {
+                productVendor = args[++count];
+            } else if (arg.equals("-A")) {
+                platformArch = args[++count];
+            } else if (arg.equals("-z")) {
+                container = args[++count];
+            } else if (arg.equals("-S")) {
+                source = args[++count];
+            } else {
+                System.err.println("Invalid option:" + arg);
+                System.exit(-1);
+            }
+            count++;
+        }
+
+        if (add) {
+            addServiceTag();
+        } else if (delete) {
+            deleteServiceTag();
+        } else if (update) {
+            updateServiceTag();
+        } else if (get) {
+            getServiceTag();
+        } else if (find) {
+            findServiceTags();
+        } else {
+            System.err.println("Error");
+            System.exit(-1);
+        }
+        updateXmlFile();
+    }
+    private static String OUTPUT = "Product instance URN=";
+
+    private static void addServiceTag() {
+        if (instanceURN == null) {
+            instanceURN = ServiceTag.generateInstanceURN();
+        }
+        ServiceTag st = ServiceTag.newInstance(instanceURN,
+                                               productName,
+                                               productVersion,
+                                               productURN,
+                                               productParent,
+                                               productParentURN,
+                                               productDefinedInstanceID,
+                                               productVendor,
+                                               platformArch,
+                                               container,
+                                               source);
+        registration.addServiceTag(st);
+        System.out.println(OUTPUT + st.getInstanceURN());
+    }
+
+    private static void deleteServiceTag() {
+        registration.removeServiceTag(instanceURN);
+        System.out.println("instance_urn=" + instanceURN + " deleted");
+    }
+
+    private static void updateServiceTag() {
+        registration.updateServiceTag(instanceURN, productDefinedInstanceID);
+        System.out.println("instance_urn=" + instanceURN + " updated");
+    }
+
+    private static void getServiceTag() {
+        ServiceTag st = registration.getServiceTag(instanceURN);
+        if (st == null) {
+            System.err.println("instance_urn=" + instanceURN + " not found");
+            System.exit(ST_ERR_REC_NOT_FOUND);
+        } else {
+            System.out.println(st);
+        }
+    }
+
+    private static void findServiceTags() {
+        Set<ServiceTag> set = registration.getServiceTags();
+        for (ServiceTag st : set) {
+            if (st.getProductURN().equals(productURN)) {
+                System.out.println(st.getInstanceURN());
+            }
+        }
+        if (set.size() == 0) {
+            System.out.println("No records found");
+            System.exit(ST_ERR_REC_NOT_FOUND);
+        }
+    }
+    private static void updateXmlFile() throws IOException {
+        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(xmlFile));
+        try {
+            registration.storeToXML(out);
+        } finally {
+            out.close();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/SystemRegistryTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for registry class
+ *          by replacing stclient with SvcTagClient utility
+ * @author  Mandy Chung
+ *
+ * @run build SvcTagClient SystemRegistryTest Util
+ * @run main SystemRegistryTest
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class SystemRegistryTest {
+    private static String registryDir = System.getProperty("test.classes");
+    private static String servicetagDir = System.getProperty("test.src");
+    private static List<ServiceTag> list = new ArrayList<ServiceTag>();
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+
+    private static Registry registry;
+    public static void main(String[] argv) throws Exception {
+        registry = Util.getSvcTagClientRegistry();
+
+        for (String filename : files) {
+            File f = new File(servicetagDir, filename);
+            ServiceTag svcTag = Util.newServiceTag(f);
+            ServiceTag st = registry.addServiceTag(svcTag);
+            list.add(st);
+            System.out.println(st);
+        }
+
+        testDuplicate(list.get(0));
+        testNotFound();
+
+        // remove a service tag
+        String urn = list.get(0).getInstanceURN();
+        ServiceTag svcTag = registry.removeServiceTag(urn);
+        if (!Util.matches(svcTag, list.get(0))) {
+           throw new RuntimeException(urn +
+               " deleted but does not match.");
+        }
+
+        // get a service tag
+        svcTag = list.get(1);
+        urn = svcTag.getInstanceURN();
+        ServiceTag st = registry.getServiceTag(urn);
+        if (!Util.matches(svcTag, st)) {
+           throw new RuntimeException(urn +
+               " returned from getServiceTag but does not match.");
+        }
+        // update the service tag
+        registry.updateServiceTag(urn, "My new defined ID");
+        st = registry.getServiceTag(urn);
+        if (Util.matches(svcTag, st)) {
+           throw new RuntimeException(urn +
+               " updated but expected to be different.");
+        }
+
+        if (!st.getProductDefinedInstanceID().equals("My new defined ID")) {
+            throw new RuntimeException("Invalid product_defined_instance_id " +
+                st.getProductDefinedInstanceID());
+        }
+        if (st.getInstallerUID() != -1) {
+            throw new RuntimeException("Invalid installer_uid " +
+                st.getInstallerUID());
+        }
+        if (st.getTimestamp().equals(svcTag.getTimestamp())) {
+            throw new RuntimeException("Timestamp " +
+                st.getTimestamp() + " == " + svcTag.getTimestamp());
+        }
+
+    }
+    private static void testDuplicate(ServiceTag st) throws IOException {
+        boolean dup = false;
+        try {
+           registry.addServiceTag(st);
+        } catch (IllegalArgumentException e) {
+           dup = true;
+        }
+        if (!dup) {
+           throw new RuntimeException(st.getInstanceURN() +
+               " added successfully but expected to be a duplicated.");
+        }
+    }
+
+    private static void testNotFound() throws Exception {
+        String instanceURN = "urn:st:721cf98a-f4d7-6231-bb1d-f2f5aa903ef7";
+        ServiceTag svctag = registry.removeServiceTag(instanceURN);
+        if (svctag != null) {
+           throw new RuntimeException(instanceURN +
+               " exists but expected not found");
+        }
+
+        svctag = registry.updateServiceTag(instanceURN, "testing");
+        if (svctag != null) {
+           throw new RuntimeException(instanceURN +
+               " exists but expected not found");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/TestLoadFromXML.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for RegistrationData.loadFromXML
+ * @author  Mandy Chung
+ *
+ * @run build TestLoadFromXML
+ * @run main TestLoadFromXML
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class TestLoadFromXML {
+    public static void main(String[] argv) throws Exception {
+        String registrationDir = System.getProperty("test.classes");
+        String servicetagDir = System.getProperty("test.src");
+
+        File inFile = new File(servicetagDir, "registration.xml");
+        File outFile = new File(registrationDir, "out.xml");
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(inFile));
+        RegistrationData regData = RegistrationData.loadFromXML(in);
+        boolean closed = false;
+        try {
+           in.read();
+        } catch (IOException e) {
+           // expect the InputStream is closed
+           closed = true;
+           System.out.println("*** Expected IOException ***");
+           e.printStackTrace();
+        }
+        if (!closed) {
+           throw new RuntimeException("InputStream not closed after " +
+               "RegistrationData.loadFromXML() call");
+        }
+
+        BufferedOutputStream out =
+            new BufferedOutputStream(new FileOutputStream(outFile));
+        regData.storeToXML(out);
+        // should be able to write to the OutputStream
+        out.write(0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/UpdateServiceTagTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for RegistrationData.updateServiceTag
+ * @author  Mandy Chung
+ *
+ * @run build UpdateServiceTagTest Util
+ * @run main UpdateServiceTagTest
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class UpdateServiceTagTest {
+    private static String servicetagDir = System.getProperty("test.src");
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+    private static RegistrationData registration = new RegistrationData();
+    private static Set<ServiceTag> set = new HashSet<ServiceTag>();
+
+    public static void main(String[] argv) throws Exception {
+        for (String f : files) {
+            ServiceTag st = addServiceTag(f);
+            set.add(st);
+        }
+        Thread.sleep(1000);
+        for (ServiceTag st : set) {
+            updateServiceTag(st);
+        }
+    }
+
+    private static ServiceTag addServiceTag(String filename) throws Exception {
+        File f = new File(servicetagDir, filename);
+        ServiceTag svcTag = Util.newServiceTag(f, true /* no instance_urn */);
+        ServiceTag st = registration.addServiceTag(svcTag);
+        if (!Util.matchesNoInstanceUrn(svcTag, st)) {
+            throw new RuntimeException("ServiceTag " +
+                " doesn't match.");
+        }
+        String urn = st.getInstanceURN();
+        if (!urn.startsWith("urn:st:")) {
+            throw new RuntimeException("Invalid generated instance_urn " +
+                urn);
+        }
+        if (st.getInstallerUID() != -1) {
+            throw new RuntimeException("Invalid installer_uid " +
+                st.getInstallerUID());
+        }
+        if (st.getTimestamp() == null) {
+            throw new RuntimeException("null timestamp ");
+        }
+        return st;
+    }
+
+    private static String newID = "New product defined instance ID";
+    private static void updateServiceTag(ServiceTag svcTag) throws Exception {
+        // update the service tag
+        String urn = svcTag.getInstanceURN();
+        registration.updateServiceTag(urn, newID);
+
+        // get the updated service tag
+        ServiceTag st = registration.getServiceTag(urn);
+        if (Util.matches(svcTag, st)) {
+            throw new RuntimeException("ServiceTag " +
+                " should not match.");
+        }
+        if (!st.getProductDefinedInstanceID().equals(newID)) {
+            throw new RuntimeException("Invalid product_defined_instance_id " +
+                st.getProductDefinedInstanceID());
+        }
+        if (st.getInstallerUID() != -1) {
+            throw new RuntimeException("Invalid installer_uid " +
+                st.getInstallerUID());
+        }
+        if (st.getTimestamp().equals(svcTag.getTimestamp())) {
+            throw new RuntimeException("Timestamp " +
+                st.getTimestamp() + " == " + svcTag.getTimestamp());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/Util.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,250 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @bug     6622366
+ * @summary Utility class used by other jtreg tests
+ */
+
+import com.sun.servicetag.RegistrationData;
+import com.sun.servicetag.ServiceTag;
+import com.sun.servicetag.Registry;
+
+import java.util.Set;
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TimeZone;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.io.*;
+
+public class Util {
+    public static ServiceTag newServiceTag(File f)
+            throws FileNotFoundException, IOException, NumberFormatException {
+        return newServiceTag(f, false /* with instance_urn */);
+    }
+
+    public static ServiceTag newServiceTag(File f, boolean noInstanceURN)
+            throws FileNotFoundException, IOException, NumberFormatException {
+        Properties props = new Properties();
+        FileReader reader = new FileReader(f);
+        try {
+            props.load(reader);
+        } finally {
+            reader.close();
+        }
+        if (noInstanceURN) {
+            return ServiceTag.newInstance(
+                            props.getProperty("product_name"),
+                            props.getProperty("product_version"),
+                            props.getProperty("product_urn"),
+                            props.getProperty("product_parent"),
+                            props.getProperty("product_parent_urn"),
+                            props.getProperty("product_defined_inst_id"),
+                            props.getProperty("product_vendor"),
+                            props.getProperty("platform_arch"),
+                            props.getProperty("container"),
+                            props.getProperty("source"));
+        } else {
+            return ServiceTag.newInstance(
+                            props.getProperty("instance_urn"),
+                            props.getProperty("product_name"),
+                            props.getProperty("product_version"),
+                            props.getProperty("product_urn"),
+                            props.getProperty("product_parent"),
+                            props.getProperty("product_parent_urn"),
+                            props.getProperty("product_defined_inst_id"),
+                            props.getProperty("product_vendor"),
+                            props.getProperty("platform_arch"),
+                            props.getProperty("container"),
+                            props.getProperty("source"));
+        }
+    }
+
+    public static boolean matches(ServiceTag st1, ServiceTag st2) {
+        if (!st1.getInstanceURN().equals(st2.getInstanceURN())) {
+            System.out.println("instance_urn: " + st1.getInstanceURN() +
+                " != " + st2.getInstanceURN());
+            return false;
+        }
+        return matchesNoInstanceUrn(st1, st2);
+    }
+
+    public static boolean matchesNoInstanceUrn(ServiceTag st1, ServiceTag st2) {
+        if (!st1.getProductName().equals(st2.getProductName())) {
+            System.out.println("product_name: " + st1.getProductName() +
+                " != " + st2.getProductName());
+            return false;
+        }
+
+        if (!st1.getProductVersion().equals(st2.getProductVersion())) {
+            System.out.println("product_version: " + st1.getProductVersion() +
+                " != " + st2.getProductVersion());
+            return false;
+        }
+        if (!st1.getProductURN().equals(st2.getProductURN())) {
+            System.out.println("product_urn: " + st1.getProductURN() +
+                " != " + st2.getProductURN());
+            return false;
+        }
+        if (!st1.getProductParentURN().equals(st2.getProductParentURN())) {
+            System.out.println("product_parent_urn: " + st1.getProductParentURN() +
+                " != " + st2.getProductParentURN());
+            return false;
+        }
+        if (!st1.getProductParent().equals(st2.getProductParent())) {
+            System.out.println("product_parent: " + st1.getProductParent() +
+                " != " + st2.getProductParent());
+            return false;
+        }
+        if (!st1.getProductDefinedInstanceID().equals(st2.getProductDefinedInstanceID())) {
+            System.out.println("product_defined_inst_id: " +
+                st1.getProductDefinedInstanceID() +
+                " != " + st2.getProductDefinedInstanceID());
+            return false;
+        }
+        if (!st1.getProductVendor().equals(st2.getProductVendor())) {
+            System.out.println("product_vendor: " + st1.getProductVendor() +
+                " != " + st2.getProductVendor());
+            return false;
+        }
+        if (!st1.getPlatformArch().equals(st2.getPlatformArch())) {
+            System.out.println("platform_arch: " + st1.getPlatformArch() +
+                " != " + st2.getPlatformArch());
+            return false;
+        }
+        if (!st1.getContainer().equals(st2.getContainer())) {
+            System.out.println("container: " + st1.getContainer() +
+                " != " + st2.getContainer());
+            return false;
+        }
+        if (!st1.getSource().equals(st2.getSource())) {
+            System.out.println("source: " + st1.getSource() +
+                " != " + st2.getSource());
+            return false;
+        }
+        return true;
+    }
+
+    public static void checkRegistrationData(String regFile,
+                                             Map<String, ServiceTag> stMap)
+            throws IOException {
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(regFile));
+        RegistrationData registration = RegistrationData.loadFromXML(in);
+        Set<ServiceTag> svcTags = registration.getServiceTags();
+        if (svcTags.size() != stMap.size()) {
+            throw new RuntimeException("Invalid service tag count= " +
+                svcTags.size() + " expected=" + stMap.size());
+        }
+        for (ServiceTag st : svcTags) {
+            ServiceTag st1 = stMap.get(st.getInstanceURN());
+            if (!matches(st, st1)) {
+                throw new RuntimeException("ServiceTag in the registry " +
+                    "does not match the one in the map");
+            }
+        }
+    }
+
+
+    /**
+     * Formats the Date into a timestamp string in YYYY-MM-dd HH:mm:ss GMT.
+     * @param timestamp Date
+     * @return a string representation of the timestamp in the YYYY-MM-dd HH:mm:ss GMT format.
+     */
+    static String formatTimestamp(Date timestamp) {
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
+        df.setTimeZone(TimeZone.getTimeZone("GMT"));
+        return df.format(timestamp);
+    }
+
+    /**
+     * Parses a timestamp string in YYYY-MM-dd HH:mm:ss GMT format.
+     * @param timestamp Timestamp in the YYYY-MM-dd HH:mm:ss GMT format.
+     * @return Date
+     */
+    static Date parseTimestamp(String timestamp) {
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
+        df.setTimeZone(TimeZone.getTimeZone("GMT"));
+        try {
+            return df.parse(timestamp);
+        } catch (ParseException e) {
+            // should not reach here
+            e.printStackTrace();
+            return new Date();
+        }
+    }
+
+    /**
+     * Returns the command simulating stclient behavior.
+     */
+    static String getSvcClientCommand(String stclientRegistry) {
+        String regDir = System.getProperty("test.classes");
+
+        StringBuilder sb = new StringBuilder();
+        // wrap each argument to the command with double quotes
+        sb.append("\"");
+        sb.append(System.getProperty("java.home"));
+        sb.append(File.separator).append("bin");
+        sb.append(File.separator).append("java");
+        sb.append("\"");
+        sb.append(" -cp ");
+        sb.append("\"").append(regDir).append("\"");
+        sb.append(" \"-Dstclient.registry.path=");
+        sb.append(stclientRegistry).append("\"");
+        sb.append(" SvcTagClient");
+        return sb.toString();
+    }
+
+    private static Registry registry = null;
+    /**
+     * Returns the Registry processed by SvcTagClient that simulates
+     * stclient.
+     */
+    static synchronized Registry getSvcTagClientRegistry() throws IOException {
+        if (registry != null) {
+            return registry;
+        }
+
+        // System.setProperty("servicetag.verbose", "true");
+        // enable the helper class
+        System.setProperty("servicetag.sthelper.supported", "true");
+
+        // clean up registry.xml
+        String regDir = System.getProperty("test.classes");
+        File registryFile = new File(regDir, "registry.xml");
+        if (registryFile.exists()) {
+            registryFile.delete();
+        }
+
+        String stclientCmd = Util.getSvcClientCommand(registryFile.getCanonicalPath());
+        System.out.println("stclient cmd: " + stclientCmd);
+        System.setProperty("servicetag.stclient.cmd", stclientCmd);
+
+        // get the Registry object after the system properties are set
+        registry = Registry.getSystemRegistry();
+        return registry;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/ValidRegistrationData.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6622366
+ * @summary Basic Test for reading a valid registration
+ * @author  Mandy Chung
+ *
+ * @run build ValidRegistrationData
+ * @run main ValidRegistrationData
+ */
+
+import com.sun.servicetag.*;
+import java.io.*;
+import java.util.*;
+
+public class ValidRegistrationData {
+    private static String registrationDir = System.getProperty("test.classes");
+    private static String servicetagDir = System.getProperty("test.src");
+    private static RegistrationData registration;
+    private static Map<String, ServiceTag> stMap =
+        new LinkedHashMap<String, ServiceTag>();
+    private static String[] files = new String[] {
+                                        "servicetag1.properties",
+                                        "servicetag2.properties",
+                                        "servicetag3.properties"
+                                    };
+    private static String URN = "urn:st:9543ffaa-a4f1-4f77-b2d1-f561922d4e4a";
+
+    public static void main(String[] argv) throws Exception {
+        File f = new File(servicetagDir, "registration.xml");
+
+        // load the registration data with all service tags
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
+        registration = RegistrationData.loadFromXML(in);
+        if (!registration.getRegistrationURN().equals(URN)){
+            throw new RuntimeException("Invalid URN=" +
+                registration.getRegistrationURN());
+        }
+        Map<String,String> environMap = registration.getEnvironmentMap();
+        checkEnvironmentMap(environMap);
+
+        // set environment
+        setInvalidEnvironment("hostname", "");
+        setInvalidEnvironment("osName", "");
+        setInvalidEnvironment("invalid", "");
+    }
+
+    private static void checkEnvironmentMap(Map<String,String> envMap)
+            throws Exception {
+        Properties props = new Properties();
+        File f = new File(servicetagDir, "environ.properties");
+        FileReader reader = new FileReader(f);
+        try {
+            props.load(reader);
+        } finally {
+            reader.close();
+        }
+        for (Map.Entry<String,String> entry : envMap.entrySet()) {
+            String name = entry.getKey();
+            String value = entry.getValue();
+            String expected = props.getProperty(name);
+            if (expected == null || !value.equals(expected)) {
+                throw new RuntimeException("Invalid environment " +
+                    name + "=" + value);
+            }
+            props.remove(name);
+        }
+        if (!props.isEmpty()) {
+            System.out.println("Environment missing: ");
+            for (String s : props.stringPropertyNames()) {
+                System.out.println("   " + s + "=" + props.getProperty(s));
+            }
+            throw new RuntimeException("Invalid environment read");
+        }
+    }
+    private static void setInvalidEnvironment(String name, String value) {
+        boolean invalid = false;
+        try {
+            registration.setEnvironment(name, value);
+        } catch (IllegalArgumentException e) {
+            invalid = true;
+        }
+        if (!invalid) {
+           throw new RuntimeException(name + "=" + value +
+               " set but expected to fail.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/environ.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,9 @@
+hostname=ko
+hostId=83abc1ab
+osName=SunOS
+osVersion=5.10
+osArchitecture=sparc
+systemModel=Sun-Fire-V440
+systemManufacturer=Sun Microsystems
+cpuManufacturer=Sun Microsystems
+serialNumber=BEL078932
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/missing-environ-field.xml	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<registration_data version="1.0">
+<environment>
+<hostname>ko</hostname>
+<hostId/>
+<osName>SunOS</osName>
+<osVersion>5.10</osVersion>
+<osArchitecture>sparc</osArchitecture>
+<systemModel/>
+<systemManufacturer/>
+<cpuManufacturer/>
+</environment>
+<registry urn="urn:st:9b2c801f-89d5-431e-a930-1335a9049124" version="1.0">
+<service_tag>
+<instance_urn>urn:st:9efff93a-767c-4714-fcfa-c48988293110</instance_urn>
+<product_name>Java SE 6 Runtime Environment</product_name>
+<product_version>1.6.0-internal</product_version>
+<product_urn>urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc</product_urn>
+<product_parent_urn>urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3</product_parent_urn>
+<product_parent>Java Platform Standard Edition 6 (Java SE 6)</product_parent>
+<product_defined_inst_id>id=1.6.0-internal-b00 sparc,dir=/myjdk/solaris-sparc</product_defined_inst_id>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>sparc</platform_arch>
+<timestamp>2007-11-12 06:15:11 GMT</timestamp>
+<container>global</container>
+<source>servicetag1.properties</source>
+<installer_uid>121937</installer_uid>
+</service_tag>
+<service_tag>
+<instance_urn>urn:st:0e9712bf-4832-e315-8e40-c4b17ffac9a9</instance_urn>
+<product_name>Java SE 6 Development Kit</product_name>
+<product_version>1.6.0</product_version>
+<product_urn>urn:uuid:b58ef9a8-5ae8-11db-a023-080020a9ed93</product_urn>
+<product_parent_urn>urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3</product_parent_urn>
+<product_parent>Java Platform Standard Edition 6 (Java SE 6)</product_parent>
+<product_defined_inst_id>id=1.6.0_05-b01 sparc,dir=/myjdk/solaris-i586</product_defined_inst_id>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>i386</platform_arch>
+<timestamp>2007-11-12 06:15:11 GMT</timestamp>
+<container>global</container>
+<source>servicetag2.properties</source>
+<installer_uid>121937</installer_uid>
+</service_tag>
+</registry>
+</registration_data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/newer-registry-version.xml	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<registration_data version="1.0">
+<environment>
+<hostname>ko</hostname>
+<hostId/>
+<osName>SunOS</osName>
+<osVersion>5.10</osVersion>
+<osArchitecture>sparc</osArchitecture>
+<systemModel/>
+<systemManufacturer/>
+<cpuManufacturer/>
+<serialNumber/>
+</environment>
+<registry urn="urn:st:9543ffaa-a4f1-4f77-b2d1-f561922d4e4a" version="100.0">
+<service_tag>
+<instance_urn>urn:st:9efff93a-767c-4714-fcfa-c48988293110</instance_urn>
+<product_name>Java SE 6 Runtime Environment</product_name>
+<product_version>1.6.0-internal</product_version>
+<product_urn>urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc</product_urn>
+<product_parent_urn>urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3</product_parent_urn>
+<product_parent>Java Platform Standard Edition 6 (Java SE 6)</product_parent>
+<product_defined_inst_id>id=1.6.0-internal-b00 sparc,dir=/myjdk/solaris-sparc</product_defined_inst_id>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>sparc</platform_arch>
+<timestamp>2007-11-13 00:49:01 GMT</timestamp>
+<container>global</container>
+<source>servicetag1.properties</source>
+<installer_uid>121937</installer_uid>
+<NEW-FIELD/>
+</service_tag>
+</registry>
+</registration_data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/registration.xml	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<registration_data version="1.0">
+<environment>
+<hostname>ko</hostname>
+<hostId>83abc1ab</hostId>
+<osName>SunOS</osName>
+<osVersion>5.10</osVersion>
+<osArchitecture>sparc</osArchitecture>
+<systemModel>Sun-Fire-V440</systemModel>
+<systemManufacturer>Sun Microsystems</systemManufacturer>
+<cpuManufacturer>Sun Microsystems</cpuManufacturer>
+<serialNumber>BEL078932</serialNumber>
+</environment>
+<registry urn="urn:st:9543ffaa-a4f1-4f77-b2d1-f561922d4e4a" version="1.0">
+<service_tag>
+<instance_urn>urn:st:9efff93a-767c-4714-fcfa-c48988293110</instance_urn>
+<product_name>Java SE 6 Runtime Environment</product_name>
+<product_version>1.6.0-internal</product_version>
+<product_urn>urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc</product_urn>
+<product_parent_urn>urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3</product_parent_urn>
+<product_parent>Java Platform Standard Edition 6 (Java SE 6)</product_parent>
+<product_defined_inst_id>id=1.6.0-internal-b00 sparc,dir=/myjdk/solaris-sparc</product_defined_inst_id>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>sparc</platform_arch>
+<timestamp>2007-11-13 00:49:01 GMT</timestamp>
+<container>global</container>
+<source>servicetag1.properties</source>
+<installer_uid>121937</installer_uid>
+</service_tag>
+<service_tag>
+<instance_urn>urn:st:0e9712bf-4832-e315-8e40-c4b17ffac9a9</instance_urn>
+<product_name>Java SE 6 Development Kit</product_name>
+<product_version>1.6.0</product_version>
+<product_urn>urn:uuid:b58ef9a8-5ae8-11db-a023-080020a9ed93</product_urn>
+<product_parent_urn>urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3</product_parent_urn>
+<product_parent>Java Platform Standard Edition 6 (Java SE 6)</product_parent>
+<product_defined_inst_id>id=1.6.0_05-b01 i386,dir=/myjdk/solaris-i586</product_defined_inst_id>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>i386</platform_arch>
+<timestamp>2007-11-13 00:49:01 GMT</timestamp>
+<container>global</container>
+<source>servicetag2.properties</source>
+<installer_uid>121937</installer_uid>
+</service_tag>
+<service_tag>
+<instance_urn>urn:st:8a6ff75e-21a4-c8d7-bbda-de2c971bd67d</instance_urn>
+<product_name>Solaris 10 Operating System</product_name>
+<product_version>10</product_version>
+<product_urn>urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113</product_urn>
+<product_parent_urn>urn:uuid:596ffcfa-63d5-11d7-9886-ac816a682f92</product_parent_urn>
+<product_parent>Solaris Operating System</product_parent>
+<product_defined_inst_id/>
+<product_vendor>Sun Microsystems</product_vendor>
+<platform_arch>sparc</platform_arch>
+<timestamp>2007-11-13 00:49:01 GMT</timestamp>
+<container>global</container>
+<source>servicetag3.properties</source>
+<installer_uid>212883</installer_uid>
+</service_tag>
+</registry>
+</registration_data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/servicetag1.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+instance_urn=urn:st:9efff93a-767c-4714-fcfa-c48988293110
+product_name=Java SE 6 Runtime Environment
+product_version=1.6.0-internal
+product_urn=urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc
+product_parent_urn=urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3
+product_parent=Java Platform Standard Edition 6 (Java SE 6)
+product_defined_inst_id=id=1.6.0-internal-b00 sparc,dir=/myjdk/solaris-sparc
+product_vendor=Sun Microsystems
+platform_arch=sparc
+timestamp=2007-11-12 05:19:40 GMT
+container=global
+source=servicetag1.properties
+installer_uid=121937
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/servicetag2.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+instance_urn=urn:st:0e9712bf-4832-e315-8e40-c4b17ffac9a9
+product_name=Java SE 6 Development Kit
+product_version=1.6.0
+product_urn=urn:uuid:b58ef9a8-5ae8-11db-a023-080020a9ed93
+product_parent_urn=urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3
+product_parent=Java Platform Standard Edition 6 (Java SE 6)
+product_defined_inst_id=id=1.6.0_05-b01 i386,dir=/myjdk/solaris-i586
+product_vendor=Sun Microsystems
+platform_arch=i386
+timestamp=2007-11-12 06:12:21 GMT
+container=global
+source=servicetag2.properties
+installer_uid=121937
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/servicetag3.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+instance_urn=urn:st:8a6ff75e-21a4-c8d7-bbda-de2c971bd67d
+product_name=Solaris 10 Operating System
+product_version=10
+product_urn=urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113
+product_parent_urn=urn:uuid:596ffcfa-63d5-11d7-9886-ac816a682f92
+product_parent=Solaris Operating System
+product_defined_inst_id=
+product_vendor=Sun Microsystems
+platform_arch=sparc
+timestamp=2007-06-20 22:07:11 GMT
+container=global
+source=servicetag3.properties
+installer_uid=212883
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/servicetag4.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+instance_urn=urn:st:b8171b45-a087-47b3-92c8-f2d9fb34e8c2
+product_name=Java SE 6 Runtime Environment
+product_version=1.6.0_05
+product_urn=urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc
+product_parent_urn=urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3
+product_parent=Java Platform Standard Edition 6 (Java SE 6)
+product_defined_inst_id=id=1.6.0_05-b01 amd64,dir=/myjdk/linux-amd64
+product_vendor=Sun Microsystems
+platform_arch=x64
+timestamp=2007-12-12 05:19:40 GMT
+container=global
+source=servicetag4.properties
+installer_uid=121937
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/servicetag/servicetag5.properties	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+instance_urn=urn:st:1d4269a1-71e3-4e44-bc8f-3793da7928ed
+product_name=Java SE 6 Runtime Environment
+product_version=1.6.0_06
+product_urn=urn:uuid:92d1de8c-1e59-42c6-a280-1c379526bcbc
+product_parent_urn=urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3
+product_parent=Java Platform Standard Edition 6 (Java SE 6)
+product_defined_inst_id=id=1.6.0_06-b06 i386,dir=/w/mchung/bundles/jdk1.6.0_05/jre
+product_vendor=Sun Microsystems
+platform_arch=x86
+timestamp=2007-11-29 17:59:42 GMT
+container=global
+source=servicetag5.properties
+installer_uid=-1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/EventQueue/6638195/bug6638195.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ *
+ * @bug 6638195
+ * @author Igor Kushnirskiy
+ * @summary tests if EventQueueDelegate.Delegate is invoked.
+ */
+
+import sun.awt.EventQueueDelegate;
+import com.sun.java.swing.SwingUtilities3;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.awt.*;
+
+public class bug6638195 {
+    public static void main(String[] args) throws Exception {
+        MyEventQueueDelegate delegate = new MyEventQueueDelegate();
+        EventQueueDelegate.setDelegate(delegate);
+        runTest(delegate);
+
+        delegate = new MyEventQueueDelegate();
+        SwingUtilities3.setEventQueueDelegate(getObjectMap(delegate));
+        runTest(delegate);
+    }
+
+    private static void runTest(MyEventQueueDelegate delegate) throws Exception {
+        EventQueue.invokeLater(
+            new Runnable() {
+                public void run() {
+                }
+            });
+        final CountDownLatch latch = new CountDownLatch(1);
+        EventQueue.invokeLater(
+            new Runnable() {
+                public void run() {
+                    latch.countDown();
+                }
+            });
+        latch.await();
+        if (! delegate.allInvoked()) {
+            throw new RuntimeException("failed");
+        }
+    }
+
+    static Map<String, Map<String, Object>> getObjectMap(
+          final EventQueueDelegate.Delegate delegate) {
+        Map<String, Map<String, Object>> objectMap =
+            new HashMap<String, Map<String, Object>>();
+        Map<String, Object> methodMap;
+
+        final AWTEvent[] afterDispatchEventArgument = new AWTEvent[1];
+        final Object[] afterDispatchHandleArgument = new Object[1];
+        Callable<Void> afterDispatchCallable =
+            new Callable<Void>() {
+                public Void call() {
+                    delegate.afterDispatch(afterDispatchEventArgument[0],
+                                           afterDispatchHandleArgument[0]);
+                    return null;
+                }
+            };
+        methodMap = new HashMap<String, Object>();
+        methodMap.put("event", afterDispatchEventArgument);
+        methodMap.put("handle", afterDispatchHandleArgument);
+        methodMap.put("method", afterDispatchCallable);
+        objectMap.put("afterDispatch", methodMap);
+
+        final AWTEvent[] beforeDispatchEventArgument = new AWTEvent[1];
+        Callable<Object> beforeDispatchCallable =
+            new Callable<Object>() {
+                public Object call() {
+                    return delegate.beforeDispatch(
+                        beforeDispatchEventArgument[0]);
+                }
+            };
+        methodMap = new HashMap<String, Object>();
+        methodMap.put("event", beforeDispatchEventArgument);
+        methodMap.put("method", beforeDispatchCallable);
+        objectMap.put("beforeDispatch", methodMap);
+
+        final EventQueue[] getNextEventEventQueueArgument = new EventQueue[1];
+        Callable<AWTEvent> getNextEventCallable =
+            new Callable<AWTEvent>() {
+                public AWTEvent call() throws Exception {
+                    return delegate.getNextEvent(
+                        getNextEventEventQueueArgument[0]);
+                }
+            };
+        methodMap = new HashMap<String, Object>();
+        methodMap.put("eventQueue", getNextEventEventQueueArgument);
+        methodMap.put("method", getNextEventCallable);
+        objectMap.put("getNextEvent", methodMap);
+
+        return objectMap;
+    }
+    static class MyEventQueueDelegate implements EventQueueDelegate.Delegate {
+        private volatile boolean getNextEventInvoked = false;
+        private volatile boolean beforeDispatchInvoked = false;
+        private volatile boolean afterDispatchInvoked = false;
+        public AWTEvent getNextEvent(EventQueue eventQueue)
+              throws InterruptedException {
+            getNextEventInvoked = true;
+            return eventQueue.getNextEvent();
+        }
+        public Object beforeDispatch(AWTEvent event) {
+            beforeDispatchInvoked = true;
+            return null;
+        }
+        public void afterDispatch(AWTEvent event, Object handle) {
+            afterDispatchInvoked = true;
+        }
+        private boolean allInvoked() {
+            return getNextEventInvoked && beforeDispatchInvoked && afterDispatchInvoked;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/MemoryClassLoader.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject.Kind;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public final class MemoryClassLoader extends ClassLoader {
+    private final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+    private final MemoryFileManager manager = new MemoryFileManager(this.compiler);
+
+    public Class<?> compile(String name, String content) {
+        compile(new Source(name, content));
+        try {
+            return findClass(name);
+        }
+        catch (ClassNotFoundException exception) {
+            throw new Error(exception);
+        }
+    }
+
+    public void compile(Source... sources) {
+        List<Source> list = new ArrayList<Source>();
+        if (sources != null) {
+            for (Source source : sources) {
+                if (source != null) {
+                    list.add(source);
+                }
+            }
+        }
+        synchronized (this.manager) {
+            this.compiler.getTask(null, this.manager, null, null, null, list).call();
+        }
+    }
+
+    @Override
+    protected Class<?> findClass(String name) throws ClassNotFoundException {
+        synchronized (this.manager) {
+            Output mc = this.manager.map.remove(name);
+            if (mc != null) {
+                byte[] array = mc.toByteArray();
+                return defineClass(name, array, 0, array.length);
+            }
+        }
+        return super.findClass(name);
+    }
+
+    private static final class MemoryFileManager extends ForwardingJavaFileManager<JavaFileManager> {
+        private final Map<String, Output> map = new HashMap<String, Output>();
+
+        MemoryFileManager(JavaCompiler compiler) {
+            super(compiler.getStandardFileManager(null, null, null));
+        }
+
+        @Override
+        public Output getJavaFileForOutput(Location location, String name, Kind kind, FileObject source) {
+            Output mc = this.map.get(name);
+            if (mc == null) {
+                mc = new Output(name);
+                this.map.put(name, mc);
+            }
+            return mc;
+        }
+    }
+
+    private static class MemoryFileObject extends SimpleJavaFileObject {
+        MemoryFileObject(String name, Kind kind) {
+            super(toURI(name, kind.extension), kind);
+        }
+
+        private static URI toURI(String name, String extension) {
+            try {
+                return new URI("mfm:///" + name.replace('.', '/') + extension);
+            }
+            catch (URISyntaxException exception) {
+                throw new Error(exception);
+            }
+        }
+    }
+
+    private static final class Output extends MemoryFileObject {
+        private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        Output(String name) {
+            super(name, Kind.CLASS);
+        }
+
+        byte[] toByteArray() {
+            return this.baos.toByteArray();
+        }
+
+        @Override
+        public ByteArrayOutputStream openOutputStream() {
+            this.baos.reset();
+            return this.baos;
+        }
+    }
+
+    public static final class Source extends MemoryFileObject {
+        private final String content;
+
+        Source(String name, String content) {
+            super(name, Kind.SOURCE);
+            this.content = content;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignore) {
+            return this.content;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/PropertyEditor/Test6397609.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6397609
+ * @summary Tests autocleaning
+ * @author Sergey Malenkov
+ */
+
+import java.beans.PropertyEditorManager;
+
+public class Test6397609 {
+    public static void main(String[] args) throws Exception {
+        MemoryClassLoader loader = new MemoryClassLoader();
+        PropertyEditorManager.registerEditor(
+                Object.class,
+                loader.compile("Editor",
+                               "public class Editor extends java.beans.PropertyEditorSupport {}"));
+
+        if (!isEditorExist(Object.class)) {
+            throw new Error("the editor is lost");
+        }
+        loader = null; // clean the reference
+        if (isEditorExist(Object.class)) {
+            throw new Error("unexpected editor is found");
+        }
+    }
+
+    private static boolean isEditorExist(Class type) {
+        for (int i = 0; i < 10; i++) {
+            System.gc(); // clean all weak references
+            if (null == PropertyEditorManager.findEditor(type)) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
--- a/jdk/test/java/beans/PropertyEditor/TestEditor.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/java/beans/PropertyEditor/TestEditor.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,18 +23,6 @@
 
 import java.beans.PropertyEditor;
 import java.beans.PropertyEditorManager;
-import java.io.ByteArrayOutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import javax.tools.FileObject;
-import javax.tools.ForwardingJavaFileManager;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject.Kind;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
 
 final class TestEditor {
     private final PropertyEditor editor;
@@ -53,8 +41,7 @@
     void testJava(Object value) {
         this.editor.setValue(value);
 
-        MemoryFileManager manager = new MemoryFileManager();
-        Object object = manager.invoke(this.editor.getJavaInitializationString());
+        Object object = execute("Executor", "execute", this.editor.getJavaInitializationString());
 
         System.out.println("Property value before: " + value);
         System.out.println("Property value after: " + object);
@@ -87,98 +74,21 @@
                 : object1.equals(object2);
     }
 
-    private static final class MemoryFileManager extends ForwardingJavaFileManager {
-        private static final String CLASS = "Executor";
-        private static final String METHOD = "execute";
-        private static final JavaCompiler COMPILER = ToolProvider.getSystemJavaCompiler();
-        private final Map<String, MemoryClass> map = new HashMap<String, MemoryClass>();
-        private final MemoryClassLoader loader = new MemoryClassLoader();
-
-        MemoryFileManager() {
-            super(COMPILER.getStandardFileManager(null, null, null));
-        }
-
-        public Object invoke(String expression) {
-            MemorySource file = new MemorySource(CLASS, METHOD, expression);
-            if (!COMPILER.getTask(null, this, null, null, null, Arrays.asList(file)).call())
-                throw new Error("compilation failed");
-
-            MemoryClass mc = this.map.get(CLASS);
-            if (mc == null)
-                throw new Error("class not found: " + CLASS);
-
-            Class c = this.loader.loadClass(CLASS, mc.toByteArray());
-            try {
-                return c.getMethod(METHOD).invoke(null);
-            }
-            catch (Exception exception) {
-                throw new Error(exception);
-            }
-        }
-
-        public MemoryClass getJavaFileForOutput(Location location, String name, Kind kind, FileObject source) {
-            MemoryClass type = this.map.get(name);
-            if (type == null) {
-                type = new MemoryClass(name);
-                this.map.put(name, type);
-            }
-            return type;
-        }
-    }
-
-    private static final class MemoryClassLoader extends ClassLoader {
-        public Class<?> loadClass(String name, byte[] array) {
-            return defineClass(name, array, 0, array.length);
-        }
-    }
+    private static Object execute(String classname, String methodname, String value) {
+        String content
+                = "public class " + classname + " {"
+                + "    public static Object " + methodname + "() throws Exception {"
+                + "        return " + value + ";"
+                + "    }"
+                + "}";
 
-    private static class MemoryObject extends SimpleJavaFileObject {
-        protected MemoryObject(String name, Kind kind) {
-            super(toURI(name, kind.extension), kind);
-        }
-
-        private static URI toURI(String name, String extension) {
-            try {
-                return new URI("mfm:///" + name.replace('.', '/') + extension);
-            }
-            catch (URISyntaxException exception) {
-                throw new Error(exception);
-            }
-        }
-    }
-
-    private static final class MemoryClass extends MemoryObject {
-        private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-        MemoryClass(String className) {
-            super(className, Kind.CLASS);
+        try {
+            MemoryClassLoader loader = new MemoryClassLoader();
+            Class type = loader.compile(classname, content);
+            return type.getMethod(methodname).invoke(null);
         }
-
-        public ByteArrayOutputStream openOutputStream() {
-            this.baos.reset();
-            return this.baos;
-        }
-
-        public byte[] toByteArray() {
-            return this.baos.toByteArray();
-        }
-    }
-
-    private static final class MemorySource extends MemoryObject {
-        private final String value;
-
-        MemorySource(String className, String methodName, String expression) {
-            super(className, Kind.SOURCE);
-            this.value
-                    = "public class " + className + " {\n"
-                    + "    public static Object " + methodName + "() throws Exception {\n"
-                    + "        return " + expression + ";\n"
-                    + "    }\n"
-                    + "}\n";
-        }
-
-        public CharSequence getCharContent(boolean ignore) {
-            return this.value;
+        catch (Exception exception) {
+            throw new Error(exception);
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/VetoableChangeSupport/Test6630275.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6630275
+ * @summary Tests VetoableChangeSupport specification
+ * @author Sergey Malenkov
+ */
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.beans.VetoableChangeSupport;
+
+public class Test6630275 {
+    private static final String PROPERTY = "property"; // NON-NLS: predefined property name
+
+    public static void main(String[] args) {
+        CheckListener first = new CheckListener(false);
+        CheckListener second = new CheckListener(true);
+        CheckListener third = new CheckListener(false);
+
+        VetoableChangeSupport vcs = new VetoableChangeSupport(Test6630275.class);
+        vcs.addVetoableChangeListener(first);
+        vcs.addVetoableChangeListener(PROPERTY, first);
+        vcs.addVetoableChangeListener(PROPERTY, second);
+        vcs.addVetoableChangeListener(PROPERTY, third);
+        try {
+            vcs.fireVetoableChange(PROPERTY, true, false);
+        } catch (PropertyVetoException exception) {
+            first.validate();
+            second.validate();
+            third.validate();
+            return; // expected exception
+        }
+        throw new Error("exception should be thrown");
+    }
+
+    private static class CheckListener implements VetoableChangeListener {
+        private final boolean veto;
+        private boolean odd; // even/odd check for notification
+
+        private CheckListener(boolean veto) {
+            this.veto = veto;
+        }
+
+        private void validate() {
+            if (this.veto != this.odd)
+                throw new Error(this.odd
+                        ? "undo event expected"
+                        : "unexpected undo event");
+        }
+
+        public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException {
+            this.odd = !this.odd;
+            if (this.veto)
+                throw new PropertyVetoException("disable all changes", event);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/Test4994637.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4994637
+ * @summary Tests custom map encoding
+ * @author Sergey Malenkov
+ */
+
+import java.util.HashMap;
+
+public final class Test4994637 extends AbstractTest<HashMap> {
+    public static void main(String[] args) {
+        new Test4994637().test(true);
+    }
+
+    @Override
+    protected CustomMap getObject() {
+        return new CustomMap();
+    }
+
+    @Override
+    protected CustomMap getAnotherObject() {
+        CustomMap map = new CustomMap();
+        map.clear();
+        map.put(null, "zero");
+        return map;
+    }
+
+    public static final class CustomMap extends HashMap<String, String> {
+        public CustomMap() {
+            put("1", "one");
+            put("2", "two");
+            put("3", "three");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/java_awt_BorderLayout.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4916852
+ * @summary Tests BorderLayout encoding
+ * @author Sergey Malenkov
+ */
+
+import java.awt.BorderLayout;
+import javax.swing.JLabel;
+
+public final class java_awt_BorderLayout extends AbstractTest<BorderLayout> {
+    private static final String[] CONSTRAINTS = {
+            BorderLayout.NORTH,
+            BorderLayout.SOUTH,
+            BorderLayout.EAST,
+            BorderLayout.WEST,
+            BorderLayout.CENTER,
+            BorderLayout.PAGE_START,
+            BorderLayout.PAGE_END,
+            BorderLayout.LINE_START,
+            BorderLayout.LINE_END,
+    };
+
+    public static void main(String[] args) {
+        new java_awt_BorderLayout().test(true);
+    }
+
+    @Override
+    protected BorderLayout getObject() {
+        BorderLayout layout = new BorderLayout();
+        update(layout, BorderLayout.EAST);
+        update(layout, BorderLayout.WEST);
+        update(layout, BorderLayout.NORTH);
+        update(layout, BorderLayout.SOUTH);
+        return layout;
+    }
+
+    @Override
+    protected BorderLayout getAnotherObject() {
+        BorderLayout layout = getObject();
+        update(layout, BorderLayout.CENTER);
+        return layout;
+    }
+
+    @Override
+    protected void validate(BorderLayout before, BorderLayout after) {
+        super.validate(before, after);
+
+        BeanValidator validator = new BeanValidator();
+        for (String constraint : CONSTRAINTS) {
+            validator.validate(before.getLayoutComponent(constraint),
+                               after.getLayoutComponent(constraint));
+        }
+    }
+
+    private static void update(BorderLayout layout, String constraints) {
+        layout.addLayoutComponent(new JLabel(constraints), constraints);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/java_awt_Component.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4916852
+ * @summary Tests Component encoding (background, foreground and font)
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+
+public final class java_awt_Component extends AbstractTest<Component> {
+    public static void main(String[] args) {
+        new java_awt_Component().test(true);
+    }
+
+    @Override
+    protected Component getObject() {
+        Component component = new MyComponent();
+        component.setBackground(Color.WHITE);
+        component.setFont(new Font(null, Font.BOLD, 5));
+        return component;
+    }
+
+    @Override
+    protected Component getAnotherObject() {
+        Component component = new MyComponent();
+        component.setForeground(Color.BLACK);
+        component.setFont(new Font(null, Font.ITALIC, 6));
+        return component;
+    }
+
+    public static final class MyComponent extends Component {
+    }
+}
\ No newline at end of file
--- a/jdk/test/java/beans/XMLEncoder/java_util_HashMap.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/java/beans/XMLEncoder/java_util_HashMap.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4631471 4921212
+ * @bug 4631471 4921212 4994637
  * @summary Tests HashMap encoding
  * @author Sergey Malenkov
  */
@@ -36,10 +36,17 @@
         new java_util_HashMap().test(true);
     }
 
+    @Override
     protected Map<String, String> getObject() {
-        return new HashMap<String, String>();
+        Map<String, String> map = new HashMap<String, String>();
+        map.put(null, null);
+        map.put("key", "value");
+        map.put("key-null", "null-value");
+        map.put("way", "remove");
+        return map;
     }
 
+    @Override
     protected Map<String, String> getAnotherObject() {
         Map<String, String> map = new HashMap<String, String>();
         map.put(null, "null-value");
@@ -48,6 +55,7 @@
         return map;
     }
 
+    @Override
     protected void validate(Map<String, String> before, Map<String, String> after) {
         super.validate(before, after);
         validate(before);
@@ -55,10 +63,18 @@
     }
 
     private static void validate(Map<String, String> map) {
-        if (!map.isEmpty()) {
+        switch (map.size()) {
+        case 3:
             validate(map, null, "null-value");
             validate(map, "key", "value");
             validate(map, "key-null", null);
+            break;
+        case 4:
+            validate(map, null, null);
+            validate(map, "key", "value");
+            validate(map, "key-null", "null-value");
+            validate(map, "way", "remove");
+            break;
         }
     }
 
--- a/jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh	Wed Jul 05 16:42:37 2017 +0200
@@ -45,4 +45,4 @@
     ;;
 esac
 
-${TESTJAVA}${FILESEP}bin${FILESEP}java -Xbootclasspath:${TESTCLASSES}${PATHSEP}${TESTJAVA}${FILESEP}lib${FILESEP}classes.zip${PATHSEP}${TESTJAVA}${FILESEP}jre${FILESEP}lib${FILESEP}rt.jar${PATHSEP}${TESTJAVA}${FILESEP}classes ADatagramSocket true
+${TESTJAVA}${FILESEP}bin${FILESEP}java -Xbootclasspath/p:${TESTCLASSES} ADatagramSocket true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Bidi/Bug6665028.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6665028
+ * @summary verify that the memory corruption doesn't happen. Note
+ * that this test case fails without the fix in some different ways,
+ * including timeout, due to the memory corruption.
+ * @build Bug6665028
+ * @run main/othervm/timeout=60 -Xmx16m Bug6665028
+ */
+
+import java.awt.font.TextAttribute;
+import java.text.AttributedString;
+import java.text.Bidi;
+
+// test1() and test2() were derived from BidiEmbeddingTest.
+public class Bug6665028 {
+
+    private static boolean runrun = true;
+
+    private static class Test extends Thread {
+        public void run() {
+            while (runrun) {
+                test1();
+                test2();
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        Test[] tests = new Test[4];
+        for (int i = 0; i < tests.length; i++) {
+            Test t = new Test();
+            tests[i] = t;
+            t.start();
+        }
+
+        try {
+            Thread.sleep(45000);
+        } catch (InterruptedException e) {
+        }
+
+        runrun = false;
+
+        for (int i = 0; i < tests.length; i++) {
+            try {
+                tests[i].join();
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+    static String target;
+    static {
+        String s = "A Bidi object provides information on the bidirectional reordering of the text used to create it. This is required, for example, to properly display Arabic or Hebrew text. ";
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < 1000; i++) {
+            sb.append(s);
+        }
+        target = sb.toString();
+    }
+
+    static void test1() {
+        String str = "If this text is >" + target + "< the test passed.";
+        int start = str.indexOf(target);
+        int limit = start + target.length();
+
+        AttributedString astr = new AttributedString(str);
+        astr.addAttribute(TextAttribute.BIDI_EMBEDDING,
+                         new Integer(-1),
+                         start,
+                         limit);
+
+        Bidi bidi = new Bidi(astr.getIterator());
+
+        byte[] embs = new byte[str.length() + 3];
+        for (int i = start + 1; i < limit + 1; ++i) {
+            embs[i] = -1;
+        }
+
+        Bidi bidi2 = new Bidi(str.toCharArray(), 0, embs, 1, str.length(), Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT);
+        if (bidi.getRunCount() != 3 || bidi2.getRunCount() != 3) {
+            throw new Error("Bidi run count incorrect");
+        }
+    }
+
+    static void test2() {
+        String str = "If this text is >" + target + "< the test passed.";
+        int length = str.length();
+        int start = str.indexOf(target);
+        int limit = start + target.length();
+
+        AttributedString astr = new AttributedString(str);
+        astr.addAttribute(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL);
+
+        astr.addAttribute(TextAttribute.BIDI_EMBEDDING,
+                         new Integer(-3),
+                         start,
+                         limit);
+
+        Bidi bidi = new Bidi(astr.getIterator());
+
+        if (bidi.getRunCount() != 6) { // runs of spaces and angles at embedding bound,s and final period, each get level 1
+            throw new Error("Bidi embedding processing failed");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/DateFormat/Bug4823811.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,789 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 4823811
+ * @summary Confirm that text which includes numbers with a trailing minus sign is parsed correctly.
+ */
+
+import java.text.*;
+import java.util.*;
+
+public class Bug4823811 {
+
+    private static Locale localeEG = new Locale("ar", "EG");
+    private static Locale localeUS = Locale.US;
+
+    private static String JuneInArabic = "\u064a\u0648\u0646\u064a\u0648";
+    private static String JulyInArabic = "\u064a\u0648\u0644\u064a\u0648";
+    private static String JuneInEnglish = "June";
+    private static String JulyInEnglish = "July";
+
+    private static String BORDER =
+        "============================================================";
+
+    /*
+     * I don't use static import here intentionally so that this test program
+     * can be run on JDK 1.4.2.
+     */
+    private static int ERA = Calendar.ERA;
+    private static int BC = GregorianCalendar.BC;
+//    private static int JAN = Calendar.JANUARY;
+//    private static int FEB = Calendar.FEBRUARY;
+//    private static int MAR = Calendar.MARCH;
+    private static int APR = Calendar.APRIL;
+    private static int MAY = Calendar.MAY;
+    private static int JUN = Calendar.JUNE;
+    private static int JUL = Calendar.JULY;
+//    private static int AUG = Calendar.AUGUST;
+//    private static int SEP = Calendar.SEPTEMBER;
+//    private static int OCT = Calendar.OCTOBER;
+//    private static int NOV = Calendar.NOVEMBER;
+//    private static int DEC = Calendar.DECEMBER;
+
+    private static String[] patterns = {
+        "yyyy MMMM d H m s",
+        "yyyy MM dd hh mm ss",
+
+        /*
+         * Because 1-based HOUR_OF_DAY, 1-based HOUR, MONTH, and YEAR fields
+         * are parsed using different code from the code for other numeric
+         * fields, I prepared YEAR-preceding patterns and SECOND-preceding
+         * patterns.
+         */
+        "yyyy M d h m s",
+        " yyyy M d h m s",
+        "yyyy M d h m s ",
+
+        "s m h d M yyyy",
+        " s m h d M yyyy",
+        "s m h d M yyyy ",
+    };
+
+    private static char originalMinusSign1 = ':';
+    private static char originalMinusSign2 = '\uff0d';  // fullwidth minus
+    private static String[] delimiters = {"-", "/", ":", "/", "\uff0d", "/"};
+    private static String[][] specialDelimiters = {
+        // for Arabic formatter and modified English formatter
+        {"--", "-/", "::", ":/", "\uff0d\uff0d", "\uff0d/"},
+
+        // for English formatter and modified Arabic formatter
+        {"--", "/-", "::", "/:", "\uff0d\uff0d", "/\uff0d"},
+    };
+
+    /*
+     * Format:
+     *   +-------------------------------------------------------------------+
+     *   | Input               | Output                                      |
+     *   +---------------------+---------------------------------------------|
+     *   | datesEG & datesUS   | formattedDatesEG & formattedDatesUS         |
+     *   +-------------------------------------------------------------------+
+     *
+     * Parse:
+     *   +-------------------------------------------------------------------+
+     *   | Input               | Output                                      |
+     *   |---------------------+---------------------------------------------|
+     *   | datesToParse        | datesEG & datesUS                           |
+     *   +-------------------------------------------------------------------+
+     */
+    private static String[][] datesToParse = {
+        // "JUNE" and "JULY" are replaced with a localized month name later.
+        {"2008 JULY 20 3 12 83",
+         "2008  JULY 20 3 12 83",
+         "2008 JULY  20 3 12 83"},
+
+        {"2008 07 20 03 12 83",
+         "2008  07 20 03 12 83",
+         "2008 07  20 03 12 83"},
+
+        {"2008 7 20 3 12 83",
+         "2008  7 20  3 12 83",
+         "2008 7  20  3 12 83"},
+
+        {" 2008 7 20 3 12 83",
+         "  2008 7 20 3 12 83",
+         " 2008  7 20 3 12 83",
+         "2008 7 20 3 12 83"},
+
+        {"2008 7 20 3 12 83 ",
+         "2008 7 20 3 12 83  ",
+         "2008 7 20 3 12 83"},
+
+        {"83 12 3 20 7 2008",
+         "83  12 3  20 7 2008",
+         "83 12  3  20 7 2008"},
+
+        {" 83 12 3 20 7 2008",
+         "  83 12 3 20 7 2008",
+         " 83  12 3 20 7 2008",
+         "83 12 3 20 7 2008"},
+
+        {"83 12 3 20 7 2008 ",
+         "83 12 3 20 7 2008  ",
+         "83 12 3 20 7 2008"},
+    };
+
+    // For formatting
+    private static String[][] formattedDatesEG = {
+        {"2008 JULY 20 3 13 23",
+         "2009 JULY 20 3 13 23",
+         null},
+
+        {"2008 07 20 03 13 23",
+         "2009 07 20 03 13 23",
+         "2007 05 20 03 13 23"},
+
+        {"2008 7 20 3 13 23",
+         "2009 6 10 3 13 23",
+         "2007 4 10 3 13 23"},
+
+        {" 2008 7 20 3 13 23",
+         null,
+         " 2009 7 20 3 13 23",
+         null},
+
+        {"2008 7 20 3 13 23 ",
+         "2008 7 20 3 10 37 ",
+         null},
+
+        {"23 13 3 20 7 2008",
+         "37 10 9 19 7 2008",
+         "23 49 8 19 7 2008"},
+
+        {" 23 13 3 20 7 2008",
+         null,
+         " 37 10 3 20 7 2008",
+         null},
+
+        {"23 13 3 20 7 2008 ",
+         "23 13 3 20 7 2009 ",
+         null},
+    };
+
+    private static String[][] formattedDatesUS = {
+        {"2008 JULY 20 3 13 23",
+         null,
+         "2008 JUNE 10 3 13 23"},
+
+        {"2008 07 20 03 13 23",
+         "2007 05 20 03 13 23",
+         "2008 06 10 03 13 23"},
+
+        {"2008 7 20 3 13 23",
+         "2007 5 19 9 13 23",
+         "2008 6 9 9 13 23"},
+
+        {" 2008 7 20 3 13 23",
+         " 2009 7 20 3 13 23",
+         " 2007 5 20 3 13 23",
+         null},
+
+        {"2008 7 20 3 13 23 ",
+         "2008 7 20 3 13 23 ",
+         null},
+
+        {"23 13 3 20 7 2008",
+         "23 49 2 10 6 2008",
+         "23 13 9 9 6 2008"},
+
+        {" 23 13 3 20 7 2008",
+         " 37 10 3 20 7 2008",
+         " 23 49 2 20 7 2008",
+         null},
+
+        {"23 13 3 20 7 2008 ",
+         "23 13 3 20 7 2008 ",
+         null},
+    };
+
+    private static GregorianCalendar[][] datesEG = {
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar(-2008, JUL,  20,  3,  12,  83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar(-2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2007, MAY,  20,  3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar(-2008, JUL, -20,  3,  12,  83),
+         new GregorianCalendar( 2007, APR,  10,  3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         null,
+         new GregorianCalendar(-2008, JUL,  20,  3,  12,  83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL,  20,  3,  12, -83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL,  20, -3,  12, -83),
+         new GregorianCalendar( 2008, JUL,  20, -3, -12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         null,
+         new GregorianCalendar( 2008, JUL,  20,  3,  12, -83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar(-2008, JUL,  20,  3,  12,  83),
+         null},
+    };
+
+    private static GregorianCalendar[][] datesUS = {
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         null,
+         new GregorianCalendar( 2008, JUN,  10,  3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2007, MAY,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUN,  10,  3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2007, MAY,  20, -3,  12,  83),
+         new GregorianCalendar( 2008, JUL, -20, -3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar(-2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2007, MAY,  20,  3,  12,  83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL, -20,  3, -12,  83),
+         new GregorianCalendar( 2008, JUL, -20, -3,  12,  83)},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL,  20,  3,  12, -83),
+         new GregorianCalendar( 2008, JUL,  20,  3, -12,  83),
+         null},
+
+        {new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         new GregorianCalendar( 2008, JUL,  20,  3,  12,  83),
+         null},
+    };
+
+    /* flags */
+    private static boolean err = false;
+    private static boolean verbose = false;
+
+
+    public static void main(String[] args) {
+        if (args.length == 1 && args[0].equals("-v")) {
+            verbose = true;
+        }
+
+        Locale defaultLocale = Locale.getDefault();
+        TimeZone defaultTimeZone = TimeZone.getDefault();
+
+        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Tokyo"));
+
+        try {
+            /*
+             * Test SimpleDateFormat.parse() and format() for original
+             * SimpleDateFormat instances
+             */
+            testDateFormat1();
+
+            /*
+             * Test SimpleDateFormat.parse() and format() for modified
+             * SimpleDateFormat instances using an original minus sign,
+             * pattern, and diffenrent month names in DecimalFormat
+             */
+            testDateFormat2();
+
+            /*
+             * Test SimpleDateFormat.parse() and format() for modified
+             * SimpleDateFormat instances using a fullwidth minus sign
+             */
+            testDateFormat3();
+
+            /*
+             * Just to confirm that regressions aren't introduced in
+             * DecimalFormat. This cannot happen, though. Because I didn't
+             * change DecimalFormat at all.
+             */
+            testNumberFormat();
+        }
+        catch (Exception e) {
+            err = true;
+            System.err.println("Unexpected exception: " + e);
+        }
+        finally {
+            Locale.setDefault(defaultLocale);
+            TimeZone.setDefault(defaultTimeZone);
+
+            if (err) {
+                System.err.println(BORDER + " Test failed.");
+                throw new RuntimeException("Date/Number formatting/parsing error.");
+            } else {
+                System.out.println(BORDER + " Test passed.");
+            }
+        }
+    }
+
+
+    //
+    // DateFormat test
+    //
+    private static void testDateFormat1() {
+        for (int i = 0; i < patterns.length; i++) {
+            System.out.println(BORDER);
+            for (int j = 0; j <= 1; j++) {
+                // Generate a pattern
+                String pattern = patterns[i].replaceAll(" ", delimiters[j]);
+                System.out.println("Pattern=\"" + pattern + "\"");
+
+                System.out.println("*** DateFormat.format test in ar_EG");
+                testDateFormatFormattingInRTL(pattern, i, j, null, localeEG, false);
+
+                System.out.println("*** DateFormat.parse test in ar_EG");
+                testDateFormatParsingInRTL(pattern, i, j, null, localeEG, false);
+
+                System.out.println("*** DateFormat.format test in en_US");
+                testDateFormatFormattingInLTR(pattern, i, j, null, localeUS, true);
+
+                System.out.println("*** DateFormat.parse test in en_US");
+                testDateFormatParsingInLTR(pattern, i, j, null, localeUS, true);
+            }
+        }
+    }
+
+    private static void testDateFormat2() {
+        /*
+         * modified ar_EG Date&Time formatter :
+         *   minus sign:  ':'
+         *   pattern:     "#,##0.###"
+         *   month names: In Arabic
+         *
+         * modified en_US Date&Time formatter :
+         *   minus sign:  ':'
+         *   pattern:     "#,##0.###;#,##0.###-"
+         *   month names: In English
+         */
+        DecimalFormat dfEG = (DecimalFormat)NumberFormat.getInstance(localeEG);
+        DecimalFormat dfUS = (DecimalFormat)NumberFormat.getInstance(localeUS);
+
+        DecimalFormatSymbols dfsEG = dfEG.getDecimalFormatSymbols();
+        DecimalFormatSymbols dfsUS = dfUS.getDecimalFormatSymbols();
+        dfsEG.setMinusSign(originalMinusSign1);
+        dfsUS.setMinusSign(originalMinusSign1);
+        dfEG.setDecimalFormatSymbols(dfsUS);
+        dfUS.setDecimalFormatSymbols(dfsEG);
+
+        String patternEG = dfEG.toPattern();
+        String patternUS = dfUS.toPattern();
+
+        dfEG.applyPattern(patternUS);
+        dfUS.applyPattern(patternEG);
+
+        for (int i = 0; i < patterns.length; i++) {
+            System.out.println(BORDER);
+            for (int j = 2; j <= 3; j++) {
+                // Generate a pattern
+                String pattern = patterns[i].replaceAll(" ", delimiters[j]);
+                System.out.println("Pattern=\"" + pattern + "\"");
+
+                System.out.println("*** DateFormat.format test in modified en_US");
+                testDateFormatFormattingInRTL(pattern, i, j, dfUS, localeUS, true);
+
+                System.out.println("*** DateFormat.parse test in modified en_US");
+                testDateFormatParsingInRTL(pattern, i, j, dfUS, localeUS, true);
+
+                System.out.println("*** DateFormat.format test in modified ar_EG");
+                testDateFormatFormattingInLTR(pattern, i, j, dfEG, localeEG, false);
+
+                System.out.println("*** DateFormat.parse test in modified ar_EG");
+                testDateFormatParsingInLTR(pattern, i, j, dfEG, localeEG, false);
+            }
+        }
+    }
+
+    private static void testDateFormat3() {
+        /*
+         * modified ar_EG Date&Time formatter :
+         *   minus sign:  '\uff0d'  // fullwidth minus
+         *   pattern:     "#,##0.###;#,##0.###-"
+         *   month names: In Arabic
+         *
+         * modified en_US Date&Time formatter :
+         *   minus sign:  '\uff0d'  // fullwidth minus
+         *   pattern:     "#,##0.###"
+         *   month names: In English
+         */
+        DecimalFormat dfEG = (DecimalFormat)NumberFormat.getInstance(localeEG);
+        DecimalFormat dfUS = (DecimalFormat)NumberFormat.getInstance(localeUS);
+
+        DecimalFormatSymbols dfsEG = dfEG.getDecimalFormatSymbols();
+        DecimalFormatSymbols dfsUS = dfUS.getDecimalFormatSymbols();
+        dfsEG.setMinusSign(originalMinusSign2);
+        dfsUS.setMinusSign(originalMinusSign2);
+        dfEG.setDecimalFormatSymbols(dfsEG);
+        dfUS.setDecimalFormatSymbols(dfsUS);
+
+        for (int i = 0; i < patterns.length; i++) {
+            System.out.println(BORDER);
+            for (int j = 4; j <= 5; j++) {
+                // Generate a pattern
+                String pattern = patterns[i].replaceAll(" ", delimiters[j]);
+                System.out.println("Pattern=\"" + pattern + "\"");
+
+                System.out.println("*** DateFormat.format test in modified ar_EG");
+                testDateFormatFormattingInRTL(pattern, i, j, dfEG, localeEG, false);
+
+                System.out.println("*** DateFormat.parse test in modified ar_EG");
+                testDateFormatParsingInRTL(pattern, i, j, dfEG, localeEG, false);
+
+                System.out.println("*** DateFormat.format test in modified en_US");
+                testDateFormatFormattingInLTR(pattern, i, j, dfUS, localeUS, true);
+
+                System.out.println("*** DateFormat.parse test in modified en_US");
+                testDateFormatParsingInLTR(pattern, i, j, dfUS, localeUS, true);
+            }
+        }
+    }
+
+    private static void testDateFormatFormattingInRTL(String pattern,
+                                                      int basePattern,
+                                                      int delimiter,
+                                                      NumberFormat nf,
+                                                      Locale locale,
+                                                      boolean useEnglishMonthName) {
+        Locale.setDefault(locale);
+
+        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+        if (nf != null) {
+            sdf.setNumberFormat(nf);
+        }
+        for (int i = 0; i < datesToParse[basePattern].length; i++) {
+            if (datesEG[basePattern][i] == null) {
+                continue;
+            }
+
+            String expected = formattedDatesEG[basePattern][i]
+                              .replaceAll("JUNE", (useEnglishMonthName ?
+                                                   JuneInEnglish : JuneInArabic))
+                              .replaceAll("JULY", (useEnglishMonthName ?
+                                                   JulyInEnglish : JulyInArabic))
+                              .replaceAll(" ", delimiters[delimiter]);
+            testDateFormatFormatting(sdf, pattern, datesEG[basePattern][i],
+                expected, locale.toString());
+        }
+    }
+
+    private static void testDateFormatFormattingInLTR(String pattern,
+                                                      int basePattern,
+                                                      int delimiter,
+                                                      NumberFormat nf,
+                                                      Locale locale,
+                                                      boolean useEnglishMonthName) {
+        Locale.setDefault(locale);
+
+        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+        if (nf != null) {
+            sdf.setNumberFormat(nf);
+        }
+        for (int i = 0; i < datesToParse[basePattern].length; i++) {
+            if (datesUS[basePattern][i] == null) {
+                continue;
+            }
+
+            String expected = formattedDatesUS[basePattern][i]
+                              .replaceAll("JUNE", (useEnglishMonthName ?
+                                                   JuneInEnglish : JuneInArabic))
+                              .replaceAll("JULY", (useEnglishMonthName ?
+                                                   JulyInEnglish : JulyInArabic))
+                              .replaceAll(" ", delimiters[delimiter]);
+            testDateFormatFormatting(sdf, pattern, datesUS[basePattern][i],
+                expected, locale.toString());
+        }
+    }
+
+    private static void testDateFormatFormatting(SimpleDateFormat sdf,
+                                                 String pattern,
+                                                 GregorianCalendar givenGC,
+                                                 String expected,
+                                                 String locale) {
+        Date given = givenGC.getTime();
+        String str = sdf.format(given);
+        if (expected.equals(str)) {
+            if (verbose) {
+                System.out.print("  Passed: SimpleDateFormat(");
+                System.out.print(locale + ", \"" + pattern + "\").format(");
+                System.out.println(given + ")");
+
+                System.out.print("      ---> \"" + str + "\" ");
+                System.out.println((givenGC.get(ERA) == BC) ? "(BC)" : "(AD)");
+            }
+        } else {
+            err = true;
+
+            System.err.print("  Failed: Unexpected SimpleDateFormat(");
+            System.out.print(locale + ", \"" + pattern + "\").format(");
+            System.out.println(given + ") result.");
+
+            System.out.println("      Expected: \"" + expected + "\"");
+
+            System.out.print("      Got:      \"" + str + "\" ");
+            System.out.println((givenGC.get(ERA) == BC) ? "(BC)" : "(AD)");
+        }
+    }
+
+    private static void testDateFormatParsingInRTL(String pattern,
+                                                   int basePattern,
+                                                   int delimiter,
+                                                   NumberFormat nf,
+                                                   Locale locale,
+                                                   boolean useEnglishMonthName) {
+        Locale.setDefault(locale);
+
+        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+        if (nf != null) {
+            sdf.setNumberFormat(nf);
+        }
+        for (int i = 0; i < datesToParse[basePattern].length; i++) {
+            String given = datesToParse[basePattern][i]
+                           .replaceAll("  ", specialDelimiters[0][delimiter])
+                           .replaceAll(" ", delimiters[delimiter]);
+
+            testDateFormatParsing(sdf, pattern,
+                given.replaceAll("JULY", (useEnglishMonthName ?
+                                          JulyInEnglish :  JulyInArabic)),
+                datesEG[basePattern][i], locale.toString());
+        }
+    }
+
+    private static void testDateFormatParsingInLTR(String pattern,
+                                                   int basePattern,
+                                                   int delimiter,
+                                                   NumberFormat nf,
+                                                   Locale locale,
+                                                   boolean useEnglishMonthName) {
+        Locale.setDefault(locale);
+
+        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+        if (nf != null) {
+            sdf.setNumberFormat(nf);
+        }
+        for (int i = 0; i < datesToParse[basePattern].length; i++) {
+            String given = datesToParse[basePattern][i]
+                           .replaceAll("  ", specialDelimiters[1][delimiter])
+                           .replaceAll(" ", delimiters[delimiter]);
+
+            testDateFormatParsing(sdf, pattern,
+                given.replaceAll("JULY", (useEnglishMonthName ?
+                                          JulyInEnglish :  JulyInArabic)),
+                datesUS[basePattern][i], locale.toString());
+        }
+    }
+
+    private static void testDateFormatParsing(SimpleDateFormat sdf,
+                                              String pattern,
+                                              String given,
+                                              GregorianCalendar expectedGC,
+                                              String locale) {
+        try {
+            Date d = sdf.parse(given);
+            if (expectedGC == null) {
+                err = true;
+                System.err.print("  Failed: SimpleDateFormat(" + locale);
+                System.err.print(", \"" + pattern + "\").parse(\"" + given);
+                System.err.println("\") should have thrown ParseException");
+            } else if (expectedGC.getTime().equals(d)) {
+                if (verbose) {
+                    System.out.print("  Passed: SimpleDateFormat(" + locale);
+                    System.out.print(", \"" + pattern + "\").parse(\"" + given);
+                    System.out.println("\")");
+
+                    System.out.print("      ---> " + d + " (" + d.getTime());
+                    System.out.println(")");
+                }
+            } else {
+                err = true;
+                System.err.print("  Failed: SimpleDateFormat(" + locale);
+                System.err.print(", \"" + pattern + "\").parse(\"" + given);
+                System.err.println("\")");
+
+                System.err.print("      Expected: " + expectedGC.getTime());
+                System.err.println(" (" + d.getTime() + ")");
+
+                System.err.print("      Got:      " + d + " (" + d.getTime());
+                System.err.println(")");
+
+                System.err.print("      Pattern:  \"");
+                System.err.print(((DecimalFormat)sdf.getNumberFormat()).toPattern());
+                System.err.println("\"");
+            }
+        }
+        catch (ParseException pe) {
+            if (expectedGC == null) {
+                if (verbose) {
+                    System.out.print("  Passed: SimpleDateFormat(" + locale);
+                    System.out.print(", \"" + pattern + "\").parse(\"" + given);
+                    System.out.println("\")");
+
+                    System.out.println("      threw ParseException as expected");
+                }
+            } else {
+                err = true;
+                System.err.println("  Failed: Unexpected exception with");
+
+                System.err.print("    SimpleDateFormat(" + locale);
+                System.err.print(", \"" + pattern + "\").parse(\"");
+                System.err.println(given + "\"):");
+
+                System.err.println("      " + pe);
+
+                System.err.print("      Pattern: \"");
+                System.err.print(((DecimalFormat)sdf.getNumberFormat()).toPattern());
+                System.err.println("\"");
+
+                System.err.print("      Month 0: ");
+                System.err.println(sdf.getDateFormatSymbols().getMonths()[0]);
+            }
+        }
+    }
+
+
+    //
+    // NumberFormat test
+    //
+    private static void testNumberFormat() {
+        NumberFormat nfEG = NumberFormat.getInstance(localeEG);
+        NumberFormat nfUS = NumberFormat.getInstance(localeUS);
+
+        System.out.println("*** DecimalFormat.format test in ar_EG");
+        testNumberFormatFormatting(nfEG, -123456789, "123,456,789-", "ar_EG");
+        testNumberFormatFormatting(nfEG, -456, "456-", "ar_EG");
+
+        System.out.println("*** DecimalFormat.parse test in ar_EG");
+        testNumberFormatParsing(nfEG, "123-", new Long(-123), "ar_EG");
+        testNumberFormatParsing(nfEG, "123--", new Long(-123), "ar_EG");
+        testNumberFormatParsingCheckException(nfEG, "-123", 0, "ar_EG");
+
+        System.out.println("*** DecimalFormat.format test in en_US");
+        testNumberFormatFormatting(nfUS, -123456789, "-123,456,789", "en_US");
+        testNumberFormatFormatting(nfUS, -456, "-456", "en_US");
+
+        System.out.println("*** DecimalFormat.parse test in en_US");
+        testNumberFormatParsing(nfUS, "123-", new Long(123), "en_US");
+        testNumberFormatParsing(nfUS, "-123", new Long(-123), "en_US");
+        testNumberFormatParsingCheckException(nfUS, "--123", 0, "en_US");
+    }
+
+    private static void testNumberFormatFormatting(NumberFormat nf,
+                                                   int given,
+                                                   String expected,
+                                                   String locale) {
+        String str = nf.format(given);
+        if (expected.equals(str)) {
+            if (verbose) {
+                System.out.print("  Passed: NumberFormat(" + locale);
+                System.out.println(").format(" + given + ")");
+
+                System.out.println("      ---> \"" + str + "\"");
+            }
+        } else {
+            err = true;
+            System.err.print("  Failed: Unexpected NumberFormat(" + locale);
+            System.err.println(").format(" + given + ") result.");
+
+            System.err.println("      Expected: \"" + expected + "\"");
+
+            System.err.println("      Got:      \"" + str + "\"");
+        }
+    }
+
+    private static void testNumberFormatParsing(NumberFormat nf,
+                                                String given,
+                                                Number expected,
+                                                String locale) {
+        try {
+            Number n = nf.parse(given);
+            if (n.equals(expected)) {
+                if (verbose) {
+                    System.out.print("  Passed: NumberFormat(" + locale);
+                    System.out.println(").parse(\"" + given + "\")");
+
+                    System.out.println("      ---> " + n);
+                }
+            } else {
+                err = true;
+                System.err.print("  Failed: Unexpected NumberFormat(" + locale);
+                System.err.println(").parse(\"" + given + "\") result.");
+
+                System.err.println("      Expected: " + expected);
+
+                System.err.println("      Got:      " + n);
+            }
+        }
+        catch (ParseException pe) {
+            err = true;
+            System.err.print("  Failed: Unexpected exception with NumberFormat(");
+            System.err.println(locale + ").parse(\"" + given + "\") :");
+
+            System.err.println("    " + pe);
+        }
+    }
+
+    private static void testNumberFormatParsingCheckException(NumberFormat nf,
+                                                              String given,
+                                                              int expected,
+                                                              String locale) {
+        try {
+            Number n = nf.parse(given);
+            err = true;
+
+            System.err.print("  Failed: NumberFormat(" + locale);
+            System.err.println(").parse(\"" + given + "\")");
+
+            System.err.println("      should have thrown ParseException");
+        }
+        catch (ParseException pe) {
+            int errorOffset = pe.getErrorOffset();
+            if (errorOffset == expected) {
+                if (verbose) {
+                    System.out.print("  Passed: NumberFormat(" + locale);
+                    System.out.println(").parse(\"" + given + "\")");
+
+                    System.out.print("      threw ParseException as expected, and its errorOffset was correct: ");
+                    System.out.println(errorOffset);
+                }
+            } else {
+                err = true;
+                System.err.print("  Failed: NumberFormat(" + locale);
+                System.err.println(").parse(\"" + given + "\")");
+
+                System.err.print("      threw ParseException as expected, but its errorOffset was incorrect: ");
+                System.err.println(errorOffset);
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/DateFormat/Bug6645292.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6645292
+ * @summary Make sure to parse a DST time zone name with which the
+ * last DST rule doesn't observe DST.
+ */
+
+import java.text.*;
+import java.util.*;
+import static java.util.Calendar.*;
+
+public class Bug6645292 {
+    public static void main(String[] args) {
+        Locale loc = Locale.getDefault();
+        TimeZone zone = TimeZone.getDefault();
+        try {
+            Locale.setDefault(Locale.US);
+            // Use "Asia/Shanghai" with an old time stamp rather than
+            // "Australia/Perth" because if Perth decides to obserb DST
+            // permanently, that decision will make this test case
+            // useless. There's the same risk with China, though.
+            TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
+            Calendar cal = Calendar.getInstance();
+            cal.clear();
+            cal.set(1986, JUNE, 1);
+            Date d1 = cal.getTime();
+            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzzz");
+            String s = df.format(d1);
+            Date d2 = null;
+            try {
+                d2 = df.parse(s);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            if (!d1.equals(d2)) {
+                throw new RuntimeException("d1 (" + d1 + ") != d2 (" + d2 + ")");
+            }
+        } finally {
+            Locale.setDefault(loc);
+            TimeZone.setDefault(zone);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/TimeZone/OldIDMappingTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * See OldMappingTest.sh
+ */
+
+import java.lang.reflect.*;
+import java.util.*;
+
+public class OldIDMappingTest {
+    private static final String MAPPING_PROPERTY_NAME = "sun.timezone.ids.oldmapping";
+    private static final Map<String, String> newmap = new HashMap<String, String>();
+    static {
+        // Add known new mappings
+        newmap.put("EST", "EST");
+        newmap.put("MST", "MST");
+        newmap.put("HST", "HST");
+    }
+
+    public static void main(String[] args) {
+        boolean useOldMapping = true;
+        String arg = args[0];
+        if (arg.equals("-new")) {
+            useOldMapping = false;
+        } else if (arg.equals("-old")) {
+            useOldMapping = true;
+        } else {
+            throw new RuntimeException("-old or -new must be specified; got " + arg);
+        }
+
+        // Get a Field for TzIDOldMapping in sun.util.calendar.
+        Map<String, String> oldmap = null;
+        try {
+            Class<?> oldmapClass = Class.forName("sun.util.calendar.TzIDOldMapping");
+            Field map = oldmapClass.getDeclaredField("MAP");
+            map.setAccessible(true);
+            oldmap = (Map<String, String>) map.get(null);
+        } catch (Exception e) {
+            throw new RuntimeException("can't get TzIDOldMapping.MAP", e);
+        }
+
+        String prop = System.getProperty(MAPPING_PROPERTY_NAME);
+        System.out.println(MAPPING_PROPERTY_NAME + "=" + prop);
+
+        // Try the test multiple times with modifying TimeZones to
+        // make sure TimeZone instances for the old mapping are
+        // properly copied (defensive copy).
+        for (int count = 0; count < 3; count++) {
+            for (String id : oldmap.keySet()) {
+                TimeZone tzAlias = TimeZone.getTimeZone(id);
+                TimeZone tz = TimeZone.getTimeZone(oldmap.get(id));
+                if (useOldMapping) {
+                    if (!tzAlias.hasSameRules(tz)) {
+                        throw new RuntimeException("OLDMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
+                                                   + id + " isn't an alias of " + oldmap.get(id));
+                    }
+                    if (count == 0) {
+                        System.out.println("    " + id + " => " + oldmap.get(id));
+                    }
+                    tzAlias.setRawOffset(tzAlias.getRawOffset() * count);
+                } else {
+                    if (!newmap.containsKey(id)) {
+                        // ignore ids not contained in the new map
+                        if (count == 0) {
+                            System.out.println("    " + id + " => " + oldmap.get(id));
+                        }
+                        tzAlias.setRawOffset(tzAlias.getRawOffset() * count);
+                        continue;
+                    }
+                    if (tzAlias.hasSameRules(tz)) {
+                        throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
+                                                   + id + " is an alias of " + oldmap.get(id));
+                    }
+                    tz = TimeZone.getTimeZone(newmap.get(id));
+                    if (!tzAlias.hasSameRules(tz)) {
+                        throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
+                                                   + id + " isn't an alias of " + newmap.get(id));
+                    }
+                    if (count == 0) {
+                        System.out.println("    " + id + " => " + newmap.get(id));
+                    }
+                    tzAlias.setRawOffset(tzAlias.getRawOffset() * count);
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/TimeZone/OldIDMappingTest.sh	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,59 @@
+# Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+
+# @test
+# @bug 6466476
+# @summary Compatibility test for the old JDK ID mapping and Olson IDs
+# @build OldIDMappingTest
+# @run shell OldIDMappingTest.sh
+
+: ${TESTJAVA:=${JAVA_HOME}}
+: ${TESTCLASSES:="`pwd`"}
+
+JAVA="${TESTJAVA}/bin/java"
+
+STATUS=0
+
+# Expecting the new (Olson compatible) mapping (default)
+for I in "" " " no No NO false False FALSE Hello
+do
+    if [ x"$I" != x ]; then
+	D="-Dsun.timezone.ids.oldmapping=${I}"
+    fi
+    if ! ${JAVA} ${D} -cp ${TESTCLASSES} OldIDMappingTest -new; then
+	STATUS=1
+    fi
+done
+
+# Expecting the old mapping
+for I in true True TRUE yes Yes YES
+do
+    if [ "x$I" != x ]; then
+	D="-Dsun.timezone.ids.oldmapping=${I}"
+    fi
+    if ! ${JAVA} ${D} -cp ${TESTCLASSES} OldIDMappingTest -old; then
+	STATUS=1
+    fi
+done
+
+exit ${STATUS}
--- a/jdk/test/javax/management/mxbean/CustomTypeTest.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/javax/management/mxbean/CustomTypeTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -22,7 +22,7 @@
  */
 
 /* @test %M% %I%
- * @bug 6562936
+ * @bug 6562936 6750935
  * @run compile customtypes/package-info.java
  * @run main CustomTypeTest
  */
@@ -342,6 +342,38 @@
         }
     }
 
+    public static class BadConstructorMXBeanMappingFactory1 extends
+            MXBeanMappingFactory {
+        private BadConstructorMXBeanMappingFactory1() {}
+
+        @Override
+        public MXBeanMapping mappingForType(Type arg0, MXBeanMappingFactory arg1)
+                throws OpenDataException {
+            throw new UnsupportedOperationException("Should not be called");
+        }
+    }
+
+    public static class BadConstructorMXBeanMappingFactory2 extends
+            MXBeanMappingFactory {
+        public BadConstructorMXBeanMappingFactory2(boolean oops) {}
+
+        @Override
+        public MXBeanMapping mappingForType(Type arg0, MXBeanMappingFactory arg1)
+                throws OpenDataException {
+            throw new UnsupportedOperationException("Should not be called");
+        }
+    }
+
+    @MXBeanMappingFactoryClass(BadConstructorMXBeanMappingFactory1.class)
+    public static interface BadConstructor1MXBean {}
+
+    public static class BadConstructor1 implements BadConstructor1MXBean {}
+
+    @MXBeanMappingFactoryClass(BadConstructorMXBeanMappingFactory2.class)
+    public static interface BadConstructor2MXBean {}
+
+    public static class BadConstructor2 implements BadConstructor2MXBean {}
+
     public static void main(String[] args) throws Exception {
         MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
 
@@ -407,8 +439,10 @@
         try {
             mbs.registerMBean(new ReallyBrokenImpl(), new ObjectName("d:type=Broken"));
             fail("Register did not throw exception");
-        } catch (IllegalArgumentException e) {
+        } catch (NotCompliantMBeanException e) {
             System.out.println("...OK: threw: " + e);
+        } catch (Exception e) {
+            fail("Register threw wrong exception: " + e);
         }
 
         System.out.println("Test MXBeanMappingFactory exception with StandardMBean");
@@ -433,6 +467,24 @@
             System.out.println("...OK: threw: " + e);
         }
 
+        System.out.println("Test MXBeanMappingFactoryClass constructor exception");
+        for (Object mbean : new Object[] {
+            new BadConstructor1(), new BadConstructor2(),
+        }) {
+            String testName = mbean.getClass().getSimpleName();
+            try {
+                ObjectName name = new ObjectName("d:type=" + testName);
+                mbs.registerMBean(mbean, name);
+                fail("Broken MXBeanMappingFactoryClass did not throw exception" +
+                        " (" + testName + ")");
+            } catch (NotCompliantMBeanException e) {
+                System.out.println("...OK: " + testName + " threw: " + e);
+            } catch (Exception e) {
+                fail("Broken MXBeanMappingFactoryClass " + testName + " threw " +
+                        "wrong exception: " + e);
+            }
+        }
+
         if (failure == null)
             System.out.println("TEST PASSED");
         else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JButton/6604281/bug6604281.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 6604281
+   @summary NimbusL&F :Regression in Focus traversal in JFileChooser in pit build
+   @author Pavel Porvatov
+   @run main bug6604281
+*/
+
+import javax.swing.*;
+import javax.swing.plaf.IconUIResource;
+import javax.swing.plaf.synth.SynthLookAndFeel;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.lang.reflect.InvocationTargetException;
+
+public class bug6604281 {
+    public static void main(String[] args) throws InvocationTargetException, InterruptedException {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                SynthLookAndFeel laf = new SynthLookAndFeel();
+                try {
+                    UIManager.setLookAndFeel(laf);
+                } catch (Exception e) {
+                    fail(e.getMessage());
+                }
+
+                // Prepare image
+                BufferedImage image = new BufferedImage(32, 32, BufferedImage.TYPE_INT_RGB);
+
+                Graphics2D graphics = (Graphics2D) image.getGraphics();
+
+                graphics.setColor(Color.BLUE);
+                graphics.fillRect(0, 0, image.getWidth(), image.getHeight());
+                graphics.setColor(Color.RED);
+                graphics.drawLine(0, 0, image.getWidth(), image.getHeight());
+
+                // Use IconUIResource as an icon, because with ImageIcon bug is not reproduced
+                JButton button1 = new JButton(new IconUIResource(new ImageIcon(image)));
+
+                JButton button2 = new JButton(new IconUIResource(new ImageIcon(image)));
+
+                button2.setEnabled(false);
+
+                if (button1.getPreferredSize().getHeight() != button2.getPreferredSize().getHeight()) {
+                    fail("Two similar buttons have different size");
+                }
+            }
+        });
+    }
+
+    private static void fail(String s) {
+        throw new RuntimeException("Test failed: " + s);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4165217.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4165217
+ * @summary Tests JColorChooser serialization
+ * @author Ilya Boyandin
+ */
+
+import java.awt.Color;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Random;
+import javax.swing.JColorChooser;
+
+public class Test4165217 {
+    public static void main(String[] args) {
+        JColorChooser chooser = new JColorChooser();
+        chooser.setColor(new Color(new Random().nextInt()));
+
+        Color before = chooser.getColor();
+        Color after = copy(chooser).getColor();
+
+        if (!after.equals(before)) {
+            throw new Error("color is changed after serialization");
+        }
+    }
+
+    private static JColorChooser copy(JColorChooser chooser) {
+        try {
+            return (JColorChooser) deserialize(serialize(chooser));
+        }
+        catch (ClassNotFoundException exception) {
+            throw new Error("unexpected exception during class creation", exception);
+        }
+        catch (IOException exception) {
+            throw new Error("unexpected exception during serialization", exception);
+        }
+    }
+
+    private static byte[] serialize(Object object) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = new ObjectOutputStream(baos);
+        oos.writeObject(object);
+        oos.flush();
+        return baos.toByteArray();
+    }
+
+    private static Object deserialize(byte[] array) throws IOException, ClassNotFoundException {
+        ByteArrayInputStream bais = new ByteArrayInputStream(array);
+        ObjectInputStream ois = new ObjectInputStream(bais);
+        return ois.readObject();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4177735.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4177735
+ * @summary Tests that JColorChooser leaves no threads when disposed
+ * @author Shannon Hickey
+ */
+
+import java.awt.Point;
+import javax.swing.JColorChooser;
+import javax.swing.JDialog;
+import javax.swing.SwingUtilities;
+import javax.swing.colorchooser.AbstractColorChooserPanel;
+
+public class Test4177735 implements Runnable {
+    private static final long DELAY = 1000L;
+
+    public static void main(String[] args) throws Exception {
+        JColorChooser chooser = new JColorChooser();
+        AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
+        chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });
+
+        JDialog dialog = show(chooser);
+        pause(DELAY);
+
+        dialog.dispose();
+        pause(DELAY);
+
+        Test4177735 test = new Test4177735();
+        SwingUtilities.invokeAndWait(test);
+        if (test.count != 0) {
+            throw new Error("JColorChooser leaves " + test.count + " threads running");
+        }
+    }
+
+    static JDialog show(JColorChooser chooser) {
+        JDialog dialog = JColorChooser.createDialog(null, null, false, chooser, null, null);
+        dialog.setVisible(true);
+        // block till displayed
+        Point point = null;
+        while (point == null) {
+            try {
+                point = dialog.getLocationOnScreen();
+            }
+            catch (IllegalStateException exception) {
+                pause(DELAY);
+            }
+        }
+        return dialog;
+    }
+
+    private static void pause(long delay) {
+        try {
+            Thread.sleep(delay);
+        }
+        catch (InterruptedException exception) {
+        }
+    }
+
+    private int count;
+
+    public void run() {
+        ThreadGroup group = Thread.currentThread().getThreadGroup();
+        Thread[] threads = new Thread[group.activeCount()];
+        int count = group.enumerate(threads, false);
+        for (int i = 0; i < count; i++) {
+            String name = threads[i].getName();
+            if ("SyntheticImageGenerator".equals(name)) { // NON-NLS: thread name
+                this.count++;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4193384.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4193384 4200976
+ * @summary Tests the color conversions and the preview panel foreground color
+ * @author Mark Davidson
+ */
+
+import java.awt.Color;
+import javax.swing.JColorChooser;
+import javax.swing.JLabel;
+
+public class Test4193384 {
+    public static void main(String[] args) {
+        test(new Color[] {
+                new Color(11, 12, 13),
+                new Color(204, 0, 204),
+                new Color(0, 51, 51)
+        });
+    }
+
+    private static void test(Color[] colors) {
+        JLabel label = new JLabel("Preview Panel"); // NON-NLS: simple label
+
+        JColorChooser chooser = new JColorChooser();
+        chooser.setPreviewPanel(label);
+
+        float[] hsb = new float[3];
+        for (int i = 0; i < colors.length; i++) {
+            Color color = colors[i];
+            // Make sure sure that there wasn't a regression
+            // in java.awt.Color and the conversion methods
+            Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsb);
+            if (!color.equals(Color.getHSBColor(hsb[0], hsb[1], hsb[2]))) {
+                throw new Error("color conversion is failed");
+            }
+            // 4193384 regression test
+            if (!color.equals(new JColorChooser(color).getColor())) {
+                throw new Error("constructor sets incorrect initial color");
+            }
+            // 4200976 regression test
+            chooser.setColor(color);
+            if (!color.equals(label.getForeground())) {
+                throw new Error("a custom preview panel doesn't handle colors");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4234761.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4234761
+ * @summary RGB values sholdn't be changed in transition to HSB tab
+ * @author Oleg Mokhovikov
+ */
+
+import java.awt.Color;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JColorChooser;
+import javax.swing.JDialog;
+import javax.swing.JTabbedPane;
+
+public class Test4234761 implements PropertyChangeListener {
+    private static final Color COLOR = new Color(51, 51, 51);
+
+    public static void main(String[] args) {
+        JColorChooser chooser = new JColorChooser(COLOR);
+        JDialog dialog = Test4177735.show(chooser);
+
+        PropertyChangeListener listener = new Test4234761();
+        chooser.addPropertyChangeListener("color", listener); // NON-NLS: property name
+
+        JTabbedPane tabbedPane = (JTabbedPane) chooser.getComponent(0);
+        tabbedPane.setSelectedIndex(1); // HSB tab index
+
+        if (!chooser.getColor().equals(COLOR)) {
+            listener.propertyChange(null);
+        }
+        dialog.dispose();
+    }
+
+    public void propertyChange(PropertyChangeEvent event) {
+        throw new Error("RGB value is changed after transition to HSB tab");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4380468.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,17 @@
+<html>
+<body>
+1. Click the HSB tab at the ColorChooser.
+2. Click in the lower left corner of the gradient palette
+   in order to select a color such that all three RGB values
+   are single digit colors (such as 0, 0, 0 or 5, 3, 1).
+3. Click another tab, then click back to the HSB tab.
+4. Now click the lighter colors that should have
+   2 and 3 digit RGB values (in the upper right corner).
+
+If all digits of each RGB value are shown then test passes.
+If only the last digit of their values are shown then test fails.
+
+<applet width="500" height="400" code="Test4380468.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4380468.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4380468
+ * @summary JColorChooser's HSB panel should display all RGB digits
+ * @author Andrey Pikalev
+ * @run applet/manual=yesno Test4380468.html
+ */
+
+import java.awt.Color;
+import javax.swing.JApplet;
+import javax.swing.JColorChooser;
+
+public class Test4380468 extends JApplet {
+    public void init() {
+        add(new JColorChooser(Color.GREEN));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4461329.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4461329
+ * @summary Tests getPreviewPanel() and setPreviewPanel() methods
+ * @author Leif Samuelsson
+ */
+
+import javax.swing.JButton;
+import javax.swing.JColorChooser;
+
+public class Test4461329 {
+    public static void main(String[] args) {
+        JColorChooser chooser = new JColorChooser();
+        if (null == chooser.getPreviewPanel()) {
+            throw new Error("Failed: getPreviewPanel() returned null");
+        }
+        JButton button = new JButton("Color"); // NON-NLS: simple label
+        chooser.setPreviewPanel(button);
+        if (button != chooser.getPreviewPanel()) {
+            throw new Error("Failed in setPreviewPanel()");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4711996.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4711996
+ * @summary Checks if IllegalArgumentException is thrown when updating JColorChooserUI
+ * @author Konstantin Eremin
+ */
+
+import javax.swing.JColorChooser;
+import javax.swing.colorchooser.AbstractColorChooserPanel;
+
+public class Test4711996 {
+    public static void main(String[] args) {
+        JColorChooser chooser = new JColorChooser();
+        AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
+        chooser.removeChooserPanel(panels[0]);
+        chooser.updateUI();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4759306.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,8 @@
+<html>
+<body>
+If you see the preview panel, then test failed, otherwise it passed.
+
+<applet width="500" height="400" code="Test4759306.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4759306.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4759306
+ * @summary Checks if JColorChooser.setPreviewPanel removes the old one
+ * @author Konstantin Eremin
+   @run applet/manual=yesno Test4759306.html
+ */
+
+import javax.swing.JApplet;
+import javax.swing.JColorChooser;
+import javax.swing.JPanel;
+
+public class Test4759306 extends JApplet {
+    public void init() {
+        JColorChooser chooser = new JColorChooser();
+        chooser.setPreviewPanel(new JPanel());
+        getContentPane().add(chooser);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4759934.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,14 @@
+<html>
+<body>
+1. Press button "Show Dialog" at the frame "Test" and
+   the dialog with button "Show ColorChooser" should appears.
+2. Press button "Show ColorChooser" at the dialog "Dialog" and
+   the colorchooser should appears.
+3. Press the button "Cancel" of colorchooser.
+   If the focus will come to the frame "Test" then test fails.
+   If the focus will come to the dialog "Dialog" then test passes.
+
+<applet width="500" height="400" code="Test4759934.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4759934.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4759934
+ * @summary Tests windows activation problem
+ * @author Andrey Pikalev
+ * @run applet/manual=yesno Test4759934.html
+ */
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Window;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JApplet;
+import javax.swing.JButton;
+import javax.swing.JColorChooser;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+
+public class Test4759934 extends JApplet implements ActionListener {
+    private static final String CMD_DIALOG = "Show Dialog"; // NON-NLS: first button
+    private static final String CMD_CHOOSER = "Show ColorChooser"; // NON-NLS: second button
+
+    private final JFrame frame = new JFrame("Test"); // NON-NLS: frame title
+
+    public void init() {
+        show(this.frame, CMD_DIALOG);
+    }
+
+    public void actionPerformed(ActionEvent event) {
+        String command = event.getActionCommand();
+        if (CMD_DIALOG.equals(command)) {
+            JDialog dialog = new JDialog(this.frame, "Dialog"); // NON-NLS: dialog title
+            dialog.setLocation(200, 0);
+            show(dialog, CMD_CHOOSER);
+        }
+        else if (CMD_CHOOSER.equals(command)) {
+            Object source = event.getSource();
+            Component component = (source instanceof Component)
+                    ? (Component) source
+                    : null;
+
+            JColorChooser.showDialog(component, "ColorChooser", Color.BLUE); // NON-NLS: title
+        }
+    }
+
+    private void show(Window window, String command) {
+        JButton button = new JButton(command);
+        button.setActionCommand(command);
+        button.addActionListener(this);
+        button.setFont(button.getFont().deriveFont(64.0f));
+
+        window.add(button);
+        window.pack();
+        window.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4887836.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,9 @@
+<html>
+<body>
+If you do not see white area under swatches,
+then test passed, otherwise it failed.
+
+<applet width="500" height="400" code="Test4887836.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test4887836.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4887836
+ * @summary Checks if no tooltip modification when no KeyStroke modifier
+ * @author Konstantin Eremin
+ * @run applet/manual=yesno Test4887836.html
+ */
+
+import java.awt.Color;
+import java.awt.Font;
+import javax.swing.JApplet;
+import javax.swing.JColorChooser;
+import javax.swing.UIManager;
+
+public class Test4887836 extends JApplet {
+    public void init() {
+        UIManager.put("Label.font", new Font("Perpetua", 0, 36)); // NON-NLS: property and font names
+        add(new JColorChooser(Color.LIGHT_GRAY));
+    }
+}
--- a/jdk/test/javax/swing/JColorChooser/Test6524757.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/javax/swing/JColorChooser/Test6524757.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,14 +34,13 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
-import javax.swing.JButton;
+import javax.swing.AbstractButton;
 import javax.swing.JColorChooser;
 import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
-import javax.swing.JRadioButton;
 import javax.swing.UIManager;
 import javax.swing.WindowConstants;
 import javax.swing.colorchooser.AbstractColorChooserPanel;
@@ -59,31 +58,41 @@
 
             "ColorChooser.swatchesNameText", // NON-NLS: string key from DefaultSwatchChooserPanel
             "ColorChooser.swatchesMnemonic", // NON-NLS: string key from DefaultSwatchChooserPanel:int
-            "ColorChooser.swatchesDisplayedMnemonicIndex", // NON-NLS: int key from DefaultSwatchChooserPanel
             "ColorChooser.swatchesSwatchSize", // NON-NLS: dimension key from DefaultSwatchChooserPanel
             "ColorChooser.swatchesRecentText", // NON-NLS: string key from DefaultSwatchChooserPanel
             "ColorChooser.swatchesRecentSwatchSize", // NON-NLS: dimension key from DefaultSwatchChooserPanel
 //NotAvail: "ColorChooser.swatchesDefaultRecentColor", // NON-NLS: color key from DefaultSwatchChooserPanel
 
-            "ColorChooser.hsbNameText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbMnemonic", // NON-NLS: int key from DefaultHSBChooserPanel
-            "ColorChooser.hsbDisplayedMnemonicIndex", // NON-NLS: int key from DefaultHSBChooserPanel
-            "ColorChooser.hsbHueText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbSaturationText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbBrightnessText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbRedText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbGreenText", // NON-NLS: string key from DefaultHSBChooserPanel
-            "ColorChooser.hsbBlueText", // NON-NLS: string key from DefaultHSBChooserPanel
+            "ColorChooser.hsvNameText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hsvMnemonic", // NON-NLS: int key from HSV ColorChooserPanel
+            "ColorChooser.hsvHueText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hsvSaturationText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hsvValueText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hsvTransparencyText", // NON-NLS: string key from HSV ColorChooserPanel
+
+            "ColorChooser.hslNameText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hslMnemonic", // NON-NLS: int key from HSV ColorChooserPanel
+            "ColorChooser.hslHueText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hslSaturationText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hslLightnessText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.hslTransparencyText", // NON-NLS: string key from HSV ColorChooserPanel
 
-            "ColorChooser.rgbNameText", // NON-NLS: string key from DefaultRGBChooserPanel
-            "ColorChooser.rgbMnemonic", // NON-NLS: int key from DefaultRGBChooserPanel
-            "ColorChooser.rgbDisplayedMnemonicIndex", // NON-NLS: int key from DefaultRGBChooserPanel
-            "ColorChooser.rgbRedText", // NON-NLS: string key from DefaultRGBChooserPanel
-            "ColorChooser.rgbGreenText", // NON-NLS: string key from DefaultRGBChooserPanel
-            "ColorChooser.rgbBlueText", // NON-NLS: string key from DefaultRGBChooserPanel
-            "ColorChooser.rgbRedMnemonic", // NON-NLS: int key from DefaultRGBChooserPanel
-            "ColorChooser.rgbGreenMnemonic", // NON-NLS: int key from DefaultRGBChooserPanel
-            "ColorChooser.rgbBlueMnemonic", // NON-NLS: int key from DefaultRGBChooserPanel
+            "ColorChooser.rgbNameText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbMnemonic", // NON-NLS: int key from HSV ColorChooserPanel
+            "ColorChooser.rgbRedText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbGreenText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbBlueText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbAlphaText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbHexCodeText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.rgbHexCodeMnemonic", // NON-NLS: int key from HSV ColorChooserPanel
+
+            "ColorChooser.cmykNameText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.cmykMnemonic", // NON-NLS: int key from HSV ColorChooserPanel
+            "ColorChooser.cmykCyanText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.cmykMagentaText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.cmykYellowText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.cmykBlackText", // NON-NLS: string key from HSV ColorChooserPanel
+            "ColorChooser.cmykAlphaText", // NON-NLS: string key from HSV ColorChooserPanel
     };
     private static final Object[] KOREAN = convert(Locale.KOREAN, KEYS);
     private static final Object[] FRENCH = convert(Locale.FRENCH, KEYS);
@@ -91,19 +100,15 @@
     public static void main(String[] args) {
         // it affects Swing because it is not initialized
         Locale.setDefault(Locale.KOREAN);
-        Object[] korean = create();
+        validate(KOREAN, create());
 
         // it does not affect Swing because it is initialized
         Locale.setDefault(Locale.CANADA);
-        Object[] canada = create();
+        validate(KOREAN, create());
 
         // it definitely should affect Swing
         JComponent.setDefaultLocale(Locale.FRENCH);
-        Object[] french = create();
-
-        validate(KOREAN, korean);
-        validate(KOREAN, canada);
-        validate(FRENCH, french);
+        validate(FRENCH, create());
     }
 
     private static void validate(Object[] expected, Object[] actual) {
@@ -153,10 +158,47 @@
 
         // process all values
         List<Object> list = new ArrayList<Object>(KEYS.length);
-        addMain(list, dialog);
-        addSwatch(list, chooser);
-        addHSB(list, chooser);
-        addRGB(list, chooser);
+
+        Component component = getC(getC(dialog.getLayeredPane(), 0), 1);
+        AbstractButton ok = (AbstractButton) getC(component, 0);
+        AbstractButton cancel = (AbstractButton) getC(component, 1);
+        AbstractButton reset = (AbstractButton) getC(component, 2);
+        list.add(ok.getText());
+        list.add(cancel.getText());
+        list.add(reset.getText());
+        list.add(Integer.valueOf(reset.getMnemonic()));
+
+        for (int i = 0; i < 5; i++) {
+            AbstractColorChooserPanel panel = (AbstractColorChooserPanel) getC(getC(getC(chooser, 0), i), 0);
+            list.add(panel.getDisplayName());
+            list.add(Integer.valueOf(panel.getMnemonic()));
+            if (i == 0) {
+                JLabel label = (JLabel) getC(getC(panel, 0), 1);
+                JPanel upper = (JPanel) getC(getC(getC(panel, 0), 0), 0);
+                JPanel lower = (JPanel) getC(getC(getC(panel, 0), 2), 0);
+                addSize(list, upper, 1, 1, 31, 9);
+                list.add(label.getText());
+                addSize(list, lower, 1, 1, 5, 7);
+            }
+            else {
+                Component container = getC(panel, 0);
+                for (int j = 0; j < 3; j++) {
+                    AbstractButton button = (AbstractButton) getC(container, j);
+                    list.add(button.getText());
+                }
+                JLabel label = (JLabel) getC(container, 3);
+                list.add(label.getText());
+                if (i == 4) {
+                    label = (JLabel) getC(container, 4);
+                    list.add(label.getText());
+                }
+                if (i == 3) {
+                    label = (JLabel) getC(panel, 1);
+                    list.add(label.getText());
+                    list.add(Integer.valueOf(label.getDisplayedMnemonic()));
+                }
+            }
+        }
 
         // close dialog
         dialog.setVisible(false);
@@ -169,56 +211,6 @@
         return list.toArray();
     }
 
-    private static void addMain(List<Object> list, JDialog dialog) {
-        Component component = getC(getC(dialog.getLayeredPane(), 0), 1);
-        JButton ok = (JButton) getC(component, 0);
-        JButton cancel = (JButton) getC(component, 1);
-        JButton reset = (JButton) getC(component, 2);
-        list.add(ok.getText());
-        list.add(cancel.getText());
-        list.add(reset.getText());
-        list.add(Integer.valueOf(reset.getMnemonic()));
-    }
-
-    private static void addSwatch(List<Object> list, JColorChooser chooser) {
-        Component component = addPanel(list, chooser, 0);
-        JLabel label = (JLabel) getC(getC(component, 0), 1);
-        JPanel upper = (JPanel) getC(getC(getC(component, 0), 0), 0);
-        JPanel lower = (JPanel) getC(getC(getC(component, 0), 2), 0);
-        addSize(list, upper, 1, 1, 31, 9);
-        list.add(label.getText());
-        addSize(list, lower, 1, 1, 5, 7);
-    }
-
-    private static void addHSB(List<Object> list, JColorChooser chooser) {
-        Component component = addPanel(list, chooser, 1);
-        JRadioButton h = (JRadioButton) getC(getC(getC(component, 1), 0), 0);
-        JRadioButton s = (JRadioButton) getC(getC(getC(component, 1), 0), 2);
-        JRadioButton b = (JRadioButton) getC(getC(getC(component, 1), 0), 4);
-        list.add(h.getText());
-        list.add(s.getText());
-        list.add(b.getText());
-        JLabel red = (JLabel) getC(getC(getC(component, 1), 2), 0);
-        JLabel green = (JLabel) getC(getC(getC(component, 1), 2), 2);
-        JLabel blue = (JLabel) getC(getC(getC(component, 1), 2), 4);
-        list.add(red.getText());
-        list.add(green.getText());
-        list.add(blue.getText());
-    }
-
-    private static void addRGB(List<Object> list, JColorChooser chooser) {
-        Component component = addPanel(list, chooser, 2);
-        JLabel red = (JLabel) getC(getC(component, 0), 0);
-        JLabel green = (JLabel) getC(getC(component, 0), 3);
-        JLabel blue = (JLabel) getC(getC(component, 0), 6);
-        list.add(red.getText());
-        list.add(green.getText());
-        list.add(blue.getText());
-        list.add(Integer.valueOf(red.getDisplayedMnemonic()));
-        list.add(Integer.valueOf(green.getDisplayedMnemonic()));
-        list.add(Integer.valueOf(blue.getDisplayedMnemonic()));
-    }
-
     private static void addSize(List<Object> list, Component component, int x, int y, int w, int h) {
         Dimension size = component.getPreferredSize();
         int width = (size.width + 1) / w - x;
@@ -226,14 +218,6 @@
         list.add(new Dimension(width, height));
     }
 
-    private static Component addPanel(List<Object> list, JColorChooser chooser, int index) {
-        AbstractColorChooserPanel panel = (AbstractColorChooserPanel) getC(getC(getC(chooser, 0), index), 0);
-        list.add(panel.getDisplayName());
-        list.add(Integer.valueOf(panel.getMnemonic()));
-        list.add(Integer.valueOf(panel.getDisplayedMnemonicIndex()));
-        return panel;
-    }
-
     private static Component getC(Component component, int index) {
         Container container = (Container) component;
         return container.getComponent(index);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test6559154.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6559154
+ * @summary Tests EDT hanging
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JColorChooser;
+import javax.swing.JDialog;
+import javax.swing.SwingUtilities;
+import javax.swing.Timer;
+
+public class Test6559154 implements ActionListener, Runnable {
+
+    private JDialog dialog;
+
+    public void actionPerformed(ActionEvent event) {
+        if (this.dialog != null) {
+            this.dialog.dispose();
+        }
+    }
+
+    public void run() {
+        Timer timer = new Timer(1000, this);
+        timer.setRepeats(false);
+        timer.start();
+
+        JColorChooser chooser = new JColorChooser();
+        setEnabledRecursive(chooser, false);
+
+        this.dialog = new JDialog();
+        this.dialog.add(chooser);
+        this.dialog.setVisible(true);
+    }
+
+    private static void setEnabledRecursive(Container container, boolean enabled) {
+        for (Component component : container.getComponents()) {
+            component.setEnabled(enabled);
+            if (component instanceof Container) {
+                setEnabledRecursive((Container) component, enabled);
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Test6559154());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test6707406.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6707406
+ * @summary Tests color chooser with invalid UI
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Color;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JColorChooser;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.plaf.basic.BasicColorChooserUI;
+
+public class Test6707406 extends BasicColorChooserUI implements PropertyChangeListener {
+    public static void main(String[] args) throws Exception {
+        test();
+        for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
+            System.out.println(laf.getName());
+            UIManager.setLookAndFeel(laf.getClassName());
+            test();
+        }
+    }
+
+    private static void test() {
+        JColorChooser chooser = new JColorChooser();
+        chooser.getUI().uninstallUI(chooser);
+        new Test6707406().installUI(chooser);
+        chooser.getSelectionModel().setSelectedColor(Color.BLUE);
+    }
+
+    @Override
+    protected PropertyChangeListener createPropertyChangeListener() {
+        return this;
+    }
+
+    public void propertyChange(PropertyChangeEvent event) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/6607130/bug6607130.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6607130
+ * @summary Checks that JComboBox cell editor is hidden if the same
+ *          item is selected with keyboard.
+ *          Also checks that JComboBox cell editor is hidden if F2 and then
+ *          ENTER were pressed.
+ * @author Mikhail Lapshin
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.table.DefaultTableModel;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+
+public class bug6607130 {
+    private JFrame frame;
+    private JComboBox cb;
+    private Robot robot;
+
+    public static void main(String[] args) throws Exception {
+        final bug6607130 test = new bug6607130();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    test.setupUI();
+                }
+            });
+            test.test();
+        } finally {
+            if (test.frame != null) {
+                test.frame.dispose();
+            }
+        }
+    }
+
+    public bug6607130() throws AWTException {
+        robot = new Robot();
+    }
+
+    private void setupUI() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        DefaultTableModel model = new DefaultTableModel(1, 1);
+        JTable table = new JTable(model);
+
+        cb = new JComboBox(new String[]{"one", "two", "three"});
+        table.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(cb));
+        frame.add(table);
+
+        frame.pack();
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+    }
+
+    private void test() throws Exception {
+        realSync();
+        test1();
+        realSync();
+        checkResult("First test");
+        test2();
+        realSync();
+        checkResult("Second test");
+    }
+
+    private void test1() throws Exception {
+        // Select 'one'
+        hitKey(KeyEvent.VK_TAB);
+        realSync();
+        hitKey(KeyEvent.VK_F2);
+        realSync();
+        hitKey(KeyEvent.VK_DOWN);
+        realSync();
+        hitKey(KeyEvent.VK_DOWN);
+        realSync();
+        hitKey(KeyEvent.VK_ENTER);
+        realSync();
+
+        // Select 'one' again
+        hitKey(KeyEvent.VK_F2);
+        realSync();
+        hitKey(KeyEvent.VK_DOWN);
+        realSync();
+        hitKey(KeyEvent.VK_ENTER);
+        realSync();
+    }
+
+    private void test2() throws Exception {
+        // Press F2 and then press ENTER
+        // Editor should be shown and then closed
+        hitKey(KeyEvent.VK_F2);
+        realSync();
+        hitKey(KeyEvent.VK_ENTER);
+        realSync();
+    }
+
+    private void checkResult(String testName) {
+        if (!cb.isShowing()) {
+            System.out.println(testName + " passed");
+        } else {
+            System.out.println(testName + " failed");
+            throw new RuntimeException("JComboBox is showing " +
+                    "after item selection.");
+        }
+    }
+
+    private static void realSync() {
+        ((SunToolkit) (Toolkit.getDefaultToolkit())).realSync();
+    }
+
+    public void hitKey(int keycode) {
+        robot.keyPress(keycode);
+        robot.keyRelease(keycode);
+        delay();
+    }
+
+    private void delay() {
+        try {
+            Thread.sleep(1000);
+        } catch(InterruptedException ie) {
+            ie.printStackTrace();
+        }
+    }
+}
--- a/jdk/test/javax/swing/JFileChooser/4252173/bug4252173.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/* @test
-   @bug 4252173
-   @summary Inability to reuse the HorizontalSliderThumbIcon
-   @author Pavel Porvatov
-   @run main bug4252173
-*/
-
-import javax.swing.*;
-import javax.swing.plaf.metal.DefaultMetalTheme;
-import javax.swing.plaf.metal.MetalLookAndFeel;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.lang.reflect.InvocationTargetException;
-
-public class bug4252173 {
-    public static void main(String[] args) throws InvocationTargetException, InterruptedException {
-        SwingUtilities.invokeAndWait(new Runnable() {
-            public void run() {
-                MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
-
-                JComponent component = new JLabel();
-
-                Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon");
-
-                Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon");
-
-                Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics();
-
-                horizontalThumbIcon.paintIcon(component, g, 0, 0);
-
-                verticalThumbIcon.paintIcon(component, g, 0, 0);
-            }
-        });
-    }
-}
--- a/jdk/test/javax/swing/JFileChooser/6524424/bug6524424.html	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<html>
-<body>
-<applet  code="bug6524424.class" width=200 height=200></applet>
-To test fix follow the next steps:
-1. Select a slider (do the next steps for every slider)
-2. Check that the next keyboard buttons work correctly:
-    Up, Down, Left, Right, Page Up, Page Down
-3. Press left mouse button on a free space of the slider and check
-    that thumb moves correctly
-</body>
-</html>
--- a/jdk/test/javax/swing/JFileChooser/6524424/bug6524424.java	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/* @test
- * @bug 6524424
- * @summary JSlider Clicking In Tracks Behavior Inconsistent For Different Tick Spacings
- * @author Pavel Porvatov
- * @run applet/manual=done bug6524424.html
- */
-
-import java.awt.*;
-import javax.swing.*;
-
-import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
-
-public class bug6524424 extends JApplet {
-    public static void main(String[] args) {
-        try {
-            UIManager.setLookAndFeel(new WindowsLookAndFeel());
-        } catch (UnsupportedLookAndFeelException e) {
-            e.printStackTrace();
-
-            return;
-        }
-
-        TestPanel panel = new TestPanel();
-
-        JFrame frame = new JFrame();
-
-        frame.setContentPane(panel);
-        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
-        frame.pack();
-        frame.setLocationRelativeTo(null);
-
-        frame.setVisible(true);
-    }
-
-    public void init() {
-        TestPanel panel = new TestPanel();
-
-        setContentPane(panel);
-    }
-
-    private static class TestPanel extends JPanel {
-
-        private TestPanel() {
-            super(new GridBagLayout());
-
-            JSlider slider1 = createSlider(1, 2);
-            JSlider slider2 = createSlider(2, 4);
-            JSlider slider3 = createSlider(3, 6);
-
-            addComponent(this, slider1);
-            addComponent(this, slider2);
-            addComponent(this, slider3);
-        }
-
-        private JSlider createSlider(int tickMinor, int tickMajor) {
-            JSlider result = new JSlider();
-
-            result.setPaintLabels(true);
-            result.setPaintTicks(true);
-            result.setSnapToTicks(true);
-            result.setMinimum(0);
-            result.setMaximum(12);
-            result.setMinorTickSpacing(tickMinor);
-            result.setMajorTickSpacing(tickMajor);
-
-            return result;
-        }
-    }
-
-    private static void addComponent(JPanel panel, Component component) {
-        panel.add(component, new GridBagConstraints(0,
-                panel.getComponentCount(), 1, 1,
-                1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
-                new Insets(0, 0, 0, 0), 0, 0));
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/6647340/bug6647340.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6647340
+ * @summary Checks that iconified internal frame follows
+ *          the main frame borders properly.
+ * @author Mikhail Lapshin
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+import java.beans.PropertyVetoException;
+
+public class bug6647340 {
+    private JFrame frame;
+    private Point location;
+    private JInternalFrame jif;
+
+    public static void main(String[] args) throws Exception {
+        final bug6647340 test = new bug6647340();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    test.setupUI();
+                }
+            });
+            test.test();
+        } finally {
+            if (test.frame != null) {
+                test.frame.dispose();
+            }
+        }
+    }
+
+    private void setupUI() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JDesktopPane desktop = new JDesktopPane();
+        frame.add(desktop);
+
+        jif = new JInternalFrame("Internal Frame", true, true, true, true);
+        jif.setBounds(20, 20, 200, 100);
+        desktop.add(jif);
+        jif.setVisible(true);
+
+        Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
+        frame.setBounds((screen.width - 400) / 2, (screen.height - 400) / 2, 400, 400);
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+    }
+
+    private void test() throws Exception {
+        realSync();
+        test1();
+        realSync();
+        check1();
+        realSync();
+        test2();
+        realSync();
+        check2();
+    }
+
+    private void test1() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                setIcon(true);
+                location = jif.getDesktopIcon().getLocation();
+                Dimension size = frame.getSize();
+                frame.setSize(size.width + 100, size.height + 100);
+            }
+        });
+    }
+
+    private void test2() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                setIcon(false);
+            }
+        });
+        realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Dimension size = frame.getSize();
+                frame.setSize(size.width - 100, size.height - 100);
+            }
+        });
+        realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                setIcon(true);
+            }
+        });
+    }
+
+    private void check1() {
+        if (!jif.getDesktopIcon().getLocation().equals(location)) {
+            System.out.println("First test passed");
+        } else {
+            throw new RuntimeException("Icon isn't shifted with the frame bounds");
+        }
+    }
+
+    private void check2() {
+        if (jif.getDesktopIcon().getLocation().equals(location)) {
+            System.out.println("Second test passed");
+        } else {
+            throw new RuntimeException("Icon isn't located near the frame bottom");
+        }
+    }
+
+    private static void realSync() {
+        ((SunToolkit) (Toolkit.getDefaultToolkit())).realSync();
+    }
+
+    private void setIcon(boolean b) {
+        try {
+            jif.setIcon(b);
+        } catch (PropertyVetoException e) {
+            e.printStackTrace();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/6725409/bug6725409.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6725409
+ * @summary Checks that JInternalFrame's system menu
+ *          can be localized during run-time
+ * @author Mikhail Lapshin
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug6725409 {
+    private JFrame frame;
+    private JInternalFrame iFrame;
+    private TestTitlePane testTitlePane;
+    private boolean passed;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            UIManager.setLookAndFeel(
+                    new com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel());
+        } catch(UnsupportedLookAndFeelException e) {
+            System.out.println("The test is for Windows LaF only");
+            System.exit(0);
+        }
+
+        final bug6725409 bug6725409 = new bug6725409();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    bug6725409.setupUIStep1();
+                }
+            });
+            realSync();
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    bug6725409.setupUIStep2();
+                }
+            });
+            realSync();
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    bug6725409.test();
+                }
+            });
+            realSync();
+            bug6725409.checkResult();
+        } finally {
+            if (bug6725409.frame != null) {
+                bug6725409.frame.dispose();
+            }
+        }
+    }
+
+    private void setupUIStep1() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JDesktopPane desktop = new JDesktopPane();
+        iFrame = new JInternalFrame("Internal Frame", true, true, true, true);
+        iFrame.setSize(200, 100);
+        desktop.add(iFrame);
+        frame.add(desktop);
+        iFrame.setVisible(true);
+
+        frame.setSize(500, 300);
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+    }
+
+    private void setupUIStep2() {
+        UIManager.put("InternalFrameTitlePane.restoreButtonText",
+                "CUSTOM.restoreButtonText");
+        UIManager.put("InternalFrameTitlePane.moveButtonText",
+                "CUSTOM.moveButtonText");
+        UIManager.put("InternalFrameTitlePane.sizeButtonText",
+                "CUSTOM.sizeButtonText");
+        UIManager.put("InternalFrameTitlePane.minimizeButtonText",
+                "CUSTOM.minimizeButtonText");
+        UIManager.put("InternalFrameTitlePane.maximizeButtonText",
+                "CUSTOM.maximizeButtonText");
+        UIManager.put("InternalFrameTitlePane.closeButtonText",
+                "CUSTOM.closeButtonText");
+        SwingUtilities.updateComponentTreeUI(frame);
+    }
+
+    // The test depends on the order of the menu items in
+    // WindowsInternalFrameTitlePane.systemPopupMenu
+    private void test() {
+        testTitlePane = new TestTitlePane(iFrame);
+        passed = true;
+        checkMenuItemText(0, "CUSTOM.restoreButtonText");
+        checkMenuItemText(1, "CUSTOM.moveButtonText");
+        checkMenuItemText(2, "CUSTOM.sizeButtonText");
+        checkMenuItemText(3, "CUSTOM.minimizeButtonText");
+        checkMenuItemText(4, "CUSTOM.maximizeButtonText");
+        // Skip separator
+        checkMenuItemText(6, "CUSTOM.closeButtonText");
+    }
+
+    private void checkMenuItemText(int index, String text) {
+        JMenuItem menuItem = (JMenuItem)
+                testTitlePane.getSystemPopupMenu().getComponent(index);
+        if (!text.equals(menuItem.getText())) {
+            passed = false;
+        }
+    }
+
+    private void checkResult() {
+        if (passed) {
+            System.out.println("Test passed");
+        } else {
+            throw new RuntimeException("Unable to localize " +
+                    "JInternalFrame's system menu during run-time");
+        }
+    }
+
+    private static void realSync() {
+        ((sun.awt.SunToolkit) (Toolkit.getDefaultToolkit())).realSync();
+    }
+
+    // Extend WindowsInternalFrameTitlePane to get access to systemPopupMenu
+    private class TestTitlePane extends
+            com.sun.java.swing.plaf.windows.WindowsInternalFrameTitlePane {
+        private JPopupMenu systemPopupMenu;
+
+        public TestTitlePane(JInternalFrame f) {
+            super(f);
+        }
+
+        public JPopupMenu getSystemPopupMenu() {
+            return systemPopupMenu;
+        }
+
+        protected void addSystemMenuItems(JPopupMenu menu) {
+            super.addSystemMenuItems(menu);
+            systemPopupMenu = menu;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/4252173/bug4252173.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 4252173
+   @summary Inability to reuse the HorizontalSliderThumbIcon
+   @author Pavel Porvatov
+   @run main bug4252173
+*/
+
+import javax.swing.*;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.lang.reflect.InvocationTargetException;
+
+public class bug4252173 {
+    public static void main(String[] args) throws InvocationTargetException, InterruptedException {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+
+                JComponent component = new JLabel();
+
+                Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon");
+
+                Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon");
+
+                Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics();
+
+                horizontalThumbIcon.paintIcon(component, g, 0, 0);
+
+                verticalThumbIcon.paintIcon(component, g, 0, 0);
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6278700/bug6278700.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6278700
+ * @summary JSlider created with BoundedRangeModel fires twice when changed
+ * @author Pavel Porvatov
+   @run main bug6278700
+ */
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+public class bug6278700 {
+    private int changeCount;
+
+    private final ChangeListener listener = new ChangeListener() {
+        public void stateChanged(ChangeEvent e) {
+            changeCount++;
+        }
+    };
+
+    public static void main(String[] args) {
+        new bug6278700();
+    }
+
+    public bug6278700() {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                JSlider slider = new JSlider(new DefaultBoundedRangeModel(5, 0, 0, 10));
+
+                slider.addChangeListener(listener);
+                slider.setValue(0);
+
+                if (changeCount != 1) {
+                    throw new RuntimeException("Incorrect stateChanged count: " + Integer.toString(changeCount));
+                }
+
+                changeCount = 0;
+
+                slider = new JSlider();
+
+                slider.addChangeListener(listener);
+                slider.setValue(0);
+
+                if (changeCount != 1) {
+                    throw new RuntimeException("Incorrect stateChanged count: " + Integer.toString(changeCount));
+                }
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6524424/bug6524424.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,11 @@
+<html>
+<body>
+<applet  code="bug6524424.class" width=200 height=200></applet>
+To test fix follow the next steps:
+1. Select a slider (do the next steps for every slider)
+2. Check that the next keyboard buttons work correctly:
+    Up, Down, Left, Right, Page Up, Page Down
+3. Press left mouse button on a free space of the slider and check
+    that thumb moves correctly
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6524424/bug6524424.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6524424
+ * @summary JSlider Clicking In Tracks Behavior Inconsistent For Different Tick Spacings
+ * @author Pavel Porvatov
+ * @run applet/manual=done bug6524424.html
+ */
+
+import java.awt.*;
+import javax.swing.*;
+
+import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
+
+public class bug6524424 extends JApplet {
+    public static void main(String[] args) {
+        try {
+            UIManager.setLookAndFeel(new WindowsLookAndFeel());
+        } catch (UnsupportedLookAndFeelException e) {
+            e.printStackTrace();
+
+            return;
+        }
+
+        TestPanel panel = new TestPanel();
+
+        JFrame frame = new JFrame();
+
+        frame.setContentPane(panel);
+        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+        frame.pack();
+        frame.setLocationRelativeTo(null);
+
+        frame.setVisible(true);
+    }
+
+    public void init() {
+        TestPanel panel = new TestPanel();
+
+        setContentPane(panel);
+    }
+
+    private static class TestPanel extends JPanel {
+
+        private TestPanel() {
+            super(new GridBagLayout());
+
+            JSlider slider1 = createSlider(1, 2);
+            JSlider slider2 = createSlider(2, 4);
+            JSlider slider3 = createSlider(3, 6);
+
+            addComponent(this, slider1);
+            addComponent(this, slider2);
+            addComponent(this, slider3);
+        }
+
+        private JSlider createSlider(int tickMinor, int tickMajor) {
+            JSlider result = new JSlider();
+
+            result.setPaintLabels(true);
+            result.setPaintTicks(true);
+            result.setSnapToTicks(true);
+            result.setMinimum(0);
+            result.setMaximum(12);
+            result.setMinorTickSpacing(tickMinor);
+            result.setMajorTickSpacing(tickMajor);
+
+            return result;
+        }
+    }
+
+    private static void addComponent(JPanel panel, Component component) {
+        panel.add(component, new GridBagConstraints(0,
+                panel.getComponentCount(), 1, 1,
+                1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
+                new Insets(0, 0, 0, 0), 0, 0));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6587742/bug6587742.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,13 @@
+<html>
+<body>
+<applet  code="bug6587742.class" width=800 height=600></applet>
+Select every theme and check that all sliders looks good.
+Note that every slider has a tooltip text with information about
+slider configuration.
+There is a small difference in sliders with property "filled = null" (it's
+default behaviour when property JSlider.isFilled is not setted)
+for themes:
+1. OceanTheme - sliders look like filled
+2. DefaultMetalTheme - sliders look like NOT filled 
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6587742/bug6587742.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6587742
+ * @summary filling half of a JSlider's track is no longer optional
+ * @author Pavel Porvatov
+ * @run applet/manual=done bug6587742.html
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import javax.swing.plaf.metal.MetalTheme;
+import javax.swing.plaf.metal.OceanTheme;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+public class bug6587742 extends JApplet {
+    public void init() {
+        TestPanel panel = new TestPanel();
+
+        setContentPane(panel);
+    }
+
+    private class TestPanel extends JPanel {
+        private final JComboBox cbThemes = new JComboBox();
+
+        private TestPanel() {
+            // Fill cbThemes
+            cbThemes.addItem(new OceanTheme());
+            cbThemes.addItem(new DefaultMetalTheme());
+
+            cbThemes.addItemListener(new ItemListener() {
+                public void itemStateChanged(ItemEvent e) {
+                    MetalTheme theme = (MetalTheme) cbThemes.getSelectedItem();
+
+                    if (theme != null) {
+                        MetalLookAndFeel.setCurrentTheme(theme);
+
+                        // re-install the Metal Look and Feel
+                        try {
+                            UIManager.setLookAndFeel(new MetalLookAndFeel());
+                        } catch (UnsupportedLookAndFeelException e1) {
+                            JOptionPane.showMessageDialog(TestPanel.this, "Can't change theme: " + e1.getMessage(),
+                                    "Error", JOptionPane.ERROR_MESSAGE);
+
+                            return;
+                        }
+
+                        SwingUtilities.updateComponentTreeUI(bug6587742.this);
+                    }
+                }
+            });
+
+            JPanel pnVertical = new JPanel();
+
+            pnVertical.setLayout(new BoxLayout(pnVertical, BoxLayout.Y_AXIS));
+
+            for (int i = 0; i < 12; i++) {
+                int filled = i >> 2;
+
+                pnVertical.add(createSlider(false, filled > 1 ? null : Boolean.valueOf(filled == 1), (i & 2) == 0,
+                        (i & 1) != 0));
+            }
+
+            JPanel pnHorizontal = new JPanel();
+
+            pnHorizontal.setLayout(new BoxLayout(pnHorizontal, BoxLayout.X_AXIS));
+
+            for (int i = 0; i < 12; i++) {
+                int filled = i >> 2;
+
+                pnHorizontal.add(createSlider(true, filled > 1 ? null : Boolean.valueOf(filled == 1), (i & 2) == 0,
+                        (i & 1) != 0));
+            }
+
+            JTabbedPane tpSliders = new JTabbedPane();
+
+            tpSliders.add("Vertical sliders", pnVertical);
+            tpSliders.add("Horizontal sliders", pnHorizontal);
+
+            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+
+            add(new JLabel("Select theme:"));
+            add(cbThemes);
+            add(tpSliders);
+        }
+    }
+
+    private static JSlider createSlider(boolean vertical, Boolean filled, boolean enabled, boolean inverted) {
+        JSlider result = new JSlider(vertical ? SwingConstants.VERTICAL : SwingConstants.HORIZONTAL, 0, 100, 50);
+
+        result.setMajorTickSpacing(20);
+        result.setMinorTickSpacing(5);
+        result.setPaintTicks(true);
+        result.setPaintLabels(true);
+        result.setEnabled(enabled);
+
+        if (filled != null) {
+            result.putClientProperty("JSlider.isFilled", filled);
+        }
+
+        result.setInverted(inverted);
+        result.setToolTipText("<html>vertical = " + vertical + "<br>enabled = " + enabled + "<br>filled = " + filled +
+                "<br>inverted = " + inverted + "</html>");
+
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6742358/bug6742358.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,6 @@
+<html>
+<body>
+<applet  code="bug6742358.class" width=400 height=300></applet>
+Check that all sliders look good.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSlider/6742358/bug6742358.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6742358
+ * @summary MetalSliderUI paint wrong vertical disabled filled JSlider for DefaultMetalTheme
+ * @author Pavel Porvatov
+ * @run applet/manual=done bug6742358.html
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+
+public class bug6742358 extends JApplet {
+    public static void main(String[] args) {
+        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+
+        JFrame frame = new JFrame();
+
+        frame.setContentPane(new TestPanel());
+        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+        frame.pack();
+        frame.setLocationRelativeTo(null);
+
+        frame.setVisible(true);
+    }
+
+    public void init() {
+        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+
+        TestPanel panel = new TestPanel();
+
+        setContentPane(panel);
+    }
+
+    private static class TestPanel extends JPanel {
+
+        private TestPanel() {
+            JPanel pnVertical = new JPanel();
+
+            pnVertical.setLayout(new BoxLayout(pnVertical, BoxLayout.Y_AXIS));
+
+            for (int i = 0; i < 8; i++) {
+                pnVertical.add(createSlider(false, (i & 4) == 0, (i & 2) == 0, (i & 1) == 0));
+            }
+
+            JPanel pnHorizontal = new JPanel();
+
+            pnHorizontal.setLayout(new BoxLayout(pnHorizontal, BoxLayout.X_AXIS));
+
+            for (int i = 0; i < 8; i++) {
+                pnHorizontal.add(createSlider(true, (i & 4) == 0, (i & 2) == 0, (i & 1) == 0));
+            }
+
+            add(pnHorizontal);
+            add(pnVertical);
+        }
+    }
+
+    private static JSlider createSlider(boolean vertical, boolean enabled, boolean filled, boolean inverted) {
+        JSlider result = new JSlider(vertical ? SwingConstants.VERTICAL : SwingConstants.HORIZONTAL, 0, 10, 5);
+
+        result.setEnabled(enabled);
+        result.putClientProperty("JSlider.isFilled", filled);
+        result.setInverted(inverted);
+        result.setToolTipText("<html>vertical = " + vertical + "<br>enabled = " + enabled + "<br>filled = " + filled +
+                "<br>inverted = " + inverted + "</html>");
+
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/RepaintManager/6608456/bug6608456.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ *
+ * @bug 6608456
+ * @author Igor Kushnirskiy
+ * @summary tests if delegate RepaintManager gets invoked.
+ */
+
+import java.awt.*;
+import java.lang.reflect.Method;
+import java.util.concurrent.Callable;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+
+import javax.swing.JComponent;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.RepaintManager;
+import javax.swing.SwingUtilities;
+
+
+
+public class bug6608456 {
+    private static final TestFuture testFuture = new TestFuture();
+    public static void main(String[] args) throws Exception {
+        final JComponent component = invokeAndWait(
+            new Callable<JComponent>() {
+                public JComponent call() throws Exception {
+                    RepaintManager.setCurrentManager(new TestRepaintManager());
+                    JFrame frame = new JFrame("test");
+                    frame.setLayout(new FlowLayout());
+                    JButton button = new JButton("default");
+
+                    frame.add(button);
+                    button = new JButton("delegate");
+                    if ( ! registerDelegate(
+                             button, new TestRepaintManager())) {
+                        return null;
+                    }
+                    frame.add(button);
+                    frame.pack();
+                    frame.setVisible(true);
+                    return button;
+                }
+            });
+        if (component == null) {
+            throw new RuntimeException("failed. can not register delegate");
+        }
+        blockTillDisplayed(component);
+        // trigger repaint for delegate RepaintManager
+        invokeAndWait(
+            new Callable<Void>() {
+                public Void call() {
+                    component.repaint();
+                    return null;
+                }
+        });
+        try {
+            if (testFuture.get(10, TimeUnit.SECONDS)) {
+                // passed
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("failed", e);
+        } finally {
+            JFrame frame = (JFrame) SwingUtilities
+                .getAncestorOfClass(JFrame.class, component);
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+    static class TestRepaintManager extends RepaintManager {
+        @Override
+        public void addDirtyRegion(JComponent c, int x, int y, int w, int h) {
+            if (RepaintManager.currentManager(c) == this) {
+                testFuture.defaultCalled();
+            } else {
+                testFuture.delegateCalled();
+            }
+            super.addDirtyRegion(c, x, y, w, h);
+        }
+    }
+    static class TestFuture extends FutureTask<Boolean> {
+        private volatile boolean defaultCalled = false;
+        private volatile boolean delegateCalled = false;
+        public TestFuture() {
+            super(new Callable<Boolean>() {
+                public Boolean call() {
+                    return null;
+                }
+            });
+        }
+        public void defaultCalled() {
+            defaultCalled = true;
+            updateState();
+        }
+        public void delegateCalled() {
+            delegateCalled = true;
+            updateState();
+        }
+        private void updateState() {
+            if (defaultCalled && delegateCalled) {
+                set(Boolean.TRUE);
+            }
+        }
+    }
+
+    private static boolean registerDelegate(JComponent c,
+            RepaintManager repaintManager) {
+        boolean rv = false;
+        try {
+            Class<?> clazz = Class.forName("com.sun.java.swing.SwingUtilities3");
+            Method method = clazz.getMethod("setDelegateRepaintManager",
+                JComponent.class, RepaintManager.class);
+            method.invoke(clazz, c, repaintManager);
+            rv = true;
+        } catch (Exception ignore) {
+        }
+        return rv;
+    }
+    static <T> T invokeAndWait(Callable<T> callable) throws Exception {
+        FutureTask<T> future = new FutureTask<T>(callable);
+        SwingUtilities.invokeLater(future);
+        return future.get();
+    }
+
+    public static void blockTillDisplayed(Component comp) {
+        Point p = null;
+        while (p == null) {
+            try {
+                p = comp.getLocationOnScreen();
+            } catch (IllegalStateException e) {
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ie) {
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4120351.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4120351
+ * @summary Tests that the methods createEtchedBorder(int type) and
+ *          createEtchedBorder(int type, Color highlight, Color shadows) are added
+ * @author Andrey Pikalev
+ */
+
+import java.awt.Color;
+import javax.swing.BorderFactory;
+import javax.swing.border.EtchedBorder;
+
+public class Test4120351 {
+    public static void main(String[] args) {
+        BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
+        BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
+        BorderFactory.createEtchedBorder(EtchedBorder.RAISED, Color.BLACK, Color.WHITE);
+        BorderFactory.createEtchedBorder(EtchedBorder.LOWERED, Color.WHITE, Color.BLACK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4124729.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,38 @@
+/*
+ * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4124729
+ * @summary Test that constrtructor LineBorder(?,?,?) is public
+ * @author Andrey Pikalev
+ */
+
+import java.awt.Color;
+import javax.swing.border.LineBorder;
+
+public class Test4124729 {
+    public static void main(String[] args) {
+        new LineBorder(Color.BLUE, 3, true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4243289.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,9 @@
+<html>
+<body>
+When applet starts, you'll see a panel with a TitledBorder with title "Panel Title".
+If this title is overstriken with the border line, test fails, otherwise it passes.
+
+<applet width="600" height="300" code="Test4243289.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4243289.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4243289
+ * @summary Tests that TitledBorder do not draw line through its caption
+ * @author Peter Zhelezniakov
+ * @run applet/manual=yesno Test4243289.html
+ */
+
+import java.awt.Font;
+import javax.swing.BorderFactory;
+import javax.swing.JApplet;
+import javax.swing.JPanel;
+import javax.swing.border.TitledBorder;
+
+public class Test4243289 extends JApplet {
+    public void init() {
+        Font font = new Font("Dialog", Font.PLAIN, 12); // NON-NLS: the font name
+        TitledBorder border = BorderFactory.createTitledBorder(
+                BorderFactory.createEtchedBorder(),
+                "Panel Title", // NON-NLS: the title of the border
+                TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION,
+                font);
+
+        JPanel panel = new JPanel();
+        panel.setBorder(border);
+        getContentPane().add(panel);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4247606.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,10 @@
+<html>
+<body>
+If the button do not fit into the titled border bounds
+and cover the bottom border's line then test fails.
+Otherwise test passes.
+
+<applet width="200" height="200" code="Test4247606.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4247606.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4247606
+ * @summary BorderedPane appears wrong with Title Position Below Bottom
+ * @author Andrey Pikalev
+ * @run applet/manual=yesno Test4247606.html
+ */
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import javax.swing.BorderFactory;
+import javax.swing.JApplet;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.border.Border;
+import javax.swing.border.TitledBorder;
+
+public class Test4247606 extends JApplet {
+    public void init() {
+        JButton button = new JButton("Button"); // NON-NLS: the button text
+        button.setBorder(BorderFactory.createLineBorder(Color.red, 1));
+
+        TitledBorder border = new TitledBorder("Bordered Pane"); // NON-NLS: the panel title
+        border.setTitlePosition(TitledBorder.BELOW_BOTTOM);
+
+        JPanel panel = create(button, border);
+        panel.setBackground(Color.green);
+
+        getContentPane().add(create(panel, BorderFactory.createEmptyBorder(10, 10, 10, 10)));
+    }
+
+    private static JPanel create(JComponent component, Border border) {
+        JPanel panel = new JPanel(new BorderLayout());
+        panel.setBorder(border);
+        panel.add(component);
+        return panel;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4252164.html	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,10 @@
+<html>
+<body>
+Please, ensure that rounded border is filled completely.
+It should not contain white points inside.
+Use Mouse Wheel to change thickness of the border.
+
+<applet width="400" height="200" code="Test4252164.class">
+</applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test4252164.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4252164
+ * @summary Tests rounded LineBorder for components
+ * @author Sergey Malenkov
+ * @run applet/manual=yesno Test4252164.html
+ */
+
+import java.awt.Color;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import javax.swing.JApplet;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.border.LineBorder;
+
+public class Test4252164 extends JApplet implements MouseWheelListener {
+    private int thickness;
+    private JLabel rounded;
+    private JLabel straight;
+
+    public void mouseWheelMoved(MouseWheelEvent event) {
+        update(event.getWheelRotation());
+    }
+
+    public void init() {
+        add(createUI());
+        addMouseWheelListener(this);
+    }
+
+    private JPanel createUI() {
+        this.rounded = new JLabel("ROUNDED"); // NON-NLS: the label for rounded border
+        this.straight = new JLabel("STRAIGHT"); // NON-NLS: the label for straight border
+
+        JPanel panel = new JPanel();
+        panel.add(this.rounded);
+        panel.add(this.straight);
+
+        update(10);
+
+        return panel;
+    }
+
+    private void update(int thickness) {
+        this.thickness += thickness;
+
+        this.rounded.setBorder(new LineBorder(Color.RED, this.thickness, true));
+        this.straight.setBorder(new LineBorder(Color.RED, this.thickness, false));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test6461042.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6461042
+ * @summary Tests that toString() doesn't cause StackOverflowException
+ *          when a JComponent is its own border
+ * @author Shannon Hickey
+ */
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Insets;
+import javax.swing.JComponent;
+import javax.swing.border.Border;
+
+public class Test6461042 extends JComponent implements Border {
+    public static void main(String[] args) {
+        new Test6461042().toString();
+    }
+
+    public Test6461042() {
+        setBorder(this);
+    }
+
+    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+    }
+
+    public Insets getBorderInsets(Component c) {
+        return null;
+    }
+
+    public boolean isBorderOpaque() {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/html/HRuleView/Test5062055.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 5062055
+   @summary Tests parsing of incorrect HR attributes
+   @author Peter Zhelezniakov
+   @run main Test5062055
+*/
+
+import java.awt.Dimension;
+import javax.swing.*;
+
+public class Test5062055 implements Runnable
+{
+    public static void main(String argv[]) {
+        SwingUtilities.invokeLater(new Test5062055());
+        // give HTML time to be parsed
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException ex) {
+            throw new Error("Wait interrupted");
+        }
+    }
+
+    public void run() {
+        JEditorPane jep = new JEditorPane();
+        jep.setContentType("text/html");
+        jep.setEditable(false);
+        jep.setText("<HTML><BODY><HR size='5px'></BODY></HTML>");
+        jep.setPreferredSize(new Dimension(640,480));
+    }
+}
--- a/jdk/test/javax/xml/crypto/dsig/GenerationTests.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/javax/xml/crypto/dsig/GenerationTests.java	Wed Jul 05 16:42:37 2017 +0200
@@ -92,6 +92,7 @@
     private static Certificate signingCert;
     private static KeyStore ks;
     private final static String DIR = System.getProperty("test.src", ".");
+//    private final static String DIR = ".";
     private final static String DATA_DIR =
         DIR + System.getProperty("file.separator") + "data";
     private final static String KEYSTORE =
@@ -202,6 +203,9 @@
         DOMSignContext dsc = new DOMSignContext(signingKey, envelope);
 
         sig.sign(dsc);
+//      StringWriter sw = new StringWriter();
+//      dumpDocument(doc, sw);
+//      System.out.println(sw.toString());
 
         DOMValidateContext dvc = new DOMValidateContext
             (kvks, envelope.getFirstChild());
--- a/jdk/test/sun/net/www/http/ChunkedInputStream/ChunkedEncodingTest.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/sun/net/www/http/ChunkedInputStream/ChunkedEncodingTest.java	Wed Jul 05 16:42:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,6 @@
 /**
  * @test
  * @bug 4333920
- * @library ../../../../../sun/net/www/httptest/
- * @build HttpCallback HttpServer ClosedChannelList HttpTransaction
  * @run main ChunkedEncodingTest
  * @summary ChunkedEncodingTest unit test
  */
@@ -33,84 +31,93 @@
 import java.io.*;
 import java.net.*;
 import java.security.*;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpExchange;
+import static java.lang.System.out;
 
-public class ChunkedEncodingTest implements HttpCallback {
-    private static String FNPrefix;
-    private String[] respBody = new String[52];
-    private byte[][] bufs = new byte[52][8*1024];
-    private static MessageDigest md5;
-    private static byte[] file1Mac, file2Mac;
-    public void request (HttpTransaction req) {
+public class ChunkedEncodingTest{
+    private static MessageDigest serverDigest, clientDigest;
+    private static byte[] serverMac, clientMac;
+
+    static void client(String u) throws Exception {
+        URL url = new URL(u);
+        out.println("client opening connection to: " + u);
+        URLConnection urlc = url.openConnection();
+        DigestInputStream dis =
+                new DigestInputStream(urlc.getInputStream(), clientDigest);
+        while (dis.read() != -1);
+        clientMac = dis.getMessageDigest().digest();
+        dis.close();
+    }
+
+    public static void test() {
+        HttpServer server = null;
         try {
-            FileInputStream fis = new FileInputStream(FNPrefix+"test.txt");
-            DigestInputStream dis = null;
-            md5.reset();
-            dis = new DigestInputStream(fis, md5);
-            for (int i = 0; i < 52; i++) {
-                int n = dis.read(bufs[i]);
-                respBody[i] = new String(bufs[i], 0, n);
+            serverDigest = MessageDigest.getInstance("MD5");
+            clientDigest = MessageDigest.getInstance("MD5");
+            server = startHttpServer();
+
+            int port = server.getAddress().getPort();
+            out.println ("Server listening on port: " + port);
+            client("http://localhost:" + port + "/chunked/");
+
+            if (!MessageDigest.isEqual(clientMac, serverMac)) {
+                throw new RuntimeException(
+                 "Data received is NOT equal to the data sent");
             }
-            file1Mac = dis.getMessageDigest().digest();
-            dis.close();
-            req.setResponseEntityBody(respBody);
-            req.sendResponse(200, "OK");
-            req.orderlyClose();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            if (server != null)
+                server.stop(0);
         }
     }
 
-    static void read (InputStream is) throws IOException {
-        int c;
-        System.out.println ("reading");
-
-        DigestInputStream dis = null;
-        md5.reset();
-        dis = new DigestInputStream(is, md5);
-        while ((c=dis.read()) != -1);
-        file2Mac = dis.getMessageDigest().digest();
-        dis.close();
-        System.out.println ("finished reading");
-    }
-
-    static void client (String u) throws Exception {
-        URL url = new URL (u);
-        System.out.println ("client opening connection to: " + u);
-        URLConnection urlc = url.openConnection ();
-        InputStream is = urlc.getInputStream ();
-        read (is);
-        is.close();
-    }
-
-    static HttpServer server;
-
-    public static void test () throws Exception {
-        try {
-
-            FNPrefix = System.getProperty("test.src", ".")+"/";
-            md5 = MessageDigest.getInstance("MD5");
-            server = new HttpServer (new ChunkedEncodingTest(), 1, 10, 0);
-            System.out.println ("Server: listening on port: " + server.getLocalPort());
-            client ("http://localhost:"+server.getLocalPort()+"/d1/foo.html");
-        } catch (Exception e) {
-            if (server != null) {
-                server.terminate();
-            }
-            throw e;
-        }
-        if (!MessageDigest.isEqual(file1Mac, file2Mac)) {
-            except ("The file sent by server is different from the original file");
-        }
-
-        server.terminate();
-    }
-
-    public static void main(String[] args) throws Exception {
+    public static void main(String[] args) {
         test();
     }
 
-    public static void except (String s) {
-        server.terminate();
-        throw new RuntimeException (s);
+    /**
+     * Http Server
+     */
+    static HttpServer startHttpServer() throws IOException {
+        HttpServer httpServer = HttpServer.create(new InetSocketAddress(0), 0);
+        HttpHandler httpHandler = new SimpleHandler();
+        httpServer.createContext("/chunked/", httpHandler);
+        httpServer.start();
+        return httpServer;
+    }
+
+    static class SimpleHandler implements HttpHandler {
+        static byte[] baMessage;
+        final static int CHUNK_SIZE = 8 * 1024;
+        final static int MESSAGE_LENGTH = 52 * CHUNK_SIZE;
+
+        static {
+            baMessage = new byte[MESSAGE_LENGTH];
+            for (int i=0; i<MESSAGE_LENGTH; i++)
+                baMessage[i] = (byte)i;
+        }
+
+        @Override
+        public void handle(HttpExchange t) throws IOException {
+            InputStream is = t.getRequestBody();
+            while (is.read() != -1);
+            is.close();
+
+            t.sendResponseHeaders (200, MESSAGE_LENGTH);
+            OutputStream os = t.getResponseBody();
+            DigestOutputStream dos = new DigestOutputStream(os, serverDigest);
+
+            int offset = 0;
+            for (int i=0; i<52; i++) {
+                dos.write(baMessage, offset, CHUNK_SIZE);
+                offset += CHUNK_SIZE;
+            }
+            serverMac = serverDigest.digest();
+            os.close();
+            t.close();
+        }
     }
 }
--- a/jdk/test/sun/net/www/http/ChunkedInputStream/test.txt	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-Fo`kMsMr*sth,dr2oD]eg<N\U4KGXn2VQ,&'!;AW&I["@nZQJWPG$PpAl;1AZ@R:DZ4;<,C-&1H7ZAjAq7LN`NV[,YDa^JKW_!oW6>=tA9q;%*^5$1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<,?sMq\%rp`UG, 86V2T)Pkl/(`)=@D&ctDt;TE"eeb+,MQ9nHV\0(KX2_gL1ADp!=#n]`fq)+s'ACJ8d%t57UXV>@RHr(]NkRQnk?8<fj'p(8F`5\d`tN>IL0oKLj'*N\Vrq:AN)aZ!"i;e(D(`*F:_.$f',ZEg]NdGT*S.:A6PkGf0?/@dmLP^A) Jh3rjQ0-kZ@OA^T41[DLG)O0Jtg'A#G+c2^X>l8g]1A\lB*)c&bnG8imS[ocBS.AXL%K^ .*L2`,CUAE.'DkbK4LZ_@)4MZS:Wlk('RHFUO&WsM;tK5fL5dm<-G_tmh><M48CSG#aDd =eP*OC;Sr6-64e74'>aA/"Rn>e-@cKaUr#`D"A%Bp2)>#0 Y-=s-jr:ita j_jD`jN+i(GL@)Cm%o@Afc`c$66HAt[k5gOGJt-<Xl`Q@-J0e@ZMq082A]Vcb+#AhUAG#tSG!8YNLYDPh-ge(BJALNLL]jrT)LcHXf[r^=ZXL:dp'AUr%l"11^rhds/@+M82o&oa@MdCgB$eIX)2`CdR9V^k(L]]C&p:<.^;]XqeVQ&@ F[DAGd3!)q^g1*:2[\A8M@h)][7L"(X;r([rA Hf8rN&*A5=$oTo5s#;GCZX
-
--- a/jdk/test/tools/launcher/Arrrghs.java	Fri Oct 10 13:29:11 2008 -0700
+++ b/jdk/test/tools/launcher/Arrrghs.java	Wed Jul 05 16:42:37 2017 +0200
@@ -21,57 +21,47 @@
  * have any questions.
  */
 
+/**
+ * @test
+ * @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881
+ * @summary Argument parsing validation.
+ * @compile Arrrghs.java TestHelper.java
+ * @run main Arrrghs
+ */
+
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
 import java.util.Map;
-import java.util.StringTokenizer;
 
 public class Arrrghs {
-
+    private Arrrghs(){}
     /**
+     * This class provides various tests for arguments processing.
      * A group of tests to ensure that arguments are passed correctly to
      * a child java process upon a re-exec, this typically happens when
      * a version other than the one being executed is requested by the user.
      *
      * History: these set of tests  were part of Arrrghs.sh. The MKS shell
-     * implementations are notoriously buggy. Implementing these tests purely
+     * implementations were notoriously buggy. Implementing these tests purely
      * in Java is not only portable but also robust.
      *
      */
 
-    /* Do not instantiate */
-    private Arrrghs() {}
-
-    static String javaCmd;
-
     // The version string to force a re-exec
     final static String VersionStr = "-version:1.1+";
 
     // The Cookie or the pattern we match in the debug output.
     final static String Cookie = "ReExec Args: ";
 
-    private static boolean _debug = Boolean.getBoolean("Arrrghs.Debug");
-    private static boolean isWindows = System.getProperty("os.name", "unknown").startsWith("Windows");
-    private static int exitValue = 0;
-
-    private static void doUsage(String message) {
-        if (message != null) System.out.println("Error: " + message);
-        System.out.println("Usage: Arrrghs path_to_java");
-        System.exit(1);
-    }
-
     /*
      * SIGH, On Windows all strings are quoted, we need to unwrap it
      */
     private static String removeExtraQuotes(String in) {
-        if (isWindows) {
+        if (TestHelper.isWindows) {
             // Trim the string and remove the enclosed quotes if any.
             in = in.trim();
             if (in.startsWith("\"") && in.endsWith("\"")) {
@@ -81,27 +71,29 @@
         return in;
     }
 
-
     /*
      * This method detects the cookie in the output stream of the process.
      */
-    private static boolean detectCookie(InputStream istream, String expectedArguments) throws IOException {
+    private static boolean detectCookie(InputStream istream,
+            String expectedArguments) throws IOException {
         BufferedReader rd = new BufferedReader(new InputStreamReader(istream));
         boolean retval = false;
 
         String in = rd.readLine();
         while (in != null) {
-            if (_debug) System.out.println(in);
+            if (TestHelper.debug) System.out.println(in);
             if (in.startsWith(Cookie)) {
                 String detectedArgument = removeExtraQuotes(in.substring(Cookie.length()));
                 if (expectedArguments.equals(detectedArgument)) {
                     retval = true;
                 } else {
-                    System.out.println("Error: Expected Arguments\t:'" + expectedArguments + "'");
-                    System.out.println(" Detected Arguments\t:'" + detectedArgument + "'");
+                    System.out.println("Error: Expected Arguments\t:'" +
+                            expectedArguments + "'");
+                    System.out.println(" Detected Arguments\t:'" +
+                            detectedArgument + "'");
                 }
                 // Return the value asap if not in debug mode.
-                if (!_debug) {
+                if (!TestHelper.debug) {
                     rd.close();
                     istream.close();
                     return retval;
@@ -112,7 +104,7 @@
         return retval;
     }
 
-    private static boolean doExec0(ProcessBuilder pb, String expectedArguments) {
+    private static boolean doTest0(ProcessBuilder pb, String expectedArguments) {
         boolean retval = false;
         try {
             pb.redirectErrorStream(true);
@@ -131,72 +123,209 @@
      * This method return true  if the expected and detected arguments are the same.
      * Quoting could cause dissimilar testArguments and expected arguments.
      */
-    static boolean doExec(String testArguments, String expectedPattern) {
-        ProcessBuilder pb = new ProcessBuilder(javaCmd, VersionStr, testArguments);
+    static int doTest(String testArguments, String expectedPattern) {
+        ProcessBuilder pb = new ProcessBuilder(TestHelper.javaCmd,
+                VersionStr, testArguments);
 
         Map<String, String> env = pb.environment();
         env.put("_JAVA_LAUNCHER_DEBUG", "true");
-        return doExec0(pb, testArguments);
+        return doTest0(pb, testArguments) ? 0 : 1;
     }
 
     /**
      * A convenience method for identical test pattern and expected arguments
      */
-    static boolean doExec(String testPattern) {
-        return doExec(testPattern, testPattern);
+    static int doTest(String testPattern) {
+        return doTest(testPattern, testPattern);
+    }
+
+    static void quoteParsingTests() {
+        /*
+         * Tests for 6214916
+         * These tests require that a JVM (any JVM) be installed in the system registry.
+         * If none is installed, skip this test.
+         */
+        TestHelper.TestResult tr =
+                TestHelper.doExec(TestHelper.javaCmd, VersionStr, "-version");
+        if (!tr.isOK()) {
+            System.err.println("Warning:Argument Passing Tests were skipped, " +
+                    "no java found in system registry.");
+            return;
+        }
+
+        // Basic test
+        TestHelper.testExitValue += doTest("-a -b -c -d");
+
+        // Basic test with many spaces
+        TestHelper.testExitValue += doTest("-a    -b      -c       -d");
+
+        // Quoted whitespace does matter ?
+        TestHelper.testExitValue += doTest("-a \"\"-b      -c\"\" -d");
+
+
+        // Escaped quotes outside of quotes as literals
+        TestHelper.testExitValue += doTest("-a \\\"-b -c\\\" -d");
+
+        // Check for escaped quotes inside of quotes as literal
+        TestHelper.testExitValue += doTest("-a \"-b \\\"stuff\\\"\" -c -d");
+
+        // A quote preceeded by an odd number of slashes is a literal quote
+        TestHelper.testExitValue += doTest("-a -b\\\\\\\" -c -d");
+
+        // A quote preceeded by an even number of slashes is a literal quote
+        // see 6214916.
+        TestHelper.testExitValue += doTest("-a -b\\\\\\\\\" -c -d");
+
+        // Make sure that whitespace doesn't interfere with the removal of the
+        // appropriate tokens. (space-tab-space preceeds -jre-restict-search).
+        TestHelper.testExitValue += doTest("-a -b  \t -jre-restrict-search -c -d","-a -b -c -d");
+
+        // Make sure that the mJRE tokens being stripped, aren't stripped if
+        // they happen to appear as arguments to the main class.
+        TestHelper.testExitValue += doTest("foo -version:1.1+");
+
+        System.out.println("Completed arguments quoting tests with " +
+                TestHelper.testExitValue + " errors");
+    }
+
+    /*
+     * These tests are usually run on non-existent targets to check error results
+     */
+    static void runBasicErrorMessageTests() {
+        // Tests for 5030233
+        TestHelper.TestResult tr = TestHelper.doExec(TestHelper.javaCmd, "-cp");
+        tr.checkNegative();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-classpath");
+        tr.checkNegative();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar");
+        tr.checkNegative();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+
+        tr = TestHelper.doExec(TestHelper.javacCmd, "-cp");
+        tr.checkNegative();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+
+        // Test for 6356475 "REGRESSION:"java -X" from cmdline fails"
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-X");
+        tr.checkPositive();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-help");
+        tr.checkPositive();
+        tr.isNotZeroOutput();
+        System.out.println(tr);
+    }
+
+    /*
+     * A set of tests which tests various dispositions of the main method.
+     */
+    static void runMainMethodTests() throws FileNotFoundException {
+        TestHelper.TestResult tr = null;
+
+        // a missing class
+        TestHelper.createJar("MIA", new File("some.jar"), new File("Foo"),
+                (String[])null);
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("Error: Could not find main class MIA");
+        tr.contains("java.lang.NoClassDefFoundError: MIA");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "MIA");
+        tr.contains("Error: Could not find main class MIA");
+        tr.contains("java.lang.NoClassDefFoundError: MIA");
+        System.out.println(tr);
+
+        // incorrect method access
+        TestHelper.createJar(new File("some.jar"), new File("Foo"),
+                "private static void main(String[] args){}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("Error: Main method not found in class Foo");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "Foo");
+        tr.contains("Error: Main method not found in class Foo");
+        System.out.println(tr);
+
+        // incorrect return type
+        TestHelper.createJar(new File("some.jar"), new File("Foo"),
+                "public static int main(String[] args){return 1;}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("Error: Main method must return a value of type void in class Foo");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "Foo");
+        tr.contains("Error: Main method must return a value of type void in class Foo");
+        System.out.println(tr);
+
+        // incorrect parameter type
+        TestHelper.createJar(new File("some.jar"), new File("Foo"),
+                "public static void main(Object[] args){}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("Error: Main method not found in class Foo");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "Foo");
+        tr.contains("Error: Main method not found in class Foo");
+        System.out.println(tr);
+
+        // incorrect method type - non-static
+         TestHelper.createJar(new File("some.jar"), new File("Foo"),
+                "public void main(String[] args){}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("Error: Main method is not static in class Foo");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "Foo");
+        tr.contains("Error: Main method is not static in class Foo");
+        System.out.println(tr);
+
+        // amongst a potpourri of kindred main methods, is the right one chosen ?
+        TestHelper.createJar(new File("some.jar"), new File("Foo"),
+        "void main(Object[] args){}",
+        "int  main(Float[] args){return 1;}",
+        "private void main() {}",
+        "private static void main(int x) {}",
+        "public int main(int argc, String[] argv) {return 1;}",
+        "public static void main(String[] args) {System.out.println(\"THE_CHOSEN_ONE\");}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.contains("THE_CHOSEN_ONE");
+        System.out.println(tr);
+        // use classpath to check
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-cp", "some.jar", "Foo");
+        tr.contains("THE_CHOSEN_ONE");
+        System.out.println(tr);
+
+        // test for extraneous whitespace in the Main-Class attribute
+        TestHelper.createJar(" Foo ", new File("some.jar"), new File("Foo"),
+                "public static void main(String... args){}");
+        tr = TestHelper.doExec(TestHelper.javaCmd, "-jar", "some.jar");
+        tr.checkPositive();
+        System.out.println(tr);
     }
 
     /**
      * @param args the command line arguments
+     * @throws java.io.FileNotFoundException
      */
-    public static void main(String[] args) {
-        if (args.length < 1 && args[0] == null) {
-            doUsage("Invalid number of arguments");
-        }
-
-        javaCmd = args[0];
-
-        if (!new File(javaCmd).canExecute()) {
-            if (isWindows && new File(javaCmd + ".exe").canExecute()) {
-                javaCmd = javaCmd + ".exe";
+    public static void main(String[] args) throws FileNotFoundException {
+        if (TestHelper.debug) System.out.println("Starting Arrrghs tests");
+            quoteParsingTests();
+            runBasicErrorMessageTests();
+            runMainMethodTests();
+            if (TestHelper.testExitValue > 0) {
+                System.out.println("Total of " + TestHelper.testExitValue + " failed");
+                System.exit(1);
             } else {
-                doUsage("The java executable must exist");
+                System.out.println("All tests pass");
             }
         }
-
-        if (_debug) System.out.println("Starting Arrrghs tests");
-        // Basic test
-        if (!doExec("-a -b -c -d")) exitValue++;
-
-        // Basic test with many spaces
-        if (!doExec("-a    -b      -c       -d")) exitValue++;
-
-        // Quoted whitespace does matter ?
-        if (!doExec("-a \"\"-b      -c\"\" -d")) exitValue++;
-
-        // Escaped quotes outside of quotes as literals
-        if (!doExec("-a \\\"-b -c\\\" -d")) exitValue++;
-
-        // Check for escaped quotes inside of quotes as literal
-        if (!doExec("-a \"-b \\\"stuff\\\"\" -c -d")) exitValue++;
-
-        // A quote preceeded by an odd number of slashes is a literal quote
-        if (!doExec("-a -b\\\\\\\" -c -d")) exitValue++;
-
-        // A quote preceeded by an even number of slashes is a literal quote
-        // see 6214916.
-        if (!doExec("-a -b\\\\\\\\\" -c -d")) exitValue++;
-
-        // Make sure that whitespace doesn't interfere with the removal of the
-        // appropriate tokens. (space-tab-space preceeds -jre-restict-search).
-        if (!doExec("-a -b  \t -jre-restrict-search -c -d","-a -b -c -d")) exitValue++;
-
-        // Make sure that the mJRE tokens being stripped, aren't stripped if
-        // they happen to appear as arguments to the main class.
-        if (!doExec("foo -version:1.1+")) exitValue++;
-
-        System.out.println("Completed Arrrghs arguments quoting/matching tests with " + exitValue + " errors");
-        System.exit(exitValue);
     }
-
-}
--- a/jdk/test/tools/launcher/Arrrghs.sh	Fri Oct 10 13:29:11 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-#!/bin/sh
-# @test Arrrghs.sh
-# @bug 5030233 6214916 6356475 6571029 6684582
-# @build Arrrghs
-# @run shell Arrrghs.sh
-# @summary Argument parsing validation.
-# @author Joseph E. Kowalski
-
-#
-# Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-#
-# This test is intended to validate generic argument parsing and
-# handling.
-#
-# Oh yes, since the response to argument parsing errors is often
-# a visceral one, the name Arrrghs (pronounced "args") seems rather
-# appropriate.
-#
-
-# Verify directory context variables are set
-if [ "${TESTJAVA}" = "" ]
-then
-  echo "TESTJAVA not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-
-if [ "${TESTSRC}" = "" ]
-then
-  echo "TESTSRC not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-
-if [ "${TESTCLASSES}" = "" ]
-then
-  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-
-#
-# Shell routine to test for the proper handling of the cp/classpath 
-# option is correct (see 5030233).  This option is unique in that it
-# is the only option to the java command (and friends) which is
-# separated from its option argument by a space, rather than an
-# equals sign.
-#
-# Parameters:
-#	$1	cmd	utility name to be tested (java, javac, ...)
-#	$2	option	either the -cp or -classpath option to be
-#			tested.
-#
-TestCP() {
-	mess="`$TESTJAVA/bin/$1 $2 2>&1 1>/dev/null`"
-	if [ $? -eq 0 ]; then
-		echo "Invalid $1 $2 syntax accepted"
-		exit 1
-	fi
-	if [ -z "$mess" ]; then
-		echo "No Usage message from invalid $1 $2 syntax"
-		exit 1
-	fi
-}
-
-#
-# Test for 6356475 "REGRESSION:"java -X" from cmdline fails"
-#
-TestXUsage() {
-	$TESTJAVA/bin/java -X > /dev/null 2>&1
-	if [ $? -ne 0 ]; then
-		echo "-X option failed"
-		exit 1
-	fi
-}
-
-#
-# Test if java -help works
-#
-TestHelp() {
-	$TESTJAVA/bin/java -help > /dev/null 2>&1
-	if [ $? -ne 0 ]; then
-		echo "-help option failed"
-		exit 1
-	fi
-}
-
-#
-# Test to ensure that a missing main class is indicated in the error message
-#
-TestMissingMainClass() {
-	# First create a small jar file with no main
-        printf "public class Foo {}\n" > Foo.java
-	$TESTJAVA/bin/javac Foo.java
-	if [ $? -ne 0 ]; then
-		printf "Error: compilation of Foo.java failed\n" 
- 		exit 1
-	fi
-	printf "Main-Class: Bar\n" > manifest
-	$TESTJAVA/bin/jar -cvfm some.jar manifest Foo.class
-	if [ ! -f some.jar ]; then
-		printf "Error: did not find some.jar\n" 
- 		exit 1
-	fi
-
-	# test a non-existence main-class using -jar 
-	mess="`$TESTJAVA/bin/java -jar some.jar 2>&1 1>/dev/null`"
-	echo $mess | grep 'Bar' 2>&1 > /dev/null
-	if [ $? -ne 0 ]; then
-		printf "Error: did not find main class missing message\n"
-		exit 1
-	fi
-
-	# test a non-existent main-class using classpath
-	mess="`$TESTJAVA/bin/java -cp some.jar Bar 2>&1 1>/dev/null`"
-	echo $mess | grep 'Bar' 2>&1 > /dev/null
-	if [ $? -ne 0 ]; then
-		printf "Error: did not find main class missing message\n"
-		exit 1
-	fi
-
-	# cleanup
-	rm -f some.jar Foo.* manifest
-}
-
-#
-# Main processing:
-#
-
-#
-# Tests for 5030233
-#
-TestCP java -cp
-TestCP java -classpath
-TestCP java -jar
-TestCP javac -cp
-TestCP javac -classpath
-TestXUsage
-TestHelp
-TestMissingMainClass
-
-#
-# Tests for 6214916
-#
-#
-# These tests require that a JVM (any JVM) be installed in the system registry.
-# If none is installed, skip this test.
-$TESTJAVA/bin/java -version:1.1+ -version >/dev/null 2>&1
-if [ $? -eq 0 ]; then
-   $TESTJAVA/bin/java -classpath $TESTCLASSES Arrrghs $TESTJAVA/bin/java
-   if [ $? -ne 0 ]; then
-      echo "Argument Passing Tests failed"
-      exit 1
-   fi
-else
-   printf "Warning:Argument Passing Tests were skipped, no java found in system registry."
-fi
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/TestHelper.java	Wed Jul 05 16:42:37 2017 +0200
@@ -0,0 +1,227 @@
+
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import javax.tools.ToolProvider;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import javax.tools.JavaCompiler;
+
+/**
+ * This class provides some common utilites for the launcher tests.
+ */
+public enum TestHelper {
+    INSTANCE;
+    static final String JAVAHOME = System.getProperty("java.home", ".");
+    static final boolean isSDK = JAVAHOME.endsWith("jre");
+    static final String javaCmd;
+    static final String javacCmd;
+    static final JavaCompiler compiler;
+
+    static final boolean debug = Boolean.getBoolean("Arrrghs.Debug");
+    static final boolean isWindows =
+            System.getProperty("os.name", "unknown").startsWith("Windows");
+    static int testExitValue = 0;
+
+    static {
+        compiler = ToolProvider.getSystemJavaCompiler();
+        File binDir = (isSDK) ? new File((new File(JAVAHOME)).getParentFile(), "bin")
+            : new File(JAVAHOME, "bin");
+        File javaCmdFile = (isWindows)
+                ? new File(binDir, "java.exe")
+                : new File(binDir, "java");
+        javaCmd = javaCmdFile.getAbsolutePath();
+        if (!javaCmdFile.canExecute()) {
+            throw new RuntimeException("java <" + TestHelper.javaCmd + "> must exist");
+        }
+
+        File javacCmdFile = (isWindows)
+                ? new File(binDir, "javac.exe")
+                : new File(binDir, "javac");
+        javacCmd = javacCmdFile.getAbsolutePath();
+        if (!javacCmdFile.canExecute()) {
+            throw new RuntimeException("java <" + javacCmd + "> must exist");
+        }
+    }
+
+    /*
+     * A convenience method to create a java file, compile and jar it up, using
+     * the sole class file name in the jar, as the Main-Class attribute value.
+     */
+    static void createJar(File jarName, File mainClass, String... mainDefs)
+            throws FileNotFoundException {
+            createJar(null, jarName, mainClass, mainDefs);
+    }
+
+    /*
+     * A generic jar file creator to create a java file, compile it
+     * and jar it up, a specific Main-Class entry name in the
+     * manifest can be specified or a null to use the sole class file name
+     * as the Main-Class attribute value.
+     */
+    static void createJar(String mEntry, File jarName, File mainClass,
+            String... mainDefs) throws FileNotFoundException {
+        if (jarName.exists()) {
+            jarName.delete();
+        }
+        PrintStream ps = new PrintStream(new FileOutputStream(mainClass + ".java"));
+        ps.println("public class Foo {");
+        if (mainDefs != null) {
+            for (String x : mainDefs) {
+                ps.println(x);
+            }
+        }
+        ps.println("}");
+        ps.close();
+
+        String compileArgs[] = {
+            mainClass + ".java"
+        };
+        if (compiler.run(null, null, null, compileArgs) != 0) {
+            throw new RuntimeException("compilation failed " + mainClass + ".java");
+        }
+        if (mEntry == null) {
+            mEntry = mainClass.getName();
+        }
+        String jarArgs[] = {
+            (debug) ? "cvfe" : "cfe",
+            jarName.getAbsolutePath(),
+            mEntry,
+            mainClass.getName() + ".class"
+        };
+        sun.tools.jar.Main jarTool =
+                new sun.tools.jar.Main(System.out, System.err, "JarCreator");
+        if (!jarTool.run(jarArgs)) {
+            throw new RuntimeException("jar creation failed " + jarName);
+        }
+    }
+
+    /*
+     * A method which executes a java cmd and returns the results in a container
+     */
+    static TestResult doExec(String...cmds) {
+        String cmdStr = "";
+        for (String x : cmds) {
+            cmdStr = cmdStr.concat(x + " ");
+        }
+        ProcessBuilder pb = new ProcessBuilder(cmds);
+        Map<String, String> env = pb.environment();
+        BufferedReader rdr = null;
+        try {
+            List<String> outputList = new ArrayList<String>();
+            pb.redirectErrorStream(true);
+            Process p = pb.start();
+            rdr = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            String in = rdr.readLine();
+            while (in != null) {
+                outputList.add(in);
+                in = rdr.readLine();
+            }
+            p.waitFor();
+            p.destroy();
+            return new TestHelper.TestResult(cmdStr, p.exitValue(), outputList);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+
+    /*
+     * A class to encapsulate the test results and stuff, with some ease
+     * of use methods to check the test results.
+     */
+    static class TestResult {
+        StringBuilder status;
+        int exitValue;
+        List<String> testOutput;
+
+        public TestResult(String str, int rv, List<String> oList) {
+            status = new StringBuilder(str);
+            exitValue = rv;
+            testOutput = oList;
+        }
+
+        void checkNegative() {
+            if (exitValue == 0) {
+                status = status.append("  Error: test must not return 0 exit value");
+                testExitValue++;
+            }
+        }
+
+        void checkPositive() {
+            if (exitValue != 0) {
+                status = status.append("  Error: test did not return 0 exit value");
+                testExitValue++;
+            }
+        }
+
+        boolean isOK() {
+            return exitValue == 0;
+        }
+
+        boolean isZeroOutput() {
+            if (!testOutput.isEmpty()) {
+                status = status.append("  Error: No message from cmd please");
+                testExitValue++;
+                return false;
+            }
+            return true;
+        }
+
+        boolean isNotZeroOutput() {
+            if (testOutput.isEmpty()) {
+                status = status.append("  Error: Missing message");
+                testExitValue++;
+                return false;
+            }
+            return true;
+        }
+
+        public String toString() {
+            if (debug) {
+                for (String x : testOutput) {
+                    status = status.append(x + "\n");
+                }
+            }
+            return status.toString();
+        }
+
+        boolean contains(String str) {
+            for (String x : testOutput) {
+                if (x.contains(str)) {
+                    return true;
+                }
+            }
+            status = status.append("   Error: string <" + str + "> not found ");
+            testExitValue++;
+            return false;
+        }
+    }
+}