changeset 13593:15c5cbd29440

Merge
author thartmann
date Tue, 26 Jan 2016 09:11:59 +0100
parents 306ce485bdad eee1ced1d8e7
children d936032133c4
files src/java.base/share/classes/sun/misc/ClassFileTransformer.java
diffstat 370 files changed, 5088 insertions(+), 3678 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Jan 15 09:15:33 2016 +0100
+++ b/.hgtags	Tue Jan 26 09:11:59 2016 +0100
@@ -344,3 +344,4 @@
 e1a789be1535741274c9779f4d4ca3495196b5c3 jdk-9+99
 3d452840f48299a36842760d17c0c8402f0e1266 jdk-9+100
 5e8370fb3ed925335164afe340d1e54beab2d4d5 jdk-9+101
+6eb3c8132e489dab81adde4ce29844904ce15482 jdk-9+102
--- a/make/CompileDemos.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/CompileDemos.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -38,7 +38,8 @@
 include ZipArchive.gmk
 
 # Prepare the find cache.
-$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
+$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/demo \
+    $(JDK_TOPDIR)/src/*/demo)))
 
 # Append demo goals to this variable.
 TARGETS =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/CompileTools.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -0,0 +1,83 @@
+#
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+include SetupJavaCompilers.gmk
+
+################################################################################
+
+JIMAGE_PKGS := \
+    jdk/internal/jimage \
+    jdk/internal/jrtfs \
+    #
+
+$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
+    INCLUDES := $(JIMAGE_PKGS), \
+    BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
+
+TARGETS += $(BUILD_INTERIM_JIMAGE)
+
+# Because of the explicit INCLUDES in the compilation setup above, the service provider
+# file will not be copied unless META-INF/services would also be added to the INCLUDES.
+# Adding META-INF/services would include all files in that directory when only the one
+# is needed, which is why this explicit copy is defined instead.
+$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
+    SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
+    DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
+    FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
+
+TARGETS += $(COPY_JIMAGE_SERVICE_PROVIDER)
+
+################################################################################
+
+$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
+        $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
+        $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
+    SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
+    BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
+    COPY := boot.modules ext.modules))
+
+$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
+
+TARGETS += $(BUILD_TOOLS_JDK)
+
+$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
+    SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
+    DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
+    FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
+
+TARGETS += $(COPY_NIMBUS_TEMPLATES)
+
+################################################################################
+
+all: $(TARGETS)
--- a/make/CopySamples.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/CopySamples.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -28,41 +28,38 @@
 include $(SPEC)
 include MakeBase.gmk
 
+################################################################################
+
 SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample/image
 SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
-SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
 SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
 
 # Exclude the vm directory
-SAMPLE_FIND_FILTER := -name vm -prune -o
+$(eval $(call SetupCopyFiles, COPY_SHARE_SAMPLES, \
+    SRC := $(SAMPLE_SOURCE_DIR), \
+    DEST := $(SAMPLE_TARGET_DIR), \
+    FILES := $(filter-out $(SAMPLE_SOURCE_DIR)/vm/%, \
+        $(call CacheFind, $(SAMPLE_SOURCE_DIR))), \
+))
 
-SAMPLE_SOURCE := $(shell $(FIND) $(SAMPLE_SOURCE_DIR) $(SAMPLE_FIND_FILTER) -type f -print)
-SAMPLE_TARGET := $(subst $(SAMPLE_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOURCE))
+TARGETS += $(COPY_SHARE_SAMPLES)
 
-ifndef OPENJDK
-# Exclude Main.java in EbayClient dir
-  SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
-  SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
-  SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
+ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
+  $(eval $(call SetupCopyFiles, COPY_SOLARIS_SAMPLES, \
+      SRC := $(SAMPLE_SOLARIS_SOURCE_DIR), \
+      DEST := $(SAMPLE_TARGET_DIR), \
+      FILES := $(call CacheFind, $(SAMPLE_SOLARIS_SOURCE_DIR)), \
+  ))
+
+  TARGETS += $(COPY_SOLARIS_SAMPLES)
 endif
 
-ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
-  SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
-  SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
-  SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
-endif
+################################################################################
 
-$(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
-	$(call install-file)
+$(eval $(call IncludeCustomExtension, jdk, CopySamples.gmk))
 
-$(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
-	$(call install-file)
+################################################################################
 
-$(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
-	$(call install-file)
+all: $(TARGETS)
 
-COPY_FILES += $(SAMPLE_TARGET)
-
-all: $(COPY_FILES)
-
-.PHONY: all
+.PHONY: all default
--- a/make/Import.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/Import.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -48,7 +48,7 @@
 ifneq ($(STATIC_BUILD), true)
   JSIG_IMPORT = jsig.*
 else
-  JSIG_IMPORT = 
+  JSIG_IMPORT =
 endif
 
 HOTSPOT_BASE_IMPORT_FILES := \
--- a/make/Tools.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/Tools.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -26,31 +26,14 @@
 ifndef _TOOLS_GMK
 _TOOLS_GMK := 1
 
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
 include JavaCompilation.gmk
-include NativeCompilation.gmk
-include SetupJavaCompilers.gmk
 
 ################################################################################
-
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
-    SETUP := GENERATE_OLDBYTECODE, \
-    ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
-        $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
-        $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
-    SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
-    BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
-    COPY := boot.modules ext.modules))
-
-$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
-    SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
-    DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
-    FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
-
-BUILD_TOOLS_JDK += $(COPY_NIMBUS_TEMPLATES)
+# To avoid reevaluating the compilation setup for the tools each time this file
+# is included, the actual compilation is handled by CompileTools.gmk. The
+# following trick is used to be able to declare a dependency on the built tools.
+BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
+    BUILD_TOOLS_JDK, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes)
 
 ################################################################################
 
@@ -135,34 +118,4 @@
     -cp $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(JDK_OUTPUTDIR)) \
     build.tools.module.ImageBuilder
 
-##########################################################################################
-
-JIMAGE_PKGS := \
-    jdk/internal/jimage \
-    jdk/internal/jrtfs \
-    #
-
-$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
-    SETUP := GENERATE_OLDBYTECODE, \
-    SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
-    INCLUDES := $(JIMAGE_PKGS), \
-    BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
-
-# Because of the explicit INCLUDES in the compilation setup above, the service provider
-# file will not be copied unless META-INF/services would also be added to the INCLUDES.
-# Adding META-INF/services would include all files in that directory when only the one
-# is needed, which is why this explicit copy is defined instead.
-$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
-    SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
-    DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
-    FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
-
-##########################################################################################
-
-$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
-
-java-tools: $(BUILD_TOOLS_JDK)
-
-all: java-tools
-
 endif # _TOOLS_GMK
--- a/make/copy/Copy-java.base.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/copy/Copy-java.base.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -187,27 +187,31 @@
 ifeq ($(CACERTS_FILE), )
   CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
 endif
+
 CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
 
 $(CACERTS_DST): $(CACERTS_FILE)
+	$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
 	$(call install-file)
 
 TARGETS += $(CACERTS_DST)
 
 ################################################################################
 
-$(CONF_DST_DIR)/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
-	$(ECHO) $(LOG_INFO) Copying $(@F)
-	$(call install-file)
+$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
+    FILES := $(JDK_TOPDIR)/src/java.base/share/conf/net.properties, \
+    DEST := $(CONF_DST_DIR), \
+))
 
-TARGETS += $(CONF_DST_DIR)/net.properties
+TARGETS += $(COPY_NET_PROPERTIES)
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-  $(CONF_DST_DIR)/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template
-	$(ECHO) $(LOG_INFO) Copying $(@F)
-	$(call install-file)
+  $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
+      FILES := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
+      DEST := $(CONF_DST_DIR)/sdp, \
+  ))
 
-  TARGETS += $(CONF_DST_DIR)/sdp/sdp.conf.template
+  TARGETS += $(COPY_SDP_CONF)
 endif
 
 ################################################################################
--- a/make/data/blacklistedcertsconverter/blacklisted.certs.pem	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/data/blacklistedcertsconverter/blacklisted.certs.pem	Tue Jan 26 09:11:59 2016 +0100
@@ -725,3 +725,26 @@
 DBabJH1vJ9Gd+KwxMCmBZ6pQPl28JDimhJhI2LNqU349uADQVV0HJosddN/ARyyI
 LSIQO7BnNVKVG9Iujf33bvPNeg0qNz5qw+rKKq97Pqeum+L5oKU=
 -----END CERTIFICATE-----
+
+// Subject: CN=eDellRoot
+// Issuer: CN=eDellRoot
+// Serial Number:
+//     6b:c5:7b:95:18:93:aa:97:4b:62:4a:c0:88:fc:3b:b6
+-----BEGIN CERTIFICATE-----
+MIIC8zCCAd+gAwIBAgIQa8V7lRiTqpdLYkrAiPw7tjAJBgUrDgMCHQUAMBQxEjAQ
+BgNVBAMTCWVEZWxsUm9vdDAeFw0xNTA0MDcxMDIzMjdaFw0zOTEyMzEyMzU5NTla
+MBQxEjAQBgNVBAMTCWVEZWxsUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBAL3RJg1uzVuEX0Hw4XWGzs6oI9W+o7HZdVdBMMVb4Gzb4uZjCTNjbPx4
+b8LNFL1uArUt+5VVMQDsOTY3Lg/Xe/UNukY2b+0llUOzzBYYpbsFcco4n6SsTvDh
+Ni5t+kPo7c23ZrYBPmOu82eEJ6cavs/t39u+wFOkXXwvRCiHA/lWyNWNEPh17+bC
+EP3q5N+JrV+6Ho3zQPEv5QUJYdmXsMmD2CMQojeQUj68J91P5w5BKjurG0xjivzh
+Soie9ym7VRwLFjWScRuw/9XV6CLqTyL5xrqiiDp1uTOuqNj3uxyts9ocbsoJXuxj
+5iEYkSM1nvLupEv+lgy9WqzIEFMm1l8CAwEAAaNJMEcwRQYDVR0BBD4wPIAQYA/f
+EzPwmaRcZuSaa/VZ1KEWMBQxEjAQBgNVBAMTCWVEZWxsUm9vdIIQa8V7lRiTqpdL
+YkrAiPw7tjAJBgUrDgMCHQUAA4IBAQArfdcScsezj8ooJ92UwwnPgg36noOgiUs5
+XzPLP4h0JpUYQVKB9hY1WTDwRUfTKGh7oNOowd027a/rVSb/TNeoiJIvMKn4gbvV
+CWAiHhO8u2u0RkHCDVsa7e0i4ncpueWsihjn6jBrY8T+7eDYwiFT/F03A8NJ7mK5
+lZA8SFd5CTDy3EBUU5UwzXUc5HoIRUxXSPycu3aIBWawg3sCdKiAoikScPAWj0bM
+0vmsP/8QSlTOBqO+QFQ6R82BtTvBNU3qbVICV4QObsxib++FAFL56NApPqskg7Vz
+LfNIAjKabHUcjbuZkmg6jr4BfYW7+oQDHCsYgADjjKGdKz/8U/fP
+-----END CERTIFICATE-----
--- a/make/gendata/GendataBreakIterator.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gendata/GendataBreakIterator.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -68,8 +68,8 @@
 $(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
 $(BASE_DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
 $(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating BreakIteratorData)
+	$(call MakeDir, $(@D))
 	$(RM) $(BIFILES)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
 	    -o $(@D) \
@@ -79,8 +79,8 @@
 $(BIFILES_TH): $(LD_DATA_PKG_DIR)/_the.bifiles_th
 $(LD_DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
 $(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
-	$(MKDIR) -p $(@D)/th
+	$(call LogInfo, Generating BreakIteratorData_th)
+	$(call MakeDir, $(@D)/th)
 	$(RM) $(BIFILES_TH)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
 	    -o $(@D) \
--- a/make/gendata/GendataHtml32dtd.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gendata/GendataHtml32dtd.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -27,7 +27,7 @@
 
 HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
 $(HTML32DTD): $(BUILD_TOOLS_JDK)
-	$(ECHO) "Generating HTML DTD file"
+	$(call LogInfo, Generating HTML DTD file)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
--- a/make/gendata/GendataPolicyJars.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gendata/GendataPolicyJars.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -87,8 +87,7 @@
 
 $(US_EXPORT_POLICY_JAR_LIMITED): \
     $(US_EXPORT_POLICY_JAR_UNLIMITED)
-	$(ECHO) $(LOG_INFO) \
-	    Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(call LogInfo, Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@))
 	$(install-file)
 
 TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
@@ -99,7 +98,7 @@
 else
   $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
 	$(install-file)
-endif 
+endif
 
 ifndef OPENJDK
   ifneq ($(UNLIMITED_CRYPTO), true)
--- a/make/gensrc/Gensrc-jdk.charsets.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/Gensrc-jdk.charsets.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -46,30 +46,34 @@
     $(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
     $(CHARSET_TEMPLATES) $(CHARSET_EXTENDED_JAVA_TEMPLATES) \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating jdk.charsets extcs)
+	$(call MakeDir, $(@D))
 	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) \
 	    extcs charsets  $(CHARSET_STANDARD_OS) \
 	    $(CHARSET_EXTENDED_JAVA_TEMPLATES) \
 	    $(CHARSET_EXTENDED_JAVA_DIR) \
 	    $(CHARSET_COPYRIGHT_HEADER) \
-	    $(LOG_INFO)
+	    $(LOG_DEBUG)
 	$(TOUCH) '$@'
 
 $(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER)/HKSCS.java \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating jdk.charsets hkscs)
+	$(call MakeDir, $(@D))
 	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
 	$(TOUCH) '$@'
 
 $(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER)/EUC_TW.java \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating jdk.charsets euctw)
+	$(call MakeDir, $(@D))
 	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
 	$(TOUCH) '$@'
 
 $(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
+	$(call MakeDir, $(@D))
 	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
 
 GENSRC_JDK_CHARSETS += \
@@ -86,4 +90,3 @@
 all: jdk.charsets
 
 .PHONY: all jdk.charsets
-
--- a/make/gensrc/Gensrc-jdk.jdi.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/Gensrc-jdk.jdi.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -40,19 +40,18 @@
 
 # Touch the target of this rule at the end to avoid triggering false rebuilds
 $(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
-	$(MKDIR) -p $(@D)
-	$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
+	$(call LogInfo, Creating JDWP.java and JDWPCommands.h from jdwp.spec)
+	$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent)
 	$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
-	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
 	$(TOOL_JDWPGEN) $< -jdi $@ -include \
 	    $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
 	$(TOUCH) $@
 
 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Creating $(@F) from jdwp.spec)
+	$(call MakeDir, $(@D))
 	$(RM) $@
-	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
 	$(TOOL_JDWPGEN) $< -doc $@
 
 GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
@@ -63,7 +62,7 @@
 ################################################################################
 
 define process-provider
-	$(MKDIR) -p $(@D)
+	$(call MakeDir, $(@D))
 	$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
 endef
 
--- a/make/gensrc/GensrcBuffer.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcBuffer.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -23,7 +23,7 @@
 # questions.
 #
 
-GENSRC_BUFFER := 
+GENSRC_BUFFER :=
 
 GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
 
@@ -31,9 +31,9 @@
 
 ###
 
-$(GENSRC_BUFFER_DST)/_the.buffer.dir: 
-	$(ECHO) "Generating buffer classes"
-	$(MKDIR) -p $(@D)
+$(GENSRC_BUFFER_DST)/_the.buffer.dir:
+	$(call LogInfo, Generating buffer classes)
+	$(call MakeDir, $(@D))
 	$(TOUCH) $@
 
 define fixRw
--- a/make/gensrc/GensrcCharacterData.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcCharacterData.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -35,8 +35,8 @@
 define SetupCharacterData
   $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
       $(CHARACTERDATA)/$1.java.template
-	$(MKDIR) -p $$(@D)
-	$(ECHO) $(LOG_INFO) Generating $1.java
+	$$(call LogInfo, Generating $1.java)
+	$$(call MakeDir, $$(@D))
 	$(TOOL_GENERATECHARACTER) $2 \
 	    -template $(CHARACTERDATA)/$1.java.template \
 	    -spec $(UNICODEDATA)/UnicodeData.txt \
@@ -56,7 +56,7 @@
 
 # Copy two Java files that need no preprocessing.
 $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
-	$(ECHO) $(LOG_INFO) Generating $(@F)
+	$(call LogInfo, Generating $(@F))
 	$(call install-file)
 
 GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
--- a/make/gensrc/GensrcCharsetMapping.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcCharsetMapping.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -44,13 +44,13 @@
     $(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
     $(CHARSET_TEMPLATES) $(CHARSET_STANDARD_JAVA_TEMPLATES) \
     $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating java.base charset mapping)
+	$(call MakeDir, $(@D))
 	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) \
 	    stdcs charsets $(CHARSET_STANDARD_OS) \
 	    $(CHARSET_STANDARD_JAVA_TEMPLATES) $(CHARSET_EXTSRC_DIR) \
 	    $(CHARSET_COPYRIGHT_HEADER) \
-            $(LOG_INFO)
+            $(LOG_DEBUG)
 	$(TOUCH) '$@'
 
 GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-stdcs
-
--- a/make/gensrc/GensrcExceptions.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcExceptions.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -32,21 +32,12 @@
 
 GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
 
-###
-
-$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir:
-	$(ECHO) "Generating exceptions classes"
-	$(MKDIR) -p $(@D)
-	$(TOUCH) $@
-
-
-###
-
 $(GENSRC_EXCEPTIONS_DST)/_the.%.marker: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
-    $(GENSRC_EXCEPTIONS_CMD) \
-    $(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
-	$(MKDIR) -p $(@D)/$*
-	SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO)
+    $(GENSRC_EXCEPTIONS_CMD)
+	$(call LogInfo, Generating exceptions java.nio $*)
+	$(call MakeDir, $(@D)/$*)
+	SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) \
+	    $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_DEBUG)
 	$(TOUCH) $@
 
 GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker)
--- a/make/gensrc/GensrcIcons.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcIcons.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -65,8 +65,8 @@
 ################################################################################
 
 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
-	$(ECHO) Generating icon classes
-	$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
+	$(call LogInfo, Generating icon classes)
+	$(call MakeDir, $(GENSRC_AWT_ICONS_DST))
 	$(TOUCH) $@
 
 ################################################################################
@@ -121,8 +121,9 @@
   endif
 
   $(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
+	$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
+	$(call MakeDir, $(@D))
 	$(RM) $@ $@.tmp
-	$(MKDIR) -p $(dir $@)
 	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
 	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
 	$(ECHO) "};" >> $@.tmp
--- a/make/gensrc/GensrcLocaleData.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcLocaleData.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -28,8 +28,9 @@
 # into LocaleDataMetaInfo.java
 
 # First go look for all locale files
-LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
-    $(JDK_TOPDIR)/src/jdk.localedata/share/classes \
+LOCALE_FILES := $(shell $(FIND) \
+    $(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/text/resources \
+    $(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/util/resources \
     -name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
     -name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
     -name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
@@ -42,17 +43,21 @@
 LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
 
 # Include the list of resources found during the previous compile.
--include $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
+-include $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.locale_resources
 
 MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
 NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
 
 ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
   # There is a difference in the number of supported resources. Trigger a regeneration.
-  $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
-    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
-    $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java \
-    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
+  ifeq ($(MODULE), java.base)
+    $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
+        $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java)
+  endif
+  ifeq ($(MODULE), jdk.localedata)
+    $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
+        $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
+  endif
 endif
 
 # The base locales
@@ -121,18 +126,18 @@
 
 $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java: \
     $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
+	$(call LogInfo, Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
 	$(MKDIR) -p $(@D)
-	$(ECHO) Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
 	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
-	    > $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
+	    > $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources
 	$(SED) $(SED_BASEARGS) $< > $@
 
 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java: \
     $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
+	$(call LogInfo, Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
 	$(MKDIR) -p $(@D)
-	$(ECHO) Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
 	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
-	    > $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
+	    > $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources
 	$(SED) $(SED_NONBASEARGS) $< > $@
 
 GENSRC_BASELOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java
--- a/make/gensrc/GensrcMisc.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcMisc.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -50,7 +50,7 @@
 SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
     $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
 
-$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
+$(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOR_EXE, \
     SRC := $(GENSRC_SOR_SRC), \
     INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
     TOOLCHAIN := TOOLCHAIN_BUILD, \
@@ -86,7 +86,7 @@
   UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
       $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
 
-  $(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
+  $(eval $(call SetupNativeCompilation, BUILD_GENSRC_UC_EXE, \
       SRC := $(GENSRC_UC_SRC), \
       INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
       TOOLCHAIN := TOOLCHAIN_BUILD, \
@@ -124,7 +124,7 @@
   SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
       $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
 
-  $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
+  $(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOL_EXE, \
       SRC := $(GENSRC_SOL_SRC), \
       INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
       TOOLCHAIN := TOOLCHAIN_BUILD, \
--- a/make/gensrc/GensrcProperties.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcProperties.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -75,7 +75,7 @@
 
   # Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
   # to .../support/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
-  # Strip away prefix and suffix, leaving for example only: 
+  # Strip away prefix and suffix, leaving for example only:
   # "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
   $1_JAVAS := $$(patsubst $$($1_MODULE_PATH_ROOT)/%, \
       $(SUPPORT_OUTPUTDIR)/gensrc/%, \
--- a/make/gensrc/GensrcSwing.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcSwing.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -31,12 +31,11 @@
 NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
 
 $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
+	$(call LogInfo, Generating Nimbus source files)
 	$(MKDIR) -p $(@D)
-	$(ECHO) "Generating Nimbus source files"
-	$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
+	$(TOOL_GENERATENIMBUS) $(LOG_DEBUG) \
 	    -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \
 	    -packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
-	$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
 	$(TOUCH) $@
 
 GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
--- a/make/gensrc/GensrcX11Wrappers.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/gensrc/GensrcX11Wrappers.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -63,14 +63,14 @@
 # Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
 # file prefix it is given so those not needed need to be hidden.
 $(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
-	$(MKDIR) -p $(@D)
+	$(call MakeDir, $(@D))
 	$(RM) '$@'
 	$(SORT) $< > $@
 
 # Run the tool on the offset files copied from the source repository to generate several Java classes
 # used in awt.
 $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
+	$(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
 	$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
 	$(TOUCH) $@
 
@@ -82,8 +82,8 @@
 
   # Generate the C code for the program that will output the offset file.
   $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
-	$(ECHO) "Generating X11 wrapper ($*-bit version)"
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating X11 wrapper ($*-bit version))
+	$(call MakeDir, $(@D))
 	$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
 
   # use -m32/-m64 only if the compiler supports it
@@ -103,7 +103,7 @@
 
   # Compile the C code into an executable.
   $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
-	$(MKDIR) -p $(@D)
+	$(call MakeDir, $(@D))
 	(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
 	    $(X_CFLAGS) \
 	    $(X_LIBS) \
@@ -114,9 +114,9 @@
   # Run the executable create the offset file and check that it is identical
   # to the offset file in the source code repository.
   $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Verifying X11 wrapper sizes)
+	$(call MakeDir, $(@D))
 	$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
-	$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
 	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
 	mv $@.tmp $@
 
--- a/make/launcher/Launcher-java.base.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/launcher/Launcher-java.base.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -130,7 +130,6 @@
       LDFLAGS := $(LDFLAGS_JDKEXE), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
       OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
-      DEBUG_SYMBOLS := true, \
       PROGRAM := jexec))
 
   TARGETS += $(BUILD_JEXEC)
--- a/make/launcher/Launcher-jdk.accessibility.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/launcher/Launcher-jdk.accessibility.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -45,7 +45,6 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
       PROGRAM := jabswitch, \
-      DEBUG_SYMBOLS := true, \
       VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=jabswitch.exe" \
@@ -79,7 +78,6 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
       PROGRAM := jaccessinspector$1, \
-      DEBUG_SYMBOLS := true, \
       VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
       RC_FLAGS := $$(RC_FLAGS) \
           -D "JDK_FNAME=jaccessinspector$1.exe" \
@@ -107,7 +105,6 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
       PROGRAM := jaccesswalker$1, \
-      DEBUG_SYMBOLS := true, \
       VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
       RC_FLAGS := $$(RC_FLAGS) \
           -D "JDK_FNAME=jaccesswalker$1.exe" \
--- a/make/launcher/Launcher-jdk.pack200.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/launcher/Launcher-jdk.pack200.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -100,7 +100,6 @@
         -D "JDK_FNAME=unpack200.exe" \
         -D "JDK_INTERNAL_NAME=unpack200" \
         -D "JDK_FTYPE=0x1L", \
-    DEBUG_SYMBOLS := true, \
     MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
     MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
 ))
--- a/make/launcher/LauncherCommon.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/launcher/LauncherCommon.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -25,15 +25,6 @@
 
 include NativeCompilation.gmk
 
-# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
-# Disable it here for the jdk binaries until we decide to enable them.
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  ENABLE_DEBUG_SYMBOLS := false
-endif
-
-# Prepare the find cache.
-$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
-
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
 else
@@ -124,7 +115,7 @@
       $1_LDFLAGS += -exported_symbols_list \
               $(SUPPORT_OUTPUTDIR)/build-static/exported.symbols
       $1_LIBS += \
-          $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
+          $$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
           $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libdt_socket.a \
           $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libjdwp.a \
           $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) \
@@ -174,8 +165,7 @@
   endif
 
   $$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
-      SRC := $(LAUNCHER_SRC), \
-      INCLUDE_FILES := main.c, \
+      EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
       OPTIMIZATION := $$($1_OPTIMIZATION), \
       CFLAGS := $$($1_CFLAGS) \
           $(LAUNCHER_CFLAGS) \
@@ -204,7 +194,6 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
       OUTPUT_DIR := $$($1_OUTPUT_DIR), \
       PROGRAM := $1, \
-      DEBUG_SYMBOLS := true, \
       VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $$(RC_FLAGS) \
           -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
--- a/make/lib/Awt2dLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Awt2dLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -69,7 +69,7 @@
         -D "JDK_INTERNAL_NAME=mlib_image" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
 
@@ -134,7 +134,7 @@
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   $(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
 
@@ -279,7 +279,7 @@
         -D "JDK_INTERNAL_NAME=awt" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBAWT): $(call FindLib, java.base, java)
 
@@ -369,7 +369,7 @@
             -D "JDK_INTERNAL_NAME=xawt" \
             -D "JDK_FTYPE=0x2L", \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
-        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+    ))
 
     $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
 
@@ -433,7 +433,7 @@
         -D "JDK_INTERNAL_NAME=lcms" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBLCMS)
 
@@ -509,7 +509,7 @@
         -D "JDK_FTYPE=0x2L", \
     REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
 
@@ -578,7 +578,7 @@
         LIBS_linux := -lm $(LIBDL), \
         LIBS_solaris := -lm $(LIBDL) $(LIBCXX) -lc, \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
-        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+    ))
 
     $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
 
@@ -700,7 +700,7 @@
         -D "JDK_INTERNAL_NAME=fontmanager" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
 
@@ -745,12 +745,13 @@
           -D "JDK_INTERNAL_NAME=jawt" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   $(BUILD_LIBJAWT): $(BUILD_LIBAWT)
 
   $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
-	$(ECHO) Copying $(@F)
+	$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
+	$(call MakeDir, $(@D))
 	$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
 
   TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
@@ -804,7 +805,7 @@
       LIBS_solaris := $(X_LIBS) -lXrender, \
       LIBS_macosx := -framework Cocoa, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   ifndef BUILD_HEADLESS_ONLY
     $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
@@ -926,7 +927,7 @@
           -D "JDK_INTERNAL_NAME=splashscreen" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBSPLASHSCREEN)
 
@@ -1002,7 +1003,7 @@
           -framework OpenGL \
           -framework QuartzCore -ljava, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBAWT_LWAWT)
 
@@ -1044,7 +1045,7 @@
           -framework JavaRuntimeSupport \
           -ljava -ljvm, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBOSXUI)
 
--- a/make/lib/CoreLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/CoreLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
       DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
       ARFLAGS := $(ARFLAGS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
 else
 
@@ -68,7 +68,7 @@
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
       LDFLAGS := -nostdlib -r -arch x86_64, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
   $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
@@ -86,7 +86,7 @@
 
 LIBVERIFY_OPTIMIZATION := HIGH
 ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
-  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
     LIBVERIFY_OPTIMIZATION := LOW
   endif
 endif
@@ -110,7 +110,7 @@
         -D "JDK_FTYPE=0x2L", \
     REORDER := $(BUILD_LIBVERIFY_REORDER), \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
-    DEBUG_SYMBOLS := true))
+))
 
 TARGETS += $(BUILD_LIBVERIFY)
 
@@ -178,7 +178,7 @@
         -D "JDK_FTYPE=0x2L", \
     REORDER := $(LIBJAVA_REORDER), \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBJAVA)
 
@@ -235,8 +235,7 @@
         -D "JDK_INTERNAL_NAME=zip" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-
+))
 
 $(BUILD_LIBZIP): $(BUILD_LIBJAVA)
 
@@ -280,7 +279,7 @@
         -D "JDK_INTERNAL_NAME=jimage" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
 
@@ -396,7 +395,7 @@
         -D "JDK_INTERNAL_NAME=jli" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBJLI)
 
@@ -414,7 +413,7 @@
       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
       ARFLAGS := $(ARFLAGS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBJLI_STATIC)
 
@@ -433,7 +432,7 @@
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
       LDFLAGS := -nostdlib -r, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   ifeq ($(STATIC_BUILD), true)
     TARGETS += $(BUILD_LIBJLI_STATIC)
--- a/make/lib/Lib-java.base.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.base.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -49,7 +49,7 @@
   JAVA_BASE_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/java.base.symbols
 
   $(JAVA_BASE_EXPORT_SYMBOL_FILE): $(JAVA_BASE_EXPORT_SYMBOLS_SRC)
-	$(ECHO) $(LOG_INFO) "Generating java.base.symbols file"
+	$(call LogInfo, Generating java.base.symbols file)
 	$(CAT) $^ > $@
 
   # The individual symbol files is generated when the respective lib is built
--- a/make/lib/Lib-java.instrument.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.instrument.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -84,7 +84,7 @@
         -D "JDK_INTERNAL_NAME=instrument" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
-    DEBUG_SYMBOLS := true))
+))
 
 ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
   $(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
--- a/make/lib/Lib-java.management.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.management.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -40,7 +40,7 @@
 
 LIBMANAGEMENT_OPTIMIZATION := HIGH
 ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
-  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
     LIBMANAGEMENT_OPTIMIZATION := LOW
   endif
 endif
@@ -64,7 +64,7 @@
         -D "JDK_INTERNAL_NAME=management" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
-    DEBUG_SYMBOLS := true))
+))
 
 $(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
 
--- a/make/lib/Lib-java.prefs.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.prefs.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
         -D "JDK_INTERNAL_NAME=prefs" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBPREFS): $(call FindLib, java.base, java)
 
--- a/make/lib/Lib-java.security.jgss.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.security.jgss.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -46,7 +46,7 @@
       LIBS := $(LIBDL), \
       LIBS_solaris := -lc, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBJ2GSS)
 endif
@@ -92,7 +92,7 @@
             -D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
             -D "JDK_FTYPE=0x2L", \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
-        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+    ))
 
     TARGETS += $(BUILD_LIBKRB5)
   endif
--- a/make/lib/Lib-java.smartcardio.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-java.smartcardio.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -52,7 +52,7 @@
         -D "JDK_INTERNAL_NAME=j2pcsc" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBJ2PCSC)
 
--- a/make/lib/Lib-jdk.accessibility.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.accessibility.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -61,7 +61,7 @@
             -D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
             -D "JDK_FTYPE=0x02L", \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
-        DEBUG_SYMBOLS := true)
+    )
 
     $$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
 
@@ -91,7 +91,7 @@
             -D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
             -D "JDK_FTYPE=0x02L", \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
-        DEBUG_SYMBOLS := true)
+    )
 
     TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
 
@@ -113,7 +113,7 @@
             -D "JDK_INTERNAL_NAME=jabsysinfo" \
             -D "JDK_FTYPE=0x02L", \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
-        DEBUG_SYMBOLS := true)
+    )
 
     TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)
 
--- a/make/lib/Lib-jdk.attach.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.attach.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -56,7 +56,7 @@
     LIBS_solaris := -ldoor, \
     LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
-    DEBUG_SYMBOLS := true))
+))
 
 $(BUILD_LIBATTACH): $(call FindLib, java.base, java)
 
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -68,7 +68,7 @@
           -D "JDK_INTERNAL_NAME=sunec" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBSUNEC)
 endif
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -47,7 +47,7 @@
           -D "JDK_INTERNAL_NAME=sunmscapi" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBSUNMSCAPI)
 endif
--- a/make/lib/Lib-jdk.crypto.pkcs11.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.crypto.pkcs11.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -51,7 +51,7 @@
         -D "JDK_INTERNAL_NAME=j2pkcs11" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBJ2PKCS11)
 
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -44,7 +44,7 @@
       LIBS := $(LIBDL), \
       LIBS_solaris := -lc, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2ucrypto, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   $(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
 
--- a/make/lib/Lib-jdk.deploy.osx.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.deploy.osx.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -57,7 +57,7 @@
           -framework SystemConfiguration \
           $(JDKLIB_LIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBOSX)
 
--- a/make/lib/Lib-jdk.internal.le.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.internal.le.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -51,7 +51,7 @@
           -D "JDK_INTERNAL_NAME=le" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lible, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBLE)
 
--- a/make/lib/Lib-jdk.jdi.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.jdi.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
           -D "JDK_INTERNAL_NAME=dt_shmem" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBDT_SHMEM)
 
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -56,7 +56,7 @@
         -D "JDK_INTERNAL_NAME=dt_socket" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
-    DEBUG_SYMBOLS := true))
+))
 
 $(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
 
@@ -95,7 +95,7 @@
         -D "JDK_INTERNAL_NAME=jdwp" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
-    DEBUG_SYMBOLS := true))
+))
 
 $(BUILD_LIBJDWP): $(call FindLib, java.base, java)
 
@@ -111,7 +111,7 @@
   JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/jdk.jdwp.agent.symbols
 
   $(JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE): $(JDK_JDWP_AGENT_EXPORT_SYMBOLS_SRC)
-	$(ECHO) $(LOG_INFO) "Generating jdk.jdwp.agent symbols file"
+	$(call LogInfo, Generating jdk.jdwp.agent symbols file)
 	$(CAT) $^ > $@
 
   # The individual symbol files is generated when the respective lib is built
--- a/make/lib/Lib-jdk.management.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.management.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -48,7 +48,7 @@
 
 LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
 ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
-  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
     LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
   endif
 endif
@@ -73,7 +73,7 @@
         -D "JDK_INTERNAL_NAME=management_ext" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_ext, \
-    DEBUG_SYMBOLS := true))
+))
 
 $(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)
 
--- a/make/lib/Lib-jdk.pack200.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.pack200.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -52,7 +52,7 @@
         -D "JDK_FNAME=unpack.dll" \
         -D "JDK_INTERNAL_NAME=unpack" \
         -D "JDK_FTYPE=0x2L", \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBUNPACK): $(call FindLib, java.base, java)
 
--- a/make/lib/Lib-jdk.sctp.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.sctp.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -53,7 +53,7 @@
         LIBS_linux := -lpthread $(LIBDL), \
         LIBS_solaris := -lsocket -lc, \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
-        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+    ))
 
     TARGETS += $(BUILD_LIBSCTP)
 
--- a/make/lib/Lib-jdk.security.auth.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/Lib-jdk.security.auth.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
         -D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBJAAS): $(call FindLib, java.base, java)
 
--- a/make/lib/LibCommon.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/LibCommon.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -23,8 +23,6 @@
 # questions.
 #
 
-include $(SPEC)
-include MakeBase.gmk
 include NativeCompilation.gmk
 
 # Hook to include the corresponding custom file, if present.
@@ -38,25 +36,6 @@
 # elegant solution to this.
 WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
 
-ifdef OPENJDK
-  # Build everything with debugging on OpenJDK
-  DEBUG_ALL_BINARIES := true
-else
-  # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
-  # not on other platforms.
-  ifeq ($(OPENJDK_TARGET_OS), windows)
-    DEBUG_ALL_BINARIES := true
-  else
-    DEBUG_ALL_BINARIES := false
-  endif
-endif
-
-# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
-# Disable it here for the jdk libraries until we decide to enable them.
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  ENABLE_DEBUG_SYMBOLS := false
-endif
-
 ################################################################################
 # Find the default set of src dirs for a native library.
 # Param 1 - module name
@@ -92,3 +71,5 @@
 else
   ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
 endif
+
+###############################################################################
--- a/make/lib/NetworkingLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/NetworkingLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -52,7 +52,7 @@
         -D "JDK_INTERNAL_NAME=net" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBNET): $(BUILD_LIBJAVA)
 
--- a/make/lib/NioLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/NioLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -91,7 +91,7 @@
         -D "JDK_INTERNAL_NAME=nio" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 TARGETS += $(BUILD_LIBNIO)
 
--- a/make/lib/PlatformLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/PlatformLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -54,7 +54,7 @@
           -framework IOSurface \
           -framework QuartzCore, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxapp, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   TARGETS += $(BUILD_LIBOSXAPP)
 
--- a/make/lib/SecurityLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/SecurityLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -54,7 +54,7 @@
             -framework Security \
             $(JDKLIB_LIBS), \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxsecurity, \
-        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+    ))
 
     $(BUILD_LIBOSXSECURITY): $(BUILD_LIBJAVA)
 
--- a/make/lib/SoundLibraries.gmk	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/lib/SoundLibraries.gmk	Tue Jan 26 09:11:59 2016 +0100
@@ -138,7 +138,7 @@
         -D "JDK_INTERNAL_NAME=jsound" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
-    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+))
 
 $(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
 
@@ -173,7 +173,7 @@
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := $(ALSA_LIBS) -ljava -ljvm, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   $(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
 
@@ -204,7 +204,7 @@
           -D "JDK_INTERNAL_NAME=jsoundds" \
           -D "JDK_FTYPE=0x2L", \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+  ))
 
   $(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
 
--- a/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java	Tue Jan 26 09:11:59 2016 +0100
@@ -60,7 +60,7 @@
  * @author Stephen Colebourne
  * @author Michael Nascimento Santos
  *
- * @since   1.9
+ * @since   9
  */
 
 class TzdbZoneRulesProvider {
--- a/src/java.base/share/classes/com/sun/crypto/provider/PBES2Core.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/PBES2Core.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -263,7 +263,7 @@
             passwdChars[i] = (char) (passwdBytes[i] & 0x7f);
 
         PBEKeySpec pbeSpec =
-            new PBEKeySpec(passwdChars, salt, iCount, blkSize * 8);
+            new PBEKeySpec(passwdChars, salt, iCount, keyLength);
             // password char[] was cloned in PBEKeySpec constructor,
             // so we can zero it out here
         java.util.Arrays.fill(passwdChars, ' ');
--- a/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Tue Jan 26 09:11:59 2016 +0100
@@ -76,11 +76,14 @@
                 "TlsRsaPremasterSecretGenerator must be initialized");
         }
 
-        if (random == null) {
-            random = new SecureRandom();
+        byte[] b = spec.getEncodedSecret();
+        if (b == null) {
+            if (random == null) {
+                random = new SecureRandom();
+            }
+            b = new byte[48];
+            random.nextBytes(b);
         }
-        byte[] b = new byte[48];
-        random.nextBytes(b);
         b[0] = (byte)spec.getMajorVersion();
         b[1] = (byte)spec.getMinorVersion();
 
--- a/src/java.base/share/classes/java/io/InputStream.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/io/InputStream.java	Tue Jan 26 09:11:59 2016 +0100
@@ -228,7 +228,7 @@
      *         allocated. For example, if an array larger than {@code 2GB} would
      *         be required to store the bytes.
      *
-     * @since 1.9
+     * @since 9
      */
     public byte[] readAllBytes() throws IOException {
         byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
@@ -298,7 +298,7 @@
      * @throws IndexOutOfBoundsException If {@code off} is negative, {@code len}
      *         is negative, or {@code len} is greater than {@code b.length - off}
      *
-     * @since 1.9
+     * @since 9
      */
     public int readNBytes(byte[] b, int off, int len) throws IOException {
         Objects.requireNonNull(b);
@@ -514,7 +514,7 @@
      * @throws IOException if an I/O error occurs when reading or writing
      * @throws NullPointerException if {@code out} is {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     public long transferTo(OutputStream out) throws IOException {
         Objects.requireNonNull(out, "out");
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1526,7 +1526,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public IntStream chars() {
@@ -1543,7 +1543,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public IntStream codePoints() {
--- a/src/java.base/share/classes/java/lang/Character.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/Character.java	Tue Jan 26 09:11:59 2016 +0100
@@ -493,25 +493,25 @@
 
     /**
      * Weak bidirectional character type "LRI" in the Unicode specification.
-     * @since 1.9
+     * @since 9
      */
     public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE = 19;
 
     /**
      * Weak bidirectional character type "RLI" in the Unicode specification.
-     * @since 1.9
+     * @since 9
      */
     public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE = 20;
 
     /**
      * Weak bidirectional character type "FSI" in the Unicode specification.
-     * @since 1.9
+     * @since 9
      */
     public static final byte DIRECTIONALITY_FIRST_STRONG_ISOLATE = 21;
 
     /**
      * Weak bidirectional character type "PDI" in the Unicode specification.
-     * @since 1.9
+     * @since 9
      */
     public static final byte DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE = 22;
 
@@ -2590,7 +2590,7 @@
         /**
          * Constant for the "Combining Diacritical Marks Extended" Unicode
          * character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED =
             new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_EXTENDED",
@@ -2599,7 +2599,7 @@
 
         /**
          * Constant for the "Myanmar Extended-B" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MYANMAR_EXTENDED_B =
             new UnicodeBlock("MYANMAR_EXTENDED_B",
@@ -2608,7 +2608,7 @@
 
         /**
          * Constant for the "Latin Extended-E" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock LATIN_EXTENDED_E =
             new UnicodeBlock("LATIN_EXTENDED_E",
@@ -2617,7 +2617,7 @@
 
         /**
          * Constant for the "Coptic Epact Numbers" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock COPTIC_EPACT_NUMBERS =
             new UnicodeBlock("COPTIC_EPACT_NUMBERS",
@@ -2626,7 +2626,7 @@
 
         /**
          * Constant for the "Old Permic" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock OLD_PERMIC =
             new UnicodeBlock("OLD_PERMIC",
@@ -2635,14 +2635,14 @@
 
         /**
          * Constant for the "Elbasan" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock ELBASAN =
             new UnicodeBlock("ELBASAN");
 
         /**
          * Constant for the "Caucasian Albanian" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock CAUCASIAN_ALBANIAN =
             new UnicodeBlock("CAUCASIAN_ALBANIAN",
@@ -2651,7 +2651,7 @@
 
         /**
          * Constant for the "Linear A" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock LINEAR_A =
             new UnicodeBlock("LINEAR_A",
@@ -2660,21 +2660,21 @@
 
         /**
          * Constant for the "Palmyrene" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock PALMYRENE =
             new UnicodeBlock("PALMYRENE");
 
         /**
          * Constant for the "Nabataean" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock NABATAEAN =
             new UnicodeBlock("NABATAEAN");
 
         /**
          * Constant for the "Old North Arabian" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock OLD_NORTH_ARABIAN =
             new UnicodeBlock("OLD_NORTH_ARABIAN",
@@ -2683,14 +2683,14 @@
 
         /**
          * Constant for the "Manichaean" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MANICHAEAN =
             new UnicodeBlock("MANICHAEAN");
 
         /**
          * Constant for the "Psalter Pahlavi" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock PSALTER_PAHLAVI =
             new UnicodeBlock("PSALTER_PAHLAVI",
@@ -2699,14 +2699,14 @@
 
         /**
          * Constant for the "Mahajani" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MAHAJANI =
             new UnicodeBlock("MAHAJANI");
 
         /**
          * Constant for the "Sinhala Archaic Numbers" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SINHALA_ARCHAIC_NUMBERS =
             new UnicodeBlock("SINHALA_ARCHAIC_NUMBERS",
@@ -2715,49 +2715,49 @@
 
         /**
          * Constant for the "Khojki" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock KHOJKI =
             new UnicodeBlock("KHOJKI");
 
         /**
          * Constant for the "Khudawadi" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock KHUDAWADI =
             new UnicodeBlock("KHUDAWADI");
 
         /**
          * Constant for the "Grantha" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock GRANTHA =
             new UnicodeBlock("GRANTHA");
 
         /**
          * Constant for the "Tirhuta" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock TIRHUTA =
             new UnicodeBlock("TIRHUTA");
 
         /**
          * Constant for the "Siddham" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SIDDHAM =
             new UnicodeBlock("SIDDHAM");
 
         /**
          * Constant for the "Modi" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MODI =
             new UnicodeBlock("MODI");
 
         /**
          * Constant for the "Warang Citi" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock WARANG_CITI =
             new UnicodeBlock("WARANG_CITI",
@@ -2766,7 +2766,7 @@
 
         /**
          * Constant for the "Pau Cin Hau" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock PAU_CIN_HAU =
             new UnicodeBlock("PAU_CIN_HAU",
@@ -2775,14 +2775,14 @@
 
         /**
          * Constant for the "Mro" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MRO =
             new UnicodeBlock("MRO");
 
         /**
          * Constant for the "Bassa Vah" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock BASSA_VAH =
             new UnicodeBlock("BASSA_VAH",
@@ -2791,7 +2791,7 @@
 
         /**
          * Constant for the "Pahawh Hmong" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock PAHAWH_HMONG =
             new UnicodeBlock("PAHAWH_HMONG",
@@ -2800,14 +2800,14 @@
 
         /**
          * Constant for the "Duployan" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock DUPLOYAN =
             new UnicodeBlock("DUPLOYAN");
 
         /**
          * Constant for the "Shorthand Format Controls" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SHORTHAND_FORMAT_CONTROLS =
             new UnicodeBlock("SHORTHAND_FORMAT_CONTROLS",
@@ -2816,7 +2816,7 @@
 
         /**
          * Constant for the "Mende Kikakui" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MENDE_KIKAKUI =
             new UnicodeBlock("MENDE_KIKAKUI",
@@ -2825,7 +2825,7 @@
 
         /**
          * Constant for the "Ornamental Dingbats" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock ORNAMENTAL_DINGBATS =
             new UnicodeBlock("ORNAMENTAL_DINGBATS",
@@ -2834,7 +2834,7 @@
 
         /**
          * Constant for the "Geometric Shapes Extended" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock GEOMETRIC_SHAPES_EXTENDED =
             new UnicodeBlock("GEOMETRIC_SHAPES_EXTENDED",
@@ -2843,7 +2843,7 @@
 
         /**
          * Constant for the "Supplemental Arrows-C" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SUPPLEMENTAL_ARROWS_C =
             new UnicodeBlock("SUPPLEMENTAL_ARROWS_C",
@@ -2852,7 +2852,7 @@
 
         /**
          * Constant for the "Cherokee Supplement" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock CHEROKEE_SUPPLEMENT =
             new UnicodeBlock("CHEROKEE_SUPPLEMENT",
@@ -2861,14 +2861,14 @@
 
         /**
          * Constant for the "Hatran" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock HATRAN =
             new UnicodeBlock("HATRAN");
 
         /**
          * Constant for the "Old Hungarian" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock OLD_HUNGARIAN =
             new UnicodeBlock("OLD_HUNGARIAN",
@@ -2877,21 +2877,21 @@
 
         /**
          * Constant for the "Multani" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock MULTANI =
             new UnicodeBlock("MULTANI");
 
         /**
          * Constant for the "Ahom" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock AHOM =
             new UnicodeBlock("AHOM");
 
         /**
          * Constant for the "Early Dynastic Cuneiform" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock EARLY_DYNASTIC_CUNEIFORM =
             new UnicodeBlock("EARLY_DYNASTIC_CUNEIFORM",
@@ -2900,7 +2900,7 @@
 
         /**
          * Constant for the "Anatolian Hieroglyphs" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock ANATOLIAN_HIEROGLYPHS =
             new UnicodeBlock("ANATOLIAN_HIEROGLYPHS",
@@ -2909,7 +2909,7 @@
 
         /**
          * Constant for the "Sutton SignWriting" Unicode character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SUTTON_SIGNWRITING =
             new UnicodeBlock("SUTTON_SIGNWRITING",
@@ -2919,7 +2919,7 @@
         /**
          * Constant for the "Supplemental Symbols and Pictographs" Unicode
          * character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS =
             new UnicodeBlock("SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS",
@@ -2929,7 +2929,7 @@
         /**
          * Constant for the "CJK Unified Ideographs Extension E" Unicode
          * character block.
-         * @since 1.9
+         * @since 9
          */
         public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E =
             new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E",
@@ -4189,175 +4189,175 @@
 
         /**
          * Unicode script "Caucasian Albanian".
-         * @since 1.9
+         * @since 9
          */
         CAUCASIAN_ALBANIAN,
 
         /**
          * Unicode script "Bassa Vah".
-         * @since 1.9
+         * @since 9
          */
         BASSA_VAH,
 
         /**
          * Unicode script "Duployan".
-         * @since 1.9
+         * @since 9
          */
         DUPLOYAN,
 
         /**
          * Unicode script "Elbasan".
-         * @since 1.9
+         * @since 9
          */
         ELBASAN,
 
         /**
          * Unicode script "Grantha".
-         * @since 1.9
+         * @since 9
          */
         GRANTHA,
 
         /**
          * Unicode script "Pahawh Hmong".
-         * @since 1.9
+         * @since 9
          */
         PAHAWH_HMONG,
 
         /**
          * Unicode script "Khojki".
-         * @since 1.9
+         * @since 9
          */
         KHOJKI,
 
         /**
          * Unicode script "Linear A".
-         * @since 1.9
+         * @since 9
          */
         LINEAR_A,
 
         /**
          * Unicode script "Mahajani".
-         * @since 1.9
+         * @since 9
          */
         MAHAJANI,
 
         /**
          * Unicode script "Manichaean".
-         * @since 1.9
+         * @since 9
          */
         MANICHAEAN,
 
         /**
          * Unicode script "Mende Kikakui".
-         * @since 1.9
+         * @since 9
          */
         MENDE_KIKAKUI,
 
         /**
          * Unicode script "Modi".
-         * @since 1.9
+         * @since 9
          */
         MODI,
 
         /**
          * Unicode script "Mro".
-         * @since 1.9
+         * @since 9
          */
         MRO,
 
         /**
          * Unicode script "Old North Arabian".
-         * @since 1.9
+         * @since 9
          */
         OLD_NORTH_ARABIAN,
 
         /**
          * Unicode script "Nabataean".
-         * @since 1.9
+         * @since 9
          */
         NABATAEAN,
 
         /**
          * Unicode script "Palmyrene".
-         * @since 1.9
+         * @since 9
          */
         PALMYRENE,
 
         /**
          * Unicode script "Pau Cin Hau".
-         * @since 1.9
+         * @since 9
          */
         PAU_CIN_HAU,
 
         /**
          * Unicode script "Old Permic".
-         * @since 1.9
+         * @since 9
          */
         OLD_PERMIC,
 
         /**
          * Unicode script "Psalter Pahlavi".
-         * @since 1.9
+         * @since 9
          */
         PSALTER_PAHLAVI,
 
         /**
          * Unicode script "Siddham".
-         * @since 1.9
+         * @since 9
          */
         SIDDHAM,
 
         /**
          * Unicode script "Khudawadi".
-         * @since 1.9
+         * @since 9
          */
         KHUDAWADI,
 
         /**
          * Unicode script "Tirhuta".
-         * @since 1.9
+         * @since 9
          */
         TIRHUTA,
 
         /**
          * Unicode script "Warang Citi".
-         * @since 1.9
+         * @since 9
          */
         WARANG_CITI,
 
          /**
          * Unicode script "Ahom".
-         * @since 1.9
+         * @since 9
          */
         AHOM,
 
         /**
          * Unicode script "Anatolian Hieroglyphs".
-         * @since 1.9
+         * @since 9
          */
         ANATOLIAN_HIEROGLYPHS,
 
         /**
          * Unicode script "Hatran".
-         * @since 1.9
+         * @since 9
          */
         HATRAN,
 
         /**
          * Unicode script "Multani".
-         * @since 1.9
+         * @since 9
          */
         MULTANI,
 
         /**
          * Unicode script "Old Hungarian".
-         * @since 1.9
+         * @since 9
          */
         OLD_HUNGARIAN,
 
         /**
          * Unicode script "SignWriting".
-         * @since 1.9
+         * @since 9
          */
         SIGNWRITING,
 
--- a/src/java.base/share/classes/java/lang/Integer.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/Integer.java	Tue Jan 26 09:11:59 2016 +0100
@@ -716,7 +716,7 @@
      *             {@code radix}, or if {@code radix} is either smaller than
      *             {@link java.lang.Character#MIN_RADIX} or larger than
      *             {@link java.lang.Character#MAX_RADIX}.
-     * @since  1.9
+     * @since  9
      */
     public static int parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
                 throws NumberFormatException {
@@ -899,7 +899,7 @@
      *             {@code radix}, or if {@code radix} is either smaller than
      *             {@link java.lang.Character#MIN_RADIX} or larger than
      *             {@link java.lang.Character#MAX_RADIX}.
-     * @since  1.9
+     * @since  9
      */
     public static int parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
                 throws NumberFormatException {
--- a/src/java.base/share/classes/java/lang/Long.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/Long.java	Tue Jan 26 09:11:59 2016 +0100
@@ -747,7 +747,7 @@
      *             {@code radix}, or if {@code radix} is either smaller than
      *             {@link java.lang.Character#MIN_RADIX} or larger than
      *             {@link java.lang.Character#MAX_RADIX}.
-     * @since  1.9
+     * @since  9
      */
     public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix)
                 throws NumberFormatException {
@@ -993,7 +993,7 @@
      *             {@code radix}, or if {@code radix} is either smaller than
      *             {@link java.lang.Character#MIN_RADIX} or larger than
      *             {@link java.lang.Character#MAX_RADIX}.
-     * @since  1.9
+     * @since  9
      */
     public static long parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix)
                 throws NumberFormatException {
--- a/src/java.base/share/classes/java/lang/Process.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/Process.java	Tue Jan 26 09:11:59 2016 +0100
@@ -304,7 +304,7 @@
      *         otherwise, {@link #destroy} forcibly terminates the process
      * @throws UnsupportedOperationException if the Process implementation
      *         does not support this operation
-     * @since 1.9
+     * @since 9
      */
     public boolean supportsNormalTermination() {
         throw new UnsupportedOperationException(this.getClass()
@@ -340,7 +340,7 @@
      * @return the native process id of the process
      * @throws UnsupportedOperationException if the Process implementation
      *         does not support this operation
-     * @since 1.9
+     * @since 9
      */
     public long getPid() {
         return toHandle().getPid();
@@ -409,7 +409,7 @@
      *
      * @return a new {@code CompletableFuture<Process>} for the Process
      *
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<Process> onExit() {
         return CompletableFuture.supplyAsync(this::waitForInternal);
@@ -471,7 +471,7 @@
      *         does not support this operation
      * @throws SecurityException if a security manager has been installed and
      *         it denies RuntimePermission("manageProcess")
-     * @since 1.9
+     * @since 9
      */
     public ProcessHandle toHandle() {
         throw new UnsupportedOperationException(this.getClass()
@@ -491,7 +491,7 @@
      * @return a snapshot of information about the process, always non-null
      * @throws UnsupportedOperationException if the Process implementation
      *         does not support this operation
-     * @since 1.9
+     * @since 9
      */
     public ProcessHandle.Info info() {
         return toHandle().info();
@@ -516,7 +516,7 @@
      *         does not support this operation
      * @throws SecurityException if a security manager has been installed and
      *         it denies RuntimePermission("manageProcess")
-     * @since 1.9
+     * @since 9
      */
     public Stream<ProcessHandle> children() {
         return toHandle().children();
@@ -542,7 +542,7 @@
      *         does not support this operation
      * @throws SecurityException if a security manager has been installed and
      *         it denies RuntimePermission("manageProcess")
-     * @since 1.9
+     * @since 9
      */
     public Stream<ProcessHandle> descendants() {
         return toHandle().descendants();
--- a/src/java.base/share/classes/java/lang/ProcessHandle.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/ProcessHandle.java	Tue Jan 26 09:11:59 2016 +0100
@@ -89,7 +89,7 @@
  * {@link #compareTo(ProcessHandle) compareTo} methods to compare ProcessHandles.
  *
  * @see Process
- * @since 1.9
+ * @since 9
  */
 public interface ProcessHandle extends Comparable<ProcessHandle> {
 
@@ -215,7 +215,7 @@
      * by the operating system privileges of the process making the request.
      * The return types are {@code Optional<T>} allowing explicit tests
      * and actions if the value is available.
-     * @since 1.9
+     * @since 9
      */
     public interface Info {
         /**
--- a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -50,7 +50,7 @@
  * ProcessHandleImpl is the implementation of ProcessHandle.
  *
  * @see Process
- * @since 1.9
+ * @since 9
  */
 final class ProcessHandleImpl implements ProcessHandle {
     /**
@@ -338,7 +338,7 @@
      *
      * @return {@code true} if the process represented by this
      * {@code ProcessHandle} object has not yet terminated.
-     * @since 1.9
+     * @since 9
      */
     @Override
     public boolean isAlive() {
--- a/src/java.base/share/classes/java/lang/StackWalker.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/StackWalker.java	Tue Jan 26 09:11:59 2016 +0100
@@ -81,7 +81,7 @@
  * will cause a {@link NullPointerException NullPointerException}
  * to be thrown.
  *
- * @since 1.9
+ * @since 9
  */
 public final class StackWalker {
     /**
@@ -92,7 +92,7 @@
      * by the {@linkplain Option stack walking options} of a {@linkplain
      * StackWalker stack walker}.
      *
-     * @since 1.9
+     * @since 9
      * @jvms 2.6
      */
     public static interface StackFrame {
@@ -185,7 +185,7 @@
      * Stack walker option to configure the {@linkplain StackFrame stack frame}
      * information obtained by a {@code StackWalker}.
      *
-     * @since 1.9
+     * @since 9
      */
     public enum Option {
         /**
--- a/src/java.base/share/classes/java/lang/String.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/String.java	Tue Jan 26 09:11:59 2016 +0100
@@ -2674,7 +2674,7 @@
      * point</a> is passed through uninterpreted.
      *
      * @return an IntStream of char values from this sequence
-     * @since 1.9
+     * @since 9
      */
     @Override
     public IntStream chars() {
@@ -2694,7 +2694,7 @@
      * {@code int} values which are then passed to the stream.
      *
      * @return an IntStream of Unicode code points from this sequence
-     * @since 1.9
+     * @since 9
      */
     @Override
     public IntStream codePoints() {
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedArrayType.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedArrayType.java	Tue Jan 26 09:11:59 2016 +0100
@@ -53,7 +53,7 @@
      *
      * @return {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     @Override
     AnnotatedType getAnnotatedOwnerType();
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedParameterizedType.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedParameterizedType.java	Tue Jan 26 09:11:59 2016 +0100
@@ -59,7 +59,7 @@
      *     refers to a parameterized type that cannot be instantiated
      *     for any reason
      *
-     * @since 1.9
+     * @since 9
      */
     @Override
     AnnotatedType getAnnotatedOwnerType();
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java	Tue Jan 26 09:11:59 2016 +0100
@@ -60,7 +60,7 @@
      *     refers to a parameterized type that cannot be instantiated
      *     for any reason
      *
-     * @since 1.9
+     * @since 9
      */
     default AnnotatedType getAnnotatedOwnerType() {
         return null;
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedTypeVariable.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedTypeVariable.java	Tue Jan 26 09:11:59 2016 +0100
@@ -54,7 +54,7 @@
      *
      * @return {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     @Override
     AnnotatedType getAnnotatedOwnerType();
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedWildcardType.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedWildcardType.java	Tue Jan 26 09:11:59 2016 +0100
@@ -65,7 +65,7 @@
      *
      * @return {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     @Override
     AnnotatedType getAnnotatedOwnerType();
--- a/src/java.base/share/classes/java/math/BigInteger.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/math/BigInteger.java	Tue Jan 26 09:11:59 2016 +0100
@@ -297,7 +297,7 @@
      * @throws IndexOutOfBoundsException if the provided array offset and
      *         length would cause an index into the byte array to be
      *         negative or greater than or equal to the array length.
-     * @since 1.9
+     * @since 9
      */
     public BigInteger(byte[] val, int off, int len) {
         if (val.length == 0) {
@@ -385,7 +385,7 @@
      * @throws IndexOutOfBoundsException if the provided array offset and
      *         length would cause an index into the byte array to be
      *         negative or greater than or equal to the array length.
-     * @since 1.9
+     * @since 9
      */
     public BigInteger(int signum, byte[] magnitude, int off, int len) {
         if (signum < -1 || signum > 1) {
@@ -2424,7 +2424,7 @@
      *         {@code (i * sqrt(-val))} where <i>i</i> is the
      *         <i>imaginary unit</i> and is equal to
      *         {@code sqrt(-1)}.)
-     * @since  1.9
+     * @since  9
      */
     public BigInteger sqrt() {
         if (this.signum < 0) {
@@ -2447,7 +2447,7 @@
      *         <i>imaginary unit</i> and is equal to
      *         {@code sqrt(-1)}.)
      * @see #sqrt()
-     * @since  1.9
+     * @since  9
      */
     public BigInteger[] sqrtAndRemainder() {
         BigInteger s = sqrt();
--- a/src/java.base/share/classes/java/math/MutableBigInteger.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/math/MutableBigInteger.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1878,7 +1878,7 @@
      * @throws ArithmeticException if the value returned by {@code bitLength()}
      * overflows the range of {@code int}.
      * @return the integer square root of {@code this}
-     * @since 1.9
+     * @since 9
      */
     MutableBigInteger sqrt() {
         // Special cases.
--- a/src/java.base/share/classes/java/net/DatagramSocket.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1338,7 +1338,7 @@
      *
      * @throws NullPointerException if name is {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     public <T> DatagramSocket setOption(SocketOption<T> name, T value)
         throws IOException
@@ -1368,7 +1368,7 @@
      *         {@link java.net.StandardSocketOptions StandardSocketOptions}
      *         do not require any security permission.
      *
-     * @since 1.9
+     * @since 9
      */
     public <T> T getOption(SocketOption<T> name) throws IOException {
         return getImpl().getOption(name);
@@ -1386,7 +1386,7 @@
      * @return A set of the socket options supported by this socket. This set
      *        may be empty if the socket's DatagramSocketImpl cannot be created.
      *
-     * @since 1.9
+     * @since 9
      */
     public Set<SocketOption<?>> supportedOptions() {
         synchronized(DatagramSocket.class) {
--- a/src/java.base/share/classes/java/net/DatagramSocketImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/DatagramSocketImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -278,7 +278,7 @@
      *
      * @throws NullPointerException if name is {@code null}
      * @throws IOException if an I/O problem occurs while attempting to set the option
-     * @since 1.9
+     * @since 9
      */
     protected <T> void setOption(SocketOption<T> name, T value) throws IOException {
         if (name == StandardSocketOptions.SO_SNDBUF) {
@@ -319,7 +319,7 @@
      * @throws NullPointerException if name is {@code null}
      * @throws IOException if an I/O problem occurs while attempting to set the option
      *
-     * @since 1.9
+     * @since 9
      */
     @SuppressWarnings("unchecked")
     protected <T> T getOption(SocketOption<T> name) throws IOException {
--- a/src/java.base/share/classes/java/net/NetworkInterface.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java	Tue Jan 26 09:11:59 2016 +0100
@@ -130,7 +130,7 @@
      *
      * @return a Stream object with all or a subset of the InetAddresses
      * bound to this network interface
-     * @since 1.9
+     * @since 9
      */
     public Stream<InetAddress> inetAddresses() {
         return streamFromArray(getCheckedInetAddresses());
@@ -208,7 +208,7 @@
      *
      * @return a Stream object with all of the subinterfaces
      * of this network interface
-     * @since 1.9
+     * @since 9
      */
     public Stream<NetworkInterface> subInterfaces() {
         return streamFromArray(childs);
@@ -362,7 +362,7 @@
      *
      * @return a Stream of NetworkInterfaces found on this machine
      * @exception  SocketException  if an I/O error occurs.
-     * @since 1.9
+     * @since 9
      */
     public static Stream<NetworkInterface> networkInterfaces()
         throws SocketException {
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Tue Jan 26 09:11:59 2016 +0100
@@ -946,7 +946,7 @@
      *         {@link java.net.StandardSocketOptions StandardSocketOptions}
      *         do not require any security permission.
      *
-     * @since 1.9
+     * @since 9
      */
     public <T> ServerSocket setOption(SocketOption<T> name, T value)
         throws IOException
@@ -976,7 +976,7 @@
      *         {@link java.net.StandardSocketOptions StandardSocketOptions}
      *         do not require any security permission.
      *
-     * @since 1.9
+     * @since 9
      */
     public <T> T getOption(SocketOption<T> name) throws IOException {
         return getImpl().getOption(name);
@@ -994,7 +994,7 @@
      * @return A set of the socket options supported by this socket. This set
      *         may be empty if the socket's SocketImpl cannot be created.
      *
-     * @since 1.9
+     * @since 9
      */
     public Set<SocketOption<?>> supportedOptions() {
         synchronized (ServerSocket.class) {
--- a/src/java.base/share/classes/java/net/Socket.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/Socket.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1756,7 +1756,7 @@
      *         {@link java.net.StandardSocketOptions StandardSocketOptions}
      *         do not require any security permission.
      *
-     * @since 1.9
+     * @since 9
      */
     public <T> Socket setOption(SocketOption<T> name, T value) throws IOException {
         getImpl().setOption(name, value);
@@ -1784,7 +1784,7 @@
      *         {@link java.net.StandardSocketOptions StandardSocketOptions}
      *         do not require any security permission.
      *
-     * @since 1.9
+     * @since 9
      */
     @SuppressWarnings("unchecked")
     public <T> T getOption(SocketOption<T> name) throws IOException {
@@ -1803,7 +1803,7 @@
      * @return A set of the socket options supported by this socket. This set
      *         may be empty if the socket's SocketImpl cannot be created.
      *
-     * @since 1.9
+     * @since 9
      */
     public Set<SocketOption<?>> supportedOptions() {
         synchronized (Socket.class) {
--- a/src/java.base/share/classes/java/net/SocketImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/SocketImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -373,22 +373,26 @@
      *
      * @throws IOException if an I/O error occurs, or if the socket is closed.
      *
-     * @since 1.9
+     * @since 9
      */
     protected <T> void setOption(SocketOption<T> name, T value) throws IOException {
-        if (name == StandardSocketOptions.SO_KEEPALIVE) {
+        if (name == StandardSocketOptions.SO_KEEPALIVE &&
+                (getSocket() != null)) {
             setOption(SocketOptions.SO_KEEPALIVE, value);
-        } else if (name == StandardSocketOptions.SO_SNDBUF) {
+        } else if (name == StandardSocketOptions.SO_SNDBUF &&
+                (getSocket() != null)) {
             setOption(SocketOptions.SO_SNDBUF, value);
         } else if (name == StandardSocketOptions.SO_RCVBUF) {
             setOption(SocketOptions.SO_RCVBUF, value);
         } else if (name == StandardSocketOptions.SO_REUSEADDR) {
             setOption(SocketOptions.SO_REUSEADDR, value);
-        } else if (name == StandardSocketOptions.SO_LINGER) {
+        } else if (name == StandardSocketOptions.SO_LINGER &&
+                (getSocket() != null)) {
             setOption(SocketOptions.SO_LINGER, value);
         } else if (name == StandardSocketOptions.IP_TOS) {
             setOption(SocketOptions.IP_TOS, value);
-        } else if (name == StandardSocketOptions.TCP_NODELAY) {
+        } else if (name == StandardSocketOptions.TCP_NODELAY &&
+                (getSocket() != null)) {
             setOption(SocketOptions.TCP_NODELAY, value);
         } else {
             throw new UnsupportedOperationException("unsupported option");
@@ -408,23 +412,27 @@
      *
      * @throws IOException if an I/O error occurs, or if the socket is closed.
      *
-     * @since 1.9
+     * @since 9
      */
     @SuppressWarnings("unchecked")
     protected <T> T getOption(SocketOption<T> name) throws IOException {
-        if (name == StandardSocketOptions.SO_KEEPALIVE) {
+        if (name == StandardSocketOptions.SO_KEEPALIVE &&
+                (getSocket() != null)) {
             return (T)getOption(SocketOptions.SO_KEEPALIVE);
-        } else if (name == StandardSocketOptions.SO_SNDBUF) {
+        } else if (name == StandardSocketOptions.SO_SNDBUF &&
+                (getSocket() != null)) {
             return (T)getOption(SocketOptions.SO_SNDBUF);
         } else if (name == StandardSocketOptions.SO_RCVBUF) {
             return (T)getOption(SocketOptions.SO_RCVBUF);
         } else if (name == StandardSocketOptions.SO_REUSEADDR) {
             return (T)getOption(SocketOptions.SO_REUSEADDR);
-        } else if (name == StandardSocketOptions.SO_LINGER) {
+        } else if (name == StandardSocketOptions.SO_LINGER &&
+                (getSocket() != null)) {
             return (T)getOption(SocketOptions.SO_LINGER);
         } else if (name == StandardSocketOptions.IP_TOS) {
             return (T)getOption(SocketOptions.IP_TOS);
-        } else if (name == StandardSocketOptions.TCP_NODELAY) {
+        } else if (name == StandardSocketOptions.TCP_NODELAY &&
+                (getSocket() != null)) {
             return (T)getOption(SocketOptions.TCP_NODELAY);
         } else {
             throw new UnsupportedOperationException("unsupported option");
--- a/src/java.base/share/classes/java/net/URL.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/URL.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,10 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Hashtable;
+import java.io.InvalidObjectException;
+import java.io.ObjectStreamException;
+import java.io.ObjectStreamField;
+import java.io.ObjectInputStream.GetField;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.ServiceConfigurationError;
@@ -142,6 +146,7 @@
  */
 public final class URL implements java.io.Serializable {
 
+    static final String BUILTIN_HANDLERS_PREFIX = "sun.net.www.protocol";
     static final long serialVersionUID = -7627629688361524110L;
 
     /**
@@ -226,6 +231,8 @@
      */
     private int hashCode = -1;
 
+    private transient UrlDeserializedState tempState;
+
     /**
      * Creates a {@code URL} object from the specified
      * {@code protocol}, {@code host}, {@code port}
@@ -1354,6 +1361,31 @@
     }
 
     /**
+     * @serialField    protocol String
+     *
+     * @serialField    host String
+     *
+     * @serialField    port int
+     *
+     * @serialField    authority String
+     *
+     * @serialField    file String
+     *
+     * @serialField    ref String
+     *
+     * @serialField    hashCode int
+     *
+     */
+    private static final ObjectStreamField[] serialPersistentFields = {
+        new ObjectStreamField("protocol", String.class),
+        new ObjectStreamField("host", String.class),
+        new ObjectStreamField("port", int.class),
+        new ObjectStreamField("authority", String.class),
+        new ObjectStreamField("file", String.class),
+        new ObjectStreamField("ref", String.class),
+        new ObjectStreamField("hashCode", int.class), };
+
+    /**
      * WriteObject is called to save the state of the URL to an
      * ObjectOutputStream. The handler is not saved since it is
      * specific to this system.
@@ -1375,16 +1407,67 @@
      * stream handler.
      */
     private synchronized void readObject(java.io.ObjectInputStream s)
-         throws IOException, ClassNotFoundException
-    {
-        s.defaultReadObject();  // read the fields
-        if ((handler = getURLStreamHandler(protocol)) == null) {
+            throws IOException, ClassNotFoundException {
+        GetField gf = s.readFields();
+        String protocol = (String)gf.get("protocol", null);
+        if (getURLStreamHandler(protocol) == null) {
             throw new IOException("unknown protocol: " + protocol);
         }
+        String host = (String)gf.get("host", null);
+        int port = gf.get("port", -1);
+        String authority = (String)gf.get("authority", null);
+        String file = (String)gf.get("file", null);
+        String ref = (String)gf.get("ref", null);
+        int hashCode = gf.get("hashCode", -1);
+        if (authority == null
+                && ((host != null && host.length() > 0) || port != -1)) {
+            if (host == null)
+                host = "";
+            authority = (port == -1) ? host : host + ":" + port;
+        }
+        tempState = new UrlDeserializedState(protocol, host, port, authority,
+               file, ref, hashCode);
+    }
+
+    /**
+     * Replaces the de-serialized object with an URL object.
+     *
+     * @return a newly created object from deserialized data
+     *
+     * @throws ObjectStreamException if a new object replacing this
+     * object could not be created
+     */
+
+   private Object readResolve() throws ObjectStreamException {
+
+        URLStreamHandler handler = null;
+        // already been checked in readObject
+        handler = getURLStreamHandler(tempState.getProtocol());
+
+        URL replacementURL = null;
+        if (isBuiltinStreamHandler(handler.getClass().getName())) {
+            replacementURL = fabricateNewURL();
+        } else {
+            replacementURL = setDeserializedFields(handler);
+        }
+        return replacementURL;
+    }
+
+    private URL setDeserializedFields(URLStreamHandler handler) {
+        URL replacementURL;
+        String userInfo = null;
+        String protocol = tempState.getProtocol();
+        String host = tempState.getHost();
+        int port = tempState.getPort();
+        String authority = tempState.getAuthority();
+        String file = tempState.getFile();
+        String ref = tempState.getRef();
+        int hashCode = tempState.getHashCode();
+
 
         // Construct authority part
-        if (authority == null &&
-            ((host != null && host.length() > 0) || port != -1)) {
+        if (authority == null
+            && ((host != null && host.length() > 0) || port != -1)) {
             if (host == null)
                 host = "";
             authority = (port == -1) ? host : host + ":" + port;
@@ -1403,8 +1486,8 @@
         }
 
         // Construct path and query part
-        path = null;
-        query = null;
+        String path = null;
+        String query = null;
         if (file != null) {
             // Fix: only do this if hierarchical?
             int q = file.lastIndexOf('?');
@@ -1414,6 +1497,67 @@
             } else
                 path = file;
         }
+
+        if (port == -1) {
+            port = 0;
+        }
+        // Set the object fields.
+        this.protocol = protocol;
+        this.host = host;
+        this.port = port;
+        this.file = file;
+        this.authority = authority;
+        this.ref = ref;
+        this.hashCode = hashCode;
+        this.handler = handler;
+        this.query = query;
+        this.path = path;
+        this.userInfo = userInfo;
+        replacementURL = this;
+        return replacementURL;
+    }
+
+    private URL fabricateNewURL()
+                throws InvalidObjectException {
+        // create URL string from deserialized object
+        URL replacementURL = null;
+        String urlString = tempState.reconstituteUrlString();
+
+        try {
+            replacementURL = new URL(urlString);
+        } catch (MalformedURLException mEx) {
+            resetState();
+            InvalidObjectException invoEx = new InvalidObjectException(
+                    "Malformed URL:  " + urlString);
+            invoEx.initCause(mEx);
+            throw invoEx;
+        }
+        replacementURL.setSerializedHashCode(tempState.getHashCode());
+        resetState();
+        return replacementURL;
+    }
+
+    private boolean isBuiltinStreamHandler(String handlerClassName) {
+        return (handlerClassName.startsWith(BUILTIN_HANDLERS_PREFIX));
+    }
+
+    private void resetState() {
+        this.protocol = null;
+        this.host = null;
+        this.port = -1;
+        this.file = null;
+        this.authority = null;
+        this.ref = null;
+        this.hashCode = -1;
+        this.handler = null;
+        this.query = null;
+        this.path = null;
+        this.userInfo = null;
+        this.tempState = null;
+    }
+
+    private void setSerializedHashCode(int hc) {
+        this.hashCode = hc;
     }
 }
 
@@ -1445,3 +1589,82 @@
         return ref;
     }
 }
+
+final class UrlDeserializedState {
+    private final String protocol;
+    private final String host;
+    private final int port;
+    private final String authority;
+    private final String file;
+    private final String ref;
+    private final int hashCode;
+
+    public UrlDeserializedState(String protocol,
+                                String host, int port,
+                                String authority, String file,
+                                String ref, int hashCode) {
+        this.protocol = protocol;
+        this.host = host;
+        this.port = port;
+        this.authority = authority;
+        this.file = file;
+        this.ref = ref;
+        this.hashCode = hashCode;
+    }
+
+    String getProtocol() {
+        return protocol;
+    }
+
+    String getHost() {
+        return host;
+    }
+
+    String getAuthority () {
+        return authority;
+    }
+
+    int getPort() {
+        return port;
+    }
+
+    String getFile () {
+        return file;
+    }
+
+    String getRef () {
+        return ref;
+    }
+
+    int getHashCode () {
+        return hashCode;
+    }
+
+    String reconstituteUrlString() {
+
+        // pre-compute length of StringBuffer
+        int len = protocol.length() + 1;
+        if (authority != null && authority.length() > 0)
+            len += 2 + authority.length();
+        if (file != null) {
+            len += file.length();
+        }
+        if (ref != null)
+            len += 1 + ref.length();
+        StringBuilder result = new StringBuilder(len);
+        result.append(protocol);
+        result.append(":");
+        if (authority != null && authority.length() > 0) {
+            result.append("//");
+            result.append(authority);
+        }
+        if (file != null) {
+            result.append(file);
+        }
+        if (ref != null) {
+            result.append("#");
+            result.append(ref);
+        }
+        return result.toString();
+    }
+}
--- a/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Tue Jan 26 09:11:59 2016 +0100
@@ -44,7 +44,7 @@
  * <p> URL stream handler providers are located at runtime, as specified in the
  * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
  *
- * @since 1.9
+ * @since 9
  */
 public abstract class URLStreamHandlerProvider
     implements URLStreamHandlerFactory
--- a/src/java.base/share/classes/java/net/spi/package-info.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/net/spi/package-info.java	Tue Jan 26 09:11:59 2016 +0100
@@ -29,7 +29,7 @@
  * <p> Only developers who are defining new URL stream handler providers
  * should need to make direct use of this package.
  *
- * @since 1.9
+ * @since 9
  */
 
 package java.net.spi;
--- a/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Tue Jan 26 09:11:59 2016 +0100
@@ -213,7 +213,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer position(int newPosition) {
@@ -223,7 +223,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer limit(int newLimit) {
@@ -233,7 +233,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer mark() {
@@ -243,7 +243,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer reset() {
@@ -253,7 +253,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer clear() {
@@ -263,7 +263,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer flip() {
@@ -273,7 +273,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public final MappedByteBuffer rewind() {
--- a/src/java.base/share/classes/java/nio/X-Buffer.java.template	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/nio/X-Buffer.java.template	Tue Jan 26 09:11:59 2016 +0100
@@ -1064,7 +1064,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public
@@ -1078,7 +1078,7 @@
     
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public
@@ -1092,7 +1092,7 @@
     
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public 
@@ -1106,7 +1106,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public 
@@ -1120,7 +1120,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public 
@@ -1134,7 +1134,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public 
@@ -1148,7 +1148,7 @@
 
     /**
      * {@inheritDoc}
-     * @since 1.9
+     * @since 9
      */
     @Override
     public 
--- a/src/java.base/share/classes/java/security/KeyStore.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/KeyStore.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1666,7 +1666,7 @@
      *
      * @see Provider
      *
-     * @since 1.9
+     * @since 9
      */
     public static final KeyStore getInstance(File file, char[] password)
         throws KeyStoreException, IOException, NoSuchAlgorithmException,
@@ -1722,7 +1722,7 @@
      *
      * @see Provider
      *
-     * @since 1.9
+     * @since 9
      */
     public static final KeyStore getInstance(File file,
         LoadStoreParameter param) throws KeyStoreException, IOException,
@@ -2006,7 +2006,7 @@
          *   of either PasswordProtection or CallbackHandlerProtection; or
          *   if file does not exist or does not refer to a normal file
          *
-         * @since 1.9
+         * @since 9
          */
         public static Builder newInstance(File file,
             ProtectionParameter protection) {
--- a/src/java.base/share/classes/java/security/PermissionCollection.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/PermissionCollection.java	Tue Jan 26 09:11:59 2016 +0100
@@ -144,7 +144,7 @@
      * the enumeration returned from a call to {@link #elements()}.
      *
      * @return a stream of all the Permissions.
-     * @since 1.9
+     * @since 9
      */
     public Stream<Permission> elementsAsStream() {
         int characteristics = isReadOnly()
--- a/src/java.base/share/classes/java/security/cert/URICertStoreParameters.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/cert/URICertStoreParameters.java	Tue Jan 26 09:11:59 2016 +0100
@@ -43,7 +43,7 @@
  * provide the necessary locking. Multiple threads each manipulating
  * separate objects need not synchronize.
  *
- * @since       1.9
+ * @since       9
  * @see         CertStore
  * @see         java.net.URI
  */
--- a/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Tue Jan 26 09:11:59 2016 +0100
@@ -74,7 +74,7 @@
      * or {@code algorithm} is null.
      * @throws IllegalArgumentException if {@code algorithm} is
      * the empty string {@code ""}
-     * @since 1.9
+     * @since 9
      */
     protected EncodedKeySpec(byte[] encodedKey, String algorithm) {
         if (algorithm == null) {
@@ -93,7 +93,7 @@
      * Returns the name of the algorithm of the encoded key.
      *
      * @return the name of the algorithm, or null if not specified
-     * @since 1.9
+     * @since 9
      */
     public String getAlgorithm() {
         return algorithmName;
--- a/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Tue Jan 26 09:11:59 2016 +0100
@@ -92,7 +92,7 @@
      * or {@code algorithm} is null.
      * @throws IllegalArgumentException if {@code algorithm} is
      * the empty string {@code ""}
-     * @since 1.9
+     * @since 9
      */
     public PKCS8EncodedKeySpec(byte[] encodedKey, String algorithm) {
         super(encodedKey, algorithm);
--- a/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Tue Jan 26 09:11:59 2016 +0100
@@ -82,7 +82,7 @@
      * or {@code algorithm} is null.
      * @throws IllegalArgumentException if {@code algorithm} is
      * the empty string {@code ""}
-     * @since 1.9
+     * @since 9
      */
     public X509EncodedKeySpec(byte[] encodedKey, String algorithm) {
         super(encodedKey, algorithm);
--- a/src/java.base/share/classes/java/util/ArrayList.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/ArrayList.java	Tue Jan 26 09:11:59 2016 +0100
@@ -207,39 +207,19 @@
      * necessary, to ensure that it can hold at least the number of elements
      * specified by the minimum capacity argument.
      *
-     * @param   minCapacity   the desired minimum capacity
+     * @param minCapacity the desired minimum capacity
      */
     public void ensureCapacity(int minCapacity) {
-        int minExpand = (elementData != DEFAULTCAPACITY_EMPTY_ELEMENTDATA)
-            // any size if not default element table
-            ? 0
-            // larger than default for default empty table. It's already
-            // supposed to be at default size.
-            : DEFAULT_CAPACITY;
-
-        if (minCapacity > minExpand) {
-            ensureExplicitCapacity(minCapacity);
+        if (minCapacity > elementData.length
+            && !(elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA
+                 && minCapacity <= DEFAULT_CAPACITY)) {
+            modCount++;
+            grow(minCapacity);
         }
     }
 
-    private void ensureCapacityInternal(int minCapacity) {
-        if (elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA) {
-            minCapacity = Math.max(DEFAULT_CAPACITY, minCapacity);
-        }
-
-        ensureExplicitCapacity(minCapacity);
-    }
-
-    private void ensureExplicitCapacity(int minCapacity) {
-        modCount++;
-
-        // overflow-conscious code
-        if (minCapacity - elementData.length > 0)
-            grow(minCapacity);
-    }
-
     /**
-     * The maximum size of array to allocate.
+     * The maximum size of array to allocate (unless necessary).
      * Some VMs reserve some header words in an array.
      * Attempts to allocate larger arrays may result in
      * OutOfMemoryError: Requested array size exceeds VM limit
@@ -251,25 +231,48 @@
      * number of elements specified by the minimum capacity argument.
      *
      * @param minCapacity the desired minimum capacity
+     * @throws OutOfMemoryError if minCapacity is less than zero
      */
-    private void grow(int minCapacity) {
+    private Object[] grow(int minCapacity) {
+        return elementData = Arrays.copyOf(elementData,
+                                           newCapacity(minCapacity));
+    }
+
+    private Object[] grow() {
+        return grow(size + 1);
+    }
+
+    /**
+     * Returns a capacity at least as large as the given minimum capacity.
+     * Returns the current capacity increased by 50% if that suffices.
+     * Will not return a capacity greater than MAX_ARRAY_SIZE unless
+     * the given minimum capacity is greater than MAX_ARRAY_SIZE.
+     *
+     * @param minCapacity the desired minimum capacity
+     * @throws OutOfMemoryError if minCapacity is less than zero
+     */
+    private int newCapacity(int minCapacity) {
         // overflow-conscious code
         int oldCapacity = elementData.length;
         int newCapacity = oldCapacity + (oldCapacity >> 1);
-        if (newCapacity - minCapacity < 0)
-            newCapacity = minCapacity;
-        if (newCapacity - MAX_ARRAY_SIZE > 0)
-            newCapacity = hugeCapacity(minCapacity);
-        // minCapacity is usually close to size, so this is a win:
-        elementData = Arrays.copyOf(elementData, newCapacity);
+        if (newCapacity - minCapacity <= 0) {
+            if (elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA)
+                return Math.max(DEFAULT_CAPACITY, minCapacity);
+            if (minCapacity < 0) // overflow
+                throw new OutOfMemoryError();
+            return minCapacity;
+        }
+        return (newCapacity - MAX_ARRAY_SIZE <= 0)
+            ? newCapacity
+            : hugeCapacity(minCapacity);
     }
 
     private static int hugeCapacity(int minCapacity) {
         if (minCapacity < 0) // overflow
             throw new OutOfMemoryError();
-        return (minCapacity > MAX_ARRAY_SIZE) ?
-            Integer.MAX_VALUE :
-            MAX_ARRAY_SIZE;
+        return (minCapacity > MAX_ARRAY_SIZE)
+            ? Integer.MAX_VALUE
+            : MAX_ARRAY_SIZE;
     }
 
     /**
@@ -452,14 +455,26 @@
     }
 
     /**
+     * This helper method split out from add(E) to keep method
+     * bytecode size under 35 (the -XX:MaxInlineSize default value),
+     * which helps when add(E) is called in a C1-compiled loop.
+     */
+    private void add(E e, Object[] elementData, int s) {
+        if (s == elementData.length)
+            elementData = grow();
+        elementData[s] = e;
+        size = s + 1;
+    }
+
+    /**
      * Appends the specified element to the end of this list.
      *
      * @param e element to be appended to this list
      * @return {@code true} (as specified by {@link Collection#add})
      */
     public boolean add(E e) {
-        ensureCapacityInternal(size + 1);  // Increments modCount!!
-        elementData[size++] = e;
+        modCount++;
+        add(e, elementData, size);
         return true;
     }
 
@@ -474,12 +489,16 @@
      */
     public void add(int index, E element) {
         rangeCheckForAdd(index);
-
-        ensureCapacityInternal(size + 1);  // Increments modCount!!
-        System.arraycopy(elementData, index, elementData, index + 1,
-                         size - index);
+        modCount++;
+        final int s;
+        Object[] elementData;
+        if ((s = size) == (elementData = this.elementData).length)
+            elementData = grow();
+        System.arraycopy(elementData, index,
+                         elementData, index + 1,
+                         s - index);
         elementData[index] = element;
-        size++;
+        size = s + 1;
     }
 
     /**
@@ -578,11 +597,17 @@
      */
     public boolean addAll(Collection<? extends E> c) {
         Object[] a = c.toArray();
+        modCount++;
         int numNew = a.length;
-        ensureCapacityInternal(size + numNew);  // Increments modCount
-        System.arraycopy(a, 0, elementData, size, numNew);
-        size += numNew;
-        return numNew != 0;
+        if (numNew == 0)
+            return false;
+        Object[] elementData;
+        final int s;
+        if (numNew > (elementData = this.elementData).length - (s = size))
+            elementData = grow(s + numNew);
+        System.arraycopy(a, 0, elementData, s, numNew);
+        size = s + numNew;
+        return true;
     }
 
     /**
@@ -604,17 +629,23 @@
         rangeCheckForAdd(index);
 
         Object[] a = c.toArray();
+        modCount++;
         int numNew = a.length;
-        ensureCapacityInternal(size + numNew);  // Increments modCount
+        if (numNew == 0)
+            return false;
+        Object[] elementData;
+        final int s;
+        if (numNew > (elementData = this.elementData).length - (s = size))
+            elementData = grow(s + numNew);
 
-        int numMoved = size - index;
+        int numMoved = s - index;
         if (numMoved > 0)
-            System.arraycopy(elementData, index, elementData, index + numNew,
+            System.arraycopy(elementData, index,
+                             elementData, index + numNew,
                              numMoved);
-
         System.arraycopy(a, 0, elementData, index, numNew);
-        size += numNew;
-        return numNew != 0;
+        size = s + numNew;
+        return true;
     }
 
     /**
@@ -786,7 +817,6 @@
      */
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
-        elementData = EMPTY_ELEMENTDATA;
 
         // Read in size, and any hidden stuff
         s.defaultReadObject();
@@ -795,14 +825,19 @@
         s.readInt(); // ignored
 
         if (size > 0) {
-            // be like clone(), allocate array based upon size not capacity
-            ensureCapacityInternal(size);
+            // like clone(), allocate array based upon size not capacity
+            Object[] elements = new Object[size];
 
-            Object[] a = elementData;
             // Read in all elements in the proper order.
-            for (int i=0; i<size; i++) {
-                a[i] = s.readObject();
+            for (int i = 0; i < size; i++) {
+                elements[i] = s.readObject();
             }
+
+            elementData = elements;
+        } else if (size == 0) {
+            elementData = EMPTY_ELEMENTDATA;
+        } else {
+            throw new java.io.InvalidObjectException("Invalid size: " + size);
         }
     }
 
--- a/src/java.base/share/classes/java/util/EnumMap.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/EnumMap.java	Tue Jan 26 09:11:59 2016 +0100
@@ -25,7 +25,6 @@
 
 package java.util;
 
-import java.util.Map.Entry;
 import jdk.internal.misc.SharedSecrets;
 
 /**
@@ -125,8 +124,6 @@
         return (V)(value == NULL ? null : value);
     }
 
-    private static final Enum<?>[] ZERO_LENGTH_ENUM_ARRAY = new Enum<?>[0];
-
     /**
      * Creates an empty enum map with the specified key type.
      *
--- a/src/java.base/share/classes/java/util/EnumSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/EnumSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -92,8 +92,6 @@
      */
     final Enum<?>[] universe;
 
-    private static Enum<?>[] ZERO_LENGTH_ENUM_ARRAY = new Enum<?>[0];
-
     EnumSet(Class<E>elementType, Enum<?>[] universe) {
         this.elementType = elementType;
         this.universe    = universe;
@@ -421,6 +419,9 @@
     private static class SerializationProxy <E extends Enum<E>>
         implements java.io.Serializable
     {
+
+        private static final Enum<?>[] ZERO_LENGTH_ENUM_ARRAY = new Enum<?>[0];
+
         /**
          * The element type of this enum set.
          *
--- a/src/java.base/share/classes/java/util/Enumeration.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/Enumeration.java	Tue Jan 26 09:11:59 2016 +0100
@@ -112,7 +112,7 @@
      *
      * @return an Iterator representing the remaining elements of this Enumeration
      *
-     * @since 1.9
+     * @since 9
      */
     default Iterator<E> asIterator() {
         return new Iterator<>() {
--- a/src/java.base/share/classes/java/util/Locale.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/Locale.java	Tue Jan 26 09:11:59 2016 +0100
@@ -3144,6 +3144,18 @@
                    && range.equals(other.range)
                    && weight == other.weight;
         }
+
+        /**
+         * Returns an informative string representation of this {@code LanguageRange}
+         * object, consisting of language range and weight if the range is
+         * weighted and the weight is less than the max weight.
+         *
+         * @return a string representation of this {@code LanguageRange} object.
+         */
+        @Override
+        public String toString() {
+            return (weight == MAX_WEIGHT) ? range : range + ";q=" + weight;
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/util/Scanner.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/Scanner.java	Tue Jan 26 09:11:59 2016 +0100
@@ -2684,7 +2684,7 @@
      *
      * @return a sequential stream of token strings
      * @throws IllegalStateException if this scanner is closed
-     * @since 1.9
+     * @since 9
      */
     public Stream<String> tokens() {
         ensureOpen();
@@ -2770,7 +2770,7 @@
      * @return a sequential stream of match results
      * @throws NullPointerException if pattern is null
      * @throws IllegalStateException if this scanner is closed
-     * @since 1.9
+     * @since 9
      */
     public Stream<MatchResult> findAll(Pattern pattern) {
         Objects.requireNonNull(pattern);
@@ -2792,7 +2792,7 @@
      * @throws NullPointerException if patString is null
      * @throws IllegalStateException if this scanner is closed
      * @throws PatternSyntaxException if the regular expression's syntax is invalid
-     * @since 1.9
+     * @since 9
      * @see java.util.regex.Pattern
      */
     public Stream<MatchResult> findAll(String patString) {
--- a/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Tue Jan 26 09:11:59 2016 +0100
@@ -2429,7 +2429,7 @@
      *
      * @param <U> the type of the value
      * @return a new CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public <U> CompletableFuture<U> newIncompleteFuture() {
         return new CompletableFuture<U>();
@@ -2444,7 +2444,7 @@
      * an Executor that provides at least one independent thread.
      *
      * @return the executor
-     * @since 1.9
+     * @since 9
      */
     public Executor defaultExecutor() {
         return ASYNC_POOL;
@@ -2462,7 +2462,7 @@
      * arrange dependent actions.
      *
      * @return the new CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<T> copy() {
         return uniCopyStage();
@@ -2479,7 +2479,7 @@
      * cause.
      *
      * @return the new CompletionStage
-     * @since 1.9
+     * @since 9
      */
     public CompletionStage<T> minimalCompletionStage() {
         return uniAsMinimalStage();
@@ -2494,7 +2494,7 @@
      * to complete this CompletableFuture
      * @param executor the executor to use for asynchronous execution
      * @return this CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier,
                                               Executor executor) {
@@ -2512,7 +2512,7 @@
      * @param supplier a function returning the value to be used
      * to complete this CompletableFuture
      * @return this CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier) {
         return completeAsync(supplier, defaultExecutor());
@@ -2528,7 +2528,7 @@
      * @param unit a {@code TimeUnit} determining how to interpret the
      *        {@code timeout} parameter
      * @return this CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) {
         if (unit == null)
@@ -2549,7 +2549,7 @@
      * @param unit a {@code TimeUnit} determining how to interpret the
      *        {@code timeout} parameter
      * @return this CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public CompletableFuture<T> completeOnTimeout(T value, long timeout,
                                                   TimeUnit unit) {
@@ -2573,7 +2573,7 @@
      *        {@code delay} parameter
      * @param executor the base executor
      * @return the new delayed executor
-     * @since 1.9
+     * @since 9
      */
     public static Executor delayedExecutor(long delay, TimeUnit unit,
                                            Executor executor) {
@@ -2592,7 +2592,7 @@
      * @param unit a {@code TimeUnit} determining how to interpret the
      *        {@code delay} parameter
      * @return the new delayed executor
-     * @since 1.9
+     * @since 9
      */
     public static Executor delayedExecutor(long delay, TimeUnit unit) {
         if (unit == null)
@@ -2608,7 +2608,7 @@
      * @param value the value
      * @param <U> the type of the value
      * @return the completed CompletionStage
-     * @since 1.9
+     * @since 9
      */
     public static <U> CompletionStage<U> completedStage(U value) {
         return new MinimalStage<U>((value == null) ? NIL : value);
@@ -2621,7 +2621,7 @@
      * @param ex the exception
      * @param <U> the type of the value
      * @return the exceptionally completed CompletableFuture
-     * @since 1.9
+     * @since 9
      */
     public static <U> CompletableFuture<U> failedFuture(Throwable ex) {
         if (ex == null) throw new NullPointerException();
@@ -2636,7 +2636,7 @@
      * @param ex the exception
      * @param <U> the type of the value
      * @return the exceptionally completed CompletionStage
-     * @since 1.9
+     * @since 9
      */
     public static <U> CompletionStage<U> failedStage(Throwable ex) {
         if (ex == null) throw new NullPointerException();
--- a/src/java.base/share/classes/java/util/concurrent/Flow.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/Flow.java	Tue Jan 26 09:11:59 2016 +0100
@@ -161,7 +161,7 @@
  * }}</pre>
  *
  * @author Doug Lea
- * @since 1.9
+ * @since 9
  */
 public final class Flow {
 
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1301,7 +1301,7 @@
      * support extensions, and is unlikely to be useful otherwise.
      *
      * @return a task, or {@code null} if none are available
-     * @since 1.9
+     * @since 9
      */
     protected static ForkJoinTask<?> pollSubmission() {
         Thread t;
--- a/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Tue Jan 26 09:11:59 2016 +0100
@@ -154,7 +154,7 @@
  *
  * @param <T> the published item type
  * @author Doug Lea
- * @since 1.9
+ * @since 9
  */
 public class SubmissionPublisher<T> implements Flow.Publisher<T>,
                                                AutoCloseable {
--- a/src/java.base/share/classes/java/util/regex/Matcher.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/regex/Matcher.java	Tue Jan 26 09:11:59 2016 +0100
@@ -974,7 +974,7 @@
      * @throws  IndexOutOfBoundsException
      *          If the replacement string refers to a capturing group
      *          that does not exist in the pattern
-     * @since 1.9
+     * @since 9
      */
     public Matcher appendReplacement(StringBuilder sb, String replacement) {
         // If no match, return error
@@ -1117,7 +1117,7 @@
      *
      * @return  The target string builder
      *
-     * @since 1.9
+     * @since 9
      */
     public StringBuilder appendTail(StringBuilder sb) {
         sb.append(text, lastAppendPosition, getTextLength());
@@ -1229,7 +1229,7 @@
      * @throws ConcurrentModificationException if it is detected, on a
      *         best-effort basis, that the replacer function modified this
      *         matcher's state
-     * @since 1.9
+     * @since 9
      */
     public String replaceAll(Function<MatchResult, String> replacer) {
         Objects.requireNonNull(replacer);
@@ -1273,7 +1273,7 @@
      * modification is detected.
      *
      * @return a sequential stream of match results.
-     * @since 1.9
+     * @since 9
      */
     public Stream<MatchResult> results() {
         class MatchResultIterator implements Iterator<MatchResult> {
@@ -1451,7 +1451,7 @@
      * @throws ConcurrentModificationException if it is detected, on a
      *         best-effort basis, that the replacer function modified this
      *         matcher's state
-     * @since 1.9
+     * @since 9
      */
     public String replaceFirst(Function<MatchResult, String> replacer) {
         Objects.requireNonNull(replacer);
--- a/src/java.base/share/classes/java/util/stream/DoubleStream.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/stream/DoubleStream.java	Tue Jan 26 09:11:59 2016 +0100
@@ -329,7 +329,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default DoubleStream takeWhile(DoublePredicate predicate) {
         Objects.requireNonNull(predicate);
@@ -396,7 +396,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default DoubleStream dropWhile(DoublePredicate predicate) {
         Objects.requireNonNull(predicate);
--- a/src/java.base/share/classes/java/util/stream/IntStream.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/stream/IntStream.java	Tue Jan 26 09:11:59 2016 +0100
@@ -326,7 +326,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default IntStream takeWhile(IntPredicate predicate) {
         Objects.requireNonNull(predicate);
@@ -392,7 +392,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default IntStream dropWhile(IntPredicate predicate) {
         Objects.requireNonNull(predicate);
--- a/src/java.base/share/classes/java/util/stream/LongStream.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/stream/LongStream.java	Tue Jan 26 09:11:59 2016 +0100
@@ -327,7 +327,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default LongStream takeWhile(LongPredicate predicate) {
         Objects.requireNonNull(predicate);
@@ -394,7 +394,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default LongStream dropWhile(LongPredicate predicate) {
         Objects.requireNonNull(predicate);
--- a/src/java.base/share/classes/java/util/stream/Stream.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/stream/Stream.java	Tue Jan 26 09:11:59 2016 +0100
@@ -533,7 +533,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default Stream<T> takeWhile(Predicate<? super T> predicate) {
         Objects.requireNonNull(predicate);
@@ -599,7 +599,7 @@
      *                  predicate to apply to elements to determine the longest
      *                  prefix of elements.
      * @return the new stream
-     * @since 1.9
+     * @since 9
      */
     default Stream<T> dropWhile(Predicate<? super T> predicate) {
         Objects.requireNonNull(predicate);
@@ -1146,7 +1146,7 @@
      * @param <T> the type of stream elements
      * @return a stream with a single element if the specified element
      *         is non-null, otherwise an empty stream
-     * @since 1.9
+     * @since 9
      */
     public static<T> Stream<T> ofNullable(T t) {
         return t == null ? Stream.empty()
--- a/src/java.base/share/classes/java/util/stream/WhileOps.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/stream/WhileOps.java	Tue Jan 26 09:11:59 2016 +0100
@@ -43,7 +43,7 @@
  * Factory for instances of a takeWhile and dropWhile operations
  * that produce subsequences of their input stream.
  *
- * @since 1.9
+ * @since 9
  */
 final class WhileOps {
 
--- a/src/java.base/share/classes/java/util/zip/CRC32C.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/zip/CRC32C.java	Tue Jan 26 09:11:59 2016 +0100
@@ -44,7 +44,7 @@
  * {@link NullPointerException} to be thrown.
  * </p>
  *
- * @since 1.9
+ * @since 9
  */
 public final class CRC32C implements Checksum {
 
--- a/src/java.base/share/classes/java/util/zip/Checksum.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/zip/Checksum.java	Tue Jan 26 09:11:59 2016 +0100
@@ -51,7 +51,7 @@
      * @throws NullPointerException
      *         if {@code b} is {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     default public void update(byte[] b) {
         update(b, 0, b.length);
@@ -99,7 +99,7 @@
      * @throws NullPointerException
      *         if {@code buffer} is {@code null}
      *
-     * @since 1.9
+     * @since 9
      */
     default public void update(ByteBuffer buffer) {
         int pos = buffer.position();
--- a/src/java.base/share/classes/java/util/zip/ZipEntry.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/java/util/zip/ZipEntry.java	Tue Jan 26 09:11:59 2016 +0100
@@ -220,7 +220,7 @@
      *         The last modification time of the entry in local date-time
      *
      * @see #getTimeLocal()
-     * @since 1.9
+     * @since 9
      */
     public void setTimeLocal(LocalDateTime time) {
         int year = time.getYear() - 1980;
@@ -259,7 +259,7 @@
      * @return  The last modification time of the entry in local date-time
      *
      * @see #setTimeLocal(LocalDateTime)
-     * @since 1.9
+     * @since 9
      */
     public LocalDateTime getTimeLocal() {
         if (mtime != null) {
--- a/src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java	Tue Jan 26 09:11:59 2016 +0100
@@ -117,7 +117,7 @@
  * and that (2) for all methods of that class annotated with
  * {@code @HotSpotIntrinsicCandidate} there is an intrinsic in the list.
  *
- * @since 1.9
+ * @since 9
  */
 @Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
 @Retention(RetentionPolicy.RUNTIME)
--- a/src/java.base/share/classes/jdk/internal/logger/package-info.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/logger/package-info.java	Tue Jan 26 09:11:59 2016 +0100
@@ -63,6 +63,6 @@
  * @see sun.util.logging.PlatformLogger.Bridge
  * @see sun.util.logging.internal
  *
- * @since 1.9
+ * @since 9
  */
 package jdk.internal.logger;
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1081,7 +1081,7 @@
      * @return the value fetched from the indicated object
      * @throws RuntimeException No defined exceptions are thrown, not even
      *         {@link NullPointerException}
-     * @since 1.9
+     * @since 9
      */
     @HotSpotIntrinsicCandidate
     public final long getLongUnaligned(Object o, long offset) {
@@ -1115,7 +1115,7 @@
      * @param offset The offset in bytes from the start of the object
      * @param bigEndian The endianness of the value
      * @return the value fetched from the indicated object
-     * @since 1.9
+     * @since 9
      */
     public final long getLongUnaligned(Object o, long offset, boolean bigEndian) {
         return convEndian(bigEndian, getLongUnaligned(o, offset));
@@ -1193,7 +1193,7 @@
      * @param x the value to store
      * @throws RuntimeException No defined exceptions are thrown, not even
      *         {@link NullPointerException}
-     * @since 1.9
+     * @since 9
      */
     @HotSpotIntrinsicCandidate
     public final void putLongUnaligned(Object o, long offset, long x) {
@@ -1231,7 +1231,7 @@
      * @param bigEndian The endianness of the value
      * @throws RuntimeException No defined exceptions are thrown, not even
      *         {@link NullPointerException}
-     * @since 1.9
+     * @since 9
      */
     public final void putLongUnaligned(Object o, long offset, long x, boolean bigEndian) {
         putLongUnaligned(o, offset, convEndian(bigEndian, x));
--- a/src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java	Tue Jan 26 09:11:59 2016 +0100
@@ -26,6 +26,7 @@
 package jdk.internal.ref;
 
 import java.lang.ref.Cleaner;
+import java.lang.ref.Reference;
 import java.lang.ref.PhantomReference;
 import java.util.Objects;
 
@@ -66,9 +67,9 @@
         this.list = CleanerImpl.getCleanerImpl(cleaner).phantomCleanableList;
         insert();
 
-        // TODO: Replace getClass() with ReachabilityFence when it is available
-        cleaner.getClass();
-        referent.getClass();
+        // Ensure referent and cleaner remain accessible
+        Reference.reachabilityFence(referent);
+        Reference.reachabilityFence(cleaner);
     }
 
     /**
--- a/src/java.base/share/classes/jdk/internal/ref/SoftCleanable.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/ref/SoftCleanable.java	Tue Jan 26 09:11:59 2016 +0100
@@ -26,6 +26,7 @@
 package jdk.internal.ref;
 
 import java.lang.ref.Cleaner;
+import java.lang.ref.Reference;
 import java.lang.ref.SoftReference;
 import java.util.Objects;
 
@@ -66,9 +67,9 @@
         list = CleanerImpl.getCleanerImpl(cleaner).softCleanableList;
         insert();
 
-        // TODO: Replace getClass() with ReachabilityFence when it is available
-        cleaner.getClass();
-        referent.getClass();
+        // Ensure referent and cleaner remain accessible
+        Reference.reachabilityFence(referent);
+        Reference.reachabilityFence(cleaner);
     }
 
     /**
--- a/src/java.base/share/classes/jdk/internal/ref/WeakCleanable.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/jdk/internal/ref/WeakCleanable.java	Tue Jan 26 09:11:59 2016 +0100
@@ -26,6 +26,7 @@
  */
 
 import java.lang.ref.Cleaner;
+import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
 import java.util.Objects;
 
@@ -66,9 +67,10 @@
         list = CleanerImpl.getCleanerImpl(cleaner).weakCleanableList;
         insert();
 
-        // TODO: Replace getClass() with ReachabilityFence when it is available
-        cleaner.getClass();
-        referent.getClass();
+        // Ensure referent and cleaner remain accessible
+        Reference.reachabilityFence(referent);
+        Reference.reachabilityFence(cleaner);
+
     }
 
     /**
--- a/src/java.base/share/classes/sun/misc/ClassFileTransformer.java	Fri Jan 15 09:15:33 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.misc;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This is an abstract base class originally intended to be called by
- * {@code java.lang.ClassLoader} when {@code ClassFormatError} is
- * thrown inside {@code defineClass()}. It is no longer hooked into
- * {@code ClassLoader} and will be removed in a future release.
- *
- * @author      Stanley Man-Kit Ho
- */
-
-@Deprecated
-public abstract class ClassFileTransformer {
-
-    private static final List<ClassFileTransformer> transformers
-        = new ArrayList<ClassFileTransformer>();
-
-    /**
-     * Add the class file transformer object.
-     *
-     * @param t Class file transformer instance
-     */
-    public static void add(ClassFileTransformer t) {
-        synchronized (transformers) {
-            transformers.add(t);
-        }
-    }
-
-    /**
-     * Get the array of ClassFileTransformer object.
-     *
-     * @return ClassFileTransformer object array
-     */
-    public static ClassFileTransformer[] getTransformers() {
-        synchronized (transformers) {
-            ClassFileTransformer[] result = new ClassFileTransformer[transformers.size()];
-            return transformers.toArray(result);
-        }
-    }
-
-
-    /**
-     * Transform a byte array from one to the other.
-     *
-     * @param b Byte array
-     * @param off Offset
-     * @param len Length of byte array
-     * @return Transformed byte array
-     */
-    public abstract byte[] transform(byte[] b, int off, int len)
-        throws ClassFormatError;
-}
--- a/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import java.net.ProtocolException;
 import java.net.PasswordAuthentication;
 import java.util.Arrays;
-import java.util.StringTokenizer;
 import java.util.Random;
 
 import sun.net.www.HeaderParser;
@@ -146,9 +145,9 @@
 
         synchronized void setQop (String qop) {
             if (qop != null) {
-                StringTokenizer st = new StringTokenizer (qop, " ");
-                while (st.hasMoreTokens()) {
-                    if (st.nextToken().equalsIgnoreCase ("auth")) {
+                String items[] = qop.split(",");
+                for (String item : items) {
+                    if ("auth".equalsIgnoreCase(item.trim())) {
                         serverQop = true;
                         return;
                     }
@@ -163,7 +162,7 @@
         synchronized String getNonce () { return nonce;}
 
         synchronized void setNonce (String s) {
-            if (!s.equals(nonce)) {
+            if (nonce == null || !s.equals(nonce)) {
                 nonce=s;
                 NCcount = 0;
                 redoCachedHA1 = true;
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Tue Jan 26 09:11:59 2016 +0100
@@ -25,6 +25,7 @@
 
 package sun.reflect.annotation;
 
+import java.io.ObjectInputStream;
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 import java.io.Serializable;
@@ -431,35 +432,72 @@
 
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField fields = s.readFields();
+
+        @SuppressWarnings("unchecked")
+        Class<? extends Annotation> t = (Class<? extends Annotation>)fields.get("type", null);
+        @SuppressWarnings("unchecked")
+        Map<String, Object> streamVals = (Map<String, Object>)fields.get("memberValues", null);
 
         // Check to make sure that types have not evolved incompatibly
 
         AnnotationType annotationType = null;
         try {
-            annotationType = AnnotationType.getInstance(type);
+            annotationType = AnnotationType.getInstance(t);
         } catch(IllegalArgumentException e) {
             // Class is no longer an annotation type; time to punch out
             throw new java.io.InvalidObjectException("Non-annotation type in annotation serial stream");
         }
 
         Map<String, Class<?>> memberTypes = annotationType.memberTypes();
+        // consistent with runtime Map type
+        Map<String, Object> mv = new LinkedHashMap<>();
 
         // If there are annotation members without values, that
         // situation is handled by the invoke method.
-        for (Map.Entry<String, Object> memberValue : memberValues.entrySet()) {
+        for (Map.Entry<String, Object> memberValue : streamVals.entrySet()) {
             String name = memberValue.getKey();
+            Object value = null;
             Class<?> memberType = memberTypes.get(name);
             if (memberType != null) {  // i.e. member still exists
-                Object value = memberValue.getValue();
+                value = memberValue.getValue();
                 if (!(memberType.isInstance(value) ||
                       value instanceof ExceptionProxy)) {
-                    memberValue.setValue(
-                        new AnnotationTypeMismatchExceptionProxy(
+                    value = new AnnotationTypeMismatchExceptionProxy(
                             value.getClass() + "[" + value + "]").setMember(
-                                annotationType.members().get(name)));
+                                annotationType.members().get(name));
                 }
             }
+            mv.put(name, value);
+        }
+
+        UnsafeAccessor.setType(this, t);
+        UnsafeAccessor.setMemberValues(this, mv);
+    }
+
+    private static class UnsafeAccessor {
+        private static final jdk.internal.misc.Unsafe unsafe;
+        private static final long typeOffset;
+        private static final long memberValuesOffset;
+        static {
+            try {
+                unsafe = jdk.internal.misc.Unsafe.getUnsafe();
+                typeOffset = unsafe.objectFieldOffset
+                        (AnnotationInvocationHandler.class.getDeclaredField("type"));
+                memberValuesOffset = unsafe.objectFieldOffset
+                        (AnnotationInvocationHandler.class.getDeclaredField("memberValues"));
+            } catch (Exception ex) {
+                throw new ExceptionInInitializerError(ex);
+            }
+        }
+        static void setType(AnnotationInvocationHandler o,
+                            Class<? extends Annotation> type) {
+            unsafe.putObject(o, typeOffset, type);
+        }
+
+        static void setMemberValues(AnnotationInvocationHandler o,
+                                    Map<String, Object> memberValues) {
+            unsafe.putObject(o, memberValuesOffset, memberValues);
         }
     }
 }
--- a/src/java.base/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java	Tue Jan 26 09:11:59 2016 +0100
@@ -43,6 +43,8 @@
 public class TlsRsaPremasterSecretParameterSpec
         implements AlgorithmParameterSpec {
 
+    private final byte[] encodedSecret;
+
     /*
      * The TLS spec says that the version in the RSA premaster secret must
      * be the maximum version supported by the client (i.e. the version it
@@ -89,6 +91,33 @@
 
         this.clientVersion = checkVersion(clientVersion);
         this.serverVersion = checkVersion(serverVersion);
+        this.encodedSecret = null;
+    }
+
+    /**
+     * Constructs a new TlsRsaPremasterSecretParameterSpec.
+     *
+     * @param clientVersion the version of the TLS protocol by which the
+     *        client wishes to communicate during this session
+     * @param serverVersion the negotiated version of the TLS protocol which
+     *        contains the lower of that suggested by the client in the client
+     *        hello and the highest supported by the server.
+     * @param encodedSecret the encoded secret key
+     *
+     * @throws IllegalArgumentException if clientVersion or serverVersion are
+     *   negative or larger than (2^16 - 1) or if encodedSecret is not
+     *   exactly 48 bytes
+     */
+    public TlsRsaPremasterSecretParameterSpec(
+            int clientVersion, int serverVersion, byte[] encodedSecret) {
+
+        this.clientVersion = checkVersion(clientVersion);
+        this.serverVersion = checkVersion(serverVersion);
+        if (encodedSecret == null || encodedSecret.length != 48) {
+            throw new IllegalArgumentException(
+                        "Encoded secret is not exactly 48 bytes");
+        }
+        this.encodedSecret = encodedSecret.clone();
     }
 
     /**
@@ -147,4 +176,13 @@
         }
         return version;
     }
+
+    /**
+     * Returns the encoded secret.
+     *
+     * @return the encoded secret, may be null if no encoded secret.
+     */
+    public byte[] getEncodedSecret() {
+        return encodedSecret == null ? null : encodedSecret.clone();
+    }
 }
--- a/src/java.base/share/classes/sun/security/jca/JCAUtil.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/jca/JCAUtil.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,12 +41,6 @@
         // no instantiation
     }
 
-    // lock to use for synchronization
-    private static final Object LOCK = JCAUtil.class;
-
-    // cached SecureRandom instance
-    private static volatile SecureRandom secureRandom;
-
     // size of the temporary arrays we use. Should fit into the CPU's 1st
     // level cache and could be adjusted based on the platform
     private static final int ARRAY_SIZE = 4096;
@@ -60,26 +54,19 @@
         return Math.min(ARRAY_SIZE, totalSize);
     }
 
+    // cached SecureRandom instance
+    private static class CachedSecureRandomHolder {
+        public static SecureRandom instance = new SecureRandom();
+    }
+
     /**
-     * Get a SecureRandom instance. This method should me used by JDK
+     * Get a SecureRandom instance. This method should be used by JDK
      * internal code in favor of calling "new SecureRandom()". That needs to
      * iterate through the provider table to find the default SecureRandom
      * implementation, which is fairly inefficient.
      */
     public static SecureRandom getSecureRandom() {
-        // we use double checked locking to minimize synchronization
-        // works because we use a volatile reference
-        SecureRandom r = secureRandom;
-        if (r == null) {
-            synchronized (LOCK) {
-                r = secureRandom;
-                if (r == null) {
-                    r = new SecureRandom();
-                    secureRandom = r;
-                }
-            }
-        }
-        return r;
+        return CachedSecureRandomHolder.instance;
     }
 
 }
--- a/src/java.base/share/classes/sun/security/provider/certpath/ResponderId.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/provider/certpath/ResponderId.java	Tue Jan 26 09:11:59 2016 +0100
@@ -49,7 +49,7 @@
  * </pre>
  *
  * @see ResponderId.Type
- * @since 1.9
+ * @since 9
  */
 public final class ResponderId {
 
@@ -58,7 +58,7 @@
      * {@code ResponderId}.
      *
      * @see ResponderId
-     * @since 1.9
+     * @since 9
      */
     public static enum Type {
         /**
--- a/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Tue Jan 26 09:11:59 2016 +0100
@@ -333,7 +333,7 @@
                             input, serverKey,
                             clnt_random.random_bytes, svr_random.random_bytes,
                             messageLen,
-                            localSupportedSignAlgs, protocolVersion);
+                            getLocalSupportedSignAlgs(), protocolVersion);
                     handshakeState.update(dhSrvKeyExchange, resumingSession);
                     this.serverKeyExchange(dhSrvKeyExchange);
                 } catch (GeneralSecurityException e) {
@@ -348,7 +348,7 @@
                         new ECDH_ServerKeyExchange
                             (input, serverKey, clnt_random.random_bytes,
                             svr_random.random_bytes,
-                            localSupportedSignAlgs, protocolVersion);
+                            getLocalSupportedSignAlgs(), protocolVersion);
                     handshakeState.update(ecdhSrvKeyExchange, resumingSession);
                     this.serverKeyExchange(ecdhSrvKeyExchange);
                 } catch (GeneralSecurityException e) {
@@ -398,7 +398,7 @@
 
                 Collection<SignatureAndHashAlgorithm> supportedPeerSignAlgs =
                     SignatureAndHashAlgorithm.getSupportedAlgorithms(
-                                                            peerSignAlgs);
+                            algorithmConstraints, peerSignAlgs);
                 if (supportedPeerSignAlgs.isEmpty()) {
                     throw new SSLHandshakeException(
                         "No supported signature and hash algorithm in common");
@@ -1211,8 +1211,8 @@
                 if (protocolVersion.useTLS12PlusSpec()) {
                     preferableSignatureAlgorithm =
                         SignatureAndHashAlgorithm.getPreferableAlgorithm(
-                            peerSupportedSignAlgs, signingKey.getAlgorithm(),
-                            signingKey);
+                            getPeerSupportedSignAlgs(),
+                            signingKey.getAlgorithm(), signingKey);
 
                     if (preferableSignatureAlgorithm == null) {
                         throw new SSLHandshakeException(
--- a/src/java.base/share/classes/sun/security/ssl/ClientKeyExchangeService.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/ClientKeyExchangeService.java	Tue Jan 26 09:11:59 2016 +0100
@@ -41,7 +41,7 @@
  * Models a service that provides support for a particular client key exchange
  * mode. Currently used to implement Kerberos-related cipher suites.
  *
- * @since 1.9
+ * @since 9
  */
 public interface ClientKeyExchangeService {
 
--- a/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1943,7 +1943,7 @@
     // the signature bytes
     private byte[] signature;
 
-    // protocol version being established using this ServerKeyExchange message
+    // protocol version being established using this CertificateVerify message
     ProtocolVersion protocolVersion;
 
     // the preferable signature algorithm used by this CertificateVerify message
@@ -1996,7 +1996,7 @@
                     preferableSignatureAlgorithm)) {
                 throw new SSLHandshakeException(
                         "Unsupported SignatureAndHashAlgorithm in " +
-                        "ServerKeyExchange message");
+                        "CertificateVerify message");
             }
         }
 
--- a/src/java.base/share/classes/sun/security/ssl/Handshaker.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/Handshaker.java	Tue Jan 26 09:11:59 2016 +0100
@@ -90,7 +90,7 @@
     AlgorithmConstraints        algorithmConstraints = null;
 
     // Local supported signature and algorithms
-    Collection<SignatureAndHashAlgorithm> localSupportedSignAlgs;
+    private Collection<SignatureAndHashAlgorithm> localSupportedSignAlgs;
 
     // Peer supported signature and algorithms
     Collection<SignatureAndHashAlgorithm> peerSupportedSignAlgs;
--- a/src/java.base/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -113,14 +113,34 @@
             }
         }
 
+        byte[] encoded = null;
         try {
             Cipher cipher = JsseJce.getCipher(JsseJce.CIPHER_RSA_PKCS1);
-            cipher.init(Cipher.UNWRAP_MODE, privateKey,
-                    new TlsRsaPremasterSecretParameterSpec(
-                            maxVersion.v, currentVersion.v),
-                    generator);
-            preMaster = (SecretKey)cipher.unwrap(encrypted,
-                                "TlsRsaPremasterSecret", Cipher.SECRET_KEY);
+            boolean needFailover = !KeyUtil.isOracleJCEProvider(
+                    cipher.getProvider().getName());
+            if (needFailover) {
+                cipher.init(Cipher.DECRYPT_MODE, privateKey);
+                boolean failed = false;
+                try {
+                    encoded = cipher.doFinal(encrypted);
+                } catch (BadPaddingException bpe) {
+                    // Note: encoded == null
+                    failed = true;
+                }
+                encoded = KeyUtil.checkTlsPreMasterSecretKey(
+                                maxVersion.v, currentVersion.v,
+                                generator, encoded, failed);
+                preMaster = generatePreMasterSecret(
+                                maxVersion.v, currentVersion.v,
+                                encoded, generator);
+            } else {
+                cipher.init(Cipher.UNWRAP_MODE, privateKey,
+                        new TlsRsaPremasterSecretParameterSpec(
+                                maxVersion.v, currentVersion.v),
+                        generator);
+                preMaster = (SecretKey)cipher.unwrap(encrypted,
+                        "TlsRsaPremasterSecret", Cipher.SECRET_KEY);
+            }
         } catch (InvalidKeyException ibk) {
             // the message is too big to process with RSA
             throw new SSLProtocolException(
@@ -135,6 +155,35 @@
         }
     }
 
+    // generate a premaster secret with the specified version number
+    @SuppressWarnings("deprecation")
+    private static SecretKey generatePreMasterSecret(
+            int clientVersion, int serverVersion,
+            byte[] encodedSecret, SecureRandom generator) {
+
+        if (debug != null && Debug.isOn("handshake")) {
+            System.out.println("Generating a premaster secret");
+        }
+
+        try {
+            String s = ((clientVersion >= ProtocolVersion.TLS12.v) ?
+                "SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret");
+            KeyGenerator kg = JsseJce.getKeyGenerator(s);
+            kg.init(new TlsRsaPremasterSecretParameterSpec(
+                    clientVersion, serverVersion, encodedSecret),
+                    generator);
+            return kg.generateKey();
+        } catch (InvalidAlgorithmParameterException |
+                NoSuchAlgorithmException iae) {
+            // unlikely to happen, otherwise, must be a provider exception
+            if (debug != null && Debug.isOn("handshake")) {
+                System.out.println("RSA premaster secret generation error:");
+                iae.printStackTrace(System.out);
+            }
+            throw new RuntimeException("Could not generate premaster secret", iae);
+        }
+    }
+
     @Override
     int messageType() {
         return ht_client_key_exchange;
--- a/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Tue Jan 26 09:11:59 2016 +0100
@@ -320,7 +320,7 @@
             case HandshakeMessage.ht_certificate_verify:
                 CertificateVerify cvm =
                         new CertificateVerify(input,
-                            localSupportedSignAlgs, protocolVersion);
+                            getLocalSupportedSignAlgs(), protocolVersion);
                 handshakeState.update(cvm, resumingSession);
                 this.clientCertificateVerify(cvm);
 
@@ -772,11 +772,10 @@
                     Collection<SignatureAndHashAlgorithm>
                         supportedPeerSignAlgs =
                             SignatureAndHashAlgorithm.getSupportedAlgorithms(
-                                                            peerSignAlgs);
+                                algorithmConstraints, peerSignAlgs);
                     if (supportedPeerSignAlgs.isEmpty()) {
                         throw new SSLHandshakeException(
-                            "No supported signature and hash algorithm " +
-                            "in common");
+                            "No signature and hash algorithm in common");
                     }
 
                     setPeerSupportedSignAlgs(supportedPeerSignAlgs);
@@ -1351,6 +1350,13 @@
                     supportedSignAlgs =
                         new ArrayList<SignatureAndHashAlgorithm>(1);
                     supportedSignAlgs.add(algorithm);
+
+                    supportedSignAlgs =
+                            SignatureAndHashAlgorithm.getSupportedAlgorithms(
+                                algorithmConstraints, supportedSignAlgs);
+
+                    // May be no default activated signature algorithm, but
+                    // let the following process make the final decision.
                 }
 
                 // Sets the peer supported signature algorithm to use in KM
@@ -1395,6 +1401,11 @@
                     SignatureAndHashAlgorithm.getPreferableAlgorithm(
                                         supportedSignAlgs, "RSA", privateKey);
                 if (preferableSignatureAlgorithm == null) {
+                    if ((debug != null) && Debug.isOn("handshake")) {
+                        System.out.println(
+                                "No signature and hash algorithm for cipher " +
+                                suite);
+                    }
                     return false;
                 }
             }
@@ -1413,6 +1424,11 @@
                     SignatureAndHashAlgorithm.getPreferableAlgorithm(
                                         supportedSignAlgs, "RSA", privateKey);
                 if (preferableSignatureAlgorithm == null) {
+                    if ((debug != null) && Debug.isOn("handshake")) {
+                        System.out.println(
+                                "No signature and hash algorithm for cipher " +
+                                suite);
+                    }
                     return false;
                 }
             }
@@ -1428,6 +1444,11 @@
                     SignatureAndHashAlgorithm.getPreferableAlgorithm(
                                                 supportedSignAlgs, "DSA");
                 if (preferableSignatureAlgorithm == null) {
+                    if ((debug != null) && Debug.isOn("handshake")) {
+                        System.out.println(
+                                "No signature and hash algorithm for cipher " +
+                                suite);
+                    }
                     return false;
                 }
             }
@@ -1446,6 +1467,11 @@
                     SignatureAndHashAlgorithm.getPreferableAlgorithm(
                                             supportedSignAlgs, "ECDSA");
                 if (preferableSignatureAlgorithm == null) {
+                    if ((debug != null) && Debug.isOn("handshake")) {
+                        System.out.println(
+                                "No signature and hash algorithm for cipher " +
+                                suite);
+                    }
                     return false;
                 }
             }
@@ -1487,7 +1513,8 @@
                     ClientKeyExchangeService.find(keyExchange.name);
             if (p == null) {
                 // internal error, unknown key exchange
-                throw new RuntimeException("Unrecognized cipherSuite: " + suite);
+                throw new RuntimeException(
+                        "Unrecognized cipherSuite: " + suite);
             }
             // need service creds
             if (serviceCreds == null) {
--- a/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Tue Jan 26 09:11:59 2016 +0100
@@ -166,10 +166,13 @@
 
     // Get supported algorithm collection from an untrusted collection
     static Collection<SignatureAndHashAlgorithm> getSupportedAlgorithms(
+            AlgorithmConstraints constraints,
             Collection<SignatureAndHashAlgorithm> algorithms ) {
         Collection<SignatureAndHashAlgorithm> supported = new ArrayList<>();
         for (SignatureAndHashAlgorithm sigAlg : algorithms) {
-            if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM) {
+            if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
+                    constraints.permits(SIGNATURE_PRIMITIVE_SET,
+                                sigAlg.algorithm, null)) {
                 supported.add(sigAlg);
             }
         }
@@ -233,30 +236,42 @@
     }
 
     static SignatureAndHashAlgorithm getPreferableAlgorithm(
-        Collection<SignatureAndHashAlgorithm> algorithms,
-        String expected, PrivateKey signingKey) {
+            Collection<SignatureAndHashAlgorithm> algorithms,
+            String expected, PrivateKey signingKey) {
 
-        if (expected == null && !algorithms.isEmpty()) {
-            for (SignatureAndHashAlgorithm sigAlg : algorithms) {
-                if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM) {
-                    return sigAlg;
+        int maxDigestLength = getMaxDigestLength(signingKey);
+        for (SignatureAndHashAlgorithm algorithm : algorithms) {
+            int signValue = algorithm.id & 0xFF;
+            if ((expected == null) ||
+                    (expected.equalsIgnoreCase("rsa") &&
+                            signValue == SignatureAlgorithm.RSA.value) ||
+                    (expected.equalsIgnoreCase("dsa") &&
+                            signValue == SignatureAlgorithm.DSA.value) ||
+                    (expected.equalsIgnoreCase("ecdsa") &&
+                            signValue == SignatureAlgorithm.ECDSA.value) ||
+                    (expected.equalsIgnoreCase("ec") &&
+                            signValue == SignatureAlgorithm.ECDSA.value)) {
+
+                if (algorithm.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
+                        algorithm.hash.length <= maxDigestLength) {
+
+                    return algorithm;
                 }
             }
-
-            return null;  // no supported algorithm
         }
 
-        if (expected == null ) {
-            return null;  // no expected algorithm, no supported algorithm
-        }
+        return null;
+    }
 
-        /*
-         * Need to check RSA key length to match the length of hash value
-         */
+    /*
+     * Need to check key length to match the length of hash value
+     */
+    private static int getMaxDigestLength(PrivateKey signingKey) {
         int maxDigestLength = Integer.MAX_VALUE;
+
+        // only need to check RSA algorithm at present.
         if (signingKey != null &&
-                "rsa".equalsIgnoreCase(signingKey.getAlgorithm()) &&
-                expected.equalsIgnoreCase("rsa")) {
+                "rsa".equalsIgnoreCase(signingKey.getAlgorithm())) {
             /*
              * RSA keys of 512 bits have been shown to be practically
              * breakable, it does not make much sense to use the strong
@@ -284,25 +299,7 @@
                 // preferable hash algorithm.
         }
 
-        for (SignatureAndHashAlgorithm algorithm : algorithms) {
-            int signValue = algorithm.id & 0xFF;
-            if (expected.equalsIgnoreCase("rsa") &&
-                    signValue == SignatureAlgorithm.RSA.value) {
-                if (algorithm.hash.length <= maxDigestLength) {
-                    return algorithm;
-                }
-            } else if (
-                    (expected.equalsIgnoreCase("dsa") &&
-                        signValue == SignatureAlgorithm.DSA.value) ||
-                    (expected.equalsIgnoreCase("ecdsa") &&
-                        signValue == SignatureAlgorithm.ECDSA.value) ||
-                    (expected.equalsIgnoreCase("ec") &&
-                        signValue == SignatureAlgorithm.ECDSA.value)) {
-                return algorithm;
-            }
-        }
-
-        return null;
+        return maxDigestLength;
     }
 
     static enum HashAlgorithm {
@@ -415,12 +412,14 @@
             supports(HashAlgorithm.SHA1,        SignatureAlgorithm.ECDSA,
                     "SHA1withECDSA",        --p);
 
-            supports(HashAlgorithm.SHA224,      SignatureAlgorithm.DSA,
-                    "SHA224withDSA",        --p);
-            supports(HashAlgorithm.SHA224,      SignatureAlgorithm.RSA,
-                    "SHA224withRSA",        --p);
-            supports(HashAlgorithm.SHA224,      SignatureAlgorithm.ECDSA,
-                    "SHA224withECDSA",      --p);
+            if (Security.getProvider("SunMSCAPI") == null) {
+                supports(HashAlgorithm.SHA224,      SignatureAlgorithm.DSA,
+                        "SHA224withDSA",        --p);
+                supports(HashAlgorithm.SHA224,      SignatureAlgorithm.RSA,
+                        "SHA224withRSA",        --p);
+                supports(HashAlgorithm.SHA224,      SignatureAlgorithm.ECDSA,
+                        "SHA224withECDSA",      --p);
+            }
 
             supports(HashAlgorithm.SHA256,      SignatureAlgorithm.DSA,
                     "SHA256withDSA",        --p);
--- a/src/java.base/share/classes/sun/security/util/KeyStoreDelegator.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/util/KeyStoreDelegator.java	Tue Jan 26 09:11:59 2016 +0100
@@ -37,7 +37,7 @@
 /**
  * This class delegates to a primary or secondary keystore implementation.
  *
- * @since 1.9
+ * @since 9
  */
 
 public class KeyStoreDelegator extends KeyStoreSpi {
--- a/src/java.base/share/classes/sun/security/util/KeyUtil.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/util/KeyUtil.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,8 @@
 import javax.crypto.spec.DHPublicKeySpec;
 import java.math.BigInteger;
 
+import sun.security.jca.JCAUtil;
+
 /**
  * A utility class to get key length, valiate keys, etc.
  */
@@ -143,8 +145,6 @@
 
     /**
      * Returns whether the specified provider is Oracle provider or not.
-     * <P>
-     * Note that this method is only apply to SunJCE and SunPKCS11 at present.
      *
      * @param  providerName
      *         the provider name
@@ -152,8 +152,11 @@
      *         {@code providerName} is Oracle provider
      */
     public static final boolean isOracleJCEProvider(String providerName) {
-        return providerName != null && (providerName.equals("SunJCE") ||
-                                        providerName.startsWith("SunPKCS11"));
+        return providerName != null &&
+                (providerName.equals("SunJCE") ||
+                    providerName.equals("SunMSCAPI") ||
+                    providerName.equals("OracleUcrypto") ||
+                    providerName.startsWith("SunPKCS11"));
     }
 
     /**
@@ -200,7 +203,7 @@
             byte[] encoded, boolean isFailOver) {
 
         if (random == null) {
-            random = new SecureRandom();
+            random = JCAUtil.getSecureRandom();
         }
         byte[] replacer = new byte[48];
         random.nextBytes(replacer);
--- a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Tue Jan 26 09:11:59 2016 +0100
@@ -588,7 +588,7 @@
             }
 
             if (oidTable == null) {
-                oidTable = new HashMap<>(1);
+                oidTable = Collections.<String,ObjectIdentifier>emptyMap();
             }
             initOidTable = true;
         }
--- a/src/java.base/share/classes/sun/security/x509/CRLDistributionPointsExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/CRLDistributionPointsExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -29,6 +29,7 @@
 import java.io.OutputStream;
 
 import java.util.*;
+import java.util.Collections;
 
 import sun.security.util.DerOutputStream;
 import sun.security.util.DerValue;
@@ -255,11 +256,12 @@
      */
     public void delete(String name) throws IOException {
         if (name.equalsIgnoreCase(POINTS)) {
-            distributionPoints = new ArrayList<DistributionPoint>();
+            distributionPoints =
+                    Collections.<DistributionPoint>emptyList();
         } else {
             throw new IOException("Attribute name [" + name +
-                                "] not recognized by " +
-                                "CertAttrSet:" + extensionName + ".");
+                                  "] not recognized by " +
+                                  "CertAttrSet:" + extensionName + '.');
         }
         encodeThis();
     }
--- a/src/java.base/share/classes/sun/security/x509/CRLNumberExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/CRLNumberExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -157,11 +157,10 @@
      */
     public BigInteger get(String name) throws IOException {
         if (name.equalsIgnoreCase(NUMBER)) {
-            if (crlNumber == null) return null;
-            else return crlNumber;
+            return crlNumber;
         } else {
-          throw new IOException("Attribute name not recognized by"
-                                + " CertAttrSet:" + extensionName + ".");
+            throw new IOException("Attribute name not recognized by" +
+                                  " CertAttrSet:" + extensionName + '.');
         }
     }
 
--- a/src/java.base/share/classes/sun/security/x509/DNSName.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/DNSName.java	Tue Jan 26 09:11:59 2016 +0100
@@ -232,15 +232,15 @@
      * @throws UnsupportedOperationException if not supported for this name type
      */
     public int subtreeDepth() throws UnsupportedOperationException {
-        String subtree=name;
-        int i=1;
+        // subtree depth is always at least 1
+        int sum = 1;
 
-        /* count dots */
-        for (; subtree.lastIndexOf('.') >= 0; i++) {
-            subtree=subtree.substring(0,subtree.lastIndexOf('.'));
+        // count dots
+        for (int i = name.indexOf('.'); i >= 0; i = name.indexOf('.', i + 1)) {
+            ++sum;
         }
 
-        return i;
+        return sum;
     }
 
 }
--- a/src/java.base/share/classes/sun/security/x509/EDIPartyName.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/EDIPartyName.java	Tue Jan 26 09:11:59 2016 +0100
@@ -197,7 +197,7 @@
      */
     public int hashCode() {
         if (myhash == -1) {
-            myhash = 37 + party.hashCode();
+            myhash = 37 + (party == null ? 1 : party.hashCode());
             if (assigner != null) {
                 myhash = 37 * myhash + assigner.hashCode();
             }
--- a/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java	Tue Jan 26 09:11:59 2016 +0100
@@ -189,7 +189,7 @@
         // the list: if any subsequent entry matches or widens entry n,
         // remove entry n. If any subsequent entries narrow entry n, remove
         // the subsequent entries.
-        for (int i = 0; i < size(); i++) {
+        for (int i = 0; i < (size() - 1); i++) {
             GeneralNameInterface current = getGeneralNameInterface(i);
             boolean remove1 = false;
 
--- a/src/java.base/share/classes/sun/security/x509/IPAddressName.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/IPAddressName.java	Tue Jan 26 09:11:59 2016 +0100
@@ -197,8 +197,10 @@
 
             // append a mask corresponding to the num of prefix bits specified
             int prefixLen = Integer.parseInt(name.substring(slashNdx+1));
-            if (prefixLen > 128)
-                throw new IOException("IPv6Address prefix is longer than 128");
+            if (prefixLen < 0 || prefixLen > 128) {
+                throw new IOException("IPv6Address prefix length (" +
+                        prefixLen + ") in out of valid range [0,128]");
+            }
 
             // create new bit array initialized to zeros
             BitArray bitArray = new BitArray(MASKSIZE * 8);
@@ -317,7 +319,8 @@
         if (!(obj instanceof IPAddressName))
             return false;
 
-        byte[] other = ((IPAddressName)obj).getBytes();
+        IPAddressName otherName = (IPAddressName)obj;
+        byte[] other = otherName.address;
 
         if (other.length != address.length)
             return false;
@@ -326,12 +329,10 @@
             // Two subnet addresses
             // Mask each and compare masked values
             int maskLen = address.length/2;
-            byte[] maskedThis = new byte[maskLen];
-            byte[] maskedOther = new byte[maskLen];
             for (int i=0; i < maskLen; i++) {
-                maskedThis[i] = (byte)(address[i] & address[i+maskLen]);
-                maskedOther[i] = (byte)(other[i] & other[i+maskLen]);
-                if (maskedThis[i] != maskedOther[i]) {
+                byte maskedThis = (byte)(address[i] & address[i+maskLen]);
+                byte maskedOther = (byte)(other[i] & other[i+maskLen]);
+                if (maskedThis != maskedOther) {
                     return false;
                 }
             }
@@ -400,7 +401,8 @@
         else if (((IPAddressName)inputName).equals(this))
             constraintType = NAME_MATCH;
         else {
-            byte[] otherAddress = ((IPAddressName)inputName).getBytes();
+            IPAddressName otherName = (IPAddressName)inputName;
+            byte[] otherAddress = otherName.address;
             if (otherAddress.length == 4 && address.length == 4)
                 // Two host addresses
                 constraintType = NAME_SAME_TYPE;
--- a/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -261,6 +261,7 @@
                 throw new IOException(
                     "Attribute value should be of type ReasonFlags.");
             }
+            revocationReasons = (ReasonFlags)obj;
 
         } else if (name.equalsIgnoreCase(INDIRECT_CRL)) {
             if (!(obj instanceof Boolean)) {
@@ -290,7 +291,6 @@
             }
             hasOnlyAttributeCerts = ((Boolean)obj).booleanValue();
 
-
         } else {
             throw new IOException("Attribute name [" + name +
                 "] not recognized by " +
--- a/src/java.base/share/classes/sun/security/x509/KeyIdentifier.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/KeyIdentifier.java	Tue Jan 26 09:11:59 2016 +0100
@@ -148,7 +148,7 @@
             return true;
         if (!(other instanceof KeyIdentifier))
             return false;
-        return java.util.Arrays.equals(octetString,
-                                       ((KeyIdentifier)other).getIdentifier());
+        byte[] otherString = ((KeyIdentifier)other).octetString;
+        return java.util.Arrays.equals(octetString, otherString);
     }
 }
--- a/src/java.base/share/classes/sun/security/x509/PolicyMappingsExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/PolicyMappingsExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -102,7 +102,7 @@
     public PolicyMappingsExtension() {
         extensionId = PKIXExtensions.PolicyMappings_Id;
         critical = true;
-        maps = new ArrayList<CertificatePolicyMap>();
+        maps = Collections.<CertificatePolicyMap>emptyList();
     }
 
     /**
--- a/src/java.base/share/classes/sun/security/x509/PrivateKeyUsageExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/PrivateKeyUsageExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -33,6 +33,7 @@
 import java.security.cert.CertificateNotYetValidException;
 import java.util.Date;
 import java.util.Enumeration;
+import java.util.Objects;
 
 import sun.security.util.*;
 
@@ -217,16 +218,17 @@
      */
     public void valid(Date now)
     throws CertificateNotYetValidException, CertificateExpiredException {
+        Objects.requireNonNull(now);
         /*
          * we use the internal Dates rather than the passed in Date
          * because someone could override the Date methods after()
          * and before() to do something entirely different.
          */
-        if (notBefore.after(now)) {
+        if (notBefore != null && notBefore.after(now)) {
             throw new CertificateNotYetValidException("NotBefore: " +
                                                       notBefore.toString());
         }
-        if (notAfter.before(now)) {
+        if (notAfter != null && notAfter.before(now)) {
             throw new CertificateExpiredException("NotAfter: " +
                                                   notAfter.toString());
         }
--- a/src/java.base/share/classes/sun/security/x509/RDN.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/RDN.java	Tue Jan 26 09:11:59 2016 +0100
@@ -27,6 +27,8 @@
 
 import java.io.IOException;
 import java.io.StringReader;
+import java.util.Arrays;
+import java.util.StringJoiner;
 import java.util.*;
 
 import sun.security.util.*;
@@ -436,31 +438,19 @@
                                assertion[0].toRFC2253String(oidMap);
         }
 
-        StringBuilder relname = new StringBuilder();
-        if (!canonical) {
-            for (int i = 0; i < assertion.length; i++) {
-                if (i > 0) {
-                    relname.append('+');
-                }
-                relname.append(assertion[i].toRFC2253String(oidMap));
-            }
-        } else {
+        AVA[] toOutput = assertion;
+        if (canonical) {
             // order the string type AVA's alphabetically,
             // followed by the oid type AVA's numerically
-            List<AVA> avaList = new ArrayList<>(assertion.length);
-            for (int i = 0; i < assertion.length; i++) {
-                avaList.add(assertion[i]);
-            }
-            java.util.Collections.sort(avaList, AVAComparator.getInstance());
-
-            for (int i = 0; i < avaList.size(); i++) {
-                if (i > 0) {
-                    relname.append('+');
-                }
-                relname.append(avaList.get(i).toRFC2253CanonicalString());
-            }
+            toOutput = assertion.clone();
+            Arrays.sort(toOutput, AVAComparator.getInstance());
         }
-        return relname.toString();
+        StringJoiner sj = new StringJoiner("+");
+        for (AVA ava : toOutput) {
+            sj.add(canonical ? ava.toRFC2253CanonicalString()
+                             : ava.toRFC2253String(oidMap));
+        }
+        return sj.toString();
     }
 
 }
--- a/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java	Tue Jan 26 09:11:59 2016 +0100
@@ -28,6 +28,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
+import java.util.Collections;
 import java.util.*;
 
 import sun.security.util.DerOutputStream;
@@ -200,7 +201,8 @@
      */
     public void delete(String name) throws IOException {
         if (name.equalsIgnoreCase(DESCRIPTIONS)) {
-            accessDescriptions = new ArrayList<AccessDescription>();
+            accessDescriptions =
+                Collections.<AccessDescription>emptyList();
         } else {
             throw new IOException("Attribute name [" + name +
                                 "] not recognized by " +
--- a/src/java.base/share/classes/sun/security/x509/URIName.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/URIName.java	Tue Jan 26 09:11:59 2016 +0100
@@ -165,7 +165,7 @@
             String host = uri.getSchemeSpecificPart();
             try {
                 DNSName hostDNS;
-                if (host.charAt(0) == '.') {
+                if (host.startsWith(".")) {
                     hostDNS = new DNSName(host.substring(1));
                 } else {
                     hostDNS = new DNSName(host);
--- a/src/java.base/share/classes/sun/security/x509/X500Name.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/X500Name.java	Tue Jan 26 09:11:59 2016 +0100
@@ -347,6 +347,8 @@
             for (int i = 0; i < names.length; i++) {
                 list.addAll(names[i].avas());
             }
+            list = Collections.unmodifiableList(list);
+            allAvaList = list;
         }
         return list;
     }
@@ -365,9 +367,6 @@
      */
     public boolean isEmpty() {
         int n = names.length;
-        if (n == 0) {
-            return true;
-        }
         for (int i = 0; i < n; i++) {
             if (names[i].assertion.length != 0) {
                 return false;
@@ -1103,12 +1102,8 @@
      * and speed recognition of common X.500 attributes.
      */
     static ObjectIdentifier intern(ObjectIdentifier oid) {
-        ObjectIdentifier interned = internedOIDs.get(oid);
-        if (interned != null) {
-            return interned;
-        }
-        internedOIDs.put(oid, oid);
-        return oid;
+        ObjectIdentifier interned = internedOIDs.putIfAbsent(oid, oid);
+        return (interned == null) ? oid : interned;
     }
 
     private static final Map<ObjectIdentifier,ObjectIdentifier> internedOIDs
--- a/src/java.base/share/classes/sun/security/x509/X509AttributeName.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/X509AttributeName.java	Tue Jan 26 09:11:59 2016 +0100
@@ -47,7 +47,7 @@
      */
     public X509AttributeName(String name) {
         int i = name.indexOf(SEPARATOR);
-        if (i == (-1)) {
+        if (i < 0) {
             prefix = name;
         } else {
             prefix = name.substring(0, i);
--- a/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -762,9 +762,7 @@
     public byte[] getTBSCertList() throws CRLException {
         if (tbsCertList == null)
             throw new CRLException("Uninitialized CRL");
-        byte[] dup = new byte[tbsCertList.length];
-        System.arraycopy(tbsCertList, 0, dup, 0, dup.length);
-        return dup;
+        return tbsCertList.clone();
     }
 
     /**
@@ -775,9 +773,7 @@
     public byte[] getSignature() {
         if (signature == null)
             return null;
-        byte[] dup = new byte[signature.length];
-        System.arraycopy(signature, 0, dup, 0, dup.length);
-        return dup;
+        return signature.clone();
     }
 
     /**
--- a/src/java.base/share/classes/sun/security/x509/X509CertImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/classes/sun/security/x509/X509CertImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -1001,9 +1001,7 @@
     public byte[] getSignature() {
         if (signature == null)
             return null;
-        byte[] dup = new byte[signature.length];
-        System.arraycopy(signature, 0, dup, 0, dup.length);
-        return dup;
+        return signature.clone();
     }
 
     /**
--- a/src/java.base/share/conf/security/java.security	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/share/conf/security/java.security	Tue Jan 26 09:11:59 2016 +0100
@@ -576,7 +576,7 @@
 #
 # Example:
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
 
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
 # processing in JSSE implementation.
--- a/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -47,6 +47,9 @@
         if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
             super.setOption(name, value);
         } else {
+            if (!flowSupported()) {
+                throw new UnsupportedOperationException("unsupported option");
+            }
             if (isClosed()) {
                 throw new SocketException("Socket closed");
             }
@@ -61,6 +64,9 @@
         if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
             return super.getOption(name);
         }
+        if (!flowSupported()) {
+            throw new UnsupportedOperationException("unsupported option");
+        }
         if (isClosed()) {
             throw new SocketException("Socket closed");
         }
--- a/src/java.base/unix/classes/java/net/PlainSocketImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.base/unix/classes/java/net/PlainSocketImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -61,6 +61,9 @@
         if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
             super.setOption(name, value);
         } else {
+            if (getSocket() == null || !flowSupported()) {
+                throw new UnsupportedOperationException("unsupported option");
+            }
             if (isClosedOrPending()) {
                 throw new SocketException("Socket closed");
             }
@@ -75,6 +78,9 @@
         if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
             return super.getOption(name);
         }
+        if (getSocket() == null || !flowSupported()) {
+            throw new UnsupportedOperationException("unsupported option");
+        }
         if (isClosedOrPending()) {
             throw new SocketException("Socket closed");
         }
--- a/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
 /**
  * Utility class with different datatransfer helper functions
  *
- * @since 1.9
+ * @since 9
  */
 public class DataFlavorUtil {
 
--- a/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java	Tue Jan 26 09:11:59 2016 +0100
@@ -35,7 +35,7 @@
  * to enrich it's functionality
  *
  * @author Petr Pchelko
- * @since 1.9
+ * @since 9
  */
 public interface DesktopDatatransferService {
 
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java	Tue Jan 26 09:11:59 2016 +0100
@@ -235,6 +235,11 @@
         // this will not work if the user clicks on the "Preview" button
         // However if the printer is a StreamPrintService, its the right path.
         PrintService psvc = getPrintService();
+
+        if (psvc == null) {
+            throw new PrinterException("No print service found.");
+        }
+
         if (psvc instanceof StreamPrintService) {
             spoolToService(psvc, attributes);
             return;
--- a/src/java.desktop/share/classes/java/awt/RenderingHints.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/awt/RenderingHints.java	Tue Jan 26 09:11:59 2016 +0100
@@ -965,7 +965,7 @@
      * <li>{@link #VALUE_RESOLUTION_VARIANT_SIZE_FIT}
      * <li>{@link #VALUE_RESOLUTION_VARIANT_DPI_FIT}
      * </ul>
-     * @since 1.9
+     * @since 9
      */
     public static final Key KEY_RESOLUTION_VARIANT =
         SunHints.KEY_RESOLUTION_VARIANT;
@@ -976,7 +976,7 @@
      * of the platform
      *
      * @see #KEY_RESOLUTION_VARIANT
-     * @since 1.9
+     * @since 9
      */
     public static final Object VALUE_RESOLUTION_VARIANT_DEFAULT =
         SunHints.VALUE_RESOLUTION_VARIANT_DEFAULT;
@@ -986,7 +986,7 @@
      * is always used.
      *
      * @see #KEY_RESOLUTION_VARIANT
-     * @since 1.9
+     * @since 9
      */
     public static final Object VALUE_RESOLUTION_VARIANT_BASE =
         SunHints.VALUE_RESOLUTION_VARIANT_BASE;
@@ -997,7 +997,7 @@
      * context.
      *
      * @see #KEY_RESOLUTION_VARIANT
-     * @since 1.9
+     * @since 9
      */
     public static final Object VALUE_RESOLUTION_VARIANT_SIZE_FIT =
         SunHints.VALUE_RESOLUTION_VARIANT_SIZE_FIT;
@@ -1007,7 +1007,7 @@
      * chosen based only on the DPI of the screen.
      *
      * @see #KEY_RESOLUTION_VARIANT
-     * @since 1.9
+     * @since 9
      */
     public static final Object VALUE_RESOLUTION_VARIANT_DPI_FIT =
         SunHints.VALUE_RESOLUTION_VARIANT_DPI_FIT;
--- a/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Tue Jan 26 09:11:59 2016 +0100
@@ -321,12 +321,12 @@
         MEETEI_MAYEK    ('\uabf0', '\uabc0', '\uac00'),
         /**
          * The Sinhala range with the Sinhala digits.
-         * @since 1.9
+         * @since 9
          */
         SINHALA         ('\u0de6', '\u0d80', '\u0e00'),
         /**
          * The Myanmar Extended-B range with the Myanmar Tai Laing digits.
-         * @since 1.9
+         * @since 9
          */
         MYANMAR_TAI_LAING ('\ua9f0', '\ua9e0', '\uaa00');
 
--- a/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java	Tue Jan 26 09:11:59 2016 +0100
@@ -59,7 +59,7 @@
  * @see java.awt.Image
  * @see java.awt.image.MultiResolutionImage
  *
- * @since 1.9
+ * @since 9
  */
 public abstract class AbstractMultiResolutionImage extends java.awt.Image
         implements MultiResolutionImage {
@@ -96,7 +96,7 @@
      *
      * @return the base image of the set of multi-resolution images
      *
-     * @since 1.9
+     * @since 9
      */
     protected abstract Image getBaseImage();
 }
\ No newline at end of file
--- a/src/java.desktop/share/classes/java/awt/image/BaseMultiResolutionImage.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/awt/image/BaseMultiResolutionImage.java	Tue Jan 26 09:11:59 2016 +0100
@@ -50,7 +50,7 @@
  * @see java.awt.image.MultiResolutionImage
  * @see java.awt.image.AbstractMultiResolutionImage
  *
- * @since 1.9
+ * @since 9
  */
 public class BaseMultiResolutionImage extends AbstractMultiResolutionImage {
 
@@ -66,7 +66,7 @@
      * @throws NullPointerException if the specified {@code resolutionVariants}
      *          contains one or more null elements
      *
-     * @since 1.9
+     * @since 9
      */
     public BaseMultiResolutionImage(Image... resolutionVariants) {
         this(0, resolutionVariants);
@@ -86,7 +86,7 @@
      *          negative or greater than or equal to {@code resolutionVariants}
      *          length.
      *
-     * @since 1.9
+     * @since 9
      */
     public BaseMultiResolutionImage(int baseImageIndex,
                                     Image... resolutionVariants) {
--- a/src/java.desktop/share/classes/java/awt/image/MultiResolutionImage.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/awt/image/MultiResolutionImage.java	Tue Jan 26 09:11:59 2016 +0100
@@ -52,7 +52,7 @@
  * @see java.awt.Toolkit#getImage(java.lang.String filename)
  * @see java.awt.Toolkit#getImage(java.net.URL url)
  *
- * @since 1.9
+ * @since 9
  */
 public interface MultiResolutionImage {
 
@@ -67,7 +67,7 @@
      *         {@code destImageHeight} is less than or equal to zero, infinity,
      *         or NaN.
      *
-     * @since 1.9
+     * @since 9
      */
     Image getResolutionVariant(double destImageWidth, double destImageHeight);
 
@@ -78,7 +78,7 @@
      * Note that many implementations might return an unmodifiable list.
      * <p>
      * @return list of resolution variants.
-     * @since 1.9
+     * @since 9
      */
     public List<Image> getResolutionVariants();
 }
\ No newline at end of file
--- a/src/java.desktop/share/classes/java/beans/BeanProperty.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/beans/BeanProperty.java	Tue Jan 26 09:11:59 2016 +0100
@@ -39,7 +39,7 @@
  * which does not imply the automatic analysis.
  *
  * @see BeanInfo#getPropertyDescriptors
- * @since 1.9
+ * @since 9
  *
  * @author Sergey A. Malenkov
  */
--- a/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java	Tue Jan 26 09:11:59 2016 +0100
@@ -152,7 +152,7 @@
      *               and the {@code value} is the automatically generated property info
      * @param bound  the flag indicating whether it is possible to treat this property as a bound property
      *
-     * @since 1.9
+     * @since 9
      */
     IndexedPropertyDescriptor(Entry<String,PropertyInfo> entry, boolean bound) {
         super(entry, bound);
--- a/src/java.desktop/share/classes/java/beans/JavaBean.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/beans/JavaBean.java	Tue Jan 26 09:11:59 2016 +0100
@@ -39,7 +39,7 @@
  * which does not imply the automatic analysis.
  *
  * @see BeanInfo#getBeanDescriptor
- * @since 1.9
+ * @since 9
  *
  * @author Sergey A. Malenkov
  */
--- a/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java	Tue Jan 26 09:11:59 2016 +0100
@@ -150,7 +150,7 @@
      *               and the {@code value} is the automatically generated property info
      * @param bound  the flag indicating whether it is possible to treat this property as a bound property
      *
-     * @since 1.9
+     * @since 9
      */
     PropertyDescriptor(Entry<String,PropertyInfo> entry, boolean bound) {
         String base = entry.getKey();
--- a/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java	Tue Jan 26 09:11:59 2016 +0100
@@ -43,7 +43,7 @@
  *
  * @see java.awt.Toolkit#getDefaultToolkit
  * @see java.util.ServiceLoader
- * @since 1.9
+ * @since 9
  */
 public abstract class AccessibilityProvider {
 
--- a/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html	Tue Jan 26 09:11:59 2016 +0100
@@ -1194,7 +1194,7 @@
 ]&gt;
 </pre>
 
-@since 1.9
+@since 9
 
 </body>
 </html>
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/BaselineTIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/BaselineTIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -55,7 +55,7 @@
  * </li>
  * </ul>
  *
- * @since 1.9
+ * @since 9
  * @see   <a href="http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf">  TIFF 6.0 Specification</a>
  */
 public class BaselineTIFFTagSet extends TIFFTagSet {
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -35,7 +35,7 @@
  * <p> The definitions of the data types referenced by the field
  * definitions may be found in the {@link TIFFTag TIFFTag} class.
  *
- * @since 1.9
+ * @since 9
  * @see   ExifTIFFTagSet
  */
 public class ExifGPSTagSet extends TIFFTagSet {
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifInteroperabilityTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifInteroperabilityTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -31,7 +31,7 @@
 /**
  * A class representing the tags found in an Exif Interoperability IFD.
  *
- * @since 1.9
+ * @since 9
  * @see   ExifTIFFTagSet
  */
 public class ExifInteroperabilityTagSet extends TIFFTagSet {
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifParentTIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifParentTIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -34,7 +34,7 @@
  * TIFFImageReadParam.addAllowedTagSet} method if Exif
  * support is desired.
  *
- * @since 1.9
+ * @since 9
  */
 public class ExifParentTIFFTagSet extends TIFFTagSet {
 
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -39,7 +39,7 @@
  * <p> The definitions of the data types referenced by the field
  * definitions may be found in the {@link TIFFTag TIFFTag} class.
  *
- * @since 1.9
+ * @since 9
  */
 public class ExifTIFFTagSet extends TIFFTagSet {
 
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -31,7 +31,7 @@
  * A class representing the extra tags found in a
  * <a href="http://tools.ietf.org/html/rfc2306"> TIFF-F</a> (RFC 2036) file.
  *
- * @since 1.9
+ * @since 9
  */
 public class FaxTIFFTagSet extends TIFFTagSet {
 
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/GeoTIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/GeoTIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -39,7 +39,7 @@
  * <p>The definitions of the data types referenced by the field
  * definitions may be found in the {@link TIFFTag TIFFTag} class.</p>
  *
- * @since 1.9
+ * @since 9
  */
 public class GeoTIFFTagSet extends TIFFTagSet {
 
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java	Tue Jan 26 09:11:59 2016 +0100
@@ -95,7 +95,7 @@
  * or removing <code>TIFFField</code>s or <code>TIFFTagSet</code>s, it
  * <i>must</i> be synchronized externally.</p>
  *
- * @since 1.9
+ * @since 9
  * @see   IIOMetadata
  * @see   TIFFField
  * @see   TIFFTag
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Tue Jan 26 09:11:59 2016 +0100
@@ -257,7 +257,7 @@
  *
  * </table>
  *
- * @since 1.9
+ * @since 9
  * @see   TIFFDirectory
  * @see   TIFFTag
  */
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFImageReadParam.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFImageReadParam.java	Tue Jan 26 09:11:59 2016 +0100
@@ -46,7 +46,7 @@
  * <code>ExifParentTIFFTagSet</code>, and <code>GeoTIFFTagSet</code>
  * are included.
  *
- * @since 1.9
+ * @since 9
  */
 public class TIFFImageReadParam extends ImageReadParam {
 
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFTag.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFTag.java	Tue Jan 26 09:11:59 2016 +0100
@@ -40,7 +40,7 @@
  * tiff stream are defined in the {@link BaselineTIFFTagSet
  * BaselineTIFFTagSet} class.
  *
- * @since 1.9
+ * @since 9
  * @see   BaselineTIFFTagSet
  * @see   TIFFField
  * @see   TIFFTagSet
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFTagSet.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFTagSet.java	Tue Jan 26 09:11:59 2016 +0100
@@ -44,7 +44,7 @@
  * name, legal data types, and mnemonic names for some or all of ts
  * data values.
  *
- * @since 1.9
+ * @since 9
  * @see   TIFFTag
  */
 public class TIFFTagSet {
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html	Tue Jan 26 09:11:59 2016 +0100
@@ -46,6 +46,6 @@
 <br>
 <br>
 
-@since 1.9
+@since 9
 </body>
 </html>
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Tue Jan 26 09:11:59 2016 +0100
@@ -616,7 +616,7 @@
      * Returns the look and feel delegate that renders this component.
      *
      * @return the {@code ComponentUI} object that renders this component
-     * @since 1.9
+     * @since 9
      */
     @Transient
     public ComponentUI getUI() {
--- a/src/java.desktop/share/classes/javax/swing/SwingContainer.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/swing/SwingContainer.java	Tue Jan 26 09:11:59 2016 +0100
@@ -45,7 +45,7 @@
  * with the {@code isContainer} attribute allow to directly specify
  * whether a Swing component is a container or not.
  *
- * @since 1.9
+ * @since 9
  *
  * @author Sergey A. Malenkov
  */
--- a/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Tue Jan 26 09:11:59 2016 +0100
@@ -3023,7 +3023,7 @@
 
         /**
          * {@inheritDoc}
-         * @since 1.9
+         * @since 9
          */
         @Override
         public void lockEdit() {
@@ -3032,7 +3032,7 @@
 
         /**
          * {@inheritDoc}
-         * @since 1.9
+         * @since 9
          */
         @Override
         public void unlockEdit() {
--- a/src/java.desktop/share/classes/sun/awt/datatransfer/DesktopDatatransferServiceImpl.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/sun/awt/datatransfer/DesktopDatatransferServiceImpl.java	Tue Jan 26 09:11:59 2016 +0100
@@ -39,7 +39,7 @@
  * {@code DesktopDatatransferService} interface.
  *
  * @author Petr Pchelko
- * @since 1.9
+ * @since 9
  */
 public class DesktopDatatransferServiceImpl implements DesktopDatatransferService {
 
--- a/src/java.desktop/share/classes/sun/swing/text/UndoableEditLockSupport.java	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/classes/sun/swing/text/UndoableEditLockSupport.java	Tue Jan 26 09:11:59 2016 +0100
@@ -28,7 +28,7 @@
 
 /**
  * UndoableEdit support for undo/redo actions synchronization
- * @since 1.9
+ * @since 9
  */
 public interface UndoableEditLockSupport extends UndoableEdit {
     /**
--- a/src/java.desktop/share/native/libfontmanager/layout/ContextualSubstSubtables.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/ContextualSubstSubtables.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -243,14 +243,14 @@
         le_uint16 srSetCount = SWAPW(subRuleSetCount);
 
         if (coverageIndex < srSetCount) {
-            LEReferenceToArrayOf<Offset> subRuleSetTableOffsetArrayRef(base, success,
-                    &subRuleSetTableOffsetArray[coverageIndex], 1);
+            LEReferenceToArrayOf<Offset>
+                subRuleSetTableOffsetArrayRef(base, success, subRuleSetTableOffsetArray, srSetCount);
             if (LE_FAILURE(success)) {
                 return 0;
             }
             Offset subRuleSetTableOffset = SWAPW(subRuleSetTableOffsetArray[coverageIndex]);
-            LEReferenceTo<SubRuleSetTable>
-                 subRuleSetTable(base, success, (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset));
+            LEReferenceTo<SubRuleSetTable> subRuleSetTable(base, success, subRuleSetTableOffset);
+            if (LE_FAILURE(success)) { return 0; }
             le_uint16 subRuleCount = SWAPW(subRuleSetTable->subRuleCount);
             le_int32 position = glyphIterator->getCurrStreamPosition();
 
@@ -264,6 +264,7 @@
                     SWAPW(subRuleSetTable->subRuleTableOffsetArray[subRule]);
                 LEReferenceTo<SubRuleTable>
                      subRuleTable(subRuleSetTable, success, subRuleTableOffset);
+                if (LE_FAILURE(success)) { return 0; }
                 le_uint16 matchCount = SWAPW(subRuleTable->glyphCount) - 1;
                 le_uint16 substCount = SWAPW(subRuleTable->substCount);
                 LEReferenceToArrayOf<TTGlyphID> inputGlyphArray(base, success, subRuleTable->inputGlyphArray, matchCount+2);
@@ -304,8 +305,8 @@
     }
 
     if (coverageIndex >= 0) {
-        LEReferenceTo<ClassDefinitionTable> classDefinitionTable(base, success,
-                                                                 (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset)));
+        LEReferenceTo<ClassDefinitionTable> classDefinitionTable(base, success, SWAPW(classDefTableOffset));
+        if (LE_FAILURE(success)) { return 0; }
         le_uint16 scSetCount = SWAPW(subClassSetCount);
         le_int32 setClass = classDefinitionTable->getGlyphClass(classDefinitionTable,
                                                                 glyphIterator->getCurrGlyphID(),
@@ -313,13 +314,13 @@
 
         if (setClass < scSetCount) {
             LEReferenceToArrayOf<Offset>
-                 subClassSetTableOffsetArrayRef(base, success, subClassSetTableOffsetArray, setClass);
+                subClassSetTableOffsetArrayRef(base, success, subClassSetTableOffsetArray, scSetCount);
             if (LE_FAILURE(success)) { return 0; }
             if (subClassSetTableOffsetArray[setClass] != 0) {
 
                 Offset subClassSetTableOffset = SWAPW(subClassSetTableOffsetArray[setClass]);
-                LEReferenceTo<SubClassSetTable>
-                    subClassSetTable(base, success, (const SubClassSetTable *) ((char *) this + subClassSetTableOffset));
+                LEReferenceTo<SubClassSetTable> subClassSetTable(base, success, subClassSetTableOffset);
+                if (LE_FAILURE(success)) { return 0; }
                 le_uint16 subClassRuleCount = SWAPW(subClassSetTable->subClassRuleCount);
                 le_int32 position = glyphIterator->getCurrStreamPosition();
                 LEReferenceToArrayOf<Offset>
@@ -332,6 +333,7 @@
                         SWAPW(subClassSetTable->subClassRuleTableOffsetArray[scRule]);
                     LEReferenceTo<SubClassRuleTable>
                         subClassRuleTable(subClassSetTable, success, subClassRuleTableOffset);
+                    if (LE_FAILURE(success)) { return 0; }
                     le_uint16 matchCount = SWAPW(subClassRuleTable->glyphCount) - 1;
                     le_uint16 substCount = SWAPW(subClassRuleTable->substCount);
 
@@ -463,13 +465,13 @@
 
         if (coverageIndex < srSetCount) {
             LEReferenceToArrayOf<Offset>
-                chainSubRuleSetTableOffsetArrayRef(base, success, chainSubRuleSetTableOffsetArray, coverageIndex);
+                chainSubRuleSetTableOffsetArrayRef(base, success, chainSubRuleSetTableOffsetArray, srSetCount);
             if (LE_FAILURE(success)) {
                 return 0;
             }
             Offset chainSubRuleSetTableOffset = SWAPW(chainSubRuleSetTableOffsetArray[coverageIndex]);
-            LEReferenceTo<ChainSubRuleSetTable>
-                 chainSubRuleSetTable(base, success, (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset));
+            LEReferenceTo<ChainSubRuleSetTable> chainSubRuleSetTable(base, success, chainSubRuleSetTableOffset);
+            if (LE_FAILURE(success)) { return 0; }
             le_uint16 chainSubRuleCount = SWAPW(chainSubRuleSetTable->chainSubRuleCount);
             le_int32 position = glyphIterator->getCurrStreamPosition();
             GlyphIterator tempIterator(*glyphIterator, emptyFeatureList);
@@ -550,17 +552,17 @@
 
     if (coverageIndex >= 0) {
         LEReferenceTo<ClassDefinitionTable>
-             backtrackClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset)));
+             backtrackClassDefinitionTable(base, success, SWAPW(backtrackClassDefTableOffset));
         LEReferenceTo<ClassDefinitionTable>
-             inputClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset)));
+             inputClassDefinitionTable(base, success, SWAPW(inputClassDefTableOffset));
         LEReferenceTo<ClassDefinitionTable>
-             lookaheadClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset)));
+             lookaheadClassDefinitionTable(base, success, SWAPW(lookaheadClassDefTableOffset));
         le_uint16 scSetCount = SWAPW(chainSubClassSetCount);
         le_int32 setClass = inputClassDefinitionTable->getGlyphClass(inputClassDefinitionTable,
                                                                      glyphIterator->getCurrGlyphID(),
                                                                      success);
         LEReferenceToArrayOf<Offset>
-            chainSubClassSetTableOffsetArrayRef(base, success, chainSubClassSetTableOffsetArray, setClass);
+            chainSubClassSetTableOffsetArrayRef(base, success, chainSubClassSetTableOffsetArray, scSetCount);
         if (LE_FAILURE(success)) {
             return 0;
         }
@@ -568,7 +570,8 @@
         if (setClass < scSetCount && chainSubClassSetTableOffsetArray[setClass] != 0) {
             Offset chainSubClassSetTableOffset = SWAPW(chainSubClassSetTableOffsetArray[setClass]);
             LEReferenceTo<ChainSubClassSetTable>
-                 chainSubClassSetTable(base, success, (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset));
+                 chainSubClassSetTable(base, success, chainSubClassSetTableOffset);
+            if (LE_FAILURE(success)) { return 0; }
             le_uint16 chainSubClassRuleCount = SWAPW(chainSubClassSetTable->chainSubClassRuleCount);
             le_int32 position = glyphIterator->getCurrStreamPosition();
             GlyphIterator tempIterator(*glyphIterator, emptyFeatureList);
@@ -582,6 +585,7 @@
                     SWAPW(chainSubClassSetTable->chainSubClassRuleTableOffsetArray[scRule]);
                 LEReferenceTo<ChainSubClassRuleTable>
                      chainSubClassRuleTable(chainSubClassSetTable, success, chainSubClassRuleTableOffset);
+                if (LE_FAILURE(success)) { return 0; }
                 le_uint16 backtrackGlyphCount = SWAPW(chainSubClassRuleTable->backtrackGlyphCount);
                 LEReferenceToArrayOf<le_uint16>   backtrackClassArray(base, success, chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount);
                 if( LE_FAILURE(success) ) { return 0; }
--- a/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -46,7 +46,7 @@
     le_uint16 eeCount       = SWAPW(entryExitCount);
 
     LEReferenceToArrayOf<EntryExitRecord>
-        entryExitRecordsArrayRef(base, success, entryExitRecords, coverageIndex);
+        entryExitRecordsArrayRef(base, success, entryExitRecords, eeCount);
 
     if (coverageIndex < 0 || coverageIndex >= eeCount || LE_FAILURE(success)) {
         glyphIterator->setCursiveGlyph();
--- a/src/java.desktop/share/native/libfontmanager/layout/Features.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/Features.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -41,11 +41,12 @@
 LEReferenceTo<FeatureTable> FeatureListTable::getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const
 {
     LEReferenceToArrayOf<FeatureRecord>
-        featureRecordArrayRef(base, success, featureRecordArray, featureIndex+1);
+        featureRecordArrayRef(base, success, featureRecordArray, SWAPW(featureCount));
 
-  if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
-    return LEReferenceTo<FeatureTable>();
-  }
+    if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
+        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        return LEReferenceTo<FeatureTable>();
+    }
 
     Offset featureTableOffset = featureRecordArray[featureIndex].featureTableOffset;
 
--- a/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -76,11 +76,11 @@
     }
 
     if (flags & irfMarkFirst) {
-        firstGlyph = (le_uint32)currGlyph;
+        firstGlyph = currGlyph;
     }
 
     if (flags & irfMarkLast) {
-        lastGlyph = (le_uint32)currGlyph;
+        lastGlyph = currGlyph;
     }
 
     doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask), success);
@@ -118,7 +118,7 @@
         if (firstGlyph == lastGlyph) break;
         if (firstGlyph + 1 < firstGlyph) {
             success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
-        break;
+            break;
         }
         a = glyphStorage[firstGlyph];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
--- a/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.h	Tue Jan 26 09:11:59 2016 +0100
@@ -76,8 +76,8 @@
     static UClassID getStaticClassID();
 
 protected:
-    le_uint32 firstGlyph;
-    le_uint32 lastGlyph;
+    le_int32 firstGlyph;
+    le_int32 lastGlyph;
 
     LEReferenceTo<IndicRearrangementSubtableHeader> indicRearrangementSubtableHeader;
     LEReferenceToArrayOf<IndicRearrangementStateEntry> entryTable;
--- a/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -74,11 +74,11 @@
     }
 
     if (flags & irfMarkFirst) {
-        firstGlyph = (le_uint32)currGlyph;
+        firstGlyph = currGlyph;
     }
 
     if (flags & irfMarkLast) {
-        lastGlyph = (le_uint32)currGlyph;
+        lastGlyph = currGlyph;
     }
 
     doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask), success);
@@ -115,7 +115,7 @@
         if (firstGlyph == lastGlyph) break;
         if (firstGlyph + 1 < firstGlyph) {
             success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
-        break;
+            break;
         }
         a = glyphStorage[firstGlyph];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
--- a/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.h	Tue Jan 26 09:11:59 2016 +0100
@@ -76,8 +76,8 @@
     static UClassID getStaticClassID();
 
 protected:
-    le_uint32 firstGlyph;
-    le_uint32 lastGlyph;
+    le_int32 firstGlyph;
+    le_int32 lastGlyph;
 
     LEReferenceToArrayOf<IndicRearrangementStateEntry2> entryTable;
     LEReferenceTo<IndicRearrangementSubtableHeader2> indicRearrangementSubtableHeader;
--- a/src/java.desktop/share/native/libfontmanager/layout/Lookups.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/Lookups.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -42,6 +42,7 @@
   LEReferenceToArrayOf<Offset> lookupTableOffsetArrayRef(base, success, (const Offset*)&lookupTableOffsetArray, SWAPW(lookupCount));
 
   if(LE_FAILURE(success) || lookupTableIndex>lookupTableOffsetArrayRef.getCount()) {
+    success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
     return LEReferenceTo<LookupTable>();
   } else {
     return LEReferenceTo<LookupTable>(base, success, SWAPW(lookupTableOffsetArrayRef.getObject(lookupTableIndex, success)));
@@ -53,6 +54,7 @@
   LEReferenceToArrayOf<Offset> subTableOffsetArrayRef(base, success, (const Offset*)&subTableOffsetArray, SWAPW(subTableCount));
 
   if(LE_FAILURE(success) || subtableIndex>subTableOffsetArrayRef.getCount()) {
+    success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
     return LEReferenceTo<LookupSubtable>();
   } else {
     return LEReferenceTo<LookupSubtable>(base, success, SWAPW(subTableOffsetArrayRef.getObject(subtableIndex, success)));
--- a/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -93,7 +93,7 @@
     }
     LEReferenceTo<BaseRecord> baseRecord(base, success, &baseArray->baseRecordArray[baseCoverage * mcCount]);
     if( LE_FAILURE(success) ) { return 0; }
-    LEReferenceToArrayOf<Offset> baseAnchorTableOffsetArray(base, success, &(baseRecord->baseAnchorTableOffsetArray[0]), markClass+1);
+    LEReferenceToArrayOf<Offset> baseAnchorTableOffsetArray(base, success, &(baseRecord->baseAnchorTableOffsetArray[0]), mcCount);
 
     if( LE_FAILURE(success) ) { return 0; }
     Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]);
--- a/src/java.desktop/share/native/libfontmanager/layout/MarkToLigaturePosnSubtables.cpp	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libfontmanager/layout/MarkToLigaturePosnSubtables.cpp	Tue Jan 26 09:11:59 2016 +0100
@@ -83,6 +83,7 @@
     LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator);
     le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success);
     LEReferenceTo<LigatureArray> ligatureArray(base, success, SWAPW(baseArrayOffset));
+    if (LE_FAILURE(success)) { return 0; }
     le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount);
 
     if (ligatureCoverage < 0 || ligatureCoverage >= ligatureCount) {
@@ -95,6 +96,7 @@
     le_int32 markPosition = glyphIterator->getCurrStreamPosition();
     Offset ligatureAttachOffset = SWAPW(ligatureArray->ligatureAttachTableOffsetArray[ligatureCoverage]);
     LEReferenceTo<LigatureAttachTable> ligatureAttachTable(ligatureArray, success, ligatureAttachOffset);
+    if (LE_FAILURE(success)) { return 0; }
     le_int32 componentCount = SWAPW(ligatureAttachTable->componentCount);
     le_int32 component = ligatureIterator.getMarkComponent(markPosition);
 
@@ -104,10 +106,12 @@
     }
 
     LEReferenceTo<ComponentRecord> componentRecord(base, success, &ligatureAttachTable->componentRecordArray[component * mcCount]);
-    LEReferenceToArrayOf<Offset> ligatureAnchorTableOffsetArray(base, success, &(componentRecord->ligatureAnchorTableOffsetArray[0]), markClass+1);
+    if (LE_FAILURE(success)) { return 0; }
+    LEReferenceToArrayOf<Offset> ligatureAnchorTableOffsetArray(base, success, &(componentRecord->ligatureAnchorTableOffsetArray[0]), mcCount);
     if( LE_FAILURE(success) ) { return 0; }
     Offset anchorTableOffset = SWAPW(componentRecord->ligatureAnchorTableOffsetArray[markClass]);
     LEReferenceTo<AnchorTable> anchorTable(ligatureAttachTable, success, anchorTableOffset);
+    if (LE_FAILURE(success)) { return 0; }
     LEPoint ligatureAnchor, markAdvance, pixels;
 
     anchorTable->getAnchor(anchorTable, ligatureGlyph, fontInstance, ligatureAnchor, success);
--- a/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Tue Jan 26 09:11:59 2016 +0100
@@ -180,6 +180,7 @@
       int               *ip;
       unsigned char     *bp;
   } outbuf;
+  size_t outbufSize;
   jobject hOutputBuffer;
 };
 
@@ -233,6 +234,7 @@
     }
     if (src->hOutputBuffer) {
         assert(src->outbuf.ip == 0);
+        src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer);
         src->outbuf.ip = (int *)(*env)->GetPrimitiveArrayCritical
             (env, src->hOutputBuffer, 0);
         if (src->outbuf.ip == 0) {
@@ -677,8 +679,8 @@
                                               cinfo.output_scanline - 1);
           } else {
               if (hasalpha) {
-                  ip = jsrc.outbuf.ip + cinfo.image_width;
-                  bp = jsrc.outbuf.bp + cinfo.image_width * 4;
+                  ip = jsrc.outbuf.ip + jsrc.outbufSize;
+                  bp = jsrc.outbuf.bp + jsrc.outbufSize * 4;
                   while (ip > jsrc.outbuf.ip) {
                       pixel = (*--bp) << 24;
                       pixel |= (*--bp);
@@ -687,8 +689,8 @@
                       *--ip = pixel;
                   }
               } else {
-                  ip = jsrc.outbuf.ip + cinfo.image_width;
-                  bp = jsrc.outbuf.bp + cinfo.image_width * 3;
+                  ip = jsrc.outbuf.ip + jsrc.outbufSize;
+                  bp = jsrc.outbuf.bp + jsrc.outbufSize * 3;
                   while (ip > jsrc.outbuf.ip) {
                       pixel = (*--bp);
                       pixel |= (*--bp) << 8;
--- a/src/java.desktop/share/native/liblcms/cmscgats.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/liblcms/cmscgats.c	Tue Jan 26 09:11:59 2016 +0100
@@ -2545,9 +2545,11 @@
     for (i=0; i < t->nSamples; i++) {
 
         fld = GetDataFormat(it8, i);
+        if (fld != NULL) {
         if (cmsstrcasecmp(fld, cSample) == 0)
             return i;
     }
+    }
 
     return -1;
 
--- a/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES	Tue Jan 26 09:11:59 2016 +0100
@@ -23,13 +23,17 @@
  * questions.
  */
 
+#if 0
 CHANGES - changes for libpng
 
-Version 0.2
+version 0.1 [March 29, 1995]
+  initial work-in-progress release
+
+version 0.2 [April 1, 1995]
   added reader into png.h
   fixed small problems in stub file
 
-Version 0.3
+version 0.3 [April 8, 1995]
   added pull reader
   split up pngwrite.c to several files
   added pnglib.txt
@@ -38,9 +42,9 @@
   fixed some bugs in writer
   interfaced with zlib 0.5
   added K&R support
-  added check for 64 KB blocks for 16-bit machines
-
-Version 0.4
+  added check for 64 KB blocks for 16 bit machines
+
+version 0.4 [April 26, 1995]
   cleaned up code and commented code
   simplified time handling into png_time
   created png_color_16 and png_color_8 to handle color needs
@@ -51,28 +55,29 @@
   cleaned up zTXt reader and writer (using zlib's Reset functions)
   split transformations into pngrtran.c and pngwtran.c
 
-Version 0.5
+version 0.5 [April 30, 1995]
   interfaced with zlib 0.8
   fixed many reading and writing bugs
   saved using 3 spaces instead of tabs
 
-Version 0.6
+version 0.6 [May 1, 1995]
+  first beta release
   added png_large_malloc() and png_large_free()
   added png_size_t
   cleaned up some compiler warnings
   added png_start_read_image()
 
-Version 0.7
+version 0.7 [June 24, 1995]
   cleaned up lots of bugs
   finished dithering and other stuff
   added test program
   changed name from pnglib to libpng
 
-Version 0.71 [June, 1995]
+version 0.71 [June 26, 1995]
   changed pngtest.png for zlib 0.93
   fixed error in libpng.txt and example.c
 
-Version 0.8
+version 0.8 [August 20, 1995]
   cleaned up some bugs
   added png_set_filler()
   split up pngstub.c into pngmem.c, pngio.c, and pngerror.c
@@ -115,7 +120,7 @@
   cleaned up documentation
   added callbacks for read/write and warning/error functions
 
-Version 0.89 [July, 1996]
+Version 0.89 [June 5, 1996]
   Added new initialization API to make libpng work better with shared libs
     we now have png_create_read_struct(), png_create_write_struct(),
     png_create_info_struct(), png_destroy_read_struct(), and
@@ -142,6 +147,9 @@
   New pngtest image also has interlacing and zTXt
   Updated documentation to reflect new API
 
+Version 0.89c [June 17, 1996]
+  Bug fixes.
+
 Version 0.90 [January, 1997]
   Made CRC errors/warnings on critical and ancillary chunks configurable
   libpng will use the zlib CRC routines by (compile-time) default
@@ -182,7 +190,7 @@
   Added new pCAL chunk read/write support
   Added experimental filter selection weighting (Greg Roelofs)
   Removed old png_set_rgbx() and png_set_xrgb() functions that have been
-     obsolete for about 2 years now (use png_set_filler() instead)
+    obsolete for about 2 years now (use png_set_filler() instead)
   Added macros to read 16- and 32-bit ints directly from buffer, to be
     used only on those systems that support it (namely PowerPC and 680x0)
     With some testing, this may become the default for MACOS/PPC systems.
@@ -464,7 +472,7 @@
 
 Version 1.0.3a [August 12, 1999]
   Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning
-     if an attempt is made to read an interlaced image when it's not supported.
+    if an attempt is made to read an interlaced image when it's not supported.
   Added check if png_ptr->trans is defined before freeing it in pngread.c
   Modified the Y2K statement to include versions back to version 0.71
   Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c
@@ -472,7 +480,7 @@
   Replaced leading blanks with tab characters in makefile.hux
   Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents.
   Changed (float)red and (float)green to (double)red, (double)green
-     in png_set_rgb_to_gray() to avoid "promotion" problems in AIX.
+    in png_set_rgb_to_gray() to avoid "promotion" problems in AIX.
   Fixed a bug in pngconf.h that omitted <stdio.h> when PNG_DEBUG==0 (K Bracey).
   Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt).
   Updated documentation to refer to the PNG-1.2 specification.
@@ -515,7 +523,7 @@
   Added new png_expand functions to scripts/pngdef.pas and pngos2.def
   Added a demo read_user_transform_fn that examines the row filters in pngtest.c
 
-Version 1.0.4 [September 24, 1999]
+Version 1.0.4 [September 24, 1999, not distributed publicly]
   Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
   Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
   Made several minor corrections to pngtest.c
@@ -542,6 +550,7 @@
   Added a "png_check_version" function in png.c and pngtest.c that will generate
     a helpful compiler error if an old png.h is found in the search path.
   Changed type of png_user_transform_depth|channels from int to png_byte.
+  Added "Libpng is OSI Certified Open Source Software" statement to png.h
 
 Version 1.0.4d [October 6, 1999]
   Changed 0.45 to 0.45455 in png_set_sRGB()
@@ -928,7 +937,7 @@
 Version 1.0.8beta1 [July 8, 2000]
   Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
   Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
-     pngwutil.c.
+    pngwutil.c.
   Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
   Removed unused "#include <assert.h>" from png.c
   Added WindowsCE support.
@@ -936,12 +945,12 @@
 
 Version 1.0.8beta2 [July 10, 2000]
   Added project files to the wince directory and made further revisions
-     of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE.
+    of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE.
 
 Version 1.0.8beta3 [July 11, 2000]
   Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
-     for indexed-color input files to avoid potential double-freeing trans array
-     under some unusual conditions; problem was introduced in version 1.0.6f.
+    for indexed-color input files to avoid potential double-freeing trans array
+    under some unusual conditions; problem was introduced in version 1.0.6f.
   Further revisions to pngtest.c and files in the wince subdirectory.
 
 Version 1.0.8beta4 [July 14, 2000]
@@ -1113,16 +1122,16 @@
 
 Version 1.2.0beta4 [June 23, 2001]
   Check for missing profile length field in iCCP chunk and free chunk_data
-     in case of truncated iCCP chunk.
+    in case of truncated iCCP chunk.
   Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
   Bumped dll-number from 2 to 3 in makefile.cygwin
   Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
-     if user attempts to run it on an 8-bit display.
+    if user attempts to run it on an 8-bit display.
   Updated contrib/gregbook
   Use png_malloc instead of png_zalloc to allocate palette in pngset.c
   Updated makefile.ibmc
   Added some typecasts to eliminate gcc 3.0 warnings.  Changed prototypes
-     of png_write_oFFS width and height from png_uint_32 to png_int_32.
+    of png_write_oFFS width and height from png_uint_32 to png_int_32.
   Updated example.c
   Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
 
@@ -1130,9 +1139,9 @@
   Revised contrib/gregbook
   Revised makefile.gcmmx
   Revised pnggccrd.c to conditionally compile some thread-unsafe code only
-     when PNG_THREAD_UNSAFE_OK is defined.
+    when PNG_THREAD_UNSAFE_OK is defined.
   Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
-     value exceeding 2^bit_depth-1
+    value exceeding 2^bit_depth-1
   Revised makefile.sgi and makefile.sggcc
   Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
   Removed restriction that do_invert_mono only operate on 1-bit opaque files
@@ -1473,8 +1482,9 @@
   Use png_malloc instead of png_zalloc to allocate the pallete.
 
 Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
-  Fixed buffer overflow vulnerability in png_handle_tRNS()
-  Fixed integer arithmetic overflow vulnerability in png_read_png().
+  Fixed buffer overflow vulnerability (CVE-2004-0597) in png_handle_tRNS().
+  Fixed NULL dereference vulnerability (CVE-2004-0598) in png_handle_iCCP().
+  Fixed integer overflow vulnerability (CVE-2004-0599) in png_read_png().
   Fixed some harmless bugs in png_handle_sBIT, etc, that would cause
     duplicate chunk types to go undetected.
   Fixed some timestamps in the -config version
@@ -1517,7 +1527,7 @@
 
 Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004]
   Moved  "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
-     section of png.h where they were inadvertently placed in version rc3.
+    section of png.h where they were inadvertently placed in version rc3.
 
 Version 1.2.6 and 1.0.16 [August 15, 2004]
   Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
@@ -2126,7 +2136,7 @@
     png_decompress_chunk(), and remove "chunkdata" from parameter list.
   Put a call to png_check_chunk_name() in png_read_chunk_header().
   Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte.
-  Removed two calls to png_check_chunk_name() occuring later in the process.
+  Removed two calls to png_check_chunk_name() occurring later in the process.
   Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
 
 Version 1.4.0beta25 [July 30, 2008]
@@ -2349,7 +2359,7 @@
 Version 1.4.0beta64 [June 24, 2009]
   Eliminated PNG_LEGACY_SUPPORTED code.
   Moved the various unknown chunk macro definitions outside of the
-     PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
+    PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
 
 Version 1.4.0beta65 [June 26, 2009]
   Added a reference to the libpng license in each file.
@@ -3771,8 +3781,9 @@
 
 Version 1.5.7beta05 [November 25, 2011]
   Removed "zTXt" from warning in generic chunk decompression function.
-  Validate time settings passed to pngset() and png_convert_to_rfc1123()
-    (Frank Busse).
+  Validate time settings passed to png_set_tIME() and png_convert_to_rfc1123()
+    (Frank Busse). Note: This prevented CVE-2015-7981 from affecting
+    libpng-1.5.7 and later.
   Added MINGW support to CMakeLists.txt
   Reject invalid compression flag or method when reading the iTXt chunk.
   Backed out 'simplified' API changes. The API seems too complex and there
@@ -3818,12 +3829,13 @@
     (the other two required headers aren't used).  Non-ANSI systems that don't
     have stddef.h or limits.h will have to provide an appropriate fake
     containing the relevant types and #defines.
-  The use of FAR/far has been eliminated and the definition of png_alloc_size_t
-    is now controlled by a flag so that 'small size_t' systems can select it
-    if necessary.  Libpng 1.6 may not currently work on such systems -- it
-    seems likely that it will ask 'malloc' for more than 65535 bytes with any
-    image that has a sufficiently large row size (rather than simply failing
-    to read such images).
+  Dropped support for 16-bit platforms. The use of FAR/far has been eliminated
+    and the definition of png_alloc_size_t is now controlled by a flag so
+    that 'small size_t' systems can select it if necessary.  Libpng 1.6 may
+    not currently work on such systems -- it seems likely that it will
+    ask 'malloc' for more than 65535 bytes with any image that has a
+    sufficiently large row size (rather than simply failing to read such
+    images).
   New tools directory containing tools used to generate libpng code.
   Fixed race conditions in parallel make builds. With higher degrees of
     parallelism during 'make' the use of the same temporary file names such
@@ -4435,7 +4447,7 @@
 
 Version 1.6.1beta03 [February 22, 2013]
   Fixed ALIGNED_MEMORY support.
-  Allow run-time ARM NEON checking to be disabled. A new configure option:
+  Added a new configure option:
     --enable-arm-neon=always will stop the run-time checks. New checks
     within arm/arm_init.c will cause the code not to be compiled unless
     __ARM_NEON__ is set. This should make it fail safe (if someone asks
@@ -4454,10 +4466,10 @@
 Version 1.6.1beta06 [March 4, 2013]
   Better documentation of unknown handling API interactions.
   Corrected Android builds and corrected libpng.vers with symbol
-    prefixing. This adds an API to set optimization options externally,
+    prefixing.  It also makes those tests compile and link on Android.
+  Added an API png_set_option() to set optimization options externally,
     providing an alternative and general solution for the non-portable
-    run-time tests used by the ARM Neon code.  It also makes those tests
-    compile and link on Android.
+    run-time tests used by the ARM Neon code, using the PNG_ARM_NEON option.
   The order of settings vs options in pnglibconf.h is reversed to allow
     settings to depend on options and options can now set (or override) the
     defaults for settings.
@@ -4549,13 +4561,14 @@
   Expanded manual paragraph about writing private chunks, particularly
     the need to call png_set_keep_unknown_chunks() when writing them.
   Avoid dereferencing NULL pointer possibly returned from
-     png_create_write_struct() (Andrew Church).
+    png_create_write_struct() (Andrew Church).
 
 Version 1.6.3beta05 [May 9, 2013]
   Calculate our own zlib windowBits when decoding rather than trusting the
     CMF bytes in the PNG datastream.
   Added an option to force maximum window size for inflating, which was
-    the behavior of libpng15 and earlier.
+    the behavior of libpng15 and earlier, via a new PNG_MAXIMUM_INFLATE_WINDOW
+    option for png_set_options().
   Added png-fix-itxt and png-fix-too-far-back to the built programs and
     removed warnings from the source code and timepng that are revealed as
     a result.
@@ -5138,17 +5151,326 @@
 
 Version 1.6.16rc01 [December 21, 2014]
   Restored a test on width that was removed from png.c at libpng-1.6.9
-    (Bug report by Alex Eubanks).
+    (Bug report by Alex Eubanks, CVE-2015-0973).
 
 Version 1.6.16rc02 [December 21, 2014]
   Undid the update to pngrutil.c in 1.6.16rc01.
 
 Version 1.6.16rc03 [December 21, 2014]
-  Fixed an overflow in png_combine_row with very wide interlaced images.
+  Fixed an overflow in png_combine_row() with very wide interlaced images
+    (Bug report and fix by John Bowler, CVE-2014-9495).
 
 Version 1.6.16 [December 22, 2014]
   No changes.
 
+Version 1.6.17beta01 [January 29, 2015]
+  Removed duplicate PNG_SAFE_LIMITS_SUPPORTED handling from pngconf.h
+  Corrected the width limit calculation in png_check_IHDR().
+  Removed user limits from pngfix. Also pass NULL pointers to
+    png_read_row to skip the unnecessary row de-interlace stuff.
+  Added testing of png_set_packing() to pngvalid.c
+  Regenerated configure scripts in the *.tar distributions with libtool-2.4.4
+  Implement previously untested cases of libpng transforms in pngvalid.c
+  Fixed byte order in png_do_read_filler() with 16-bit input. Previously
+    the high and low bytes of the filler, from png_set_filler() or from
+    png_set_add_alpha(), were read in the wrong order.
+  Made the check for out-of-range values in png_set_tRNS() detect
+    values that are exactly 2^bit_depth, and work on 16-bit platforms.
+  Merged some parts of libpng-1.6.17beta01 and libpng-1.7.0beta47.
+  Added #ifndef __COVERITY__ where needed in png.c, pngrutil.c and
+    pngset.c to avoid warnings about dead code.
+  Added "& 0xff" to many instances of expressions that are typecast
+    to (png_byte), to avoid Coverity warnings.
+
+Version 1.6.17beta02 [February 7, 2015]
+  Work around one more Coverity-scan dead-code warning.
+  Do not build png_product2() when it is unused.
+
+Version 1.6.17beta03 [February 17, 2015]
+  Display user limits in the output from pngtest.
+  Eliminated the PNG_SAFE_LIMITS macro and restored the 1-million-column
+    and 1-million-row default limits in pnglibconf.dfa, that can be reset
+    by the user at build time or run time.  This provides a more robust
+    defense against DOS and as-yet undiscovered overflows.
+
+Version 1.6.17beta04 [February 21, 2015]
+  Added PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED macro, on by default.
+  Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins).
+  Rebuilt configure scripts with automake-1.15 and libtool-2.4.6
+
+Version 1.6.17beta05 [February 25, 2015]
+  Restored compiling of png_reciprocal2 with PNG_NO_16BIT.
+
+Version 1.6.17beta06 [February 27, 2015]
+  Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block
+    of png.h.
+  Avoid runtime checks when converting integer to png_byte with
+    Visual Studio (Sergey Kosarevsky)
+
+Version 1.6.17rc01 [March 4, 2015]
+  No changes.
+
+Version 1.6.17rc02 [March 9, 2015]
+  Removed some comments that the configure script did not handle
+    properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt.
+  Free the unknown_chunks structure even when it contains no data.
+
+Version 1.6.17rc03 [March 12, 2015]
+  Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF
+    for consistency, and remove some useless tests (Alexey Petruchik).
+
+Version 1.6.17rc04 [March 16, 2015]
+  Remove pnglibconf.h, pnglibconf.c, and pnglibconf.out instead of
+    pnglibconf.* in "make clean" (Cosmin).
+  Fix bug in calculation of maxbits, in png_write_sBIT, introduced
+    in libpng-1.6.17beta01 (John Bowler).
+
+Version 1.6.17rc05 [March 21, 2015]
+  Define PNG_FILTER_* and PNG_FILTER_VALUE_* in png.h even when WRITE
+    is not supported (John Bowler).  This fixes an error introduced in
+    libpng-1.6.17beta06.
+  Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes
+    the Coverity scan without them.
+
+Version 1.6.17rc06 [March 23, 2015]
+  Remove pnglibconf.dfn and pnglibconf.pre with "make clean".
+  Reformatted some "&0xff" instances to "& 0xff".
+  Fixed simplified 8-bit-linear to sRGB alpha. The calculated alpha
+    value was wrong.  It's not clear if this affected the final stored
+    value; in the obvious code path the upper and lower 8-bits of the
+    alpha value were identical and the alpha was truncated to 8-bits
+    rather than dividing by 257 (John Bowler).
+
+Version 1.6.17 [March 26, 2015]
+  No changes.
+
+Version 1.6.18beta01 [April 1, 2015]
+  Removed PNG_SET_CHUNK_[CACHE|MALLOC]_LIMIT_SUPPORTED macros.  They
+    have been combined with PNG_SET_USER_LIMITS_SUPPORTED (resolves
+    bug report by Andrew Church).
+  Fixed rgb_to_gray checks and added tRNS checks to pngvalid.c.  This
+    fixes some arithmetic errors that caused some tests to fail on
+    some 32-bit platforms (Bug reports by Peter Breitenlohner [i686]
+    and Petr Gajdos [i586]).
+
+Version 1.6.18beta02 [April 26, 2015]
+  Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
+    (Bug report by Viktor Szakats).
+
+Version 1.6.18beta03 [May 6, 2015]
+  Replaced "unexpected" with an integer (0xabadca11) in pngset.c
+    where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1.
+  Added contrib/examples/simpleover.c, to demonstrate how to handle
+    alpha compositing of multiple images, using the "simplified API"
+    and an example PNG generation tool, contrib/examples/genpng.c
+    (John Bowler).
+
+Version 1.6.18beta04 [May 20, 2015]
+  PNG_RELEASE_BUILD replaces tests where the code depended on the build base
+    type and can be defined on the command line, allowing testing in beta
+    builds (John Bowler).
+  Avoid Coverity issue 80858 (REVERSE NULL) in pngtest.c PNG_DEBUG builds.
+  Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
+    report from Christopher Ferris).
+
+Version 1.6.18beta05 [May 31, 2015]
+  Backport filter selection code from libpng-1.7.0beta51, to combine
+    sub_row, up_row, avg_row, and paeth_row into try_row and tst_row.
+  Changed png_voidcast(), etc., to voidcast(), etc., in contrib/tools/pngfix.c
+    to avoid confusion with the libpng private macros.
+  Fixed old cut&paste bug in the weighted filter selection code in
+    pngwutil.c, introduced in libpng-0.95, March 1997.
+
+Version 1.6.18beta06 [June 1, 2015]
+  Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
+    compiled library size. It never worked properly and as far as we can
+    tell, no one uses it. The png_set_filter_heuristics() and
+    png_set_filter_heuristics_fixed() APIs are retained but deprecated
+    and do nothing.
+
+Version 1.6.18beta07 [June 6, 2015]
+  Removed non-working progressive reader 'skip' function. This
+    function has apparently never been used. It was implemented
+    to support back-door modification of png_struct in libpng-1.4.x
+    but (because it does nothing and cannot do anything) was apparently
+    never tested (John Bowler).
+  Fixed cexcept.h in which GCC 5 now reports that one of the auto
+    variables in the Try macro needs to be volatile to prevent value
+    being lost over the setjmp (John Bowler).
+  Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler).
+  Fix g++ build breaks (John Bowler).
+  Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c,
+    pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt
+    would only work with iTXt chunks with length 255 or less.
+  Added #ifdef's to contrib/examples programs so people don't try
+    to compile them without the minimum required support enabled
+    (suggested by Flavio Medeiros).
+
+Version 1.6.18beta08 [June 30, 2015]
+  Eliminated the final two Coverity defects (insecure temporary file
+    handling in contrib/libtests/pngstest.c; possible overflow of
+    unsigned char in contrib/tools/png-fix-itxt.c). To use the "secure"
+    file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will
+    be used.
+  Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
+
+Version 1.6.18beta09 [July 5, 2015]
+  Removed some useless typecasts from contrib/tools/png-fix-itxt.c
+  Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
+  Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*.  To
+    preserve API compatibility, the new defines all default to "extern"
+    (requested by Jan Nijtmans).
+
+Version 1.6.18rc01 [July 9, 2015]
+  Belatedly added Mans Rullgard and James Yu to the list of Contributing
+    Authors.
+
+Version 1.6.18rc02 [July 12, 2015]
+  Restored unused FILTER_HEURISTIC macros removed at libpng-1.6.18beta08
+    to png.h to avoid compatibility warnings.
+
+Version 1.6.18rc03 [July 15, 2015]
+  Minor changes to the man page
+
+Version 1.6.18 [July 23, 2015]
+  No changes.
+
+Version 1.6.19beta01 [July 30, 2015]
+  Updated obsolete information about the simplified API macros in the
+    manual pages (Bug report by Arc Riley).
+  Avoid potentially dereferencing NULL info_ptr in png_info_init_3().
+  Rearranged png.h to put the major sections in the same order as
+    in libpng17.
+  Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
+    PNG_WEIGHT_FACTOR macros.
+  Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
+    (Bug report by Viktor Szakats).  Several warnings remain and are
+    unavoidable, where we test for overflow.
+  Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
+  Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
+
+Version 1.6.19beta02 [August 19, 2015]
+  Moved config.h.in~ from the "libpng_autotools_files" list to the
+    "libpng_autotools_extra" list in autogen.sh because it was causing a
+    false positive for missing files (bug report by Robert C. Seacord).
+  Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c
+    to suppress clang warnings (Bug report by Viktor Szakats).
+  Fixed some bad links in the man page.
+  Changed "n bit" to "n-bit" in comments.
+  Added signed/unsigned 16-bit safety net. This removes the dubious
+    0x8000 flag definitions on 16-bit systems. They aren't supported
+    yet the defs *probably* work, however it seems much safer to do this
+    and be advised if anyone, contrary to advice, is building libpng 1.6
+    on a 16-bit system. It also adds back various switch default clauses
+    for GCC; GCC errors out if they are not present (with an appropriately
+    high level of warnings).
+  Safely convert num_bytes to a png_byte in png_set_sig_bytes() (Robert
+    Seacord).
+  Fixed the recently reported 1's complement security issue by replacing
+    the value that is illegal in the PNG spec, in both signed and unsigned
+    values, with 0. Illegal unsigned values (anything greater than or equal
+    to  0x80000000) can still pass through, but since these are not illegal
+    in ANSI-C (unlike 0x80000000 in the signed case) the checking that
+    occurs later can catch them (John Bowler).
+
+Version 1.6.19beta03 [September 26, 2015]
+  Fixed png_save_int_32 when int is not 2's complement (John Bowler).
+  Updated libpng16 with all the recent test changes from libpng17,
+    including changes to pngvalid.c to ensure that the original,
+    distributed, version of contrib/visupng/cexcept.h can be used
+    (John Bowler).
+  pngvalid contains the correction to the use of SAVE/STORE_
+    UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More
+    tests contain the --strict option to detect warnings and the
+    pngvalid-standard test has been corrected so that it does not
+    turn on progressive-read. There is a separate test which does
+    that. (John Bowler)
+  Also made some signed/unsigned fixes.
+  Make pngstest error limits version specific. Splitting the machine
+    generated error structs out to a file allows the values to be updated
+    without changing pngstest.c itself. Since libpng 1.6 and 1.7 have
+    slightly different error limits this simplifies maintenance. The
+    makepngs.sh script has also been updated to more accurately reflect
+    current problems in libpng 1.7 (John Bowler).
+  Incorporated new test PNG files into make check.  tests/pngstest-*
+    are changed so that the new test files are divided into 8 groups by
+    gamma and alpha channel.  These tests have considerably better code
+    and pixel-value coverage than contrib/pngsuite; however,coverage is
+    still incomplete (John Bowler).
+  Removed the '--strict' in 1.6 because of the double-gamma-correction
+    warning, updated pngstest-errors.h for the errors detected with the
+    new contrib/testspngs PNG test files (John Bowler).
+
+Version 1.6.19beta04 [October 15, 2015]
+  Worked around rgb-to-gray issues in libpng 1.6.  The previous
+    attempts to ignore the errors in the code aren't quite enough to
+    deal with the 'channel selection' encoding added to libpng 1.7; abort.
+    pngvalid.c is changed to drop this encoding in prior versions.
+  Fixed 'pow' macros in pngvalid.c. It is legal for 'pow' to be a
+    macro, therefore the argument list cannot contain preprocessing
+    directives.  Make sure pow is a function where this happens. This is
+    a minimal safe fix, the issue only arises in non-performance-critical
+    code (bug report by Curtis Leach, fix by John Bowler).
+  Added sPLT support to pngtest.c
+
+Version 1.6.19rc01 [October 23, 2015]
+  No changes.
+
+Version 1.6.19rc02 [October 31, 2015]
+  Prevent setting or writing over-length PLTE chunk (Cosmin Truta).
+  Silently truncate over-length PLTE chunk while reading.
+  Libpng incorrectly calculated the output rowbytes when the application
+    decreased either the number of channels or the bit depth (or both) in
+    a user transform.  This was safe; libpng overallocated buffer space
+   (potentially by quite a lot; up to 4 times the amount required) but,
+   from 1.5.4 on, resulted in a png_error (John Bowler).
+
+Version 1.6.19rc03 [November 3, 2015]
+  Fixed some inconsequential cut-and-paste typos in png_set_cHRM_XYZ_fixed().
+  Clarified COPYRIGHT information to state explicitly that versions
+    are derived from previous versions.
+  Removed much of the long list of previous versions from png.h and
+    libpng.3.
+
+Version 1.6.19rc04 [November 5, 2015]
+  Fixed new bug with CRC error after reading an over-length palette
+    (bug report by Cosmin Truta) (CVE-2015-8126).
+
+Version 1.6.19 [November 12, 2015]
+  Cleaned up coding style in png_handle_PLTE().
+
+Version 1.6.20beta01 [November 20, 2015]
+  Avoid potential pointer overflow/underflow in png_handle_sPLT() and
+    png_handle_pCAL() (Bug report by John Regehr).
+
+Version 1.6.20beta02 [November 23, 2015]
+  Fixed incorrect implementation of png_set_PLTE() that uses png_ptr
+    not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126
+    vulnerability.
+
+Version 1.6.20beta03 [November 24, 2015]
+  Backported tests from libpng-1.7.0beta69.
+
+Version 1.6.20rc01 [November 26, 2015]
+  Fixed an error in handling of bad zlib CMINFO field in pngfix, found by
+    American Fuzzy Lop, reported by Brian Carpenter.  inflate() doesn't
+    immediately fault a bad CMINFO field; instead a 'too far back' error
+    happens later (at least some times).  pngfix failed to limit CMINFO to
+    the allowed values but then assumed that window_bits was in range,
+    triggering an assert. The bug is mostly harmless; the PNG file cannot
+    be fixed.
+
+Version 1.6.20rc02 [November 29, 2015]
+  In libpng 1.6 zlib initialization was changed to use the window size
+    in the zlib stream, not a fixed value. This causes some invalid images,
+    where CINFO is too large, to display 'correctly' if the rest of the
+    data is valid.  This provides a workaround for zlib versions where the
+    error arises (ones that support the API change to use the window size
+    in the stream).
+
+Version 1.6.20 [December 3, 2015]
+  No changes.
+
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
@@ -5156,3 +5478,4 @@
 or to glennrp at users.sourceforge.net
 
 Glenn R-P
+#endif
--- a/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE	Tue Jan 26 09:11:59 2016 +0100
@@ -10,21 +10,18 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
-Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
-   Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
+libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are
+Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
 
    Simon-Pierre Cadieux
    Eric S. Raymond
+   Mans Rullgard
+   Cosmin Truta
    Gilles Vollant
+   James Yu
 
 and with the following additions to the disclaimer:
 
@@ -36,18 +33,20 @@
    the user.
 
 libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the list
+of Contributing Authors:
 
    Tom Lane
    Glenn Randers-Pehrson
    Willem van Schaik
 
 libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
 
    John Bowler
    Kevin Bracey
@@ -57,7 +56,7 @@
    Tom Tanner
 
 libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
 
 For the purposes of this copyright and license, "Contributing Authors"
 is defined as the following set of individuals:
@@ -80,13 +79,13 @@
 source code, or portions hereof, for any purpose, without fee, subject
 to the following restrictions:
 
-1. The origin of this source code must not be misrepresented.
+  1. The origin of this source code must not be misrepresented.
 
-2. Altered versions must be plainly marked as such and must not
-   be misrepresented as being the original source.
+  2. Altered versions must be plainly marked as such and must not
+     be misrepresented as being the original source.
 
-3. This Copyright notice may not be removed or altered from any
-   source or altered source distribution.
+  3. This Copyright notice may not be removed or altered from any
+     source or altered source distribution.
 
 The Contributing Authors and Group 42, Inc. specifically permit, without
 fee, and encourage the use of this source code as a component to
@@ -94,18 +93,20 @@
 source code in a product, acknowledgment is not required but would be
 appreciated.
 
+END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
 
 A "png_get_copyright" function is available, for convenient use in "about"
 boxes and the like:
 
-   printf("%s",png_get_copyright(NULL));
+   printf("%s", png_get_copyright(NULL));
 
 Also, the PNG logo (in PNG format, of course) is supplied in the
 files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
 
-Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
+Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is
+a certification mark of the Open Source Initiative. OSI has not addressed
+the additional disclaimers inserted at version 1.0.7.
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-December 22, 2014
+December 3, 2015
--- a/src/java.desktop/share/native/libsplashscreen/libpng/README	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/README	Tue Jan 26 09:11:59 2016 +0100
@@ -1,4 +1,4 @@
-README for libpng version 1.6.16 - December 22, 2014 (shared library 16.0)
+README for libpng version 1.6.20 - December 3, 2015 (shared library 16.0)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
@@ -134,7 +134,7 @@
 to others, if necessary.
 
 Please do not send suggestions on how to change PNG.  We have
-been discussing PNG for nineteen years now, and it is official and
+been discussing PNG for twenty years now, and it is official and
 finished.  If you have suggestions for libpng, however, I'll
 gladly listen.  Even if your suggestion is not used immediately,
 it may be used later.
--- a/src/java.desktop/share/native/libsplashscreen/libpng/png.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.c	Tue Jan 26 09:11:59 2016 +0100
@@ -29,8 +29,8 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * Last changed in libpng 1.6.16 [December 22, 2014]
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.19 [November 12, 2015]
+ * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -42,7 +42,7 @@
 #include "pngpriv.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_16 Your_png_h_is_not_version_1_6_16;
+typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20;
 
 /* Tells libpng that we have already handled the first "num_bytes" bytes
  * of the PNG file signature.  If the PNG data is embedded into another
@@ -54,15 +54,20 @@
 void PNGAPI
 png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
 {
+   unsigned int nb = (unsigned int)num_bytes;
+
    png_debug(1, "in png_set_sig_bytes");
 
    if (png_ptr == NULL)
       return;
 
-   if (num_bytes > 8)
+   if (num_bytes < 0)
+      nb = 0;
+
+   if (nb > 8)
       png_error(png_ptr, "Too many bytes for PNG signature");
 
-   png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
+   png_ptr->sig_bytes = (png_byte)nb;
 }
 
 /* Checks whether the supplied bytes match the PNG signature.  We allow
@@ -129,7 +134,7 @@
 void /* PRIVATE */
 png_reset_crc(png_structrp png_ptr)
 {
-   /* The cast is safe because the crc is a 32 bit value. */
+   /* The cast is safe because the crc is a 32-bit value. */
    png_ptr->crc = (png_uint_32)crc32(0, Z_NULL, 0);
 }
 
@@ -157,7 +162,7 @@
    }
 
    /* 'uLong' is defined in zlib.h as unsigned long; this means that on some
-    * systems it is a 64 bit value.  crc32, however, returns 32 bits so the
+    * systems it is a 64-bit value.  crc32, however, returns 32 bits so the
     * following cast is safe.  'uInt' may be no more than 16 bits, so it is
     * necessary to perform a loop here.
     */
@@ -168,8 +173,10 @@
       do
       {
          uInt safe_length = (uInt)length;
+#ifndef __COVERITY__
          if (safe_length == 0)
             safe_length = (uInt)-1; /* evil, but safe */
+#endif
 
          crc = crc32(crc, ptr, safe_length);
 
@@ -269,15 +276,15 @@
       create_struct.user_height_max = PNG_USER_HEIGHT_MAX;
 
 #     ifdef PNG_USER_CHUNK_CACHE_MAX
-         /* Added at libpng-1.2.43 and 1.4.0 */
-         create_struct.user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
+      /* Added at libpng-1.2.43 and 1.4.0 */
+      create_struct.user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
 #     endif
 
 #     ifdef PNG_USER_CHUNK_MALLOC_MAX
-         /* Added at libpng-1.2.43 and 1.4.1, required only for read but exists
-          * in png_struct regardless.
-          */
-         create_struct.user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
+      /* Added at libpng-1.2.43 and 1.4.1, required only for read but exists
+       * in png_struct regardless.
+       */
+      create_struct.user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
 #     endif
 #  endif
 
@@ -301,7 +308,9 @@
 
 #  ifdef PNG_SETJMP_SUPPORTED
       if (!setjmp(create_jmp_buf))
+#  endif
       {
+#  ifdef PNG_SETJMP_SUPPORTED
          /* Temporarily fake out the longjmp information until we have
           * successfully completed this function.  This only works if we have
           * setjmp() support compiled in, but it is safe - this stuff should
@@ -310,8 +319,6 @@
          create_struct.jmp_buf_ptr = &create_jmp_buf;
          create_struct.jmp_buf_size = 0; /*stack allocation*/
          create_struct.longjmp_fn = longjmp;
-#  else
-      {
 #  endif
          /* Call the general version checker (shared with read and write code):
           */
@@ -330,10 +337,10 @@
                create_struct.zstream.opaque = png_ptr;
 
 #              ifdef PNG_SETJMP_SUPPORTED
-                  /* Eliminate the local error handling: */
-                  create_struct.jmp_buf_ptr = NULL;
-                  create_struct.jmp_buf_size = 0;
-                  create_struct.longjmp_fn = 0;
+               /* Eliminate the local error handling: */
+               create_struct.jmp_buf_ptr = NULL;
+               create_struct.jmp_buf_size = 0;
+               create_struct.longjmp_fn = 0;
 #              endif
 
                *png_ptr = create_struct;
@@ -439,6 +446,8 @@
       free(info_ptr);
       info_ptr = png_voidcast(png_inforp, png_malloc_base(NULL,
          (sizeof *info_ptr)));
+      if (info_ptr == NULL)
+         return;
       *ptr_ptr = info_ptr;
    }
 
@@ -504,9 +513,10 @@
    /* Free any tRNS entry */
    if (((mask & PNG_FREE_TRNS) & info_ptr->free_me) != 0)
    {
+      info_ptr->valid &= ~PNG_INFO_tRNS;
       png_free(png_ptr, info_ptr->trans_alpha);
       info_ptr->trans_alpha = NULL;
-      info_ptr->valid &= ~PNG_INFO_tRNS;
+      info_ptr->num_trans = 0;
    }
 #endif
 
@@ -572,20 +582,17 @@
 
       else
       {
-         if (info_ptr->splt_palettes_num != 0)
+         int i;
+
+         for (i = 0; i < info_ptr->splt_palettes_num; i++)
          {
-            int i;
-
-            for (i = 0; i < info_ptr->splt_palettes_num; i++)
-            {
-               png_free(png_ptr, info_ptr->splt_palettes[i].name);
-               png_free(png_ptr, info_ptr->splt_palettes[i].entries);
-            }
-
-            png_free(png_ptr, info_ptr->splt_palettes);
-            info_ptr->splt_palettes = NULL;
-            info_ptr->splt_palettes_num = 0;
+            png_free(png_ptr, info_ptr->splt_palettes[i].name);
+            png_free(png_ptr, info_ptr->splt_palettes[i].entries);
          }
+
+         png_free(png_ptr, info_ptr->splt_palettes);
+         info_ptr->splt_palettes = NULL;
+         info_ptr->splt_palettes_num = 0;
          info_ptr->valid &= ~PNG_INFO_sPLT;
       }
    }
@@ -605,15 +612,12 @@
       {
          int i;
 
-         if (info_ptr->unknown_chunks_num != 0)
-         {
-            for (i = 0; i < info_ptr->unknown_chunks_num; i++)
-               png_free(png_ptr, info_ptr->unknown_chunks[i].data);
-
-            png_free(png_ptr, info_ptr->unknown_chunks);
-            info_ptr->unknown_chunks = NULL;
-            info_ptr->unknown_chunks_num = 0;
-         }
+         for (i = 0; i < info_ptr->unknown_chunks_num; i++)
+            png_free(png_ptr, info_ptr->unknown_chunks[i].data);
+
+         png_free(png_ptr, info_ptr->unknown_chunks);
+         info_ptr->unknown_chunks = NULL;
+         info_ptr->unknown_chunks_num = 0;
       }
    }
 #endif
@@ -694,22 +698,23 @@
 }
 #  endif
 
-#ifdef PNG_SAVE_INT_32_SUPPORTED
-/* The png_save_int_32 function assumes integers are stored in two's
- * complement format.  If this isn't the case, then this routine needs to
- * be modified to write data in two's complement format.  Note that,
- * the following works correctly even if png_int_32 has more than 32 bits
- * (compare the more complex code required on read for sign extension.)
+#  ifdef PNG_SAVE_INT_32_SUPPORTED
+/* PNG signed integers are saved in 32-bit 2's complement format.  ANSI C-90
+ * defines a cast of a signed integer to an unsigned integer either to preserve
+ * the value, if it is positive, or to calculate:
+ *
+ *     (UNSIGNED_MAX+1) + integer
+ *
+ * Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the
+ * negative integral value is added the result will be an unsigned value
+ * correspnding to the 2's complement representation.
  */
 void PNGAPI
 png_save_int_32(png_bytep buf, png_int_32 i)
 {
-   buf[0] = (png_byte)((i >> 24) & 0xff);
-   buf[1] = (png_byte)((i >> 16) & 0xff);
-   buf[2] = (png_byte)((i >> 8) & 0xff);
-   buf[3] = (png_byte)(i & 0xff);
+   png_save_uint_32(buf, i);
 }
-#endif
+#  endif
 
 #  ifdef PNG_TIME_RFC1123_SUPPORTED
 /* Convert the supplied time into an RFC 1123 string suitable for use in
@@ -753,6 +758,7 @@
       APPEND(':');
       APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second);
       APPEND_STRING(" +0000"); /* This reliably terminates the buffer */
+      PNG_UNUSED (pos)
 
 #     undef APPEND
 #     undef APPEND_NUMBER
@@ -762,7 +768,7 @@
    return 1;
 }
 
-#     if PNG_LIBPNG_VER < 10700
+#    if PNG_LIBPNG_VER < 10700
 /* To do: remove the following from libpng-1.7 */
 /* Original API that uses a private buffer in png_struct.
  * Deprecated because it causes png_struct to carry a spurious temporary
@@ -783,7 +789,7 @@
 
    return NULL;
 }
-#     endif
+#    endif /* LIBPNG_VER < 10700 */
 #  endif /* TIME_RFC1123 */
 
 #endif /* READ || WRITE */
@@ -797,14 +803,14 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-     "libpng version 1.6.16 - December 22, 2014" PNG_STRING_NEWLINE \
-     "Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
-     "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
-     "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
-     PNG_STRING_NEWLINE;
+      "libpng version 1.6.20 - December 3, 2015" PNG_STRING_NEWLINE \
+      "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
+      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
+      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
+      PNG_STRING_NEWLINE;
 #  else
-      return "libpng version 1.6.16 - December 22, 2014\
-      Copyright (c) 1998-2014 Glenn Randers-Pehrson\
+   return "libpng version 1.6.20 - December 3, 2015\
+      Copyright (c) 1998-2015 Glenn Randers-Pehrson\
       Copyright (c) 1996-1997 Andreas Dilger\
       Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
 #  endif
@@ -842,9 +848,9 @@
 #ifdef __STDC__
    return PNG_HEADER_VERSION_STRING
 #  ifndef PNG_READ_SUPPORTED
-   "     (NO READ SUPPORT)"
+      " (NO READ SUPPORT)"
 #  endif
-   PNG_STRING_NEWLINE;
+      PNG_STRING_NEWLINE;
 #else
    return PNG_HEADER_VERSION_STRING;
 #endif
@@ -900,9 +906,9 @@
 
    for (i = 0, v = 0; i < num_palette; i++, v += color_inc)
    {
-      palette[i].red = (png_byte)v;
-      palette[i].green = (png_byte)v;
-      palette[i].blue = (png_byte)v;
+      palette[i].red = (png_byte)(v & 0xff);
+      palette[i].green = (png_byte)(v & 0xff);
+      palette[i].blue = (png_byte)(v & 0xff);
    }
 }
 #endif
@@ -975,8 +981,6 @@
    return((png_uint_32)PNG_LIBPNG_VER);
 }
 
-
-
 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
 /* Ensure that png_ptr->zstream.msg holds some appropriate error message string.
  * If it doesn't 'ret' is used to set it to something appropriate, even in cases
@@ -1119,10 +1123,10 @@
       errmsg = "gamma value out of range";
 
 #  ifdef PNG_READ_gAMA_SUPPORTED
-      /* Allow the application to set the gamma value more than once */
-      else if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 &&
-         (colorspace->flags & PNG_COLORSPACE_FROM_gAMA) != 0)
-         errmsg = "duplicate";
+   /* Allow the application to set the gamma value more than once */
+   else if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 &&
+      (colorspace->flags & PNG_COLORSPACE_FROM_gAMA) != 0)
+      errmsg = "duplicate";
 #  endif
 
    /* Do nothing if the colorspace is already invalid */
@@ -1163,31 +1167,31 @@
          PNG_INFO_iCCP);
 
 #     ifdef PNG_COLORSPACE_SUPPORTED
-         /* Clean up the iCCP profile now if it won't be used. */
-         png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, -1/*not used*/);
+      /* Clean up the iCCP profile now if it won't be used. */
+      png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, -1/*not used*/);
 #     else
-         PNG_UNUSED(png_ptr)
+      PNG_UNUSED(png_ptr)
 #     endif
    }
 
    else
    {
 #     ifdef PNG_COLORSPACE_SUPPORTED
-         /* Leave the INFO_iCCP flag set if the pngset.c code has already set
-          * it; this allows a PNG to contain a profile which matches sRGB and
-          * yet still have that profile retrievable by the application.
-          */
-         if ((info_ptr->colorspace.flags & PNG_COLORSPACE_MATCHES_sRGB) != 0)
-            info_ptr->valid |= PNG_INFO_sRGB;
-
-         else
-            info_ptr->valid &= ~PNG_INFO_sRGB;
-
-         if ((info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
-            info_ptr->valid |= PNG_INFO_cHRM;
-
-         else
-            info_ptr->valid &= ~PNG_INFO_cHRM;
+      /* Leave the INFO_iCCP flag set if the pngset.c code has already set
+       * it; this allows a PNG to contain a profile which matches sRGB and
+       * yet still have that profile retrievable by the application.
+       */
+      if ((info_ptr->colorspace.flags & PNG_COLORSPACE_MATCHES_sRGB) != 0)
+         info_ptr->valid |= PNG_INFO_sRGB;
+
+      else
+         info_ptr->valid &= ~PNG_INFO_sRGB;
+
+      if ((info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
+         info_ptr->valid |= PNG_INFO_cHRM;
+
+      else
+         info_ptr->valid &= ~PNG_INFO_cHRM;
 #     endif
 
       if ((info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0)
@@ -1209,7 +1213,7 @@
    png_colorspace_sync_info(png_ptr, info_ptr);
 }
 #endif
-#endif
+#endif /* GAMMA */
 
 #ifdef PNG_COLORSPACE_SUPPORTED
 /* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for
@@ -1268,16 +1272,17 @@
 
    /* Check xy and, implicitly, z.  Note that wide gamut color spaces typically
     * have end points with 0 tristimulus values (these are impossible end
-    * points, but they are used to cover the possible colors.)
+    * points, but they are used to cover the possible colors).  We check
+    * xy->whitey against 5, not 0, to avoid a possible integer overflow.
     */
-   if (xy->redx < 0 || xy->redx > PNG_FP_1) return 1;
-   if (xy->redy < 0 || xy->redy > PNG_FP_1-xy->redx) return 1;
+   if (xy->redx   < 0 || xy->redx > PNG_FP_1) return 1;
+   if (xy->redy   < 0 || xy->redy > PNG_FP_1-xy->redx) return 1;
    if (xy->greenx < 0 || xy->greenx > PNG_FP_1) return 1;
    if (xy->greeny < 0 || xy->greeny > PNG_FP_1-xy->greenx) return 1;
-   if (xy->bluex < 0 || xy->bluex > PNG_FP_1) return 1;
-   if (xy->bluey < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1;
+   if (xy->bluex  < 0 || xy->bluex > PNG_FP_1) return 1;
+   if (xy->bluey  < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1;
    if (xy->whitex < 0 || xy->whitex > PNG_FP_1) return 1;
-   if (xy->whitey < 0 || xy->whitey > PNG_FP_1-xy->whitex) return 1;
+   if (xy->whitey < 5 || xy->whitey > PNG_FP_1-xy->whitex) return 1;
 
    /* The reverse calculation is more difficult because the original tristimulus
     * value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8
@@ -1735,7 +1740,6 @@
           */
          colorspace->flags |= PNG_COLORSPACE_INVALID;
          png_error(png_ptr, "internal error checking chromaticities");
-         break;
    }
 
    return 0; /* failed */
@@ -1763,7 +1767,6 @@
       default:
          colorspace->flags |= PNG_COLORSPACE_INVALID;
          png_error(png_ptr, "internal error checking chromaticities");
-         break;
    }
 
    return 0; /* failed */
@@ -2089,8 +2092,8 @@
    temp = png_get_uint_32(profile+12); /* profile/device class */
    switch (temp)
    {
-      case 0x73636E72: /* 'scnr' */
-      case 0x6D6E7472: /* 'mntr' */
+      case 0x73636e72: /* 'scnr' */
+      case 0x6d6e7472: /* 'mntr' */
       case 0x70727472: /* 'prtr' */
       case 0x73706163: /* 'spac' */
          /* All supported */
@@ -2101,7 +2104,7 @@
          return png_icc_profile_error(png_ptr, colorspace, name, temp,
             "invalid embedded Abstract ICC profile");
 
-      case 0x6C696E6B: /* 'link' */
+      case 0x6c696e6b: /* 'link' */
          /* DeviceLink profiles cannot be interpreted in a non-device specific
           * fashion, if an app uses the AToB0Tag in the profile the results are
           * undefined unless the result is sent to the intended device,
@@ -2111,7 +2114,7 @@
          return png_icc_profile_error(png_ptr, colorspace, name, temp,
             "unexpected DeviceLink ICC profile class");
 
-      case 0x6E6D636C: /* 'nmcl' */
+      case 0x6e6d636c: /* 'nmcl' */
          /* A NamedColor profile is also device specific, however it doesn't
           * contain an AToB0 tag that is open to misinterpretation.  Almost
           * certainly it will fail the tests below.
@@ -2137,8 +2140,8 @@
    temp = png_get_uint_32(profile+20);
    switch (temp)
    {
-      case 0x58595A20: /* 'XYZ ' */
-      case 0x4C616220: /* 'Lab ' */
+      case 0x58595a20: /* 'XYZ ' */
+      case 0x4c616220: /* 'Lab ' */
          break;
 
       default:
@@ -2194,7 +2197,8 @@
    return 1; /* success, maybe with warnings */
 }
 
-#if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0
+#ifdef PNG_sRGB_SUPPORTED
+#if PNG_sRGB_PROFILE_CHECKS >= 0
 /* Information about the known ICC sRGB profiles */
 static const struct
 {
@@ -2307,8 +2311,8 @@
          }
 
          /* Length *and* intent must match */
-         if (length == png_sRGB_checks[i].length &&
-            intent == png_sRGB_checks[i].intent)
+         if (length == (png_uint_32) png_sRGB_checks[i].length &&
+            intent == (png_uint_32) png_sRGB_checks[i].intent)
          {
             /* Now calculate the adler32 if not done already. */
             if (adler == 0)
@@ -2352,8 +2356,8 @@
                    */
                   else if (png_sRGB_checks[i].have_md5 == 0)
                   {
-                     png_chunk_report(png_ptr, "out-of-date sRGB profile with"
-                        " no signature",
+                     png_chunk_report(png_ptr,
+                        "out-of-date sRGB profile with no signature",
                         PNG_CHUNK_WARNING);
                   }
 
@@ -2366,8 +2370,8 @@
           * way.  This probably indicates a data error or uninformed hacking.
           * Fall through to "no match".
           */
-         png_chunk_report(png_ptr, "Not recognizing known sRGB profile that"
-             " has been edited",
+         png_chunk_report(png_ptr,
+             "Not recognizing known sRGB profile that has been edited",
              PNG_CHUNK_WARNING);
          break;
 # endif
@@ -2377,9 +2381,8 @@
 
    return 0; /* no match */
 }
-#endif
-
-#ifdef PNG_sRGB_SUPPORTED
+#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */
+
 void /* PRIVATE */
 png_icc_set_sRGB(png_const_structrp png_ptr,
    png_colorspacerp colorspace, png_const_bytep profile, uLong adler)
@@ -2393,7 +2396,7 @@
       (void)png_colorspace_set_sRGB(png_ptr, colorspace,
          (int)/*already checked*/png_get_uint_32(profile+64));
 }
-#endif /* READ_sRGB */
+#endif /* sRGB */
 
 int /* PRIVATE */
 png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
@@ -2485,7 +2488,7 @@
          png_error(png_ptr, "internal error handling cHRM->XYZ");
    }
 }
-#endif
+#endif /* READ_RGB_TO_GRAY */
 
 #endif /* COLORSPACE */
 
@@ -2514,18 +2517,19 @@
       png_warning(png_ptr, "Image width is zero in IHDR");
       error = 1;
    }
-   else if (width > PNG_UINT_31_MAX)
+
+   if (width > PNG_UINT_31_MAX)
    {
       png_warning(png_ptr, "Invalid image width in IHDR");
       error = 1;
    }
 
-   else if (png_gt(width,
-                   (PNG_SIZE_MAX >> 3) /* 8-byte RGBA pixels */
-                   - 48                /* big_row_buf hack */
-                   - 1                 /* filter byte */
-                   - 7*8               /* rounding width to multiple of 8 pix */
-                   - 8))               /* extra max_pixel_depth pad */
+   if (png_gt(((width + 7) & (~7)),
+       ((PNG_SIZE_MAX
+           - 48        /* big_row_buf hack */
+           - 1)        /* filter byte */
+           / 8)        /* 8-byte RGBA pixels */
+           - 1))       /* extra max_pixel_depth pad */
    {
       /* The size of the row must be within the limits of this architecture.
        * Because the read code can perform arbitrary transformations the
@@ -2541,17 +2545,15 @@
       png_warning(png_ptr, "Image width is too large for this architecture");
       error = 1;
    }
-   else
+
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+   if (width > png_ptr->user_width_max)
+#else
+   if (width > PNG_USER_WIDTH_MAX)
+#endif
    {
-#     ifdef PNG_SET_USER_LIMITS_SUPPORTED
-      if (width > png_ptr->user_width_max)
-#     else
-      if (width > PNG_USER_WIDTH_MAX)
-#     endif
-      {
-         png_warning(png_ptr, "Image width exceeds user limit in IHDR");
-         error = 1;
-      }
+      png_warning(png_ptr, "Image width exceeds user limit in IHDR");
+      error = 1;
    }
 
    if (height == 0)
@@ -2559,22 +2561,21 @@
       png_warning(png_ptr, "Image height is zero in IHDR");
       error = 1;
    }
-   else if (height > PNG_UINT_31_MAX)
+
+   if (height > PNG_UINT_31_MAX)
    {
       png_warning(png_ptr, "Invalid image height in IHDR");
       error = 1;
    }
-   else
+
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+   if (height > png_ptr->user_height_max)
+#else
+   if (height > PNG_USER_HEIGHT_MAX)
+#endif
    {
-#     ifdef PNG_SET_USER_LIMITS_SUPPORTED
-      if (height > png_ptr->user_height_max)
-#     else
-      if (height > PNG_USER_HEIGHT_MAX)
-#     endif
-      {
-         png_warning(png_ptr, "Image height exceeds user limit in IHDR");
-         error = 1;
-      }
+      png_warning(png_ptr, "Image height exceeds user limit in IHDR");
+      error = 1;
    }
 
    /* Check other values */
@@ -2613,7 +2614,7 @@
       error = 1;
    }
 
-#  ifdef PNG_MNG_FEATURES_SUPPORTED
+#ifdef PNG_MNG_FEATURES_SUPPORTED
    /* Accept filter_method 64 (intrapixel differencing) only if
     * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
     * 2. Libpng did not read a PNG signature (this filter_method is only
@@ -2646,13 +2647,13 @@
       }
    }
 
-#  else
+#else
    if (filter_type != PNG_FILTER_TYPE_BASE)
    {
       png_warning(png_ptr, "Unknown filter method in IHDR");
       error = 1;
    }
-#  endif
+#endif
 
    if (error == 1)
       png_error(png_ptr, "Invalid IHDR data");
@@ -2878,7 +2879,7 @@
 
       if (fp >= DBL_MIN && fp <= DBL_MAX)
       {
-         int exp_b10;       /* A base 10 exponent */
+         int exp_b10;   /* A base 10 exponent */
          double base;   /* 10^exp_b10 */
 
          /* First extract a base 10 exponent of the number,
@@ -2926,7 +2927,7 @@
           */
 
          {
-            int czero, clead, cdigits;
+            unsigned int czero, clead, cdigits;
             char exponent[10];
 
             /* Allow up to two leading zeros - this will not lengthen
@@ -2956,7 +2957,7 @@
                 * of the loop don't break the number into parts so
                 * that the final digit is rounded.
                 */
-               if (cdigits+czero-clead+1 < (int)precision)
+               if (cdigits+czero+1 < precision+clead)
                   fp = modf(fp, &d);
 
                else
@@ -3062,14 +3063,14 @@
                   *ascii++ = (char)(48 + (int)d), ++cdigits;
                }
             }
-            while (cdigits+czero-clead < (int)precision && fp > DBL_MIN);
+            while (cdigits+czero < precision+clead && fp > DBL_MIN);
 
             /* The total output count (max) is now 4+precision */
 
             /* Check for an exponent, if we don't need one we are
              * done and just need to terminate the string.  At
              * this point exp_b10==(-1) is effectively if flag - it got
-             * to '-1' because of the decrement after outputing
+             * to '-1' because of the decrement after outputting
              * the decimal point above (the exponent required is
              * *not* -1!)
              */
@@ -3077,7 +3078,7 @@
             {
                /* The following only happens if we didn't output the
                 * leading zeros above for negative exponent, so this
-                * doest add to the digit requirement.  Note that the
+                * doesn't add to the digit requirement.  Note that the
                 * two zeros here can only be output if the two leading
                 * zeros were *not* output, so this doesn't increase
                 * the output count.
@@ -3130,7 +3131,7 @@
             /* Need another size check here for the exponent digits, so
              * this need not be considered above.
              */
-            if ((int)size > cdigits)
+            if (size > cdigits)
             {
                while (cdigits > 0) *ascii++ = exponent[--cdigits];
 
@@ -3178,7 +3179,7 @@
 
       /* Avoid overflow here on the minimum integer. */
       if (fp < 0)
-         *ascii++ = 45, --size, num = -fp;
+         *ascii++ = 45, num = -fp;
       else
          num = fp;
 
@@ -3234,7 +3235,7 @@
    png_error(png_ptr, "ASCII conversion buffer too small");
 }
 #   endif /* FIXED_POINT */
-#endif /* READ_SCAL */
+#endif /* SCAL */
 
 #if defined(PNG_FLOATING_POINT_SUPPORTED) && \
    !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \
@@ -3252,7 +3253,7 @@
       png_fixed_error(png_ptr, text);
 
 #  ifndef PNG_ERROR_TEXT_SUPPORTED
-      PNG_UNUSED(text)
+   PNG_UNUSED(text)
 #  endif
 
    return (png_fixed_point)r;
@@ -3433,29 +3434,29 @@
 #endif
 
 #ifdef PNG_READ_GAMMA_SUPPORTED
-#if defined(PNG_16BIT_SUPPORTED) || !defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
+#ifdef PNG_16BIT_SUPPORTED
 /* A local convenience routine. */
 static png_fixed_point
 png_product2(png_fixed_point a, png_fixed_point b)
 {
    /* The required result is 1/a * 1/b; the following preserves accuracy. */
-#    ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
    double r = a * 1E-5;
    r *= b;
    r = floor(r+.5);
 
    if (r <= 2147483647. && r >= -2147483648.)
       return (png_fixed_point)r;
-#    else
+#else
    png_fixed_point res;
 
    if (png_muldiv(&res, a, b, 100000) != 0)
       return res;
-#    endif
+#endif
 
    return 0; /* overflow */
 }
-#endif /* 16BIT || !FLOATING_ARITHMETIC */
+#endif /* 16BIT */
 
 /* The inverse of the above. */
 png_fixed_point
@@ -3463,12 +3464,15 @@
 {
    /* The required result is 1/a * 1/b; the following preserves accuracy. */
 #ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
-   double r = 1E15/a;
-   r /= b;
-   r = floor(r+.5);
-
-   if (r <= 2147483647. && r >= -2147483648.)
-      return (png_fixed_point)r;
+   if (a != 0 && b != 0)
+   {
+      double r = 1E15/a;
+      r /= b;
+      r = floor(r+.5);
+
+      if (r <= 2147483647. && r >= -2147483648.)
+         return (png_fixed_point)r;
+   }
 #else
    /* This may overflow because the range of png_fixed_point isn't symmetric,
     * but this API is only used for the product of file and screen gamma so it
@@ -3706,7 +3710,7 @@
    if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */
    {
       /* Obtain a 4-bit approximation */
-      png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf];
+      png_uint_32 e = png_32bit_exp[(x >> 12) & 0x0f];
 
       /* Incorporate the low 12 bits - these decrease the returned value by
        * multiplying by a number less than 1 if the bit is set.  The multiplier
@@ -3759,7 +3763,7 @@
     * step.
     */
    x -= x >> 8;
-   return (png_byte)((x + 0x7fffffU) >> 24);
+   return (png_byte)(((x + 0x7fffffU) >> 24) & 0xff);
 }
 
 #ifdef PNG_16BIT_SUPPORTED
@@ -3820,7 +3824,7 @@
 #     endif
    }
 
-   return (png_byte)value;
+   return (png_byte)(value & 0xff);
 }
 
 #ifdef PNG_16BIT_SUPPORTED
@@ -4042,7 +4046,7 @@
 
    else
       for (i=0; i<256; ++i)
-         table[i] = (png_byte)i;
+         table[i] = (png_byte)(i & 0xff);
 }
 
 /* Used from png_read_destroy and below to release the memory used by the gamma
@@ -4182,7 +4186,8 @@
       *
       */
      if (sig_bit > 0 && sig_bit < 16U)
-        shift = (png_byte)(16U - sig_bit); /* shift == insignificant bits */
+        /* shift == insignificant bits */
+        shift = (png_byte)((16U - sig_bit) & 0xff);
 
      else
         shift = 0; /* keep all 16 bits */
@@ -4251,7 +4256,7 @@
       int setting = (2 + (onoff != 0)) << option;
       int current = png_ptr->options;
 
-      png_ptr->options = (png_byte)((current & ~mask) | setting);
+      png_ptr->options = (png_byte)(((current & ~mask) | setting) & 0xff);
 
       return (current & mask) >> option;
    }
@@ -4267,7 +4272,7 @@
  * contrib/tools/makesRGB.c.  The actual sRGB transfer curve defined in the
  * specification (see the article at http://en.wikipedia.org/wiki/SRGB)
  * is used, not the gamma=1/2.2 approximation use elsewhere in libpng.
- * The sRGB to linear table is exact (to the nearest 16 bit linear fraction).
+ * The sRGB to linear table is exact (to the nearest 16-bit linear fraction).
  * The inverse (linear to sRGB) table has accuracies as follows:
  *
  * For all possible (255*65535+1) input values:
--- a/src/java.desktop/share/native/libsplashscreen/libpng/png.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.h	Tue Jan 26 09:11:59 2016 +0100
@@ -29,8 +29,9 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * libpng version 1.6.16, December 22, 2014
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * libpng version 1.6.20, December 3, 2015
+ *
+ * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -38,17 +39,137 @@
  *
  * Authors and maintainers:
  *   libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
- *   libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *   libpng versions 0.97, January 1998, through 1.6.16, December 22, 2014: Glenn
+ *   libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
+ *   libpng versions 0.97, January 1998, through 1.6.20, December 3, 2015:
+ *     Glenn Randers-Pehrson.
  *   See also "Contributing Authors", below.
+ */
+
+/*
+ * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
  *
- * Note about libpng version numbers:
+ * If you modify libpng you may insert additional notices immediately following
+ * this sentence.
  *
- *   Due to various miscommunications, unforeseen code incompatibilities
- *   and occasional factors outside the authors' control, version numbering
- *   on the library has not always been consistent and straightforward.
- *   The following table summarizes matters since version 0.89c, which was
- *   the first widely used release:
+ * This code is released under the libpng license.
+ *
+ * libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are
+ * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
+ * derived from libpng-1.0.6, and are distributed according to the same
+ * disclaimer and license as libpng-1.0.6 with the following individuals
+ * added to the list of Contributing Authors:
+ *
+ *    Simon-Pierre Cadieux
+ *    Eric S. Raymond
+ *    Mans Rullgard
+ *    Cosmin Truta
+ *    Gilles Vollant
+ *    James Yu
+ *
+ * and with the following additions to the disclaimer:
+ *
+ *    There is no warranty against interference with your enjoyment of the
+ *    library or against infringement.  There is no warranty that our
+ *    efforts or the library will fulfill any of your particular purposes
+ *    or needs.  This library is provided with all faults, and the entire
+ *    risk of satisfactory quality, performance, accuracy, and effort is with
+ *    the user.
+ *
+ * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+ * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+ * libpng-0.96, and are distributed according to the same disclaimer and
+ * license as libpng-0.96, with the following individuals added to the list
+ * of Contributing Authors:
+ *
+ *    Tom Lane
+ *    Glenn Randers-Pehrson
+ *    Willem van Schaik
+ *
+ * libpng versions 0.89, June 1996, through 0.96, May 1997, are
+ * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+ * and are distributed according to the same disclaimer and license as
+ * libpng-0.88, with the following individuals added to the list of
+ * Contributing Authors:
+ *
+ *    John Bowler
+ *    Kevin Bracey
+ *    Sam Bushell
+ *    Magnus Holmgren
+ *    Greg Roelofs
+ *    Tom Tanner
+ *
+ * libpng versions 0.5, May 1995, through 0.88, January 1996, are
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+ *
+ * For the purposes of this copyright and license, "Contributing Authors"
+ * is defined as the following set of individuals:
+ *
+ *    Andreas Dilger
+ *    Dave Martindale
+ *    Guy Eric Schalnat
+ *    Paul Schmidt
+ *    Tim Wegner
+ *
+ * The PNG Reference Library is supplied "AS IS".  The Contributing Authors
+ * and Group 42, Inc. disclaim all warranties, expressed or implied,
+ * including, without limitation, the warranties of merchantability and of
+ * fitness for any purpose.  The Contributing Authors and Group 42, Inc.
+ * assume no liability for direct, indirect, incidental, special, exemplary,
+ * or consequential damages, which may result from the use of the PNG
+ * Reference Library, even if advised of the possibility of such damage.
+ *
+ * Permission is hereby granted to use, copy, modify, and distribute this
+ * source code, or portions hereof, for any purpose, without fee, subject
+ * to the following restrictions:
+ *
+ *   1. The origin of this source code must not be misrepresented.
+ *
+ *   2. Altered versions must be plainly marked as such and must not
+ *      be misrepresented as being the original source.
+ *
+ *   3. This Copyright notice may not be removed or altered from any
+ *      source or altered source distribution.
+ *
+ * The Contributing Authors and Group 42, Inc. specifically permit, without
+ * fee, and encourage the use of this source code as a component to
+ * supporting the PNG file format in commercial products.  If you use this
+ * source code in a product, acknowledgment is not required but would be
+ * appreciated.
+ *
+ * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
+ */
+
+/*
+ * A "png_get_copyright" function is available, for convenient use in "about"
+ * boxes and the like:
+ *
+ *    printf("%s", png_get_copyright(NULL));
+ *
+ * Also, the PNG logo (in PNG format, of course) is supplied in the
+ * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+ */
+
+/*
+ * Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is
+ * a certification mark of the Open Source Initiative. OSI has not addressed
+ * the additional disclaimers inserted at version 1.0.7.
+ */
+
+/*
+ * The contributing authors would like to thank all those who helped
+ * with testing, bug fixes, and patience.  This wouldn't have been
+ * possible without all of you.
+ *
+ * Thanks to Frank J. T. Wojcik for helping with the documentation.
+ */
+
+/* Note about libpng version numbers:
+ *
+ *    Due to various miscommunications, unforeseen code incompatibilities
+ *    and occasional factors outside the authors' control, version numbering
+ *    on the library has not always been consistent and straightforward.
+ *    The following table summarizes matters since version 0.89c, which was
+ *    the first widely used release:
  *
  *    source                 png.h  png.h  shared-lib
  *    version                string   int  version
@@ -86,310 +207,48 @@
  *    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)
  *    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)
  *    1.0.7                    1    10007  (still compatible)
- *    1.0.8beta1-4             1    10008  2.1.0.8beta1-4
- *    1.0.8rc1                 1    10008  2.1.0.8rc1
- *    1.0.8                    1    10008  2.1.0.8
- *    1.0.9beta1-6             1    10009  2.1.0.9beta1-6
- *    1.0.9rc1                 1    10009  2.1.0.9rc1
- *    1.0.9beta7-10            1    10009  2.1.0.9beta7-10
- *    1.0.9rc2                 1    10009  2.1.0.9rc2
- *    1.0.9                    1    10009  2.1.0.9
- *    1.0.10beta1              1    10010  2.1.0.10beta1
- *    1.0.10rc1                1    10010  2.1.0.10rc1
- *    1.0.10                   1    10010  2.1.0.10
- *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3
- *    1.0.11rc1                1    10011  2.1.0.11rc1
- *    1.0.11                   1    10011  2.1.0.11
- *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2
- *    1.0.12rc1                2    10012  2.1.0.12rc1
- *    1.0.12                   2    10012  2.1.0.12
- *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)
- *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2
- *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5
- *    1.2.0rc1                 3    10200  3.1.2.0rc1
- *    1.2.0                    3    10200  3.1.2.0
- *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4
- *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2
- *    1.2.1                    3    10201  3.1.2.1
- *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6
- *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1
- *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1
- *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1
- *    1.0.13                  10    10013  10.so.0.1.0.13
- *    1.2.2                   12    10202  12.so.0.1.2.2
- *    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6
- *    1.2.3                   12    10203  12.so.0.1.2.3
- *    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3
- *    1.0.14rc1               13    10014  10.so.0.1.0.14rc1
- *    1.2.4rc1                13    10204  12.so.0.1.2.4rc1
- *    1.0.14                  10    10014  10.so.0.1.0.14
- *    1.2.4                   13    10204  12.so.0.1.2.4
- *    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2
- *    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3
- *    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3
- *    1.0.15                  10    10015  10.so.0.1.0.15
- *    1.2.5                   13    10205  12.so.0.1.2.5
- *    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4
- *    1.0.16                  10    10016  10.so.0.1.0.16
- *    1.2.6                   13    10206  12.so.0.1.2.6
- *    1.2.7beta1-2            13    10207  12.so.0.1.2.7beta1-2
- *    1.0.17rc1               10    10017  12.so.0.1.0.17rc1
- *    1.2.7rc1                13    10207  12.so.0.1.2.7rc1
- *    1.0.17                  10    10017  12.so.0.1.0.17
- *    1.2.7                   13    10207  12.so.0.1.2.7
- *    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5
- *    1.0.18rc1-5             10    10018  12.so.0.1.0.18rc1-5
- *    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5
- *    1.0.18                  10    10018  12.so.0.1.0.18
- *    1.2.8                   13    10208  12.so.0.1.2.8
- *    1.2.9beta1-3            13    10209  12.so.0.1.2.9beta1-3
- *    1.2.9beta4-11           13    10209  12.so.0.9[.0]
- *    1.2.9rc1                13    10209  12.so.0.9[.0]
- *    1.2.9                   13    10209  12.so.0.9[.0]
- *    1.2.10beta1-7           13    10210  12.so.0.10[.0]
- *    1.2.10rc1-2             13    10210  12.so.0.10[.0]
- *    1.2.10                  13    10210  12.so.0.10[.0]
- *    1.4.0beta1-5            14    10400  14.so.0.0[.0]
- *    1.2.11beta1-4           13    10211  12.so.0.11[.0]
- *    1.4.0beta7-8            14    10400  14.so.0.0[.0]
- *    1.2.11                  13    10211  12.so.0.11[.0]
- *    1.2.12                  13    10212  12.so.0.12[.0]
- *    1.4.0beta9-14           14    10400  14.so.0.0[.0]
- *    1.2.13                  13    10213  12.so.0.13[.0]
- *    1.4.0beta15-36          14    10400  14.so.0.0[.0]
- *    1.4.0beta37-87          14    10400  14.so.14.0[.0]
- *    1.4.0rc01               14    10400  14.so.14.0[.0]
- *    1.4.0beta88-109         14    10400  14.so.14.0[.0]
- *    1.4.0rc02-08            14    10400  14.so.14.0[.0]
- *    1.4.0                   14    10400  14.so.14.0[.0]
- *    1.4.1beta01-03          14    10401  14.so.14.1[.0]
- *    1.4.1rc01               14    10401  14.so.14.1[.0]
- *    1.4.1beta04-12          14    10401  14.so.14.1[.0]
- *    1.4.1                   14    10401  14.so.14.1[.0]
- *    1.4.2                   14    10402  14.so.14.2[.0]
- *    1.4.3                   14    10403  14.so.14.3[.0]
- *    1.4.4                   14    10404  14.so.14.4[.0]
- *    1.5.0beta01-58          15    10500  15.so.15.0[.0]
- *    1.5.0rc01-07            15    10500  15.so.15.0[.0]
- *    1.5.0                   15    10500  15.so.15.0[.0]
- *    1.5.1beta01-11          15    10501  15.so.15.1[.0]
- *    1.5.1rc01-02            15    10501  15.so.15.1[.0]
- *    1.5.1                   15    10501  15.so.15.1[.0]
- *    1.5.2beta01-03          15    10502  15.so.15.2[.0]
- *    1.5.2rc01-03            15    10502  15.so.15.2[.0]
- *    1.5.2                   15    10502  15.so.15.2[.0]
- *    1.5.3beta01-10          15    10503  15.so.15.3[.0]
- *    1.5.3rc01-02            15    10503  15.so.15.3[.0]
- *    1.5.3beta11             15    10503  15.so.15.3[.0]
- *    1.5.3 [omitted]
- *    1.5.4beta01-08          15    10504  15.so.15.4[.0]
- *    1.5.4rc01               15    10504  15.so.15.4[.0]
- *    1.5.4                   15    10504  15.so.15.4[.0]
- *    1.5.5beta01-08          15    10505  15.so.15.5[.0]
- *    1.5.5rc01               15    10505  15.so.15.5[.0]
- *    1.5.5                   15    10505  15.so.15.5[.0]
- *    1.5.6beta01-07          15    10506  15.so.15.6[.0]
- *    1.5.6rc01-03            15    10506  15.so.15.6[.0]
- *    1.5.6                   15    10506  15.so.15.6[.0]
- *    1.5.7beta01-05          15    10507  15.so.15.7[.0]
- *    1.5.7rc01-03            15    10507  15.so.15.7[.0]
- *    1.5.7                   15    10507  15.so.15.7[.0]
- *    1.6.0beta01-40          16    10600  16.so.16.0[.0]
- *    1.6.0rc01-08            16    10600  16.so.16.0[.0]
- *    1.6.0                   16    10600  16.so.16.0[.0]
- *    1.6.1beta01-09          16    10601  16.so.16.1[.0]
- *    1.6.1rc01               16    10601  16.so.16.1[.0]
- *    1.6.1                   16    10601  16.so.16.1[.0]
- *    1.6.2beta01             16    10602  16.so.16.2[.0]
- *    1.6.2rc01-06            16    10602  16.so.16.2[.0]
- *    1.6.2                   16    10602  16.so.16.2[.0]
- *    1.6.3beta01-11          16    10603  16.so.16.3[.0]
- *    1.6.3rc01               16    10603  16.so.16.3[.0]
- *    1.6.3                   16    10603  16.so.16.3[.0]
- *    1.6.4beta01-02          16    10604  16.so.16.4[.0]
- *    1.6.4rc01               16    10604  16.so.16.4[.0]
- *    1.6.4                   16    10604  16.so.16.4[.0]
- *    1.6.5                   16    10605  16.so.16.5[.0]
- *    1.6.6                   16    10606  16.so.16.6[.0]
- *    1.6.7beta01-04          16    10607  16.so.16.7[.0]
- *    1.6.7rc01-03            16    10607  16.so.16.7[.0]
- *    1.6.7                   16    10607  16.so.16.7[.0]
- *    1.6.8beta01-02          16    10608  16.so.16.8[.0]
- *    1.6.8rc01-02            16    10608  16.so.16.8[.0]
- *    1.6.8                   16    10608  16.so.16.8[.0]
- *    1.6.9beta01-04          16    10609  16.so.16.9[.0]
- *    1.6.9rc01-02            16    10609  16.so.16.9[.0]
- *    1.6.9                   16    10609  16.so.16.9[.0]
- *    1.6.10beta01-03         16    10610  16.so.16.10[.0]
- *    1.6.10rc01-03           16    10610  16.so.16.10[.0]
- *    1.6.10                  16    10610  16.so.16.10[.0]
- *    1.6.11beta01-06         16    10611  16.so.16.11[.0]
- *    1.6.11rc01-02           16    10611  16.so.16.11[.0]
- *    1.6.11                  16    10611  16.so.16.11[.0]
- *    1.6.12rc01-03           16    10612  16.so.16.12[.0]
- *    1.6.12                  16    10612  16.so.16.12[.0]
- *    1.6.13beta01-04         16    10613  16.so.16.13[.0]
- *    1.6.13rc01-02           16    10613  16.so.16.13[.0]
- *    1.6.13                  16    10613  16.so.16.13[.0]
- *    1.6.14beta01-07         16    10614  16.so.16.14[.0]
- *    1.6.14rc01-02           16    10614  16.so.16.14[.0]
- *    1.6.14                  16    10614  16.so.16.14[.0]
- *    1.6.15beta01-08         16    10615  16.so.16.15[.0]
- *    1.6.15rc01-03           16    10615  16.so.16.15[.0]
- *    1.6.15                  16    10615  16.so.16.15[.0]
- *    1.6.16beta01-03         16    10616  16.so.16.16[.0]
- *    1.6.16rc01-02           16    10616  16.so.16.16[.0]
- *    1.6.16                  16    10616  16.so.16.16[.0]
+ *    ...
+ *    1.0.19                  10    10019  10.so.0.19[.0]
+ *    ...
+ *    1.2.53                  13    10253  12.so.0.53[.0]
+ *    ...
+ *    1.5.23                  15    10523  15.so.15.23[.0]
+ *    ...
+ *    1.6.20                  16    10620  16.so.16.20[.0]
  *
- *   Henceforth the source version will match the shared-library major
- *   and minor numbers; the shared-library major version number will be
- *   used for changes in backward compatibility, as it is intended.  The
- *   PNG_LIBPNG_VER macro, which is not used within libpng but is available
- *   for applications, is an unsigned integer of the form xyyzz corresponding
- *   to the source version x.y.z (leading zeros in y and z).  Beta versions
- *   were given the previous public release number plus a letter, until
- *   version 1.0.6j; from then on they were given the upcoming public
- *   release number plus "betaNN" or "rcNN".
+ *    Henceforth the source version will match the shared-library major
+ *    and minor numbers; the shared-library major version number will be
+ *    used for changes in backward compatibility, as it is intended.  The
+ *    PNG_LIBPNG_VER macro, which is not used within libpng but is available
+ *    for applications, is an unsigned integer of the form xyyzz corresponding
+ *    to the source version x.y.z (leading zeros in y and z).  Beta versions
+ *    were given the previous public release number plus a letter, until
+ *    version 1.0.6j; from then on they were given the upcoming public
+ *    release number plus "betaNN" or "rcNN".
  *
- *   Binary incompatibility exists only when applications make direct access
- *   to the info_ptr or png_ptr members through png.h, and the compiled
- *   application is loaded with a different version of the library.
+ *    Binary incompatibility exists only when applications make direct access
+ *    to the info_ptr or png_ptr members through png.h, and the compiled
+ *    application is loaded with a different version of the library.
  *
- *   DLLNUM will change each time there are forward or backward changes
- *   in binary compatibility (e.g., when a new feature is added).
+ *    DLLNUM will change each time there are forward or backward changes
+ *    in binary compatibility (e.g., when a new feature is added).
  *
- * See libpng-manual.txt or libpng.3 for more information.  The PNG
- * specification is available as a W3C Recommendation and as an ISO
- * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/
- */
-
-/*
- * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
- *
- * If you modify libpng you may insert additional notices immediately following
- * this sentence.
- *
- * This code is released under the libpng license.
- *
- * libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
- * Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-1.2.5
- * with the following individual added to the list of Contributing Authors:
- *
- *    Cosmin Truta
- *
- * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
- * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-1.0.6
- * with the following individuals added to the list of Contributing Authors:
- *
- *    Simon-Pierre Cadieux
- *    Eric S. Raymond
- *    Gilles Vollant
- *
- * and with the following additions to the disclaimer:
- *
- *    There is no warranty against interference with your enjoyment of the
- *    library or against infringement.  There is no warranty that our
- *    efforts or the library will fulfill any of your particular purposes
- *    or needs.  This library is provided with all faults, and the entire
- *    risk of satisfactory quality, performance, accuracy, and effort is with
- *    the user.
- *
- * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
- * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-0.96,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    Tom Lane
- *    Glenn Randers-Pehrson
- *    Willem van Schaik
- *
- * libpng versions 0.89, June 1996, through 0.96, May 1997, are
- * Copyright (c) 1996, 1997 Andreas Dilger
- * Distributed according to the same disclaimer and license as libpng-0.88,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    John Bowler
- *    Kevin Bracey
- *    Sam Bushell
- *    Magnus Holmgren
- *    Greg Roelofs
- *    Tom Tanner
- *
- * libpng versions 0.5, May 1995, through 0.88, January 1996, are
- * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
- *
- * For the purposes of this copyright and license, "Contributing Authors"
- * is defined as the following set of individuals:
- *
- *    Andreas Dilger
- *    Dave Martindale
- *    Guy Eric Schalnat
- *    Paul Schmidt
- *    Tim Wegner
- *
- * The PNG Reference Library is supplied "AS IS".  The Contributing Authors
- * and Group 42, Inc. disclaim all warranties, expressed or implied,
- * including, without limitation, the warranties of merchantability and of
- * fitness for any purpose.  The Contributing Authors and Group 42, Inc.
- * assume no liability for direct, indirect, incidental, special, exemplary,
- * or consequential damages, which may result from the use of the PNG
- * Reference Library, even if advised of the possibility of such damage.
- *
- * Permission is hereby granted to use, copy, modify, and distribute this
- * source code, or portions hereof, for any purpose, without fee, subject
- * to the following restrictions:
- *
- *   1. The origin of this source code must not be misrepresented.
- *
- *   2. Altered versions must be plainly marked as such and must not
- *      be misrepresented as being the original source.
- *
- *   3. This Copyright notice may not be removed or altered from
- *      any source or altered source distribution.
- *
- * The Contributing Authors and Group 42, Inc. specifically permit, without
- * fee, and encourage the use of this source code as a component to
- * supporting the PNG file format in commercial products.  If you use this
- * source code in a product, acknowledgment is not required but would be
- * appreciated.
- */
-
-/*
- * A "png_get_copyright" function is available, for convenient use in "about"
- * boxes and the like:
- *
- *     printf("%s", png_get_copyright(NULL));
- *
- * Also, the PNG logo (in PNG format, of course) is supplied in the
- * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
- */
-
-/*
- * Libpng is OSI Certified Open Source Software.  OSI Certified is a
- * certification mark of the Open Source Initiative.
- */
-
-/*
- * The contributing authors would like to thank all those who helped
- * with testing, bug fixes, and patience.  This wouldn't have been
- * possible without all of you.
- *
- * Thanks to Frank J. T. Wojcik for helping with the documentation.
+ * See libpng.txt or libpng.3 for more information.  The PNG specification
+ * is available as a W3C Recommendation and as an ISO Specification,
+ * <http://www.w3.org/TR/2003/REC-PNG-20031110/
  */
 
 /*
  * Y2K compliance in libpng:
  * =========================
  *
- *    December 22, 2014
+ *    December 3, 2015
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
  *
  *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.6.16 are Y2K compliant.  It is my belief that
+ *    upward through 1.6.20 are Y2K compliant.  It is my belief that
  *    earlier versions were also Y2K compliant.
  *
  *    Libpng only has two year fields.  One is a 2-byte unsigned integer
@@ -451,9 +310,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.16"
+#define PNG_LIBPNG_VER_STRING "1.6.20"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.16 - December 22, 2014\n"
+     " libpng version 1.6.20 - December 3, 2015\n"
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
@@ -461,7 +320,7 @@
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MINOR   6
-#define PNG_LIBPNG_VER_RELEASE 16
+#define PNG_LIBPNG_VER_RELEASE 20
 
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -492,7 +351,7 @@
  * version 1.0.0 was mis-numbered 100 instead of 10000).  From
  * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release
  */
-#define PNG_LIBPNG_VER 10616 /* 1.6.16 */
+#define PNG_LIBPNG_VER 10620 /* 1.6.20 */
 
 /* Library configuration: these options cannot be changed after
  * the library has been built.
@@ -549,17 +408,22 @@
 
 /* This file is arranged in several sections:
  *
- * 1. Any configuration options that can be specified by for the application
+ * 1. [omitted]
+ * 2. Any configuration options that can be specified by for the application
  *    code when it is built.  (Build time configuration is in pnglibconf.h)
- * 2. Type definitions (base types are defined in pngconf.h), structure
+ * 3. Type definitions (base types are defined in pngconf.h), structure
  *    definitions.
- * 3. Exported library functions.
- * 4. Simplified API.
+ * 4. Exported library functions.
+ * 5. Simplified API.
+ * 6. Implementation options.
  *
  * The library source code has additional files (principally pngpriv.h) that
  * allow configuration of the library.
  */
-/* Section 1: run time configuration
+
+/* Section 1: [omitted] */
+
+/* Section 2: run time configuration
  * See pnglibconf.h for build time configuration
  *
  * Run time configuration allows the application to choose between
@@ -589,7 +453,7 @@
  * Otherwise the calls are mapped to png_error.
  */
 
-/* Section 2: type definitions, including structures and compile time
+/* Section 3: type definitions, including structures and compile time
  * constants.
  * See pngconf.h for base types that vary by machine/system
  */
@@ -597,7 +461,7 @@
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef char* png_libpng_version_1_6_16;
+typedef char* png_libpng_version_1_6_20;
 
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  *
@@ -913,7 +777,9 @@
 #define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */
 #define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */
 #define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */
+#if INT_MAX >= 0x8000 /* else this might break */
 #define PNG_INFO_IDAT 0x8000   /* ESR, 1.0.6 */
+#endif
 
 /* This is used for the transformation routines, as some of them
  * change these values for the row.  It also should enable using
@@ -1017,7 +883,9 @@
 #define PNG_TRANSFORM_GRAY_TO_RGB   0x2000      /* read only */
 /* Added to libpng-1.5.4 */
 #define PNG_TRANSFORM_EXPAND_16     0x4000      /* read only */
+#if INT_MAX >= 0x8000 /* else this might break */
 #define PNG_TRANSFORM_SCALE_16      0x8000      /* read only */
+#endif
 
 /* Flags for MNG supported features */
 #define PNG_FLAG_MNG_EMPTY_PLTE     0x01
@@ -1034,7 +902,7 @@
     png_alloc_size_t));
 typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
 
-/* Section 3: exported functions
+/* Section 4: exported functions
  * Here are the function definitions most commonly used.  This is not
  * the place to find out how to use libpng.  See libpng-manual.txt for the
  * full explanation, see example.c for the summary.  This just provides
@@ -1407,13 +1275,13 @@
 #endif
 
 #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
+/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
 PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
     int flags));
 /* The values of the PNG_FILLER_ defines should NOT be changed */
 #  define PNG_FILLER_BEFORE 0
 #  define PNG_FILLER_AFTER 1
-/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
+/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */
 PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
     png_uint_32 filler, int flags));
 #endif /* READ_FILLER || WRITE_FILLER */
@@ -1606,6 +1474,7 @@
 #define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */
 #define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */
 
+#ifdef PNG_WRITE_SUPPORTED
 /* These functions give the user control over the scan-line filtering in
  * libpng and the compression methods used by zlib.  These functions are
  * mainly useful for testing, as the defaults should work with most users.
@@ -1619,6 +1488,7 @@
  */
 PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
     int filters));
+#endif /* WRITE */
 
 /* Flags for png_set_filter() to say which filters to use.  The flags
  * are chosen so that they don't conflict with real filter types
@@ -1644,35 +1514,8 @@
 #define PNG_FILTER_VALUE_PAETH 4
 #define PNG_FILTER_VALUE_LAST  5
 
-#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */
-/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
- * defines, either the default (minimum-sum-of-absolute-differences), or
- * the experimental method (weighted-minimum-sum-of-absolute-differences).
- *
- * Weights are factors >= 1.0, indicating how important it is to keep the
- * filter type consistent between rows.  Larger numbers mean the current
- * filter is that many times as likely to be the same as the "num_weights"
- * previous filters.  This is cumulative for each previous row with a weight.
- * There needs to be "num_weights" values in "filter_weights", or it can be
- * NULL if the weights aren't being specified.  Weights have no influence on
- * the selection of the first row filter.  Well chosen weights can (in theory)
- * improve the compression for a given image.
- *
- * Costs are factors >= 1.0 indicating the relative decoding costs of a
- * filter type.  Higher costs indicate more decoding expense, and are
- * therefore less likely to be selected over a filter with lower computational
- * costs.  There needs to be a value in "filter_costs" for each valid filter
- * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
- * setting the costs.  Costs try to improve the speed of decompression without
- * unduly increasing the compressed image size.
- *
- * A negative weight or cost indicates the default value is to be used, and
- * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
- * The default values for both weights and costs are currently 1.0, but may
- * change if good general weighting/cost heuristics can be found.  If both
- * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
- * to the UNWEIGHTED method, but with added encoding time/computation.
- */
+#ifdef PNG_WRITE_SUPPORTED
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */
 PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr,
     int heuristic_method, int num_weights, png_const_doublep filter_weights,
     png_const_doublep filter_costs))
@@ -1682,15 +1525,12 @@
     png_const_fixed_point_p filter_costs))
 #endif /* WRITE_WEIGHTED_FILTER */
 
-/* Heuristic used for row filter selection.  These defines should NOT be
- * changed.
- */
+/* The following are no longer used and will be removed from libpng-1.7: */
 #define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently "UNWEIGHTED" */
 #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */
 #define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */
 #define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */
 
-#ifdef PNG_WRITE_SUPPORTED
 /* Set the library compression level.  Currently, valid values range from
  * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
  * (0 - no compression, 9 - "maximal" compression).  Note that tests have
@@ -1698,6 +1538,7 @@
  * for PNG images, and do considerably fewer caclulations.  In the future,
  * these values may not correspond directly to the zlib compression levels.
  */
+#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
 PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr,
     int level));
 
@@ -1715,7 +1556,7 @@
 
 PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr,
     int method));
-#endif
+#endif /* WRITE_CUSTOMIZE_COMPRESSION */
 
 #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
 /* Also set zlib parameters for compressing non-IDAT chunks */
@@ -1737,6 +1578,7 @@
 PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
     int method));
 #endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
+#endif /* WRITE */
 
 /* These next functions are called for input/output, memory, and error
  * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
@@ -1847,7 +1689,7 @@
  *
  * The integer return from the callback function is interpreted thus:
  *
- * negative: An error occured, png_chunk_error will be called.
+ * negative: An error occurred; png_chunk_error will be called.
  *     zero: The chunk was not handled, the chunk will be saved. A critical
  *           chunk will cause an error at this point unless it is to be saved.
  * positive: The chunk was handled, libpng will ignore/discard it.
@@ -2692,26 +2534,28 @@
            * (png_uint_16)(alpha)                         \
            + (png_uint_16)(bg)*(png_uint_16)(255          \
            - (png_uint_16)(alpha)) + 128);                \
-       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
+       (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); }
 
 #  define png_composite_16(composite, fg, alpha, bg)       \
      { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg)  \
            * (png_uint_32)(alpha)                          \
            + (png_uint_32)(bg)*(65535                      \
            - (png_uint_32)(alpha)) + 32768);               \
-       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
+       (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); }
 
 #else  /* Standard method using integer division */
 
-#  define png_composite(composite, fg, alpha, bg)                          \
-     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +  \
-     (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \
-     127) / 255)
+#  define png_composite(composite, fg, alpha, bg)                        \
+     (composite) =                                                       \
+         (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) +  \
+         (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
+         127) / 255))
 
 #  define png_composite_16(composite, fg, alpha, bg)                         \
-     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
-     (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) +         \
-     32767) / 65535)
+     (composite) =                                                           \
+         (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \
+         (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) +     \
+         32767) / 65535))
 #endif /* READ_COMPOSITE_NODIV */
 
 #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
@@ -2762,7 +2606,7 @@
 
 #  define PNG_get_int_32(buf) \
      ((png_int_32)((*(buf) & 0x80) \
-      ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \
+      ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \
       : (png_int_32)png_get_uint_32(buf)))
 
    /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h,
@@ -2782,10 +2626,17 @@
 #  endif
 #endif
 
-#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
-    defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
+#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
+PNG_EXPORT(242, void, png_set_check_for_invalid_index,
+    (png_structrp png_ptr, int allowed));
+#  ifdef PNG_GET_PALETTE_MAX_SUPPORTED
+PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+#  endif
+#endif /* CHECK_FOR_INVALID_INDEX */
+
 /*******************************************************************************
- *  SIMPLIFIED API
+ * Section 5: SIMPLIFIED API
  *******************************************************************************
  *
  * Please read the documentation in libpng-manual.txt (TODO: write said
@@ -2801,8 +2652,9 @@
  *
  * To read a PNG file using the simplified API:
  *
- * 1) Declare a 'png_image' structure (see below) on the stack and set the
- *    version field to PNG_IMAGE_VERSION.
+ * 1) Declare a 'png_image' structure (see below) on the stack, set the
+ *    version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL
+ *    (this is REQUIRED, your program may crash if you don't do it.)
  * 2) Call the appropriate png_image_begin_read... function.
  * 3) Set the png_image 'format' member to the required sample format.
  * 4) Allocate a buffer for the image and, if required, the color-map.
@@ -2829,6 +2681,9 @@
  * when it is being read or defines the in-memory format of an image that you
  * need to write:
  */
+#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
+    defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
+
 #define PNG_IMAGE_VERSION 1
 
 typedef struct png_control *png_controlp;
@@ -2928,7 +2783,7 @@
  * called to read or write the color-map and set the format correctly for the
  * image data.  Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly!
  *
- * NOTE: libpng can be built with particular features disabled, if you see
+ * NOTE: libpng can be built with particular features disabled. If you see
  * compiler errors because the definition of one of the following flags has been
  * compiled out it is because libpng does not have the required support.  It is
  * possible, however, for the libpng configuration to enable the format on just
@@ -2940,7 +2795,7 @@
  */
 #define PNG_FORMAT_FLAG_ALPHA    0x01U /* format with an alpha channel */
 #define PNG_FORMAT_FLAG_COLOR    0x02U /* color format: otherwise grayscale */
-#define PNG_FORMAT_FLAG_LINEAR   0x04U /* 2 byte channels else 1 byte */
+#define PNG_FORMAT_FLAG_LINEAR   0x04U /* 2-byte channels else 1-byte */
 #define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */
 
 #ifdef PNG_FORMAT_BGR_SUPPORTED
@@ -3227,9 +3082,11 @@
  *
  * With all APIs row_stride is handled as in the read APIs - it is the spacing
  * from one row to the next in component sized units (1 or 2 bytes) and if
- * negative indicates a bottom-up row layout in the buffer.
+ * negative indicates a bottom-up row layout in the buffer.  If row_stride is zero,
+ * libpng will calculate it for you from the image width and number of channels.
  *
- * Note that the write API does not support interlacing or sub-8-bit pixels.
+ * Note that the write API does not support interlacing, sub-8-bit pixels, indexed
+ * PNG (color_type 3) or most ancillary chunks.
  */
 #endif /* STDIO */
 #endif /* SIMPLIFIED_WRITE */
@@ -3238,17 +3095,8 @@
  ******************************************************************************/
 #endif /* SIMPLIFIED_{READ|WRITE} */
 
-#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
-PNG_EXPORT(242, void, png_set_check_for_invalid_index,
-    (png_structrp png_ptr, int allowed));
-#  ifdef PNG_GET_PALETTE_MAX_SUPPORTED
-PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
-    png_const_infop info_ptr));
-#  endif
-#endif /* CHECK_FOR_INVALID_INDEX */
-
 /*******************************************************************************
- *  IMPLEMENTATION OPTIONS
+ * Section 6: IMPLEMENTATION OPTIONS
  *******************************************************************************
  *
  * Support for arbitrary implementation-specific optimizations.  The API allows
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h	Tue Jan 26 09:11:59 2016 +0100
@@ -29,9 +29,9 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * libpng version 1.6.16,December 22, 2014
+ * libpng version 1.6.20, December 3, 2015
  *
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -39,9 +39,7 @@
  * For conditions of distribution and use, see the disclaimer
  * and license in png.h
  *
- */
-
-/* Any machine specific code is near the front of this file, so if you
+ * Any machine specific code is near the front of this file, so if you
  * are configuring libpng for a machine, you may want to read the section
  * starting here down to where it starts to typedef png_color, png_text,
  * and png_info.
@@ -50,26 +48,6 @@
 #ifndef PNGCONF_H
 #define PNGCONF_H
 
-/* To do: Do all of this in scripts/pnglibconf.dfa */
-#ifdef PNG_SAFE_LIMITS_SUPPORTED
-#  ifdef PNG_USER_WIDTH_MAX
-#    undef PNG_USER_WIDTH_MAX
-#    define PNG_USER_WIDTH_MAX 1000000L
-#  endif
-#  ifdef PNG_USER_HEIGHT_MAX
-#    undef PNG_USER_HEIGHT_MAX
-#    define PNG_USER_HEIGHT_MAX 1000000L
-#  endif
-#  ifdef PNG_USER_CHUNK_MALLOC_MAX
-#    undef PNG_USER_CHUNK_MALLOC_MAX
-#    define PNG_USER_CHUNK_MALLOC_MAX 4000000L
-#  endif
-#  ifdef PNG_USER_CHUNK_CACHE_MAX
-#    undef PNG_USER_CHUNK_CACHE_MAX
-#    define PNG_USER_CHUNK_CACHE_MAX 128
-#  endif
-#endif
-
 #ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
 
 /* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
@@ -113,7 +91,7 @@
  */
 #define PNG_CONST const /* backward compatibility only */
 
-/* This controls optimization of the reading of 16 and 32 bit values
+/* This controls optimization of the reading of 16-bit and 32-bit values
  * from PNG files.  It can be set on a per-app-file basis - it
  * just changes whether a macro is used when the function is called.
  * The library builder sets the default; if read functions are not
@@ -345,11 +323,11 @@
     * table entries, so we discard it here.  See the .dfn files in the
     * scripts directory.
     */
+
 #ifndef PNG_EXPORTA
-
-#  define PNG_EXPORTA(ordinal, type, name, args, attributes)\
-      PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \
-        extern attributes)
+#  define PNG_EXPORTA(ordinal, type, name, args, attributes) \
+      PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
+      PNG_LINKAGE_API attributes)
 #endif
 
 /* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
@@ -357,7 +335,7 @@
  */
 #define PNG_EMPTY /*empty list*/
 
-#define PNG_EXPORT(ordinal, type, name, args)\
+#define PNG_EXPORT(ordinal, type, name, args) \
    PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
 
 /* Use PNG_REMOVED to comment out a removed interface. */
@@ -530,7 +508,7 @@
 #if CHAR_BIT == 8 && UCHAR_MAX == 255
    typedef unsigned char png_byte;
 #else
-#  error "libpng requires 8 bit bytes"
+#  error "libpng requires 8-bit bytes"
 #endif
 
 #if INT_MIN == -32768 && INT_MAX == 32767
@@ -538,7 +516,7 @@
 #elif SHRT_MIN == -32768 && SHRT_MAX == 32767
    typedef short png_int_16;
 #else
-#  error "libpng requires a signed 16 bit type"
+#  error "libpng requires a signed 16-bit type"
 #endif
 
 #if UINT_MAX == 65535
@@ -546,7 +524,7 @@
 #elif USHRT_MAX == 65535
    typedef unsigned short png_uint_16;
 #else
-#  error "libpng requires an unsigned 16 bit type"
+#  error "libpng requires an unsigned 16-bit type"
 #endif
 
 #if INT_MIN < -2147483646 && INT_MAX > 2147483646
@@ -554,7 +532,7 @@
 #elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
    typedef long int png_int_32;
 #else
-#  error "libpng requires a signed 32 bit (or more) type"
+#  error "libpng requires a signed 32-bit (or more) type"
 #endif
 
 #if UINT_MAX > 4294967294
@@ -562,7 +540,7 @@
 #elif ULONG_MAX > 4294967294
    typedef unsigned long int png_uint_32;
 #else
-#  error "libpng requires an unsigned 32 bit (or more) type"
+#  error "libpng requires an unsigned 32-bit (or more) type"
 #endif
 
 /* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngdebug.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngdebug.h	Tue Jan 26 09:11:59 2016 +0100
@@ -29,12 +29,11 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
+ * Last changed in libpng 1.6.8 [December 19, 2013]
  * Copyright (c) 1998-2013 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
- * Last changed in libpng 1.6.8 [December 19, 2013]
- *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
  * and license in png.h
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c	Tue Jan 26 09:11:59 2016 +0100
@@ -29,8 +29,8 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * Last changed in libpng 1.6.15 [November 20, 2014]
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.17 [March 26, 2015]
+ * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -827,14 +827,20 @@
 {
    png_debug1(1, "in %s retrieval function", "IHDR");
 
-   if (png_ptr == NULL || info_ptr == NULL || width == NULL ||
-       height == NULL || bit_depth == NULL || color_type == NULL)
+   if (png_ptr == NULL || info_ptr == NULL)
       return (0);
 
-   *width = info_ptr->width;
-   *height = info_ptr->height;
-   *bit_depth = info_ptr->bit_depth;
-   *color_type = info_ptr->color_type;
+   if (width != NULL)
+       *width = info_ptr->width;
+
+   if (height != NULL)
+       *height = info_ptr->height;
+
+   if (bit_depth != NULL)
+       *bit_depth = info_ptr->bit_depth;
+
+   if (color_type != NULL)
+       *color_type = info_ptr->color_type;
 
    if (compression_type != NULL)
       *compression_type = info_ptr->compression_type;
@@ -1163,21 +1169,21 @@
    if (png_ptr == NULL)
       return 0;
 
-#  ifdef PNG_WRITE_SUPPORTED
+#ifdef PNG_WRITE_SUPPORTED
       if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0)
-#  endif
+#endif
    {
-#     ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
          return png_ptr->IDAT_read_size;
-#     else
+#else
          return PNG_IDAT_READ_SIZE;
-#     endif
+#endif
    }
 
-#  ifdef PNG_WRITE_SUPPORTED
+#ifdef PNG_WRITE_SUPPORTED
       else
          return png_ptr->zbuffer_size;
-#  endif
+#endif
 }
 
 #ifdef PNG_SET_USER_LIMITS_SUPPORTED
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pnginfo.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pnginfo.h	Tue Jan 26 09:11:59 2016 +0100
@@ -29,12 +29,11 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
+ * Last changed in libpng 1.6.1 [March 28, 2013]
  * Copyright (c) 1998-2013 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
- * Last changed in libpng 1.6.1 [March 28, 2013]
- *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
  * and license in png.h
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h	Tue Jan 26 09:11:59 2016 +0100
@@ -34,7 +34,7 @@
  * file and, per its terms, should not be removed:
  */
 
-/* libpng version 1.6.16,December 22, 2014 */
+/* libpng version 1.6.20, December 3, 2015 */
 
 /* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
 
@@ -129,13 +129,10 @@
 #define PNG_READ_tIME_SUPPORTED
 #define PNG_READ_tRNS_SUPPORTED
 #define PNG_READ_zTXt_SUPPORTED
-/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
 /*#undef PNG_SAVE_INT_32_SUPPORTED*/
 #define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SEQUENTIAL_READ_SUPPORTED
 #define PNG_SETJMP_SUPPORTED
-#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
-#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
 #define PNG_SET_OPTION_SUPPORTED
 #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
 #define PNG_SET_USER_LIMITS_SUPPORTED
@@ -161,6 +158,7 @@
 /*#undef PNG_WRITE_BGR_SUPPORTED*/
 /*#undef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
 /*#undef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED*/
+/*#undef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED*/
 /*#undef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED*/
 /*#undef PNG_WRITE_FILLER_SUPPORTED*/
 /*#undef PNG_WRITE_FILTER_SUPPORTED*/
@@ -219,11 +217,14 @@
 /* end of options */
 /* settings */
 #define PNG_API_RULE 0
-#define PNG_COST_SHIFT 3
 #define PNG_DEFAULT_READ_MACROS 1
 #define PNG_GAMMA_THRESHOLD_FIXED 5000
 #define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
 #define PNG_INFLATE_BUF_SIZE 1024
+#define PNG_LINKAGE_API extern
+#define PNG_LINKAGE_CALLBACK extern
+#define PNG_LINKAGE_DATA extern
+#define PNG_LINKAGE_FUNCTION extern
 #define PNG_MAX_GAMMA_8 11
 #define PNG_QUANTIZE_BLUE_BITS 5
 #define PNG_QUANTIZE_GREEN_BITS 5
@@ -234,7 +235,6 @@
 #define PNG_USER_CHUNK_MALLOC_MAX 0
 #define PNG_USER_HEIGHT_MAX 1000000
 #define PNG_USER_WIDTH_MAX 1000000
-#define PNG_WEIGHT_SHIFT 8
 #define PNG_ZBUF_SIZE 8192
 #define PNG_ZLIB_VERNUM 0
 #define PNG_Z_DEFAULT_COMPRESSION (-1)
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngmem.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngmem.c	Tue Jan 26 09:11:59 2016 +0100
@@ -69,7 +69,7 @@
 }
 
 /* Allocate memory.  For reasonable files, size should never exceed
- * 64K.  However, zlib may allocate more then 64K if you don't tell
+ * 64K.  However, zlib may allocate more than 64K if you don't tell
  * it not to.  See zconf.h and png.h for more information.  zlib does
  * need to allocate exactly 64K, so whatever you call here must
  * have the ability to do that.
@@ -105,6 +105,9 @@
    PNG_UNUSED(png_ptr)
 #endif
 
+   /* Some compilers complain that this is always true.  However, it
+    * can be false when integer overflow happens.
+    */
    if (size > 0 && size <= PNG_SIZE_MAX
 #     ifdef PNG_MAX_MALLOC_64K
          && size <= 65536U
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c	Fri Jan 15 09:15:33 2016 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c	Tue Jan 26 09:11:59 2016 +0100
@@ -29,8 +29,8 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * Last changed in libpng 1.6.15 [November 20, 2014]
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.18 [July 23, 2015]
+ * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -47,7 +47,6 @@
 #define PNG_READ_SIG_MODE   0
 #define PNG_READ_CHUNK_MODE 1
 #define PNG_READ_IDAT_MODE  2
-#define PNG_SKIP_MODE       3
 #define PNG_READ_tEXt_MODE  4
 #define PNG_READ_zTXt_MODE  5
 #define PNG_READ_DONE_MODE  6
@@ -106,32 +105,14 @@
 png_uint_32 PNGAPI
 png_process_data_skip(png_structrp png_ptr)
 {
-   png_uint_32 remaining = 0;
-
-   if (png_ptr != NULL && png_ptr->process_mode == PNG_SKIP_MODE &&
-      png_ptr->skip_length > 0)
-   {
-      /* At the end of png_process_data the buffer size must be 0 (see the loop
-       * above) so we can detect a broken call here:
-       */
-      if (png_ptr->buffer_size != 0)
-         png_error(png_ptr,
-            "png_process_data_skip called inside png_process_data");
-
-      /* If is impossible for there to be a saved buffer at this point -
-       * otherwise we could not be in SKIP mode.  This will also happen if
-       * png_process_skip is called inside png_process_data (but only very
-       * rarely.)
-       */
-      if (png_ptr->save_buffer_size != 0)
-         png_error(png_ptr, "png_process_data_skip called with saved data");
-
-      remaining = png_ptr->skip_length;
-      png_ptr->skip_length = 0;
-      png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-   }
-
-   return remaining;
+  /* TODO: Deprecate and remove this API.
+   * Somewhere the implementation of this seems to have been lost,
+   * or abandoned.  It was only to support some internal back-door access
+   * to png_struct) in libpng-1.4.x.
+   */
+   png_app_warning(png_ptr,
+"png_process_data_skip is not implemented in any current version of libpng");
+   return 0;
 }
 
 /* What we do with the incoming data depends on what we were previously
@@ -163,12 +144,6 @@
          break;
       }
 
-      case PNG_SKIP_MODE:
-      {
-         png_push_crc_finish(png_ptr);
-         break;
-      }
-
       default:
       {
          png_ptr->buffer_size = 0;
@@ -187,7 +162,7 @@
 png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
 {
    png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
-             num_to_check = 8 - num_checked;
+       num_to_check = 8 - num_checked;
 
    if (png_ptr->buffer_size < num_to_check)
    {
@@ -467,69 +442,6 @@
    png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
 }
 
-void /* PRIVATE */
-png_push_crc_skip(png_structrp png_ptr, png_uint_32 skip)
-{
-   png_ptr->process_mode = PNG_SKIP_MODE;
-   png_ptr->skip_length = skip;
-}
-
-void /* PRIVATE */
-png_push_crc_finish(png_structrp png_ptr)
-{
-   if (png_ptr->skip_length != 0 && png_ptr->save_buffer_size != 0)
-   {
-      png_size_t save_size = png_ptr->save_buffer_size;
-      png_uint_32 skip_length = png_ptr->skip_length;
-
-      /* We want the smaller of 'skip_length' and 'save_buffer_size', but
-       * they are of different types and we don't know which variable has the
-       * fewest bits.  Carefully select the smaller and cast it to the type of
-       * the larger - this cannot overflow.  Do not cast in the following test
-       * - it will break on either 16 or 64 bit platforms.
-       */
-      if (skip_length < save_size)
-         save_size = (png_size_t)skip_length;
-
-      else
-         skip_length = (png_uint_32)save_size;
-
-      png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
-
-      png_ptr->skip_length -= skip_length;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->save_buffer_size -= save_size;
-      png_ptr->save_buffer_ptr += save_size;
-   }
-   if (png_ptr->skip_length != 0 && png_ptr->current_buffer_size != 0)
-   {
-      png_size_t save_size = png_ptr->current_buffer_size;
-      png_uint_32 skip_length = png_ptr->skip_length;
-
-      /* We want the smaller of 'skip_length' and 'current_buffer_size', here,
-       * the same problem exists as above and the same solution.
-       */
-      if (skip_length < save_size)
-         save_size = (png_size_t)skip_length;
-
-      else
-         skip_length = (png_uint_32)save_size;
-
-      png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
-
-      png_ptr->skip_length -= skip_length;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->current_buffer_size -= save_size;
-      png_ptr->current_buffer_ptr += save_size;
-   }
-   if (png_ptr->skip_length == 0)
-   {
-      PNG_PUSH_SAVE_BUFFER_IF_LT(4)
-      png_crc_finish(png_ptr, 0);
-      png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-   }
-}
-
 void PNGCBAPI
 png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
 {
@@ -612,13 +524,11 @@
       if (png_ptr->save_buffer == NULL)
       {
          png_free(png_ptr, old_buffer);
-         old_buffer = NULL;
          png_error(png_ptr, "Insufficient memory for save_buffer");
       }
 
       memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
       png_free(png_ptr, old_buffer);
-      old_buffer = NULL;
       png_ptr->save_buffer_max = new_max;
    }
    if (png_ptr->current_buffer_size)
@@ -681,7 +591,7 @@
        * are of different types and we don't know which variable has the fewest
        * bits.  Carefully select the smaller and cast it to the type of the
        * larger - this cannot overflow.  Do not cast in the following test - it
-       * will break on either 16 or 64 bit platforms.
+       * will break on either 16-bit or 64-bit platforms.
        */
       if (idat_size < save_size)
          save_size = (png_size_t)idat_size;
@@ -724,6 +634,7 @@
       png_ptr->current_buffer_size -= save_size;
       png_ptr->current_buffer_ptr += save_size;
    }
+
    if (png_ptr->idat_size == 0)
    {
       PNG_PUSH_SAVE_BUFFER_IF_LT(4)
@@ -754,7 +665,7 @@
     * or the stream marked as finished.
     */
    while (png_ptr->zstream.avail_in > 0 &&
-      !(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED))
+      (png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0)
    {
       int ret;
 
@@ -779,7 +690,7 @@
        * change the current behavior (see comments in inflate.c
        * for why this doesn't happen at present with zlib 1.2.5).
        */
-      ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
+      ret = PNG_INFLATE(png_ptr, Z_SYNC_FLUSH);