changeset 15780:2cf89e39af00

Merge
author dlong
date Tue, 20 Sep 2016 16:34:47 -0400
parents cb35da7fa7a9 511e3dcdf740
children a1f77096eb86
files make/data/cryptopolicy/limited/default_local.policy make/data/cryptopolicy/limited/exempt_local.policy make/data/cryptopolicy/unlimited/default_US_export.policy make/data/cryptopolicy/unlimited/default_local.policy make/gendata/GendataPolicyJars.gmk src/java.base/share/classes/sun/text/resources/BreakIteratorRulesProvider.java src/jdk.localedata/share/classes/sun/text/resources/thai_dict test/sun/security/krb5/auto/unreachable.krb5.conf test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256
diffstat 764 files changed, 33710 insertions(+), 6827 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Aug 26 12:20:09 2016 -0700
+++ b/.hgtags	Tue Sep 20 16:34:47 2016 -0400
@@ -376,3 +376,6 @@
 8c57f4c293bbc5609928308a6d91ba765760b5f9 jdk-9+131
 d5c70818cd8a82e76632c8c815bdb4f75f53aeaf jdk-9+132
 3cdae27c90b5e41afe75eab904fda19fac076330 jdk-9+133
+803adcd526d74ae0b64948d1f8260c2dbe514779 jdk-9+134
+021369229cfd0b5feb76834b2ea498f47f43c0f3 jdk-9+135
+54c5931849a33a363e03fdffa141503f5cc4779d jdk-9+136
--- a/make/GenerateClasslist.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/GenerateClasslist.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -50,6 +50,8 @@
 
 CLASSLIST_FILE := $(SUPPORT_OUTPUTDIR)/classlist/classlist
 
+JLI_TRACE_FILE := $(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
+
 # If an external buildjdk has been supplied, we don't build a separate interim
 # image, so just use the external build jdk instead.
 ifeq ($(EXTERNAL_BUILDJDK), true)
@@ -59,13 +61,11 @@
 $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
 	$(call MakeDir, $(@D))
 	$(call LogInfo, Generating lib/classlist)
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \
+	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
+	    -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
-	    build.tools.classlist.HelloClasslist $(LOG_DEBUG) 2>&1
-        # Filter out generated classes, remove after JDK-8149977
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
-	    -Xshare:dump -XX:SharedClassListFile=$@.tmp $(LOG_DEBUG) 2>&1
-	$(RM) $@.tmp
+	    build.tools.classlist.HelloClasslist \
+	    $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
 
 TARGETS += $(CLASSLIST_FILE)
 
--- a/make/data/cryptopolicy/limited/default_local.policy	Fri Aug 26 12:20:09 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-// Some countries have import limits on crypto strength. This policy file
-// is worldwide importable.
-
-grant {
-    permission javax.crypto.CryptoPermission "DES", 64;
-    permission javax.crypto.CryptoPermission "DESede", *;
-    permission javax.crypto.CryptoPermission "RC2", 128, 
-                                     "javax.crypto.spec.RC2ParameterSpec", 128;
-    permission javax.crypto.CryptoPermission "RC4", 128;
-    permission javax.crypto.CryptoPermission "RC5", 128, 
-          "javax.crypto.spec.RC5ParameterSpec", *, 12, *;
-    permission javax.crypto.CryptoPermission "RSA", *;
-    permission javax.crypto.CryptoPermission *, 128;
-};
--- a/make/data/cryptopolicy/limited/exempt_local.policy	Fri Aug 26 12:20:09 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-// Some countries have import limits on crypto strength. So this file
-// will be useful.
-
-grant {
-    // There is no restriction to any algorithms if KeyRecovery is enforced.
-    permission javax.crypto.CryptoPermission *, "KeyRecovery"; 
-
-    // There is no restriction to any algorithms if KeyEscrow is enforced.
-    permission javax.crypto.CryptoPermission *, "KeyEscrow"; 
-
-    // There is no restriction to any algorithms if KeyWeakening is enforced. 
-    permission javax.crypto.CryptoPermission *, "KeyWeakening";
-};
--- a/make/data/cryptopolicy/unlimited/default_US_export.policy	Fri Aug 26 12:20:09 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-// Manufacturing policy file.
-grant {
-    // There is no restriction to any algorithms.
-    permission javax.crypto.CryptoAllPermission; 
-};
--- a/make/data/cryptopolicy/unlimited/default_local.policy	Fri Aug 26 12:20:09 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-// Country-specific policy file for countries with no limits on crypto strength.
-grant {
-    // There is no restriction to any algorithms.
-    permission javax.crypto.CryptoAllPermission; 
-};
--- a/make/gendata/Gendata-java.base.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/gendata/Gendata-java.base.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -34,7 +34,7 @@
 
 include GendataBlacklistedCerts.gmk
 
-include GendataPolicyJars.gmk
+include GendataCryptoPolicy.gmk
 
 ################################################################################
 
@@ -64,13 +64,19 @@
 GENDATA_JAVA_SECURITY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security
 GENDATA_JAVA_SECURITY := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/java.security
 
+ifeq ($(UNLIMITED_CRYPTO), true)
+    CRYPTO.POLICY := unlimited
+else
+    CRYPTO.POLICY := limited
+endif
+
 # RESTRICTED_PKGS_SRC is optionally set in custom extension for this makefile
 
 $(GENDATA_JAVA_SECURITY): $(BUILD_TOOLS) $(GENDATA_JAVA_SECURITY_SRC) $(RESTRICTED_PKGS_SRC)
 	$(call LogInfo, Generating java.security)
 	$(call MakeDir, $(@D))
 	$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
-	    $(OPENJDK_TARGET_CPU_ARCH) $(RESTRICTED_PKGS_SRC)
+	    $(OPENJDK_TARGET_CPU_ARCH) $(CRYPTO.POLICY) $(RESTRICTED_PKGS_SRC)
 
 TARGETS += $(GENDATA_JAVA_SECURITY)
 
--- a/make/gendata/GendataBreakIterator.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/gendata/GendataBreakIterator.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -81,7 +81,7 @@
 
 # output
 BASE_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
-LD_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
+LD_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources/ext
 BIFILES := $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
     $(BASE_DATA_PKG_DIR)/WordBreakIteratorData \
     $(BASE_DATA_PKG_DIR)/LineBreakIteratorData \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/gendata/GendataCryptoPolicy.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# In pre-JDK9 releases, Oracle JDK has had a separately downloadable set
+# of policy files which has been a nightmare for deployment.
+#
+# We now create 2 complete initial sets of policy files and package into 
+# 2 different directories.  The crypto.policy Security property will select
+# the active policy.
+#
+# It will be up to the user/deployer to make an informed choice
+# as to whether they are legally entitled to use the unlimited policy
+# file in their environment.  The $(UNLIMITED_CRYPTO) make variable
+# determines the default directory/policy.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+
+################################################################################
+POLICY_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/policy
+LIMITED_POLICY_DIR := $(POLICY_DIR)/limited
+UNLIMITED_POLICY_DIR := $(POLICY_DIR)/unlimited
+
+POLICY_SRC_DIR := $(JDK_TOPDIR)/src/java.base/share/conf/security/policy
+LIMITED_POLICY_SRC_DIR := $(POLICY_SRC_DIR)/limited
+UNLIMITED_POLICY_SRC_DIR := $(POLICY_SRC_DIR)/unlimited
+
+$(POLICY_DIR)/README.txt: $(POLICY_SRC_DIR)/README.txt
+	$(install-file)
+
+$(LIMITED_POLICY_DIR)/%: $(LIMITED_POLICY_SRC_DIR)/%
+	$(install-file)
+
+$(UNLIMITED_POLICY_DIR)/%: $(UNLIMITED_POLICY_SRC_DIR)/%
+	$(install-file)
+
+TARGETS += \
+    $(POLICY_DIR)/README.txt \
+    $(LIMITED_POLICY_DIR)/default_US_export.policy \
+    $(LIMITED_POLICY_DIR)/default_local.policy \
+    $(LIMITED_POLICY_DIR)/exempt_local.policy \
+    $(UNLIMITED_POLICY_DIR)/default_US_export.policy \
+    $(UNLIMITED_POLICY_DIR)/default_local.policy \
+
+################################################################################
--- a/make/gendata/GendataPolicyJars.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JarArchive.gmk
-
-
-################################################################################
-
-US_EXPORT_POLICY_JAR_DST := \
-    $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/US_export_policy.jar
-
-US_EXPORT_POLICY_JAR_LIMITED := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/limited/US_export_policy.jar
-US_EXPORT_POLICY_JAR_UNLIMITED := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy.jar
-
-#
-# TODO fix so that SetupJarArchive does not write files into SRCS
-# then we don't need this extra copying
-#
-# NOTE: We currently do not place restrictions on our limited export
-# policy. This was not a typo. This means we are shipping the same file
-# for both limited and unlimited US_export_policy.jar.  Only the local
-# policy file currently has restrictions.
-#
-US_EXPORT_POLICY_JAR_SRC_DIR := \
-    $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
-US_EXPORT_POLICY_JAR_TMP := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy_jar.tmp
-
-$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
-	$(install-file)
-
-US_EXPORT_POLICY_JAR_DEPS := \
-    $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
-
-$(eval $(call SetupJarArchive, BUILD_US_EXPORT_POLICY_JAR, \
-    DEPENDENCIES := $(US_EXPORT_POLICY_JAR_DEPS), \
-    SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
-    SUFFIXES := .policy, \
-    JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED), \
-    EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-    SKIP_METAINF := true, \
-))
-
-$(US_EXPORT_POLICY_JAR_LIMITED): \
-    $(US_EXPORT_POLICY_JAR_UNLIMITED)
-	$(call LogInfo, Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@))
-	$(install-file)
-
-TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
-
-ifeq ($(UNLIMITED_CRYPTO), true)
-  $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED)
-	$(install-file)
-else
-  $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
-	$(install-file)
-endif
-
-POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
-
-################################################################################
-
-LOCAL_POLICY_JAR_DST := \
-    $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/local_policy.jar
-
-LOCAL_POLICY_JAR_LIMITED := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy.jar
-LOCAL_POLICY_JAR_UNLIMITED := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy.jar
-
-#
-# TODO fix so that SetupJarArchive does not write files into SRCS
-# then we don't need this extra copying
-#
-LOCAL_POLICY_JAR_LIMITED_TMP := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy_jar.tmp
-LOCAL_POLICY_JAR_UNLIMITED_TMP := \
-    $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy_jar.tmp
-
-$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \
-    $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
-	$(install-file)
-
-$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: \
-    $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
-	$(install-file)
-
-$(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_LIMITED, \
-    DEPENDENCIES := $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
-        $(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
-    SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
-    SUFFIXES := .policy, \
-    JAR := $(LOCAL_POLICY_JAR_LIMITED), \
-    EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
-    SKIP_METAINF := true, \
-))
-
-$(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
-    DEPENDENCIES := $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
-    SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
-    SUFFIXES := .policy, \
-    JAR := $(LOCAL_POLICY_JAR_UNLIMITED), \
-    EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-    SKIP_METAINF := true, \
-))
-
-TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED)
-
-ifeq ($(UNLIMITED_CRYPTO), true)
-  $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED)
-	$(install-file)
-else
-  $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED)
-	$(install-file)
-endif
-
-POLICY_JARS += $(LOCAL_POLICY_JAR_DST)
-TARGETS += $(POLICY_JARS)
-
-################################################################################
-
-$(eval $(call IncludeCustomExtension, jdk, gendata/GendataPolicyJars.gmk))
--- a/make/gensrc/GensrcVarHandles.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/gensrc/GensrcVarHandles.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -44,6 +44,10 @@
     $1_ARGS += -KAtomicAdd
   endif
 
+  ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char Int Long), )
+    $1_ARGS += -KBitwise
+  endif
+
   ifneq ($$(findstring $$($1_Type), Byte Short Char), )
     $1_ARGS += -KShorterThanInt
   endif
@@ -101,6 +105,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Long)
@@ -113,6 +118,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Float)
--- a/make/lib/Lib-jdk.crypto.pkcs11.gmk	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/lib/Lib-jdk.crypto.pkcs11.gmk	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 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
@@ -38,8 +38,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.pkcs11, \
-    DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
-    DISABLED_WARNINGS_microsoft := 4013 4267, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/mapfiles/libattach/mapfile-linux	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libattach/mapfile-linux	Tue Sep 20 16:34:47 2016 -0400
@@ -30,8 +30,6 @@
 	    Java_sun_tools_attach_VirtualMachineImpl_checkPermissions;
 	    Java_sun_tools_attach_VirtualMachineImpl_close;
 	    Java_sun_tools_attach_VirtualMachineImpl_connect;
-	    Java_sun_tools_attach_VirtualMachineImpl_getLinuxThreadsManager;
-	    Java_sun_tools_attach_VirtualMachineImpl_isLinuxThreads;
 	    Java_sun_tools_attach_VirtualMachineImpl_open;
 	    Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo;
             Java_sun_tools_attach_VirtualMachineImpl_sendQuitToChildrenOf;
--- a/make/mapfiles/libawt/mapfile-mawt-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libawt/mapfile-mawt-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 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
@@ -22,259 +22,261 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-#		Java_java_awt_KeyboardFocusManager_getGlobalHeavyweightFocusOwner;
 
 # Define public interface.
 # These are the libmawt exports. See mapfile-vers for the libawt exports
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_sun_awt_UNIXToolkit_check_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1gtk;
-                Java_sun_awt_UNIXToolkit_unload_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1stock_1icon;
-                Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
-		Java_sun_awt_UNIXToolkit_nativeSync;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-		Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_swapBuffers;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-                Java_sun_awt_X11GraphicsEnvironment_initGLX;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-                Java_sun_awt_X11GraphicsDevice_getConfigColormap;
-                Java_sun_awt_X11GraphicsDevice_getConfigDepth;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_sun_awt_UNIXToolkit_check_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1gtk;
+        Java_sun_awt_UNIXToolkit_unload_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1stock_1icon;
+        Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
+        Java_sun_awt_UNIXToolkit_nativeSync;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_createBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_initGLX;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11GraphicsDevice_getConfigColormap;
+        Java_sun_awt_X11GraphicsDevice_getConfigDepth;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-                Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initOps;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-		Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-		Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initOps;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-		Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-		Java_sun_java2d_x11_XSurfaceData_XResetClip;
-		Java_sun_java2d_x11_XSurfaceData_XSetClip;
-		Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-		Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
-		Java_sun_java2d_xr_XRSurfaceData_initIDs;
-		Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-		Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-		Java_sun_java2d_xr_XRBackendNative_initIDs;
-		Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
-		Java_sun_java2d_xr_XRBackendNative_freeGC;
-		Java_sun_java2d_xr_XRBackendNative_createGC;
-		Java_sun_java2d_xr_XRBackendNative_createPixmap;
-		Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-		Java_sun_java2d_xr_XRBackendNative_freePicture;
-		Java_sun_java2d_xr_XRBackendNative_freePixmap;
-		Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-		Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-		Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-		Java_sun_java2d_xr_XRBackendNative_copyArea;
-		Java_sun_java2d_xr_XRBackendNative_renderComposite;
-		Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-		Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-		Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_setFilter;
-		Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-		Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-		Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-		Java_sun_java2d_xr_XRBackendNative_setGCMode;
-		Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-		Java_sun_java2d_xr_XRUtils_initFormatPtrs;
-		Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
-		XRT_DrawGlyphList;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
+        Java_sun_java2d_xr_XRSurfaceData_initIDs;
+        Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRUtils_initFormatPtrs;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        XRT_DrawGlyphList;
 
-                Java_sun_java2d_opengl_OGLContext_getOGLIdString;
-                Java_sun_java2d_opengl_OGLMaskFill_maskFill;
-                Java_sun_java2d_opengl_OGLRenderer_drawPoly;
-                Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
-                Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
-                Java_sun_java2d_opengl_GLXSurfaceData_initOps;
+        Java_sun_java2d_opengl_OGLContext_getOGLIdString;
+        Java_sun_java2d_opengl_OGLMaskFill_maskFill;
+        Java_sun_java2d_opengl_OGLRenderer_drawPoly;
+        Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
+        Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
+        Java_sun_java2d_opengl_GLXSurfaceData_initOps;
 
-                Java_sun_print_CUPSPrinter_initIDs;
-                Java_sun_print_CUPSPrinter_getCupsServer;
-                Java_sun_print_CUPSPrinter_getCupsPort;
-                Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-                Java_sun_print_CUPSPrinter_canConnect;
-                Java_sun_print_CUPSPrinter_getMedia;
-                Java_sun_print_CUPSPrinter_getPageSizes;
-                Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
 
-		awt_display;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        awt_display;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+            Java_sun_font_FontConfigManager_getFontConfig;
+            Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libawt/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -27,163 +27,163 @@
 # These are the libawt exports, mapfile-mawt-vers contains the libmawt exports.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-                Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-                Java_sun_java2d_loops_DrawPath_DrawPath;
-                Java_sun_java2d_loops_FillPath_FillPath;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawPath_DrawPath;
+        Java_sun_java2d_loops_FillPath_FillPath;
 
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
-		Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-		Java_sun_java2d_loops_TransformHelper_Transform;
-		Java_sun_java2d_pipe_Region_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
+        Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_loops_TransformHelper_Transform;
+        Java_sun_java2d_pipe_Region_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                SurfaceData_IntersectBlitBounds;
-                SurfaceData_IntersectBoundsXYXY;
-		Region_GetBounds;
-		Region_GetInfo;
-		Region_StartIteration;
-		Region_CountIterationRects;
-		Region_NextIteration;
-		Region_EndIteration;
-		RegionToYXBandedRectangles;
-		GrPrim_CompGetXorInfo;
-		GrPrim_CompGetAlphaInfo;
-                J2dTraceImpl;
-                J2dTraceInit;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        SurfaceData_IntersectBlitBounds;
+        SurfaceData_IntersectBoundsXYXY;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        RegionToYXBandedRectangles;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        J2dTraceImpl;
+        J2dTraceInit;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                mul8table;
-                div8table;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        mul8table;
+        div8table;
+        jvm;
 
-                # ProcessPath entry points and data
-                doDrawPath;
-                doFillPath;
-                path2DNumTypesID;
-                path2DTypesID;
-                path2DWindingRuleID;
-                path2DFloatCoordsID;
-                sg2dStrokeHintID;
-                sunHints_INTVAL_STROKE_PURE;
+        # ProcessPath entry points and data
+        doDrawPath;
+        doFillPath;
+        path2DNumTypesID;
+        path2DTypesID;
+        path2DWindingRuleID;
+        path2DFloatCoordsID;
+        sg2dStrokeHintID;
+        sunHints_INTVAL_STROKE_PURE;
 
-		# CDE private entry points
-                # These are in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry points
+        # These are in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt/mapfile-vers-linux	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libawt/mapfile-vers-linux	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -27,277 +27,278 @@
 # Linux port does not use mawt, all public symbols are in libawt.so
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-		Java_java_awt_TrayIcon_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_Image_initIDs;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_java_awt_TrayIcon_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_Image_initIDs;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-		Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                Region_GetBounds;
-                Region_GetInfo;
-                Region_StartIteration;
-                Region_CountIterationRects;
-                Region_NextIteration;
-                Region_EndIteration;
-                GrPrim_CompGetXorInfo;
-                GrPrim_CompGetAlphaInfo;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        jvm;
 
-		# CDE private entry point
-                # This is in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
+        # CDE private entry point
+        # This is in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-                Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
 
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11PMBlitLoops_Blit;
+        Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_awt_X11Renderer_devFillSpans;
+        Java_sun_awt_X11Renderer_doDrawArc;
+        Java_sun_awt_X11Renderer_doDrawLine;
+        Java_sun_awt_X11Renderer_doDrawOval;
+        Java_sun_awt_X11Renderer_doDrawPoly;
+        Java_sun_awt_X11Renderer_doDrawRect;
+        Java_sun_awt_X11Renderer_doDrawRoundRect;
+        Java_sun_awt_X11Renderer_doFillArc;
+        Java_sun_awt_X11Renderer_doFillOval;
+        Java_sun_awt_X11Renderer_doFillPoly;
+        Java_sun_awt_X11Renderer_doFillRect;
+        Java_sun_awt_X11Renderer_doFillRoundRect;
+        Java_sun_awt_X11Renderer_devCopyArea;
+        Java_sun_awt_X11SurfaceData_initIDs;
+        Java_sun_awt_X11SurfaceData_initOps;
+        Java_sun_awt_X11SurfaceData_initSurface;
+        Java_sun_awt_X11SurfaceData_isDgaAvailable;
+        Java_sun_awt_X11SurfaceData_setInvalid;
+        Java_sun_awt_X11SurfaceData_flushNativeSurface;
+        awt_display;
+        awt_lock;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-		Java_sun_awt_X11PMBlitLoops_Blit;
-		Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_awt_X11Renderer_devFillSpans;
-		Java_sun_awt_X11Renderer_doDrawArc;
-		Java_sun_awt_X11Renderer_doDrawLine;
-		Java_sun_awt_X11Renderer_doDrawOval;
-		Java_sun_awt_X11Renderer_doDrawPoly;
-		Java_sun_awt_X11Renderer_doDrawRect;
-		Java_sun_awt_X11Renderer_doDrawRoundRect;
-		Java_sun_awt_X11Renderer_doFillArc;
-		Java_sun_awt_X11Renderer_doFillOval;
-		Java_sun_awt_X11Renderer_doFillPoly;
-		Java_sun_awt_X11Renderer_doFillRect;
-		Java_sun_awt_X11Renderer_doFillRoundRect;
-		Java_sun_awt_X11Renderer_devCopyArea;
-		Java_sun_awt_X11SurfaceData_initIDs;
-		Java_sun_awt_X11SurfaceData_initOps;
-		Java_sun_awt_X11SurfaceData_initSurface;
-		Java_sun_awt_X11SurfaceData_isDgaAvailable;
-		Java_sun_awt_X11SurfaceData_setInvalid;
-		Java_sun_awt_X11SurfaceData_flushNativeSurface;
-		awt_display;
-		awt_lock;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
-
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt_headless/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libawt_headless/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,85 +26,84 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-                Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-                Java_sun_java2d_x11_XSurfaceData_XResetClip;
-                Java_sun_java2d_x11_XSurfaceData_XSetClip;
-                Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
 
-		X11SurfaceData_GetOps;
-		Java_java_awt_Font_initIDs;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-                Java_sun_font_FontConfigManager_getFontConfigVersion;
-                Java_sun_awt_FcFontManager_getFontPathNative;
+        X11SurfaceData_GetOps;
+        Java_java_awt_Font_initIDs;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_font_FontConfigManager_getFontConfigVersion;
+        Java_sun_awt_FcFontManager_getFontPathNative;
 
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_PlatformFont_initIDs;
 
-		Java_sun_print_CUPSPrinter_initIDs;
-		Java_sun_print_CUPSPrinter_getCupsServer;
-		Java_sun_print_CUPSPrinter_getCupsPort;
-		Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-		Java_sun_print_CUPSPrinter_canConnect;
-		Java_sun_print_CUPSPrinter_getMedia;
-		Java_sun_print_CUPSPrinter_getPageSizes;
-		Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt_xawt/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libawt_xawt/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,7 +26,7 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-        global:
+    global:
         JNI_OnLoad;
         Java_sun_awt_X11_XlibWrapper_copyIntArray;
         Java_sun_awt_X11_XlibWrapper_copyLongArray;
@@ -58,8 +58,8 @@
         Java_sun_awt_X11_XlibWrapper_XSetLocaleModifiers;
         Java_sun_awt_X11_XlibWrapper_XPeekEvent;
         Java_sun_awt_X11_XlibWrapper_DefaultScreen;
-	Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
-	Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
+        Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
+        Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
         Java_sun_awt_X11_XlibWrapper_RootWindow;
         Java_sun_awt_X11_XlibWrapper_DisplayHeight;
         Java_sun_awt_X11_XlibWrapper_DisplayWidthMM;
@@ -172,7 +172,7 @@
         Java_java_awt_Scrollbar_initIDs;
         Java_java_awt_Window_initIDs;
         Java_java_awt_Frame_initIDs;
-	Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
         Java_sun_awt_UNIXToolkit_check_1gtk;
         Java_sun_awt_UNIXToolkit_load_1gtk;
         Java_sun_awt_UNIXToolkit_unload_1gtk;
@@ -196,17 +196,16 @@
         Java_sun_font_FontConfigManager_getFontConfig;
         Java_sun_font_FontConfigManager_getFontConfigAASettings;
         Java_sun_font_FontConfigManager_getFontConfigVersion;
-	Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_awt_FcFontManager_getFontPathNative;
         Java_sun_awt_X11GraphicsEnvironment_initDisplay;
         Java_sun_awt_X11GraphicsEnvironment_initGLX;
-	Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
         Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
         Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
         Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
         Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
         Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
         Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-#        Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
         Java_sun_awt_X11GraphicsDevice_initIDs;
         Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
         Java_sun_awt_X11GraphicsDevice_getConfigDepth;
@@ -231,16 +230,16 @@
         Java_sun_awt_X11GraphicsConfig_makeColorModel;
         Java_sun_awt_X11GraphicsConfig_pGetBounds;
         Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_swapBuffers;
-	Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
         Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout;
         Java_java_awt_Insets_initIDs;
         Java_java_awt_KeyboardFocusManager_initIDs;
         Java_java_awt_Font_initIDs;
         # libfontmanager entry points
         AWTIsHeadless;
-	AWTCountFonts;
+        AWTCountFonts;
         AWTLoadFont;
         AWTFreeFont;
         AWTFontAscent;
@@ -303,7 +302,7 @@
         Java_sun_awt_X11_XlibWrapper_XGetIconSizes;
         Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym;
         Java_sun_awt_X11_XlibWrapper_XKeysymToKeycode;
-	Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
+        Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
         Java_sun_awt_X11_XlibWrapper_XkbGetEffectiveGroup;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEvents;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEventDetails;
@@ -350,23 +349,23 @@
         Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
         Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
         Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-	Java_sun_java2d_x11_X11Renderer_XFillSpans;
-	Java_sun_java2d_x11_X11Renderer_XDrawArc;
-	Java_sun_java2d_x11_X11Renderer_XDrawLine;
-	Java_sun_java2d_x11_X11Renderer_XDrawOval;
-	Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-	Java_sun_java2d_x11_X11Renderer_XDrawRect;
-	Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
         Java_sun_java2d_x11_X11Renderer_XDoPath;
-	Java_sun_java2d_x11_X11Renderer_XFillArc;
-	Java_sun_java2d_x11_X11Renderer_XFillOval;
-	Java_sun_java2d_x11_X11Renderer_XFillPoly;
-	Java_sun_java2d_x11_X11Renderer_XFillRect;
-	Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
         Java_sun_java2d_x11_X11Renderer_devCopyArea;
         Java_sun_java2d_x11_X11SurfaceData_initIDs;
         Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-	Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
         Java_sun_java2d_x11_X11SurfaceData_initSurface;
         Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
         Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
@@ -377,40 +376,40 @@
         Java_sun_java2d_x11_XSurfaceData_XResetClip;
         Java_sun_java2d_x11_XSurfaceData_XSetClip;
         Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-	Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
         Java_sun_java2d_x11_XSurfaceData_setInvalid;
         Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
         Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
         Java_sun_java2d_xr_XRSurfaceData_initIDs;
         Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-	Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-	Java_sun_java2d_xr_XRBackendNative_initIDs;
-	Java_sun_java2d_xr_XRBackendNative_freeGC;
-	Java_sun_java2d_xr_XRBackendNative_createGC;
-	Java_sun_java2d_xr_XRBackendNative_createPixmap;
-	Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-	Java_sun_java2d_xr_XRBackendNative_freePicture;
-	Java_sun_java2d_xr_XRBackendNative_freePixmap;
-	Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-	Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-	Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-	Java_sun_java2d_xr_XRBackendNative_copyArea;
-	Java_sun_java2d_xr_XRBackendNative_renderComposite;
-	Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-	Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_setFilter;
-	Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-	Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-	Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-	Java_sun_java2d_xr_XRBackendNative_setGCMode;
-	Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
 
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
@@ -444,25 +443,28 @@
         Java_sun_awt_X11_GtkFileDialogPeer_toFront;
         Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
 
-	Java_sun_print_CUPSPrinter_initIDs;
-	Java_sun_print_CUPSPrinter_getCupsServer;
-	Java_sun_print_CUPSPrinter_getCupsPort;
-	Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-	Java_sun_print_CUPSPrinter_canConnect;
-	Java_sun_print_CUPSPrinter_getMedia;
-	Java_sun_print_CUPSPrinter_getPageSizes;
-	Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
         awt_GetDrawingSurface;
         awt_FreeDrawingSurface;
         awt_Unlock;
         awt_Lock;
         awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
         #XAWT entry point for CDE
         Java_sun_awt_motif_XsessionWMcommand;
         Java_sun_awt_motif_XsessionWMcommand_New;
 
-        local:
-                *;
+    local:
+        *;
 };
--- a/make/mapfiles/libjava/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libjava/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -176,6 +176,9 @@
 		Java_java_lang_ProcessHandleImpl_00024Info_info0;
 		Java_java_lang_ProcessImpl_init;
 		Java_java_lang_ProcessImpl_forkAndExec;
+		Java_java_lang_ref_Reference_getAndClearReferencePendingList;
+		Java_java_lang_ref_Reference_hasReferencePendingList;
+		Java_java_lang_ref_Reference_waitForReferencePendingList;
 		Java_java_lang_reflect_Array_get;
 		Java_java_lang_reflect_Array_getBoolean;
 		Java_java_lang_reflect_Array_getByte;
--- a/make/mapfiles/libjawt/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libjawt/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,8 +26,8 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-	    JAWT_GetAWT;
-	local:
-	    *;
+    global:
+        JAWT_GetAWT;
+    local:
+        *;
 };
--- a/make/mapfiles/libjpeg/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libjpeg/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,30 +26,30 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_image_JPEGImageDecoder_initIDs;
-		Java_sun_awt_image_JPEGImageDecoder_readImage;
+        Java_sun_awt_image_JPEGImageDecoder_initIDs;
+        Java_sun_awt_image_JPEGImageDecoder_readImage;
 
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
-	local:
-		*;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
+    local:
+        *;
 };
--- a/make/mapfiles/libjsound/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libjsound/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,60 +26,60 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_Platform_nGetExtraLibraries;
-            Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
-            Java_com_sun_media_sound_Platform_nIsBigEndian;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-	local:
-	    *;
+    global:
+		Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+		Java_com_sun_media_sound_DirectAudioDevice_nClose;
+		Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+		Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+		Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+		Java_com_sun_media_sound_DirectAudioDevice_nRead;
+		Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+		Java_com_sun_media_sound_DirectAudioDevice_nService;
+		Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nStart;
+		Java_com_sun_media_sound_DirectAudioDevice_nStop;
+		Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+		Java_com_sun_media_sound_MidiInDevice_nClose;
+		Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+		Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiInDevice_nOpen;
+		Java_com_sun_media_sound_MidiInDevice_nStart;
+		Java_com_sun_media_sound_MidiInDevice_nStop;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_MidiOutDevice_nClose;
+		Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiOutDevice_nOpen;
+		Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+		Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_Platform_nGetExtraLibraries;
+		Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
+		Java_com_sun_media_sound_Platform_nIsBigEndian;
+		Java_com_sun_media_sound_PortMixer_nClose;
+		Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+		Java_com_sun_media_sound_PortMixer_nGetControls;
+		Java_com_sun_media_sound_PortMixer_nGetPortCount;
+		Java_com_sun_media_sound_PortMixer_nGetPortName;
+		Java_com_sun_media_sound_PortMixer_nGetPortType;
+		Java_com_sun_media_sound_PortMixer_nOpen;
+		Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+		Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+    local:
+        *;
 };
--- a/make/mapfiles/libjsoundalsa/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libjsoundalsa/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,57 +26,57 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-	local:
-	    *;
+    global:
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+        Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+        Java_com_sun_media_sound_DirectAudioDevice_nClose;
+        Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+        Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+        Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+        Java_com_sun_media_sound_DirectAudioDevice_nRead;
+        Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+        Java_com_sun_media_sound_DirectAudioDevice_nService;
+        Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nStart;
+        Java_com_sun_media_sound_DirectAudioDevice_nStop;
+        Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiInDevice_nClose;
+        Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+        Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiInDevice_nOpen;
+        Java_com_sun_media_sound_MidiInDevice_nStart;
+        Java_com_sun_media_sound_MidiInDevice_nStop;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiOutDevice_nClose;
+        Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiOutDevice_nOpen;
+        Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+        Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+        Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+        Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+        Java_com_sun_media_sound_PortMixer_nClose;
+        Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+        Java_com_sun_media_sound_PortMixer_nGetControls;
+        Java_com_sun_media_sound_PortMixer_nGetPortCount;
+        Java_com_sun_media_sound_PortMixer_nGetPortName;
+        Java_com_sun_media_sound_PortMixer_nGetPortType;
+        Java_com_sun_media_sound_PortMixer_nOpen;
+    local:
+        *;
 };
--- a/make/mapfiles/libsplashscreen/mapfile-vers	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/mapfiles/libsplashscreen/mapfile-vers	Tue Sep 20 16:34:47 2016 -0400
@@ -26,24 +26,24 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		Java_java_awt_SplashScreen__1update;
-		Java_java_awt_SplashScreen__1isVisible;
-		Java_java_awt_SplashScreen__1getBounds;
-		Java_java_awt_SplashScreen__1getInstance;
-		Java_java_awt_SplashScreen__1close;
-                Java_java_awt_SplashScreen__1getImageFileName;
-                Java_java_awt_SplashScreen__1getImageJarName;
-                Java_java_awt_SplashScreen__1setImageData;
-                Java_java_awt_SplashScreen__1getScaleFactor;
+    global:
+        Java_java_awt_SplashScreen__1update;
+        Java_java_awt_SplashScreen__1isVisible;
+        Java_java_awt_SplashScreen__1getBounds;
+        Java_java_awt_SplashScreen__1getInstance;
+        Java_java_awt_SplashScreen__1close;
+        Java_java_awt_SplashScreen__1getImageFileName;
+        Java_java_awt_SplashScreen__1getImageJarName;
+        Java_java_awt_SplashScreen__1setImageData;
+        Java_java_awt_SplashScreen__1getScaleFactor;
 
-		SplashLoadMemory;
-		SplashLoadFile;
-		SplashInit;
-		SplashClose;
-                SplashSetFileJarName;
-                SplashSetScaleFactor;
-                SplashGetScaledImageName;
-	local:
-		*;
+        SplashLoadMemory;
+        SplashLoadFile;
+        SplashInit;
+        SplashClose;
+        SplashSetFileJarName;
+        SplashSetScaleFactor;
+        SplashGetScaledImageName;
+    local:
+        *;
 };
--- a/make/src/classes/build/tools/makejavasecurity/MakeJavaSecurity.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/make/src/classes/build/tools/makejavasecurity/MakeJavaSecurity.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -35,7 +35,8 @@
  *
  * 1. Adds additional packages to the package.access and
  *    package.definition security properties.
- * 2. Filter out platform-unrelated parts
+ * 2. Filter out platform-unrelated parts.
+ * 3. Set the JCE jurisdiction policy directory.
  *
  * In order to easily maintain platform-related entries, every item
  * (including the last line) in package.access and package.definition
@@ -50,12 +51,13 @@
 
     public static void main(String[] args) throws Exception {
 
-        if (args.length < 4) {
+        if (args.length < 5) {
             System.err.println("Usage: java MakeJavaSecurity " +
                                "[input java.security file name] " +
                                "[output java.security file name] " +
                                "[openjdk target os] " +
                                "[openjdk target cpu architecture]" +
+                               "[JCE jurisdiction policy directory]" +
                                "[more restricted packages file name?]");
 
                     System.exit(1);
@@ -63,8 +65,8 @@
 
         // more restricted packages
         List<String> extraLines;
-        if (args.length == 5) {
-            extraLines = Files.readAllLines(Paths.get(args[4]));
+        if (args.length == 6) {
+            extraLines = Files.readAllLines(Paths.get(args[5]));
         } else {
             extraLines = Collections.emptyList();
         }
@@ -135,6 +137,16 @@
             }
         }
 
+        // Set the JCE policy value
+        for (int i = 0; i < lines.size(); i++) {
+            String line = lines.get(i);
+            int index = line.indexOf("crypto.policydir-tbd");
+            if (index >= 0) {
+                String prefix = line.substring(0, index);
+                lines.set(i, prefix + args[4]);
+            }
+        }
+
         // Clean up the last line of PKG_ACC and PKG_DEF blocks.
         // Not really necessary since a blank line follows.
         boolean inBlock = false;
--- a/src/java.base/aix/native/libnet/aix_close.c	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/aix/native/libnet/aix_close.c	Tue Sep 20 16:34:47 2016 -0400
@@ -410,6 +410,10 @@
     BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
 }
 
+int NET_NonBlockingRead(int s, void* buf, size_t len) {
+    BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK));
+}
+
 int NET_ReadV(int s, const struct iovec * vector, int count) {
     BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
 }
@@ -503,8 +507,8 @@
  * Auto restarts with adjusted timeout if interrupted by
  * signal other than our wakeup signal.
  */
-int NET_Timeout(int s, long timeout) {
-    long prevtime = 0, newtime;
+int NET_Timeout0(int s, long timeout, long currentTime) {
+    long prevtime = currentTime, newtime;
     struct timeval t;
     fdEntry_t *fdEntry = getFdEntry(s);
 
@@ -516,14 +520,6 @@
         return -1;
     }
 
-    /*
-     * Pick up current time as may need to adjust timeout
-     */
-    if (timeout > 0) {
-        gettimeofday(&t, NULL);
-        prevtime = t.tv_sec * 1000  +  t.tv_usec / 1000;
-    }
-
     for(;;) {
         struct pollfd pfd;
         int rv;
--- a/src/java.base/linux/native/libnet/linux_close.c	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/linux/native/libnet/linux_close.c	Tue Sep 20 16:34:47 2016 -0400
@@ -367,6 +367,10 @@
     BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
 }
 
+int NET_NonBlockingRead(int s, void* buf, size_t len) {
+    BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) );
+}
+
 int NET_ReadV(int s, const struct iovec * vector, int count) {
     BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
 }
@@ -406,8 +410,8 @@
  * Auto restarts with adjusted timeout if interrupted by
  * signal other than our wakeup signal.
  */
-int NET_Timeout(int s, long timeout) {
-    long prevtime = 0, newtime;
+int NET_Timeout0(int s, long timeout, long currentTime) {
+    long prevtime = currentTime, newtime;
     struct timeval t;
     fdEntry_t *fdEntry = getFdEntry(s);
 
@@ -419,14 +423,6 @@
         return -1;
     }
 
-    /*
-     * Pick up current time as may need to adjust timeout
-     */
-    if (timeout > 0) {
-        gettimeofday(&t, NULL);
-        prevtime = t.tv_sec * 1000  +  t.tv_usec / 1000;
-    }
-
     for(;;) {
         struct pollfd pfd;
         int rv;
--- a/src/java.base/macosx/native/libnet/bsd_close.c	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/macosx/native/libnet/bsd_close.c	Tue Sep 20 16:34:47 2016 -0400
@@ -371,6 +371,10 @@
     BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
 }
 
+int NET_NonBlockingRead(int s, void* buf, size_t len) {
+    BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT));
+}
+
 int NET_ReadV(int s, const struct iovec * vector, int count) {
     BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
 }
@@ -410,8 +414,8 @@
  * Auto restarts with adjusted timeout if interrupted by
  * signal other than our wakeup signal.
  */
-int NET_Timeout(int s, long timeout) {
-    long prevtime = 0, newtime;
+int NET_Timeout0(int s, long timeout, long currentTime) {
+    long prevtime = currentTime, newtime;
     struct timeval t, *tp = &t;
     fd_set fds;
     fd_set* fdsp = NULL;
@@ -432,9 +436,6 @@
      */
     if (timeout > 0) {
         /* Timed */
-        struct timeval now;
-        gettimeofday(&now, NULL);
-        prevtime = now.tv_sec * 1000  +  now.tv_usec / 1000;
         t.tv_sec = timeout / 1000;
         t.tv_usec = (timeout % 1000) * 1000;
     } else if (timeout < 0) {
--- a/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -123,7 +123,6 @@
     kevent(kq, changes, 2, errors, 2, &dontBlock);
 }
 
-
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_KQueueArrayWrapper_kevent0(JNIEnv *env, jobject this, jint kq,
                                            jlong kevAddr, jint kevCount,
@@ -138,6 +137,15 @@
     // Java timeout == -1 : wait forever : timespec timeout of NULL
     // Java timeout == 0  : return immediately : timespec timeout of zero
     if (timeout >= 0) {
+        // For some indeterminate reason kevent(2) has been found to fail with
+        // an EINVAL error for timeout values greater than or equal to
+        // 100000001000L. To avoid this problem, clamp the timeout arbitrarily
+        // to the maximum value of a 32-bit signed integer which is
+        // approximately 25 days in milliseconds.
+        const jlong timeoutMax = 0x7fffffff; // java.lang.Integer.MAX_VALUE
+        if (timeout > timeoutMax) {
+            timeout = timeoutMax;
+        }
         ts.tv_sec = timeout / 1000;
         ts.tv_nsec = (timeout % 1000) * 1000000; //nanosec = 1 million millisec
         tsp = &ts;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -476,7 +476,8 @@
             } else if (localICs.isEmpty()) {
                 // It was a non-empty diff, but the local ICs were absent.
                 actualICs = null;
-                changed = 0;  // [] => null, no tuple change
+                // [] => null, no tuple change, but attribute deletion.
+                changed = -1;
             } else {
                 // Non-trivial diff was transmitted.
                 actualICs = computeICdiff();
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -1193,18 +1193,21 @@
         cls.visitRefs(VRM_CLASSIC, cpRefs);
 
         ArrayList<BootstrapMethodEntry> bsms = new ArrayList<>();
-        /*
-         * BootstrapMethod(BSMs) are added here before InnerClasses(ICs),
-         * so as to ensure the order. Noting that the BSMs  may be
-         * removed if they are not found in the CP, after the ICs expansion.
-         */
-        cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
-
         // flesh out the local constant pool
         ConstantPool.completeReferencesIn(cpRefs, true, bsms);
 
+        // add the bsm and references as required
+        if (!bsms.isEmpty()) {
+            cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
+            cpRefs.add(Package.getRefString("BootstrapMethods"));
+            Collections.sort(bsms);
+            cls.setBootstrapMethods(bsms);
+        }
+
         // Now that we know all our local class references,
         // compute the InnerClasses attribute.
+        // An InnerClasses attribute usually gets added here,
+        // although it might already have been present.
         int changed = cls.expandLocalICs();
 
         if (changed != 0) {
@@ -1221,16 +1224,6 @@
             ConstantPool.completeReferencesIn(cpRefs, true, bsms);
         }
 
-        // remove the attr previously set, otherwise add the bsm and
-        // references as required
-        if (bsms.isEmpty()) {
-            cls.attributes.remove(Package.attrBootstrapMethodsEmpty.canonicalInstance());
-        } else {
-            cpRefs.add(Package.getRefString("BootstrapMethods"));
-            Collections.sort(bsms);
-            cls.setBootstrapMethods(bsms);
-        }
-
         // construct a local constant pool
         int numDoubles = 0;
         for (Entry e : cpRefs) {
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/intrinsic.properties	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/intrinsic.properties	Tue Sep 20 16:34:47 2016 -0400
@@ -18,7 +18,7 @@
 pack.class.attribute.Module = NH[RUHFH]NH[RUHNH[RUH]]NH[RCH]NH[RCHRCH]
 pack.class.attribute.ConcealedPackages = NH[RUH]
 pack.class.attribute.Version = RUH
-pack.class.attribute.MainClass = RUH
+pack.class.attribute.MainClass = RCH
 pack.class.attribute.TargetPlatform = RUHRUHRUH
 pack.class.attribute.Hashes = RUHNH[RUHRUH]
 
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Sep 20 16:34:47 2016 -0400
@@ -27,6 +27,7 @@
 
 import java.io.InputStream;
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.io.File;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
@@ -46,12 +47,16 @@
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
+import java.util.Spliterator;
+import java.util.Spliterators;
 import java.util.Stack;
 import java.util.NoSuchElementException;
 import java.util.Vector;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
 import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
 
 import jdk.internal.perf.PerfCounter;
 import jdk.internal.module.ServicesCatalog;
@@ -1167,17 +1172,7 @@
     protected final Class<?> findSystemClass(String name)
         throws ClassNotFoundException
     {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            if (!checkName(name))
-                throw new ClassNotFoundException(name);
-            Class<?> cls = findBootstrapClass(name);
-            if (cls == null) {
-                throw new ClassNotFoundException(name);
-            }
-            return cls;
-        }
-        return system.loadClass(name);
+        return getSystemClassLoader().loadClass(name);
     }
 
     /**
@@ -1354,6 +1349,57 @@
     }
 
     /**
+     * Returns a stream whose elements are the URLs of all the resources with
+     * the given name. A resource is some data (images, audio, text, etc) that
+     * can be accessed by class code in a way that is independent of the
+     * location of the code.
+     *
+     * Resources in a named module are private to that module. This method does
+     * not find resources in named modules.
+     *
+     * <p> The name of a resource is a {@code /}-separated path name that
+     * identifies the resource.
+     *
+     * <p> The search order is described in the documentation for {@link
+     * #getResource(String)}.
+     *
+     * <p> The resources will be located when the returned stream is evaluated.
+     * If the evaluation results in an {@code IOException} then the I/O
+     * exception is wrapped in an {@link UncheckedIOException} that is then
+     * thrown.
+     *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResource(java.lang.String) getResource(String)} method. This should
+     * ensure that the first element returned by the stream is the same
+     * resource that the {@code getResource(String)} method would return.
+     *
+     * @param  name
+     *         The resource name
+     *
+     * @return  A stream of resource {@link java.net.URL URL} objects. If no
+     *          resources could  be found, the stream will be empty.  Resources
+     *          that the class loader doesn't have access to will not be in the
+     *          stream.
+     *
+     * @see  #findResources(String)
+     *
+     * @since  9
+     */
+    public Stream<URL> resources(String name) {
+        int characteristics = Spliterator.NONNULL | Spliterator.IMMUTABLE;
+        Supplier<Spliterator<URL>> si = () -> {
+            try {
+                return Spliterators.spliteratorUnknownSize(
+                    getResources(name).asIterator(), characteristics);
+            } catch (IOException e) {
+                throw new UncheckedIOException(e);
+            }
+        };
+        return StreamSupport.stream(si, characteristics, false);
+    }
+
+    /**
      * Finds the resource with the given name. Class loader implementations
      * should override this method to specify where to find resources.
      *
@@ -1437,11 +1483,7 @@
      * @since  1.1
      */
     public static URL getSystemResource(String name) {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            return BootLoader.findResource(name);
-        }
-        return system.getResource(name);
+        return getSystemClassLoader().getResource(name);
     }
 
     /**
@@ -1464,17 +1506,13 @@
      *
      * @throws  IOException
      *          If I/O errors occur
-
+     *
      * @since  1.2
      */
     public static Enumeration<URL> getSystemResources(String name)
         throws IOException
     {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            return BootLoader.findResources(name);
-        }
-        return system.getResources(name);
+        return getSystemClassLoader().getResources(name);
     }
 
     /**
@@ -1631,8 +1669,7 @@
      * this method during startup should take care not to cache the return
      * value until the system is fully initialized.
      *
-     * @return  The system <tt>ClassLoader</tt> for delegation, or
-     *          <tt>null</tt> if none
+     * @return  The system <tt>ClassLoader</tt> for delegation
      *
      * @throws  SecurityException
      *          If a security manager is present, and the caller's class loader
@@ -1941,9 +1978,14 @@
      * @return The {@code Package} of the given name defined by this class loader,
      *         or {@code null} if not found
      *
+     * @throws  NullPointerException
+     *          if {@code name} is {@code null}.
+     *
      * @since  9
      */
     public final Package getDefinedPackage(String name) {
+        Objects.requireNonNull(name, "name cannot be null");
+
         NamedPackage p = packages.get(name);
         if (p == null)
             return null;
@@ -1981,6 +2023,9 @@
      * @return The {@code Package} corresponding to the given name defined by
      *         this class loader or its ancestors, or {@code null} if not found.
      *
+     * @throws  NullPointerException
+     *          if {@code name} is {@code null}.
+     *
      * @deprecated
      * If multiple class loaders delegate to each other and define classes
      * with the same package name, and one such loader relies on the lookup
--- a/src/java.base/share/classes/java/lang/Compiler.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/Compiler.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -29,21 +29,18 @@
  * The {@code Compiler} class is provided to support Java-to-native-code
  * compilers and related services. By design, the {@code Compiler} class does
  * nothing; it serves as a placeholder for a JIT compiler implementation.
+ * If no compiler is available, these methods do nothing.
  *
- * <p> When the Java Virtual Machine first starts, it determines if the system
- * property {@code java.compiler} exists. (System properties are accessible
- * through {@link System#getProperty(String)} and {@link
- * System#getProperty(String, String)}.  If so, it is assumed to be the name of
- * a library (with a platform-dependent exact location and type); {@link
- * System#loadLibrary} is called to load that library. If this loading
- * succeeds, the function named {@code java_lang_Compiler_start()} in that
- * library is called.
- *
- * <p> If no compiler is available, these methods do nothing.
+ * @deprecated JIT compilers and their technologies vary too widely to
+ * be controlled effectively by a standardized interface. As such, many
+ * JIT compiler implementations ignore this interface, and are instead
+ * controllable by implementation-specific mechanisms such as command-line
+ * options. This class is subject to removal in a future version of Java SE.
  *
  * @author  Frank Yellin
  * @since   1.0
  */
+@Deprecated(since="9", forRemoval=true)
 public final class Compiler  {
     private Compiler() {}               // don't make instances
 
--- a/src/java.base/share/classes/java/lang/Package.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/Package.java	Tue Sep 20 16:34:47 2016 -0400
@@ -317,6 +317,9 @@
      * @return The {@code Package} of the given name defined by the caller's
      *         class loader or its ancestors, or {@code null} if not found.
      *
+     * @throws NullPointerException
+     *         if {@code name} is {@code null}.
+     *
      * @deprecated
      * If multiple class loaders delegate to each other and define classes
      * with the same package name, and one such loader relies on the lookup
--- a/src/java.base/share/classes/java/lang/Runtime.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Tue Sep 20 16:34:47 2016 -0400
@@ -733,6 +733,7 @@
      * @deprecated
      * This method was intended to control instruction tracing.
      * It has been superseded by JVM-specific tracing mechanisms.
+     * This method is subject to removal in a future version of Java SE.
      *
      * @param on ignored
      */
@@ -745,6 +746,7 @@
      * @deprecated
      * This method was intended to control method call tracing.
      * It has been superseded by JVM-specific tracing mechanisms.
+     * This method is subject to removal in a future version of Java SE.
      *
      * @param on ignored
      */
--- a/src/java.base/share/classes/java/lang/RuntimePermission.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/RuntimePermission.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -323,11 +323,9 @@
  *   <td>usePolicy</td>
  *   <td>Granting this permission disables the Java Plug-In's default
  *   security prompting behavior.</td>
- *   <td>For more information, refer to Java Plug-In's guides, <a href=
- *   "../../../technotes/guides/plugin/developer_guide/security.html">
- *   Applet Security Basics</a> and <a href=
- *   "../../../technotes/guides/plugin/developer_guide/rsa_how.html#use">
- *   usePolicy Permission</a>.</td>
+ *   <td>For more information, refer to the <a href=
+ *   "../../../technotes/guides/deploy/index.html">deployment guide</a>.
+ *   </td>
  * </tr>
  * <tr>
  *   <td>manageProcess</td>
--- a/src/java.base/share/classes/java/lang/StackStreamFactory.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/StackStreamFactory.java	Tue Sep 20 16:34:47 2016 -0400
@@ -71,6 +71,7 @@
     // These flags must match the values maintained in the VM
     @Native private static final int DEFAULT_MODE              = 0x0;
     @Native private static final int FILL_CLASS_REFS_ONLY      = 0x2;
+    @Native private static final int GET_CALLER_CLASS          = 0x4;
     @Native private static final int SHOW_HIDDEN_FRAMES        = 0x20;  // LambdaForms are hidden by the VM
     @Native private static final int FILL_LIVE_STACK_FRAMES    = 0x100;
     /*
@@ -614,9 +615,7 @@
         private Class<?> caller;
 
         CallerClassFinder(StackWalker walker) {
-            super(walker, FILL_CLASS_REFS_ONLY);
-            assert (mode & FILL_CLASS_REFS_ONLY) == FILL_CLASS_REFS_ONLY
-                   : "mode should contain FILL_CLASS_REFS_ONLY";
+            super(walker, FILL_CLASS_REFS_ONLY|GET_CALLER_CLASS);
         }
 
         final class ClassBuffer extends FrameBuffer<Class<?>> {
--- a/src/java.base/share/classes/java/lang/StringConcatHelper.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/StringConcatHelper.java	Tue Sep 20 16:34:47 2016 -0400
@@ -334,11 +334,15 @@
     /**
      * Instantiates the String with given buffer and coder
      * @param buf     buffer to use
+     * @param index   remaining index
      * @param coder   coder to use
      * @return String resulting string
      */
-    static String newString(byte[] buf, byte coder) {
+    static String newString(byte[] buf, int index, byte coder) {
         // Use the private, non-copying constructor (unsafe!)
+        if (index != 0) {
+            throw new InternalError("Storage is not completely initialized, " + index + " bytes left");
+        }
         return new String(buf, coder);
     }
 
--- a/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Sep 20 16:34:47 2016 -0400
@@ -497,6 +497,10 @@
                         String shortTypes = LambdaForm.shortenSignature(types);
                         String className = SPECIES_CLASS_PREFIX + shortTypes;
                         Class<?> c = BootLoader.loadClassOrNull(className);
+                        if (TRACE_RESOLVE) {
+                            System.out.println("[BMH_RESOLVE] " + shortTypes +
+                                    (c != null ? " (success)" : " (fail)") );
+                        }
                         if (c != null) {
                             return c.asSubclass(BoundMethodHandle.class);
                         } else {
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Tue Sep 20 16:34:47 2016 -0400
@@ -607,7 +607,10 @@
     private static MemberName resolveFrom(String name, MethodType type, Class<?> holder) {
         MemberName member = new MemberName(holder, name, type, REF_invokeStatic);
         MemberName resolvedMember = MemberName.getFactory().resolveOrNull(REF_invokeStatic, member, holder);
-
+        if (TRACE_RESOLVE) {
+            System.out.println("[LF_RESOLVE] " + holder.getName() + " " + name + " " +
+                    shortenSignature(basicTypeSignature(type)) + (resolvedMember != null ? " (success)" : " (fail)") );
+        }
         return resolvedMember;
     }
 
--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Tue Sep 20 16:34:47 2016 -0400
@@ -83,7 +83,9 @@
                 FOLD_ARGS = 11,
                 FOLD_ARGS_TO_VOID = 12,
                 PERMUTE_ARGS = 13,
-                LOCAL_TYPES = 14;
+                LOCAL_TYPES = 14,
+                FOLD_SELECT_ARGS = 15,
+                FOLD_SELECT_ARGS_TO_VOID = 16;
 
         private static final boolean STRESS_TEST = false; // turn on to disable most packing
         private static final int
@@ -695,6 +697,72 @@
         return buf.endEdit();
     }
 
+    private LambdaForm makeArgumentCombinationForm(int pos,
+                                                   MethodType combinerType,
+                                                   int[] argPositions,
+                                                   boolean keepArguments,
+                                                   boolean dropResult) {
+        LambdaFormBuffer buf = buffer();
+        buf.startEdit();
+        int combinerArity = combinerType.parameterCount();
+        assert(combinerArity == argPositions.length);
+
+        int resultArity = (dropResult ? 0 : 1);
+
+        assert(pos <= lambdaForm.arity);
+        assert(pos > 0);  // cannot filter the MH arg itself
+        assert(combinerType == combinerType.basicType());
+        assert(combinerType.returnType() != void.class || dropResult);
+
+        BoundMethodHandle.SpeciesData oldData = oldSpeciesData();
+        BoundMethodHandle.SpeciesData newData = newSpeciesData(L_TYPE);
+
+        // The newly created LF will run with a different BMH.
+        // Switch over any pre-existing BMH field references to the new BMH class.
+        Name oldBaseAddress = lambdaForm.parameter(0);  // BMH holding the values
+        buf.replaceFunctions(oldData.getterFunctions(), newData.getterFunctions(), oldBaseAddress);
+        Name newBaseAddress = oldBaseAddress.withConstraint(newData);
+        buf.renameParameter(0, newBaseAddress);
+
+        Name getCombiner = new Name(newData.getterFunction(oldData.fieldCount()), newBaseAddress);
+        Object[] combinerArgs = new Object[1 + combinerArity];
+        combinerArgs[0] = getCombiner;
+        Name[] newParams;
+        if (keepArguments) {
+            newParams = new Name[0];
+            for (int i = 0; i < combinerArity; i++) {
+                combinerArgs[i + 1] = lambdaForm.parameter(1 + argPositions[i]);
+                assert (basicType(combinerType.parameterType(i)) == lambdaForm.parameterType(1 + argPositions[i]));
+            }
+        } else {
+            newParams = new Name[combinerArity];
+            for (int i = 0; i < newParams.length; i++) {
+                newParams[i] = lambdaForm.parameter(1 + argPositions[i]);
+                assert (basicType(combinerType.parameterType(i)) == lambdaForm.parameterType(1 + argPositions[i]));
+            }
+            System.arraycopy(newParams, 0,
+                             combinerArgs, 1, combinerArity);
+        }
+        Name callCombiner = new Name(combinerType, combinerArgs);
+
+        // insert the two new expressions
+        int exprPos = lambdaForm.arity();
+        buf.insertExpression(exprPos+0, getCombiner);
+        buf.insertExpression(exprPos+1, callCombiner);
+
+        // insert new arguments, if needed
+        int argPos = pos + resultArity;  // skip result parameter
+        for (Name newParam : newParams) {
+            buf.insertParameter(argPos++, newParam);
+        }
+        assert(buf.lastIndexOf(callCombiner) == exprPos+1+newParams.length);
+        if (!dropResult) {
+            buf.replaceParameterByCopy(pos, exprPos+1+newParams.length);
+        }
+
+        return buf.endEdit();
+    }
+
     LambdaForm filterReturnForm(BasicType newType, boolean constantZero) {
         byte kind = (constantZero ? Transform.FILTER_RETURN_TO_ZERO : Transform.FILTER_RETURN);
         Transform key = Transform.of(kind, newType.ordinal());
@@ -759,6 +827,21 @@
         return putInCache(key, form);
     }
 
+    LambdaForm foldArgumentsForm(int foldPos, boolean dropResult, MethodType combinerType, int ... argPositions) {
+        byte kind = (dropResult ? Transform.FOLD_SELECT_ARGS_TO_VOID
+                                : Transform.FOLD_SELECT_ARGS);
+        int[] keyArgs = Arrays.copyOf(argPositions, argPositions.length + 1);
+        keyArgs[argPositions.length] = foldPos;
+        Transform key = Transform.of(kind, keyArgs);
+        LambdaForm form = getInCache(key);
+        if (form != null) {
+            assert(form.arity == lambdaForm.arity - (kind == Transform.FOLD_SELECT_ARGS ? 1 : 0));
+            return form;
+        }
+        form = makeArgumentCombinationForm(foldPos, combinerType, argPositions, true, dropResult);
+        return putInCache(key, form);
+    }
+
     LambdaForm permuteArgumentsForm(int skip, int[] reorder) {
         assert(skip == 1);  // skip only the leading MH argument, names[0]
         int length = lambdaForm.names.length;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Tue Sep 20 16:34:47 2016 -0400
@@ -46,6 +46,7 @@
     static final boolean DUMP_CLASS_FILES;
     static final boolean TRACE_INTERPRETER;
     static final boolean TRACE_METHOD_LINKAGE;
+    static final boolean TRACE_RESOLVE;
     static final int COMPILE_THRESHOLD;
     static final boolean LOG_LF_COMPILATION_FAILURE;
     static final int DONT_INLINE_THRESHOLD;
@@ -65,6 +66,8 @@
                 props.getProperty("java.lang.invoke.MethodHandle.TRACE_INTERPRETER"));
         TRACE_METHOD_LINKAGE = Boolean.parseBoolean(
                 props.getProperty("java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE"));
+        TRACE_RESOLVE = Boolean.parseBoolean(
+                props.getProperty("java.lang.invoke.MethodHandle.TRACE_RESOLVE"));
         COMPILE_THRESHOLD = Integer.parseInt(
                 props.getProperty("java.lang.invoke.MethodHandle.COMPILE_THRESHOLD", "0"));
         LOG_LF_COMPILATION_FAILURE = Boolean.parseBoolean(
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1207,11 +1207,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1326,11 +1331,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double}, then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1631,11 +1641,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -2353,9 +2368,13 @@
      * the following conditions:
      * <ul>
      * <li>if the component type is anything other than {@code byte},
-     *     {@code short}, {@code char}, {@code int} or {@code long},
+     *     {@code short}, {@code char}, {@code int}, {@code long},
      *     {@code float}, or {@code double} then numeric atomic update access
      *     modes are unsupported.
+     * <li>if the field type is anything other than {@code boolean},
+     *     {@code byte}, {@code short}, {@code char}, {@code int} or
+     *     {@code long} then bitwise atomic update access modes are
+     *     unsupported.
      * </ul>
      * <p>
      * If the component type is {@code float} or {@code double} then numeric
@@ -2426,7 +2445,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2434,6 +2455,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
@@ -2508,7 +2532,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2516,6 +2542,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
@@ -3914,6 +3943,33 @@
         return rtype;
     }
 
+    private static Class<?> foldArgumentChecks(int foldPos, MethodType targetType, MethodType combinerType, int ... argPos) {
+        int foldArgs = combinerType.parameterCount();
+        if (argPos.length != foldArgs) {
+            throw newIllegalArgumentException("combiner and argument map must be equal size", combinerType, argPos.length);
+        }
+        Class<?> rtype = combinerType.returnType();
+        int foldVals = rtype == void.class ? 0 : 1;
+        boolean ok = true;
+        for (int i = 0; i < foldArgs; i++) {
+            int arg = argPos[i];
+            if (arg < 0 || arg > targetType.parameterCount()) {
+                throw newIllegalArgumentException("arg outside of target parameterRange", targetType, arg);
+            }
+            if (combinerType.parameterType(i) != targetType.parameterType(arg)) {
+                throw newIllegalArgumentException("target argument type at position " + arg
+                        + " must match combiner argument type at index " + i + ": " + targetType
+                        + " -> " + combinerType + ", map: " + Arrays.toString(argPos));
+            }
+        }
+        if (ok && foldVals != 0 && combinerType.returnType() != targetType.parameterType(foldPos)) {
+            ok = false;
+        }
+        if (!ok)
+            throw misMatchedTypes("target and combiner types", targetType, combinerType);
+        return rtype;
+    }
+
     /**
      * Makes a method handle which adapts a target method handle,
      * by guarding it with a test, a boolean-valued method handle.
@@ -4920,6 +4976,27 @@
         return result;
     }
 
+    /**
+     * As {@see foldArguments(MethodHandle, int, MethodHandle)}, but with the
+     * added capability of selecting the arguments from the targets parameters
+     * to call the combiner with. This allows us to avoid some simple cases of
+     * permutations and padding the combiner with dropArguments to select the
+     * right argument, which may ultimately produce fewer intermediaries.
+     */
+    static MethodHandle foldArguments(MethodHandle target, int pos, MethodHandle combiner, int ... argPositions) {
+        MethodType targetType = target.type();
+        MethodType combinerType = combiner.type();
+        Class<?> rtype = foldArgumentChecks(pos, targetType, combinerType, argPositions);
+        BoundMethodHandle result = target.rebind();
+        boolean dropResult = rtype == void.class;
+        LambdaForm lform = result.editor().foldArgumentsForm(1 + pos, dropResult, combinerType.basicType(), argPositions);
+        MethodType newType = targetType;
+        if (!dropResult) {
+            newType = newType.dropParameterTypes(pos, pos + 1);
+        }
+        result = result.copyWithExtendL(newType, lform, combiner);
+        return result;
+    }
 
     private static void checkLoop0(MethodHandle[][] clauses) {
         if (clauses == null || clauses.length == 0) {
--- a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java	Tue Sep 20 16:34:47 2016 -0400
@@ -563,9 +563,8 @@
         }
 
         if ((lookup.lookupModes() & MethodHandles.Lookup.PRIVATE) == 0) {
-            throw new StringConcatException(String.format(
-                    "Invalid caller: %s",
-                    lookup.lookupClass().getName()));
+            throw new StringConcatException("Invalid caller: " +
+                    lookup.lookupClass().getName());
         }
 
         int cCount = 0;
@@ -1494,51 +1493,41 @@
             // Drop all remaining parameter types, leave only helper arguments:
             MethodHandle mh;
 
-            mh = MethodHandles.dropArguments(NEW_STRING, 2, ptypes);
-            mh = MethodHandles.dropArguments(mh, 0, int.class);
+            mh = MethodHandles.dropArguments(NEW_STRING, 3, ptypes);
 
-            // Safety: check that remaining index is zero -- that would mean the storage is completely
-            // overwritten, and no leakage of uninitialized data occurred.
-            mh = MethodHandles.filterArgument(mh, 0, CHECK_INDEX);
-
-            // Mix in prependers. This happens when (int, byte[], byte) = (index, storage, coder) is already
+            // Mix in prependers. This happens when (byte[], int, byte) = (storage, index, coder) is already
             // known from the combinators below. We are assembling the string backwards, so "index" is the
             // *ending* index.
             for (RecipeElement el : recipe.getElements()) {
-                MethodHandle prepender;
+                // Do the prepend, and put "new" index at index 1
+                mh = MethodHandles.dropArguments(mh, 2, int.class);
                 switch (el.getTag()) {
-                    case TAG_CONST:
+                    case TAG_CONST: {
                         Object cnst = el.getValue();
-                        prepender = MethodHandles.insertArguments(prepender(cnst.getClass()), 3, cnst);
+                        MethodHandle prepender = MethodHandles.insertArguments(prepender(cnst.getClass()), 3, cnst);
+                        mh = MethodHandles.foldArguments(mh, 1, prepender,
+                                2, 0, 3 // index, storage, coder
+                        );
                         break;
-                    case TAG_ARG:
+                    }
+                    case TAG_ARG: {
                         int pos = el.getArgPos();
-                        prepender = selectArgument(prepender(ptypes[pos]), 3, ptypes, pos);
+                        MethodHandle prepender = prepender(ptypes[pos]);
+                        mh = MethodHandles.foldArguments(mh, 1, prepender,
+                                2, 0, 3, // index, storage, coder
+                                4 + pos  // selected argument
+                        );
                         break;
+                    }
                     default:
                         throw new StringConcatException("Unhandled tag: " + el.getTag());
                 }
-
-                // Remove "old" index from arguments
-                mh = MethodHandles.dropArguments(mh, 1, int.class);
-
-                // Do the prepend, and put "new" index at index 0
-                mh = MethodHandles.foldArguments(mh, prepender);
             }
 
-            // Prepare the argument list for prepending. The tree below would instantiate
-            // the storage byte[] into argument 0, so we need to swap "storage" and "index".
-            // The index at this point equals to "size", and resides at argument 1.
-            {
-                MethodType nmt = mh.type()
-                        .changeParameterType(0, byte[].class)
-                        .changeParameterType(1, int.class);
-                mh = MethodHandles.permuteArguments(mh, nmt, swap10(nmt.parameterCount()));
-            }
-
-            // Fold in byte[] instantiation at argument 0.
-            MethodHandle combiner = MethodHandles.dropArguments(NEW_ARRAY, 2, ptypes);
-            mh = MethodHandles.foldArguments(mh, combiner);
+            // Fold in byte[] instantiation at argument 0
+            mh = MethodHandles.foldArguments(mh, 0, NEW_ARRAY,
+                    1, 2 // index, coder
+            );
 
             // Start combining length and coder mixers.
             //
@@ -1567,12 +1556,8 @@
                         int ac = el.getArgPos();
 
                         Class<?> argClass = ptypes[ac];
-                        MethodHandle lm = selectArgument(lengthMixer(argClass), 1, ptypes, ac);
-                        lm = MethodHandles.dropArguments(lm, 0, byte.class); // (*)
-                        lm = MethodHandles.dropArguments(lm, 2, byte.class);
-
-                        MethodHandle cm = selectArgument(coderMixer(argClass),  1, ptypes, ac);
-                        cm = MethodHandles.dropArguments(cm, 0, int.class);  // (**)
+                        MethodHandle lm = lengthMixer(argClass);
+                        MethodHandle cm = coderMixer(argClass);
 
                         // Read this bottom up:
 
@@ -1580,12 +1565,18 @@
                         mh = MethodHandles.dropArguments(mh, 2, int.class, byte.class);
 
                         // 3. Compute "new-index", producing ("new-index", "new-coder", "old-index", "old-coder", <args>)
-                        //    Length mixer ignores both "new-coder" and "old-coder" due to dropArguments above (*)
-                        mh = MethodHandles.foldArguments(mh, lm);
+                        //    Length mixer needs old index, plus the appropriate argument
+                        mh = MethodHandles.foldArguments(mh, 0, lm,
+                                2, // old-index
+                                4 + ac // selected argument
+                        );
 
                         // 2. Compute "new-coder", producing ("new-coder", "old-index", "old-coder", <args>)
-                        //    Coder mixer ignores the "old-index" arg due to dropArguments above (**)
-                        mh = MethodHandles.foldArguments(mh, cm);
+                        //    Coder mixer needs old coder, plus the appropriate argument.
+                        mh = MethodHandles.foldArguments(mh, 0, cm,
+                                2, // old-coder
+                                3 + ac // selected argument
+                        );
 
                         // 1. The mh shape here is ("old-index", "old-coder", <args>)
                         break;
@@ -1606,41 +1597,11 @@
             return mh;
         }
 
-        private static int[] swap10(int count) {
-            int[] perm = new int[count];
-            perm[0] = 1;
-            perm[1] = 0;
-            for (int i = 2; i < count; i++) {
-                perm[i] = i;
-            }
-            return perm;
-        }
-
-        // Adapts: (...prefix..., parameter[pos])R -> (...prefix..., ...parameters...)R
-        private static MethodHandle selectArgument(MethodHandle mh, int prefix, Class<?>[] ptypes, int pos) {
-            if (pos == 0) {
-                return MethodHandles.dropArguments(mh, prefix + 1, Arrays.copyOfRange(ptypes, 1, ptypes.length));
-            } else if (pos == ptypes.length - 1) {
-                return MethodHandles.dropArguments(mh, prefix, Arrays.copyOf(ptypes, ptypes.length - 1));
-            } else { // 0 < pos < ptypes.size() - 1
-                MethodHandle t = MethodHandles.dropArguments(mh, prefix, Arrays.copyOf(ptypes, pos));
-                return MethodHandles.dropArguments(t, prefix + 1 + pos, Arrays.copyOfRange(ptypes, pos + 1, ptypes.length));
-            }
-        }
-
         @ForceInline
         private static byte[] newArray(int length, byte coder) {
             return (byte[]) UNSAFE.allocateUninitializedArray(byte.class, length << coder);
         }
 
-        @ForceInline
-        private static int checkIndex(int index) {
-            if (index != 0) {
-                throw new IllegalStateException("Storage is not completely initialized, " + index + " bytes left");
-            }
-            return index;
-        }
-
         private static MethodHandle prepender(Class<?> cl) {
             return PREPENDERS.computeIfAbsent(cl, PREPEND);
         }
@@ -1678,7 +1639,6 @@
         };
 
         private static final MethodHandle NEW_STRING;
-        private static final MethodHandle CHECK_INDEX;
         private static final MethodHandle NEW_ARRAY;
         private static final ConcurrentMap<Class<?>, MethodHandle> PREPENDERS;
         private static final ConcurrentMap<Class<?>, MethodHandle> LENGTH_MIXERS;
@@ -1699,9 +1659,8 @@
             LENGTH_MIXERS = new ConcurrentHashMap<>();
             CODER_MIXERS = new ConcurrentHashMap<>();
 
-            NEW_STRING = lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "newString", String.class, byte[].class, byte.class);
+            NEW_STRING = lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "newString", String.class, byte[].class, int.class, byte.class);
             NEW_ARRAY  = lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleInlineCopyStrategy.class, "newArray", byte[].class, int.class, byte.class);
-            CHECK_INDEX = lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleInlineCopyStrategy.class, "checkIndex", int.class, int.class);
         }
     }
 
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Tue Sep 20 16:34:47 2016 -0400
@@ -134,21 +134,38 @@
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #compareAndSet compareAndSet},
+ * {@link #weakCompareAndSetPlain weakCompareAndSetPlain},
  * {@link #weakCompareAndSet weakCompareAndSet},
- * {@link #weakCompareAndSetVolatile weakCompareAndSetVolatile},
  * {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire},
  * {@link #weakCompareAndSetRelease weakCompareAndSetRelease},
  * {@link #compareAndExchangeAcquire compareAndExchangeAcquire},
  * {@link #compareAndExchange compareAndExchange},
  * {@link #compareAndExchangeRelease compareAndExchangeRelease},
- * {@link #getAndSet getAndSet}.
+ * {@link #getAndSet getAndSet},
+ * {@link #getAndSetAcquire getAndSetAcquire},
+ * {@link #getAndSetRelease getAndSetRelease}.
  * <li>numeric atomic update access modes that, for example, atomically get and
  * set with addition the value of a variable under specified memory ordering
  * effects.
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #getAndAdd getAndAdd},
- * {@link #addAndGet addAndGet}.
+ * {@link #getAndAddAcquire getAndAddAcquire},
+ * {@link #getAndAddRelease getAndAddRelease},
+ * <li>bitwise atomic update access modes that, for example, atomically get and
+ * bitwise OR the value of a variable under specified memory ordering
+ * effects.
+ * The set of corresponding access mode methods belonging to this group
+ * consists of the methods
+ * {@link #getAndBitwiseOr getAndBitwiseOr},
+ * {@link #getAndBitwiseOrAcquire getAndBitwiseOrAcquire},
+ * {@link #getAndBitwiseOrRelease getAndBitwiseOrRelease},
+ * {@link #getAndBitwiseAnd getAndBitwiseAnd},
+ * {@link #getAndBitwiseAndAcquire getAndBitwiseAndAcquire},
+ * {@link #getAndBitwiseAndRelease getAndBitwiseAndRelease},
+ * {@link #getAndBitwiseXor getAndBitwiseXor},
+ * {@link #getAndBitwiseXorAcquire getAndBitwiseXorAcquire},
+ * {@link #getAndBitwiseXorRelease getAndBitwiseXorRelease}.
  * </ul>
  *
  * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup
@@ -163,8 +180,8 @@
  * VarHandle instances and the corresponding method never throws
  * {@code UnsupportedOperationException}.
  * If a VarHandle references a read-only variable (for example a {@code final}
- * field) then write, atomic update and numeric atomic update access modes are
- * not supported and corresponding methods throw
+ * field) then write, atomic update, numeric atomic update, and bitwise atomic
+ * update access modes are not supported and corresponding methods throw
  * {@code UnsupportedOperationException}.
  * Read/write access modes (if supported), with the exception of
  * {@code get} and {@code set}, provide atomic access for
@@ -816,8 +833,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSet} must match the access mode type that is the result of
-     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
+     * weakCompareAndSetPlain} must match the access mode type that is the result of
+     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -838,7 +855,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSet(Object... args);
+    boolean weakCompareAndSetPlain(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -853,8 +870,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSetVolatile} must match the access mode type that is the
-     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE)}
+     * weakCompareAndSet} must match the access mode type that is the
+     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -875,7 +892,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSetVolatile(Object... args);
+    boolean weakCompareAndSet(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -986,6 +1003,71 @@
     @HotSpotIntrinsicCandidate
     Object getAndSet(Object... args);
 
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #set} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #setRelease} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetRelease(Object... args);
 
     // Primitive adders
     // Throw UnsupportedOperationException for refs
@@ -1025,21 +1107,21 @@
 
     /**
      * Atomically adds the {@code value} to the current value of a variable with
-     * the memory semantics of {@link #setVolatile}, and returns the variable's
-     * current (updated) value, as accessed with the memory semantics of
-     * {@link #getVolatile}.
+     * the memory semantics of {@link #set}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
      *
      * <p>The method signature is of the form {@code (CT, T value)T}.
      *
-     * <p>The symbolic type descriptor at the call site of {@code addAndGet}
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire}
      * must match the access mode type that is the result of calling
-     * {@code accessModeType(VarHandle.AccessMode.ADD_AND_GET)} on this
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE)} on this
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
      * {@code (CT, T value)}
      * , statically represented using varargs.
-     * @return the signature-polymorphic result that is the current value of
+     * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
@@ -1054,7 +1136,378 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    Object addAndGet(Object... args);
+    Object getAndAddAcquire(Object... args);
+
+    /**
+     * Atomically adds the {@code value} to the current value of a variable with
+     * the memory semantics of {@link #setRelease}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T value)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T value)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndAddRelease(Object... args);
+
+
+    // Bitwise operations
+    // Throw UnsupportedOperationException for refs
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOr(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAnd(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXor(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorRelease(Object... args);
+
 
     enum AccessType {
         GET(Object.class),
@@ -1204,18 +1657,18 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain}
+         */
+        WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SWAP),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
          */
         WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#weakCompareAndSetVolatile VarHandle.weakCompareAndSetVolatile}
-         */
-        WEAK_COMPARE_AND_SET_VOLATILE("weakCompareAndSetVolatile", AccessType.COMPARE_AND_SWAP),
-        /**
-         * The access mode whose access is specified by the corresponding
-         * method
          * {@link VarHandle#weakCompareAndSetAcquire VarHandle.weakCompareAndSetAcquire}
          */
         WEAK_COMPARE_AND_SET_ACQUIRE("weakCompareAndSetAcquire", AccessType.COMPARE_AND_SWAP),
@@ -1234,15 +1687,87 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#getAndSetAcquire VarHandle.getAndSetAcquire}
+         */
+        GET_AND_SET_ACQUIRE("getAndSetAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndSetRelease VarHandle.getAndSetRelease}
+         */
+        GET_AND_SET_RELEASE("getAndSetRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#getAndAdd VarHandle.getAndAdd}
          */
         GET_AND_ADD("getAndAdd", AccessType.GET_AND_UPDATE),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#addAndGet VarHandle.addAndGet}
+         * {@link VarHandle#getAndAddAcquire VarHandle.getAndAddAcquire}
          */
-        ADD_AND_GET("addAndGet", AccessType.GET_AND_UPDATE),
+        GET_AND_ADD_ACQUIRE("getAndAddAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndAddRelease VarHandle.getAndAddRelease}
+         */
+        GET_AND_ADD_RELEASE("getAndAddRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOr VarHandle.getAndBitwiseOr}
+         */
+        GET_AND_BITWISE_OR("getAndBitwiseOr", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrRelease VarHandle.getAndBitwiseOrRelease}
+         */
+        GET_AND_BITWISE_OR_RELEASE("getAndBitwiseOrRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrAcquire VarHandle.getAndBitwiseOrAcquire}
+         */
+        GET_AND_BITWISE_OR_ACQUIRE("getAndBitwiseOrAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAnd VarHandle.getAndBitwiseAnd}
+         */
+        GET_AND_BITWISE_AND("getAndBitwiseAnd", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndRelease VarHandle.getAndBitwiseAndRelease}
+         */
+        GET_AND_BITWISE_AND_RELEASE("getAndBitwiseAndRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndAcquire VarHandle.getAndBitwiseAndAcquire}
+         */
+        GET_AND_BITWISE_AND_ACQUIRE("getAndBitwiseAndAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXor VarHandle.getAndBitwiseXor}
+         */
+        GET_AND_BITWISE_XOR("getAndBitwiseXor", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorRelease VarHandle.getAndBitwiseXorRelease}
+         */
+        GET_AND_BITWISE_XOR_RELEASE("getAndBitwiseXorRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorAcquire VarHandle.getAndBitwiseXorAcquire}
+         */
+        GET_AND_BITWISE_XOR_ACQUIRE("getAndBitwiseXorAcquire", AccessType.GET_AND_UPDATE),
         ;
 
         static final Map<String, AccessMode> methodNameToAccessMode;
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Tue Sep 20 16:34:47 2016 -0400
@@ -156,7 +156,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -164,7 +164,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -193,6 +193,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -204,12 +218,85 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldInstanceReadWrite handle, Object holder, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+        static $type$ getAndAddAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
         }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, $type$.class);
     }
@@ -337,7 +424,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -345,7 +432,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -374,6 +461,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -385,12 +486,84 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldStaticReadWrite handle, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(handle.base,
+        static $type$ getAndAddAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(handle.base,
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, $type$.class);
     }
@@ -562,7 +735,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -575,7 +748,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -624,33 +797,131 @@
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Acquire(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
         @ForceInline
         static $type$ getAndAdd(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
             $type$[] array = ($type$[]) oarray;
-#end[Object]
             return UNSAFE.getAndAdd$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     value);
         }
 
         @ForceInline
-        static $type$ addAndGet(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
+        static $type$ getAndAddAcquire(Array handle, Object oarray, int index, $type$ value) {
             $type$[] array = ($type$[]) oarray;
-#end[Object]
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(array,
+            return UNSAFE.getAndAdd$Type$Acquire(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
-                    value) + value);
+                    value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndAdd$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(Array.class, {#if[Object]?Object[].class:$type$[].class}, {#if[Object]?Object.class:$type$.class}, int.class);
     }
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Tue Sep 20 16:34:47 2016 -0400
@@ -223,7 +223,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     ba,
@@ -232,7 +232,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     ba,
@@ -267,6 +267,26 @@
                                       address(ba, index(ba, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -284,6 +304,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(byte[] ba, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             long offset = address(ba, index(ba, index));
@@ -294,12 +340,162 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ArrayHandle handle, Object oba, int index, $type$ delta) {
-            return getAndAdd(handle, oba, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ArrayHandle.class, byte[].class, $type$.class, int.class);
     }
@@ -466,7 +662,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -475,7 +671,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -510,6 +706,26 @@
                                       address(bb, indexRO(bb, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -527,6 +743,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
@@ -538,12 +780,166 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
-            return getAndAdd(handle, obb, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+        
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ByteBufferHandle.class, ByteBuffer.class, $type$.class, int.class);
     }
--- a/src/java.base/share/classes/java/lang/ref/Reference.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/ref/Reference.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -110,22 +110,6 @@
     private transient Reference<T> discovered;  /* used by VM */
 
 
-    /* Object used to synchronize with the garbage collector.  The collector
-     * must acquire this lock at the beginning of each collection cycle.  It is
-     * therefore critical that any code holding this lock complete as quickly
-     * as possible, allocate no new objects, and avoid calling user code.
-     */
-    private static class Lock { }
-    private static Lock lock = new Lock();
-
-
-    /* List of References waiting to be enqueued.  The collector adds
-     * References to this list, while the Reference-handler thread removes
-     * them.  This list is protected by the above lock object. The
-     * list uses the discovered field to link its elements.
-     */
-    private static Reference<Object> pending = null;
-
     /* High-priority thread to enqueue pending References
      */
     private static class ReferenceHandler extends Thread {
@@ -139,10 +123,9 @@
         }
 
         static {
-            // pre-load and initialize InterruptedException and Cleaner classes
-            // so that we don't get into trouble later in the run loop if there's
-            // memory shortage while loading/initializing them lazily.
-            ensureClassInitialized(InterruptedException.class);
+            // pre-load and initialize Cleaner class so that we don't
+            // get into trouble later in the run loop if there's
+            // memory shortage while loading/initializing it lazily.
             ensureClassInitialized(Cleaner.class);
         }
 
@@ -152,72 +135,80 @@
 
         public void run() {
             while (true) {
-                tryHandlePending(true);
+                processPendingReferences();
             }
         }
     }
 
-    /**
-     * Try handle pending {@link Reference} if there is one.<p>
-     * Return {@code true} as a hint that there might be another
-     * {@link Reference} pending or {@code false} when there are no more pending
-     * {@link Reference}s at the moment and the program can do some other
-     * useful work instead of looping.
-     *
-     * @param waitForNotify if {@code true} and there was no pending
-     *                      {@link Reference}, wait until notified from VM
-     *                      or interrupted; if {@code false}, return immediately
-     *                      when there is no pending {@link Reference}.
-     * @return {@code true} if there was a {@link Reference} pending and it
-     *         was processed, or we waited for notification and either got it
-     *         or thread was interrupted before being notified;
-     *         {@code false} otherwise.
+    /* Atomically get and clear (set to null) the VM's pending list.
      */
-    static boolean tryHandlePending(boolean waitForNotify) {
-        Reference<Object> r;
-        Cleaner c;
-        try {
-            synchronized (lock) {
-                if (pending != null) {
-                    r = pending;
-                    // 'instanceof' might throw OutOfMemoryError sometimes
-                    // so do this before un-linking 'r' from the 'pending' chain...
-                    c = r instanceof Cleaner ? (Cleaner) r : null;
-                    // unlink 'r' from 'pending' chain
-                    pending = r.discovered;
-                    r.discovered = null;
-                } else {
-                    // The waiting on the lock may cause an OutOfMemoryError
-                    // because it may try to allocate exception objects.
-                    if (waitForNotify) {
-                        lock.wait();
-                    }
-                    // retry if waited
-                    return waitForNotify;
+    private static native Reference<Object> getAndClearReferencePendingList();
+
+    /* Test whether the VM's pending list contains any entries.
+     */
+    private static native boolean hasReferencePendingList();
+
+    /* Wait until the VM's pending list may be non-null.
+     */
+    private static native void waitForReferencePendingList();
+
+    private static final Object processPendingLock = new Object();
+    private static boolean processPendingActive = false;
+
+    private static void processPendingReferences() {
+        // Only the singleton reference processing thread calls
+        // waitForReferencePendingList() and getAndClearReferencePendingList().
+        // These are separate operations to avoid a race with other threads
+        // that are calling waitForReferenceProcessing().
+        waitForReferencePendingList();
+        Reference<Object> pendingList;
+        synchronized (processPendingLock) {
+            pendingList = getAndClearReferencePendingList();
+            processPendingActive = true;
+        }
+        while (pendingList != null) {
+            Reference<Object> ref = pendingList;
+            pendingList = ref.discovered;
+            ref.discovered = null;
+
+            if (ref instanceof Cleaner) {
+                ((Cleaner)ref).clean();
+                // Notify any waiters that progress has been made.
+                // This improves latency for nio.Bits waiters, which
+                // are the only important ones.
+                synchronized (processPendingLock) {
+                    processPendingLock.notifyAll();
                 }
+            } else {
+                ReferenceQueue<? super Object> q = ref.queue;
+                if (q != ReferenceQueue.NULL) q.enqueue(ref);
             }
-        } catch (OutOfMemoryError x) {
-            // Give other threads CPU time so they hopefully drop some live references
-            // and GC reclaims some space.
-            // Also prevent CPU intensive spinning in case 'r instanceof Cleaner' above
-            // persistently throws OOME for some time...
-            Thread.yield();
-            // retry
-            return true;
-        } catch (InterruptedException x) {
-            // retry
-            return true;
         }
+        // Notify any waiters of completion of current round.
+        synchronized (processPendingLock) {
+            processPendingActive = false;
+            processPendingLock.notifyAll();
+        }
+    }
 
-        // Fast path for cleaners
-        if (c != null) {
-            c.clean();
-            return true;
+    // Wait for progress in reference processing.
+    //
+    // Returns true after waiting (for notification from the reference
+    // processing thread) if either (1) the VM has any pending
+    // references, or (2) the reference processing thread is
+    // processing references. Otherwise, returns false immediately.
+    private static boolean waitForReferenceProcessing()
+        throws InterruptedException
+    {
+        synchronized (processPendingLock) {
+            if (processPendingActive || hasReferencePendingList()) {
+                // Wait for progress, not necessarily completion.
+                processPendingLock.wait();
+                return true;
+            } else {
+                return false;
+            }
         }
-
-        ReferenceQueue<? super Object> q = r.queue;
-        if (q != ReferenceQueue.NULL) q.enqueue(r);
-        return true;
     }
 
     static {
@@ -236,8 +227,10 @@
         // provide access in SharedSecrets
         SharedSecrets.setJavaLangRefAccess(new JavaLangRefAccess() {
             @Override
-            public boolean tryHandlePendingReference() {
-                return tryHandlePending(false);
+            public boolean waitForReferenceProcessing()
+                throws InterruptedException
+            {
+                return Reference.waitForReferenceProcessing();
             }
         });
     }
--- a/src/java.base/share/classes/java/lang/ref/package-info.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/lang/ref/package-info.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -43,8 +43,7 @@
  * implementing memory-sensitive caches, weak references are for
  * implementing canonicalizing mappings that do not prevent their keys
  * (or values) from being reclaimed, and phantom references are for
- * scheduling pre-mortem cleanup actions in a more flexible way than
- * is possible with the Java finalization mechanism.
+ * scheduling post-mortem cleanup actions.
  * Post-mortem cleanup actions can be registered and managed by a
  * {@link java.lang.ref.Cleaner}.
  *
--- a/src/java.base/share/classes/java/net/HttpCookie.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/net/HttpCookie.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -233,7 +233,7 @@
         // if not specify max-age, this cookie should be
         // discarded when user agent is to be closed, but
         // it is not expired.
-        if (maxAge == MAX_AGE_UNSPECIFIED) return false;
+        if (maxAge < 0) return false;
 
         long deltaSecond = (System.currentTimeMillis() - whenCreated) / 1000;
         if (deltaSecond > maxAge)
@@ -952,7 +952,8 @@
                                    String attrName,
                                    String attrValue) {
                     if (cookie.getMaxAge() == MAX_AGE_UNSPECIFIED) {
-                        cookie.setMaxAge(cookie.expiryDate2DeltaSeconds(attrValue));
+                        long delta = cookie.expiryDate2DeltaSeconds(attrValue);
+                        cookie.setMaxAge(delta > 0 ? delta : 0);
                     }
                 }
             });
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Tue Sep 20 16:34:47 2016 -0400
@@ -25,8 +25,13 @@
 
 package java.net;
 
+import jdk.internal.misc.JavaNetSocketAccess;
+import jdk.internal.misc.SharedSecrets;
+
 import java.io.FileDescriptor;
 import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.channels.ServerSocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -1011,4 +1016,27 @@
             return options;
         }
     }
+
+    static {
+        SharedSecrets.setJavaNetSocketAccess(
+            new JavaNetSocketAccess() {
+                @Override
+                public ServerSocket newServerSocket(SocketImpl impl) {
+                    return new ServerSocket(impl);
+                }
+
+                @Override
+                public SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass) {
+                    try {
+                        Constructor<? extends SocketImpl> ctor =
+                            implClass.getDeclaredConstructor();
+                        return ctor.newInstance();
+                    } catch (NoSuchMethodException | InstantiationException |
+                             IllegalAccessException | InvocationTargetException e) {
+                        throw new AssertionError(e);
+                    }
+                }
+            }
+        );
+    }
 }
--- a/src/java.base/share/classes/java/nio/Bits.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/nio/Bits.java	Tue Sep 20 16:34:47 2016 -0400
@@ -131,23 +131,38 @@
         }
 
         final JavaLangRefAccess jlra = SharedSecrets.getJavaLangRefAccess();
-
-        // retry while helping enqueue pending Reference objects
-        // which includes executing pending Cleaner(s) which includes
-        // Cleaner(s) that free direct buffer memory
-        while (jlra.tryHandlePendingReference()) {
-            if (tryReserveMemory(size, cap)) {
-                return;
-            }
-        }
-
-        // trigger VM's Reference processing
-        System.gc();
-
-        // a retry loop with exponential back-off delays
-        // (this gives VM some time to do it's job)
         boolean interrupted = false;
         try {
+
+            // Retry allocation until success or there are no more
+            // references (including Cleaners that might free direct
+            // buffer memory) to process and allocation still fails.
+            boolean refprocActive;
+            do {
+                try {
+                    refprocActive = jlra.waitForReferenceProcessing();
+                } catch (InterruptedException e) {
+                    // Defer interrupts and keep trying.
+                    interrupted = true;
+                    refprocActive = true;
+                }
+                if (tryReserveMemory(size, cap)) {
+                    return;
+                }
+            } while (refprocActive);
+
+            // trigger VM's Reference processing
+            System.gc();
+
+            // A retry loop with exponential back-off delays.
+            // Sometimes it would suffice to give up once reference
+            // processing is complete.  But if there are many threads
+            // competing for memory, this gives more opportunities for
+            // any given thread to make progress.  In particular, this
+            // seems to be enough for a stress test like
+            // DirectBufferAllocTest to (usually) succeed, while
+            // without it that test likely fails.  Since failure here
+            // ends in OOME, there's no need to hurry.
             long sleepTime = 1;
             int sleeps = 0;
             while (true) {
@@ -157,14 +172,14 @@
                 if (sleeps >= MAX_SLEEPS) {
                     break;
                 }
-                if (!jlra.tryHandlePendingReference()) {
-                    try {
+                try {
+                    if (!jlra.waitForReferenceProcessing()) {
                         Thread.sleep(sleepTime);
                         sleepTime <<= 1;
                         sleeps++;
-                    } catch (InterruptedException e) {
-                        interrupted = true;
                     }
+                } catch (InterruptedException e) {
+                    interrupted = true;
                 }
             }
 
--- a/src/java.base/share/classes/java/security/DigestInputStream.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/security/DigestInputStream.java	Tue Sep 20 16:34:47 2016 -0400
@@ -52,7 +52,7 @@
  * {@link MessageDigest}),
  * so that in order to compute intermediate digests, a caller should
  * retain a handle onto the digest object, and clone it for each
- * digest to be computed, leaving the orginal digest untouched.
+ * digest to be computed, leaving the original digest untouched.
  *
  * @see MessageDigest
  *
--- a/src/java.base/share/classes/java/security/KeyPairGenerator.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/security/KeyPairGenerator.java	Tue Sep 20 16:34:47 2016 -0400
@@ -76,7 +76,7 @@
  * {@code g} parameters. If the modulus size is not one of the above
  * values, the <i>Sun</i> provider creates a new set of parameters. Other
  * providers might have precomputed parameter sets for more than just the
- * three modulus sizes mentioned above. Still others might not have a list of
+ * modulus sizes mentioned above. Still others might not have a list of
  * precomputed parameters at all and instead always create new parameter sets.
  *
  * <li><b>Algorithm-Specific Initialization</b>
@@ -393,7 +393,7 @@
      * of randomness.
      * (If none of the installed providers supply an implementation of
      * {@code SecureRandom}, a system-provided source of randomness is
-     * used.).
+     * used.)
      *
      * <p>This concrete method has been added to this previously-defined
      * abstract class.
--- a/src/java.base/share/classes/java/security/SignatureSpi.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/security/SignatureSpi.java	Tue Sep 20 16:34:47 2016 -0400
@@ -38,7 +38,7 @@
  * for the {@code Signature} class, which is used to provide the
  * functionality of a digital signature algorithm. Digital signatures are used
  * for authentication and integrity assurance of digital data.
- *.
+ *
  * <p> All the abstract methods in this class must be implemented by each
  * cryptographic service provider who wishes to supply the implementation
  * of a particular signature algorithm.
--- a/src/java.base/share/classes/java/util/ArrayDeque.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/ArrayDeque.java	Tue Sep 20 16:34:47 2016 -0400
@@ -81,8 +81,8 @@
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch and Doug Lea
+ * @param <E> the type of elements held in this deque
  * @since   1.6
- * @param <E> the type of elements held in this deque
  */
 public class ArrayDeque<E> extends AbstractCollection<E>
                            implements Deque<E>, Cloneable, Serializable
--- a/src/java.base/share/classes/java/util/Base64.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/Base64.java	Tue Sep 20 16:34:47 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -788,7 +788,7 @@
         public void write(byte[] b, int off, int len) throws IOException {
             if (closed)
                 throw new IOException("Stream is closed");
-            if (off < 0 || len < 0 || off + len > b.length)
+            if (off < 0 || len < 0 || len > b.length - off)
                 throw new ArrayIndexOutOfBoundsException();
             if (len == 0)
                 return;
--- a/src/java.base/share/classes/java/util/ImmutableCollections.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/ImmutableCollections.java	Tue Sep 20 16:34:47 2016 -0400
@@ -31,6 +31,10 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.UnaryOperator;
 
 /**
  * Container class for immutable collections. Not part of the public API.
@@ -61,9 +65,25 @@
      */
     static final double EXPAND_FACTOR = 2.0;
 
+    static UnsupportedOperationException uoe() { return new UnsupportedOperationException(); }
+
     // ---------- List Implementations ----------
 
-    static final class List0<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    abstract static class AbstractImmutableList<E> extends AbstractList<E>
+                                                implements RandomAccess, Serializable {
+        @Override public boolean add(E e) { throw uoe(); }
+        @Override public boolean addAll(Collection<? extends E> c) { throw uoe(); }
+        @Override public boolean addAll(int index, Collection<? extends E> c) { throw uoe(); }
+        @Override public void    clear() { throw uoe(); }
+        @Override public boolean remove(Object o) { throw uoe(); }
+        @Override public boolean removeAll(Collection<?> c) { throw uoe(); }
+        @Override public boolean removeIf(Predicate<? super E> filter) { throw uoe(); }
+        @Override public void    replaceAll(UnaryOperator<E> operator) { throw uoe(); }
+        @Override public boolean retainAll(Collection<?> c) { throw uoe(); }
+        @Override public void    sort(Comparator<? super E> c) { throw uoe(); }
+    }
+
+    static final class List0<E> extends AbstractImmutableList<E> {
         List0() { }
 
         @Override
@@ -86,7 +106,7 @@
         }
     }
 
-    static final class List1<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class List1<E> extends AbstractImmutableList<E> {
         private final E e0;
 
         List1(E e0) {
@@ -114,7 +134,7 @@
         }
     }
 
-    static final class List2<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class List2<E> extends AbstractImmutableList<E> {
         private final E e0;
         private final E e1;
 
@@ -147,7 +167,7 @@
         }
     }
 
-    static final class ListN<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class ListN<E> extends AbstractImmutableList<E> {
         private final E[] elements;
 
         @SafeVarargs
@@ -183,7 +203,17 @@
 
     // ---------- Set Implementations ----------
 
-    static final class Set0<E> extends AbstractSet<E> implements Serializable {
+    abstract static class AbstractImmutableSet<E> extends AbstractSet<E> implements Serializable {
+        @Override public boolean add(E e) { throw uoe(); }
+        @Override public boolean addAll(Collection<? extends E> c) { throw uoe(); }
+        @Override public void    clear() { throw uoe(); }
+        @Override public boolean remove(Object o) { throw uoe(); }
+        @Override public boolean removeAll(Collection<?> c) { throw uoe(); }
+        @Override public boolean removeIf(Predicate<? super E> filter) { throw uoe(); }
+        @Override public boolean retainAll(Collection<?> c) { throw uoe(); }
+    }
+
+    static final class Set0<E> extends AbstractImmutableSet<E> {
         Set0() { }
 
         @Override
@@ -210,7 +240,7 @@
         }
     }
 
-    static final class Set1<E> extends AbstractSet<E> implements Serializable {
+    static final class Set1<E> extends AbstractImmutableSet<E> {
         private final E e0;
 
         Set1(E e0) {
@@ -241,7 +271,7 @@
         }
     }
 
-    static final class Set2<E> extends AbstractSet<E> implements Serializable {
+    static final class Set2<E> extends AbstractImmutableSet<E> {
         private final E e0;
         private final E e1;
 
@@ -312,7 +342,7 @@
      * least one null is always present.
      * @param <E> the element type
      */
-    static final class SetN<E> extends AbstractSet<E> implements Serializable {
+    static final class SetN<E> extends AbstractImmutableSet<E> {
         private final E[] elements;
         private final int size;
 
@@ -403,7 +433,23 @@
 
     // ---------- Map Implementations ----------
 
-    static final class Map0<K,V> extends AbstractMap<K,V> implements Serializable {
+    abstract static class AbstractImmutableMap<K,V> extends AbstractMap<K,V> implements Serializable {
+        @Override public void clear() { throw uoe(); }
+        @Override public V compute(K key, BiFunction<? super K,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V computeIfAbsent(K key, Function<? super K,? extends V> mf) { throw uoe(); }
+        @Override public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V put(K key, V value) { throw uoe(); }
+        @Override public void putAll(Map<? extends K,? extends V> m) { throw uoe(); }
+        @Override public V putIfAbsent(K key, V value) { throw uoe(); }
+        @Override public V remove(Object key) { throw uoe(); }
+        @Override public boolean remove(Object key, Object value) { throw uoe(); }
+        @Override public V replace(K key, V value) { throw uoe(); }
+        @Override public boolean replace(K key, V oldValue, V newValue) { throw uoe(); }
+        @Override public void replaceAll(BiFunction<? super K,? super V,? extends V> f) { throw uoe(); }
+    }
+
+    static final class Map0<K,V> extends AbstractImmutableMap<K,V> {
         Map0() { }
 
         @Override
@@ -430,7 +476,7 @@
         }
     }
 
-    static final class Map1<K,V> extends AbstractMap<K,V> implements Serializable {
+    static final class Map1<K,V> extends AbstractImmutableMap<K,V> {
         private final K k0;
         private final V v0;
 
@@ -472,7 +518,7 @@
      * @param <K> the key type
      * @param <V> the value type
      */
-    static final class MapN<K,V> extends AbstractMap<K,V> implements Serializable {
+    static final class MapN<K,V> extends AbstractImmutableMap<K,V> {
         private final Object[] table; // pairs of key, value
         private final int size; // number of pairs
 
--- a/src/java.base/share/classes/java/util/List.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/List.java	Tue Sep 20 16:34:47 2016 -0400
@@ -94,7 +94,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Elements cannot be added, removed,
- * or replaced. Attempts to do so result in {@code UnsupportedOperationException}.
+ * or replaced. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained elements are themselves mutable,
  * this may cause the List's contents to appear to change.
  * <li>They disallow {@code null} elements. Attempts to create them with
--- a/src/java.base/share/classes/java/util/Map.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/Map.java	Tue Sep 20 16:34:47 2016 -0400
@@ -119,7 +119,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Keys and values cannot be added,
- * removed, or updated. Attempts to do so result in {@code UnsupportedOperationException}.
+ * removed, or updated. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained keys or values are themselves mutable, this may cause the
  * Map to behave inconsistently or its contents to appear to change.
  * <li>They disallow {@code null} keys and values. Attempts to create them with
--- a/src/java.base/share/classes/java/util/PriorityQueue.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/PriorityQueue.java	Tue Sep 20 16:34:47 2016 -0400
@@ -749,11 +749,11 @@
     /**
      * Saves this queue to a stream (that is, serializes it).
      *
+     * @param s the stream
+     * @throws java.io.IOException if an I/O error occurs
      * @serialData The length of the array backing the instance is
      *             emitted (int), followed by all of its elements
      *             (each an {@code Object}) in the proper order.
-     * @param s the stream
-     * @throws java.io.IOException if an I/O error occurs
      */
     private void writeObject(java.io.ObjectOutputStream s)
         throws java.io.IOException {
--- a/src/java.base/share/classes/java/util/Set.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/Set.java	Tue Sep 20 16:34:47 2016 -0400
@@ -70,7 +70,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Elements cannot be added or
- * removed. Attempts to do so result in {@code UnsupportedOperationException}.
+ * removed. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained elements are themselves mutable, this may cause the
  * Set to behave inconsistently or its contents to appear to change.
  * <li>They disallow {@code null} elements. Attempts to create them with
--- a/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Tue Sep 20 16:34:47 2016 -0400
@@ -136,9 +136,9 @@
  * }}</pre>
  *
  * @author Doug Lea
- * @since 1.8
  * @param <T> The result type returned by this future's {@code join}
  * and {@code get} methods
+ * @since 1.8
  */
 public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
 
@@ -521,7 +521,7 @@
                 else
                     break;
             }
-            else if (STACK.weakCompareAndSetVolatile(this, p, (p = p.next)))
+            else if (STACK.weakCompareAndSet(this, p, (p = p.next)))
                 unlinked = true;
             else
                 p = stack;
@@ -532,7 +532,7 @@
             if (q.isLive()) {
                 p = q;
                 q = s;
-            } else if (NEXT.weakCompareAndSetVolatile(p, q, s))
+            } else if (NEXT.weakCompareAndSet(p, q, s))
                 break;
             else
                 q = p.next;
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Tue Sep 20 16:34:47 2016 -0400
@@ -330,7 +330,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != h) // hop two nodes at a time; failure is OK
-                            HEAD.weakCompareAndSetVolatile(this, h, newNode);
+                            HEAD.weakCompareAndSet(this, h, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read prev
@@ -362,7 +362,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != t) // hop two nodes at a time; failure is OK
-                            TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                            TAIL.weakCompareAndSet(this, t, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read next
@@ -1153,12 +1153,12 @@
                     if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                         // Successful CAS is the linearization point
                         // for all elements to be added to this deque.
-                        if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                        if (!TAIL.weakCompareAndSet(this, t, last)) {
                             // Try a little harder to update tail,
                             // since we may be adding many elements.
                             t = tail;
                             if (last.next == null)
-                                TAIL.weakCompareAndSetVolatile(this, t, last);
+                                TAIL.weakCompareAndSet(this, t, last);
                         }
                         return true;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Tue Sep 20 16:34:47 2016 -0400
@@ -308,7 +308,7 @@
                     // for e to become an element of this queue,
                     // and for newNode to become "live".
                     if (p != t) // hop two nodes at a time; failure is OK
-                        TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                        TAIL.weakCompareAndSet(this, t, newNode);
                     return true;
                 }
                 // Lost CAS race to another thread; re-read next
@@ -477,7 +477,7 @@
 
                 next = succ(p);
                 if (pred != null && next != null) // unlink
-                    NEXT.weakCompareAndSetVolatile(pred, p, next);
+                    NEXT.weakCompareAndSet(pred, p, next);
                 if (removed)
                     return true;
             }
@@ -524,12 +524,12 @@
                 if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                     // Successful CAS is the linearization point
                     // for all elements to be added to this queue.
-                    if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                    if (!TAIL.weakCompareAndSet(this, t, last)) {
                         // Try a little harder to update tail,
                         // since we may be adding many elements.
                         t = tail;
                         if (last.next == null)
-                            TAIL.weakCompareAndSetVolatile(this, t, last);
+                            TAIL.weakCompareAndSet(this, t, last);
                     }
                     return true;
                 }
--- a/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Tue Sep 20 16:34:47 2016 -0400
@@ -120,102 +120,114 @@
  * to complete for some elements than others, either because of
  * intrinsic variation (for example I/O) or auxiliary effects such as
  * garbage collection.  Because CountedCompleters provide their own
- * continuations, other threads need not block waiting to perform
- * them.
+ * continuations, other tasks need not block waiting to perform them.
  *
- * <p>For example, here is an initial version of a class that uses
- * divide-by-two recursive decomposition to divide work into single
- * pieces (leaf tasks). Even when work is split into individual calls,
- * tree-based techniques are usually preferable to directly forking
- * leaf tasks, because they reduce inter-thread communication and
- * improve load balancing. In the recursive case, the second of each
- * pair of subtasks to finish triggers completion of its parent
+ * <p>For example, here is an initial version of a utility method that
+ * uses divide-by-two recursive decomposition to divide work into
+ * single pieces (leaf tasks). Even when work is split into individual
+ * calls, tree-based techniques are usually preferable to directly
+ * forking leaf tasks, because they reduce inter-thread communication
+ * and improve load balancing. In the recursive case, the second of
+ * each pair of subtasks to finish triggers completion of their parent
  * (because no result combination is performed, the default no-op
  * implementation of method {@code onCompletion} is not overridden).
- * A static utility method sets up the base task and invokes it
- * (here, implicitly using the {@link ForkJoinPool#commonPool()}).
+ * The utility method sets up the root task and invokes it (here,
+ * implicitly using the {@link ForkJoinPool#commonPool()}).  It is
+ * straightforward and reliable (but not optimal) to always set the
+ * pending count to the number of child tasks and call {@code
+ * tryComplete()} immediately before returning.
  *
  * <pre> {@code
- * class MyOperation<E> { void apply(E e) { ... }  }
+ * public static <E> void forEach(E[] array, Consumer<E> action) {
+ *   class Task extends CountedCompleter<Void> {
+ *     final int lo, hi;
+ *     Task(Task parent, int lo, int hi) {
+ *       super(parent); this.lo = lo; this.hi = hi;
+ *     }
  *
- * class ForEach<E> extends CountedCompleter<Void> {
- *
- *   public static <E> void forEach(E[] array, MyOperation<E> op) {
- *     new ForEach<E>(null, array, op, 0, array.length).invoke();
+ *     public void compute() {
+ *       if (hi - lo >= 2) {
+ *         int mid = (lo + hi) >>> 1;
+ *         // must set pending count before fork
+ *         setPendingCount(2);
+ *         new Task(this, mid, hi).fork(); // right child
+ *         new Task(this, lo, mid).fork(); // left child
+ *       }
+ *       else if (hi > lo)
+ *         action.accept(array[lo]);
+ *       tryComplete();
+ *     }
  *   }
- *
- *   final E[] array; final MyOperation<E> op; final int lo, hi;
- *   ForEach(CountedCompleter<?> p, E[] array, MyOperation<E> op, int lo, int hi) {
- *     super(p);
- *     this.array = array; this.op = op; this.lo = lo; this.hi = hi;
- *   }
- *
- *   public void compute() { // version 1
- *     if (hi - lo >= 2) {
- *       int mid = (lo + hi) >>> 1;
- *       setPendingCount(2); // must set pending count before fork
- *       new ForEach(this, array, op, mid, hi).fork(); // right child
- *       new ForEach(this, array, op, lo, mid).fork(); // left child
- *     }
- *     else if (hi > lo)
- *       op.apply(array[lo]);
- *     tryComplete();
- *   }
+ *   new Task(null, 0, array.length).invoke();
  * }}</pre>
  *
  * This design can be improved by noticing that in the recursive case,
  * the task has nothing to do after forking its right task, so can
  * directly invoke its left task before returning. (This is an analog
- * of tail recursion removal.)  Also, because the task returns upon
- * executing its left task (rather than falling through to invoke
- * {@code tryComplete}) the pending count is set to one:
+ * of tail recursion removal.)  Also, when the last action in a task
+ * is to fork or invoke a subtask (a "tail call"), the call to {@code
+ * tryComplete()} can be optimized away, at the cost of making the
+ * pending count look "off by one".
  *
  * <pre> {@code
- * class ForEach<E> ... {
- *   ...
- *   public void compute() { // version 2
- *     if (hi - lo >= 2) {
- *       int mid = (lo + hi) >>> 1;
- *       setPendingCount(1); // only one pending
- *       new ForEach(this, array, op, mid, hi).fork(); // right child
- *       new ForEach(this, array, op, lo, mid).compute(); // direct invoke
+ *     public void compute() {
+ *       if (hi - lo >= 2) {
+ *         int mid = (lo + hi) >>> 1;
+ *         setPendingCount(1); // looks off by one, but correct!
+ *         new Task(this, mid, hi).fork(); // right child
+ *         new Task(this, lo, mid).compute(); // direct invoke
+ *       } else {
+ *         if (hi > lo)
+ *           action.accept(array[lo]);
+ *         tryComplete();
+ *       }
+ *     }}</pre>
+ *
+ * As a further optimization, notice that the left task need not even exist.
+ * Instead of creating a new one, we can continue using the original task,
+ * and add a pending count for each fork.  Additionally, because no task
+ * in this tree implements an {@link #onCompletion(CountedCompleter)} method,
+ * {@code tryComplete} can be replaced with {@link #propagateCompletion}.
+ *
+ * <pre> {@code
+ *     public void compute() {
+ *       int n = hi - lo;
+ *       for (; n >= 2; n /= 2) {
+ *         addToPendingCount(1);
+ *         new Task(this, lo + n/2, lo + n).fork();
+ *       }
+ *       if (n > 0)
+ *         action.accept(array[lo]);
+ *       propagateCompletion();
+ *     }}</pre>
+ *
+ * When pending counts can be precomputed, they can be established in
+ * the constructor:
+ *
+ * <pre> {@code
+ * public static <E> void forEach(E[] array, Consumer<E> action) {
+ *   class Task extends CountedCompleter<Void> {
+ *     final int lo, hi;
+ *     Task(Task parent, int lo, int hi) {
+ *       super(parent, 31 - Integer.numberOfLeadingZeros(hi - lo));
+ *       this.lo = lo; this.hi = hi;
  *     }
- *     else {
- *       if (hi > lo)
- *         op.apply(array[lo]);
- *       tryComplete();
+ *
+ *     public void compute() {
+ *       for (int n = hi - lo; n >= 2; n /= 2)
+ *         new Task(this, lo + n/2, lo + n).fork();
+ *       action.accept(array[lo]);
+ *       propagateCompletion();
  *     }
  *   }
+ *   if (array.length > 0)
+ *     new Task(null, 0, array.length).invoke();
  * }}</pre>
  *
- * As a further optimization, notice that the left task need not even exist.
- * Instead of creating a new one, we can iterate using the original task,
- * and add a pending count for each fork.  Additionally, because no task
- * in this tree implements an {@link #onCompletion(CountedCompleter)} method,
- * {@code tryComplete()} can be replaced with {@link #propagateCompletion}.
- *
- * <pre> {@code
- * class ForEach<E> ... {
- *   ...
- *   public void compute() { // version 3
- *     int l = lo, h = hi;
- *     while (h - l >= 2) {
- *       int mid = (l + h) >>> 1;
- *       addToPendingCount(1);
- *       new ForEach(this, array, op, mid, h).fork(); // right child
- *       h = mid;
- *     }
- *     if (h > l)
- *       op.apply(array[l]);
- *     propagateCompletion();
- *   }
- * }}</pre>
- *
- * Additional optimizations of such classes might entail precomputing
- * pending counts so that they can be established in constructors,
- * specializing classes for leaf steps, subdividing by say, four,
- * instead of two per iteration, and using an adaptive threshold
- * instead of always subdividing down to single elements.
+ * Additional optimizations of such classes might entail specializing
+ * classes for leaf steps, subdividing by say, four, instead of two
+ * per iteration, and using an adaptive threshold instead of always
+ * subdividing down to single elements.
  *
  * <p><b>Searching.</b> A tree of CountedCompleters can search for a
  * value or property in different parts of a data structure, and
@@ -551,7 +563,7 @@
     public final int decrementPendingCountUnlessZero() {
         int c;
         do {} while ((c = pending) != 0 &&
-                     !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
+                     !PENDING.weakCompareAndSet(this, c, c - 1));
         return c;
     }
 
@@ -584,7 +596,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -607,7 +619,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -652,7 +664,7 @@
         for (int c;;) {
             if ((c = pending) == 0)
                 return this;
-            else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
+            else if (PENDING.weakCompareAndSet(this, c, c - 1))
                 return null;
         }
     }
--- a/src/java.base/share/classes/java/util/concurrent/CyclicBarrier.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/CyclicBarrier.java	Tue Sep 20 16:34:47 2016 -0400
@@ -132,10 +132,10 @@
  * <i>happen-before</i> actions following a successful return from the
  * corresponding {@code await()} in other threads.
  *
- * @since 1.5
  * @see CountDownLatch
  *
  * @author Doug Lea
+ * @since 1.5
  */
 public class CyclicBarrier {
     /**
--- a/src/java.base/share/classes/java/util/concurrent/Flow.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/Flow.java	Tue Sep 20 16:34:47 2016 -0400
@@ -68,7 +68,7 @@
  *   private boolean subscribed; // true after first subscribe
  *   public synchronized void subscribe(Subscriber<? super Boolean> subscriber) {
  *     if (subscribed)
- *        subscriber.onError(new IllegalStateException()); // only one allowed
+ *       subscriber.onError(new IllegalStateException()); // only one allowed
  *     else {
  *       subscribed = true;
  *       subscriber.onSubscribe(new OneShotSubscription(subscriber, executor));
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Tue Sep 20 16:34:47 2016 -0400
@@ -42,15 +42,10 @@
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Predicate;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinWorkerThread;
 import java.util.concurrent.locks.LockSupport;
 
 /**
@@ -135,7 +130,7 @@
  * </table>
  *
  * <p>The common pool is by default constructed with default
- * parameters, but these may be controlled by setting three
+ * parameters, but these may be controlled by setting the following
  * {@linkplain System#getProperty system properties}:
  * <ul>
  * <li>{@code java.util.concurrent.ForkJoinPool.common.parallelism}
@@ -1413,7 +1408,7 @@
         }
         if (phase != QUIET) {                         // else pre-adjusted
             long c;                                   // decrement counts
-            do {} while (!CTL.weakCompareAndSetVolatile
+            do {} while (!CTL.weakCompareAndSet
                          (this, c = ctl, ((RC_MASK & (c - RC_UNIT)) |
                                           (TC_MASK & (c - TC_UNIT)) |
                                           (SP_MASK & c))));
@@ -1608,7 +1603,7 @@
                     do {
                         w.stackPred = (int)(c = ctl);
                         nc = ((c - RC_UNIT) & UC_MASK) | (SP_MASK & np);
-                    } while (!CTL.weakCompareAndSetVolatile(this, c, nc));
+                    } while (!CTL.weakCompareAndSet(this, c, nc));
                 }
                 else {                                  // already queued
                     int pred = w.stackPred;
@@ -3246,7 +3241,7 @@
          * An ACC to restrict permissions for the factory itself.
          * The constructed workers have no permissions set.
          */
-        private static final AccessControlContext innocuousAcc;
+        private static final AccessControlContext INNOCUOUS_ACC;
         static {
             Permissions innocuousPerms = new Permissions();
             innocuousPerms.add(modifyThreadPermission);
@@ -3254,7 +3249,7 @@
                                    "enableContextClassLoaderOverride"));
             innocuousPerms.add(new RuntimePermission(
                                    "modifyThreadGroup"));
-            innocuousAcc = new AccessControlContext(new ProtectionDomain[] {
+            INNOCUOUS_ACC = new AccessControlContext(new ProtectionDomain[] {
                     new ProtectionDomain(null, innocuousPerms)
                 });
         }
@@ -3265,7 +3260,7 @@
                     public ForkJoinWorkerThread run() {
                         return new ForkJoinWorkerThread.
                             InnocuousForkJoinWorkerThread(pool);
-                    }}, innocuousAcc);
+                    }}, INNOCUOUS_ACC);
         }
     }
 
--- a/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Tue Sep 20 16:34:47 2016 -0400
@@ -361,7 +361,7 @@
     private void finishCompletion() {
         // assert state > COMPLETING;
         for (WaitNode q; (q = waiters) != null;) {
-            if (WAITERS.weakCompareAndSetVolatile(this, q, null)) {
+            if (WAITERS.weakCompareAndSet(this, q, null)) {
                 for (;;) {
                     Thread t = q.thread;
                     if (t != null) {
@@ -423,7 +423,7 @@
                 q = new WaitNode();
             }
             else if (!queued)
-                queued = WAITERS.weakCompareAndSetVolatile(this, q.next = waiters, q);
+                queued = WAITERS.weakCompareAndSet(this, q.next = waiters, q);
             else if (timed) {
                 final long parkNanos;
                 if (startTime == 0L) { // first time
--- a/src/java.base/share/classes/java/util/concurrent/Phaser.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/Phaser.java	Tue Sep 20 16:34:47 2016 -0400
@@ -456,7 +456,7 @@
                         // finish registration whenever parent registration
                         // succeeded, even when racing with termination,
                         // since these are part of the same "transaction".
-                        while (!STATE.weakCompareAndSetVolatile
+                        while (!STATE.weakCompareAndSet
                                (this, s,
                                 ((long)phase << PHASE_SHIFT) | adjust)) {
                             s = state;
@@ -488,7 +488,7 @@
             // CAS to root phase with current parties, tripping unarrived
             while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
                    (int)(s >>> PHASE_SHIFT) &&
-                   !STATE.weakCompareAndSetVolatile
+                   !STATE.weakCompareAndSet
                    (this, s,
                     s = (((long)phase << PHASE_SHIFT) |
                          ((phase < 0) ? (s & COUNTS_MASK) :
--- a/src/java.base/share/classes/java/util/concurrent/Semaphore.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/Semaphore.java	Tue Sep 20 16:34:47 2016 -0400
@@ -72,8 +72,8 @@
  *   protected synchronized Object getNextAvailableItem() {
  *     for (int i = 0; i < MAX_AVAILABLE; ++i) {
  *       if (!used[i]) {
- *          used[i] = true;
- *          return items[i];
+ *         used[i] = true;
+ *         return items[i];
  *       }
  *     }
  *     return null; // not reached
@@ -82,11 +82,11 @@
  *   protected synchronized boolean markAsUnused(Object item) {
  *     for (int i = 0; i < MAX_AVAILABLE; ++i) {
  *       if (item == items[i]) {
- *          if (used[i]) {
- *            used[i] = false;
- *            return true;
- *          } else
- *            return false;
+ *         if (used[i]) {
+ *           used[i] = false;
+ *           return true;
+ *         } else
+ *           return false;
  *       }
  *     }
  *     return false;
--- a/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Tue Sep 20 16:34:47 2016 -0400
@@ -554,8 +554,9 @@
                 while (r != null) {
                     BufferedSubscription<T> nextRetry = r.nextRetry;
                     r.nextRetry = null;
-                    int stat = (nanos > 0L) ? r.timedOffer(item, nanos) :
-                        r.offer(item);
+                    int stat = (nanos > 0L)
+                        ? r.timedOffer(item, nanos)
+                        : r.offer(item);
                     if (stat == 0 && onDrop != null &&
                         onDrop.test(r.subscriber, item))
                         stat = r.offer(item);
@@ -1203,7 +1204,7 @@
                     } catch (RuntimeException | Error ex) { // back out
                         do {} while (((c = ctl) & DISABLED) == 0 &&
                                      (c & ACTIVE) != 0 &&
-                                     !CTL.weakCompareAndSetVolatile
+                                     !CTL.weakCompareAndSet
                                      (this, c, c & ~ACTIVE));
                         throw ex;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue Sep 20 16:34:47 2016 -0400
@@ -617,6 +617,9 @@
         /** Per-thread task counter */
         volatile long completedTasks;
 
+        // TODO: switch to AbstractQueuedLongSynchronizer and move
+        // completedTasks into the lock word.
+
         /**
          * Creates with given first task and thread from ThreadFactory.
          * @param firstTask the first task (null if none)
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Tue Sep 20 16:34:47 2016 -0400
@@ -106,16 +106,16 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSet(this,
-                                       (expectedValue ? 1 : 0),
-                                       (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSetPlain(this,
+                                            (expectedValue ? 1 : 0),
+                                            (newValue ? 1 : 0));
     }
 
     /**
@@ -285,7 +285,7 @@
      * Possibly atomically sets the value to {@code newValue} if the current
      * value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -293,9 +293,9 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSetVolatile(this,
-                                               (expectedValue ? 1 : 0),
-                                               (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSet(this,
+                                       (expectedValue ? 1 : 0),
+                                       (newValue ? 1 : 0));
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Tue Sep 20 16:34:47 2016 -0400
@@ -146,7 +146,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -193,7 +193,7 @@
 
     /**
      * Atomically increments the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(1)}.
      *
@@ -205,7 +205,7 @@
 
     /**
      * Atomically decrements the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(-1)}.
      *
@@ -217,7 +217,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -490,7 +490,7 @@
      * Possibly atomically sets the value to {@code newValue} if
      * the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Tue Sep 20 16:34:47 2016 -0400
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final int incrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, 1);
+        return (int)AA.getAndAdd(array, i, 1) + 1;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final int decrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, -1);
+        return (int)AA.getAndAdd(array, i, -1) - 1;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public final int addAndGet(int i, int delta) {
-        return (int)AA.addAndGet(array, i, delta);
+        return (int)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Tue Sep 20 16:34:47 2016 -0400
@@ -162,7 +162,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -209,7 +209,7 @@
 
     /**
      * Atomically increments the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(1)}.
      *
@@ -221,7 +221,7 @@
 
     /**
      * Atomically decrements the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(-1)}.
      *
@@ -233,7 +233,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -504,7 +504,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Tue Sep 20 16:34:47 2016 -0400
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final long incrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, 1L);
+        return (long)AA.getAndAdd(array, i, 1L) + 1L;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final long decrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, -1L);
+        return (long)AA.getAndAdd(array, i, -1L) - 1L;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public long addAndGet(int i, long delta) {
-        return (long)AA.addAndGet(array, i, delta);
+        return (long)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Tue Sep 20 16:34:47 2016 -0400
@@ -125,14 +125,14 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
     }
 
     /**
@@ -370,7 +370,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -378,7 +378,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSetVolatile(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Tue Sep 20 16:34:47 2016 -0400
@@ -155,7 +155,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -163,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -451,7 +451,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -460,7 +460,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Tue Sep 20 16:34:47 2016 -0400
@@ -154,13 +154,13 @@
  *     long stamp = sl.tryOptimisticRead();
  *     double currentX = x, currentY = y;
  *     if (!sl.validate(stamp)) {
- *        stamp = sl.readLock();
- *        try {
- *          currentX = x;
- *          currentY = y;
- *        } finally {
- *           sl.unlockRead(stamp);
- *        }
+ *       stamp = sl.readLock();
+ *       try {
+ *         currentX = x;
+ *         currentY = y;
+ *       } finally {
+ *         sl.unlockRead(stamp);
+ *       }
  *     }
  *     return Math.sqrt(currentX * currentX + currentY * currentY);
  *   }
@@ -1123,14 +1123,14 @@
             }
             else if ((p = wtail) == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
                 node = new WNode(WMODE, p);
             else if (node.prev != p)
                 node.prev = p;
-            else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+            else if (WTAIL.weakCompareAndSet(this, p, node)) {
                 p.next = node;
                 break;
             }
@@ -1162,7 +1162,7 @@
             else if (h != null) { // help release stale waiters
                 WNode c; Thread w;
                 while ((c = h.cowait) != null) {
-                    if (WCOWAIT.weakCompareAndSetVolatile(h, c, c.cowait) &&
+                    if (WCOWAIT.weakCompareAndSet(h, c, c.cowait) &&
                         (w = c.thread) != null)
                         LockSupport.unpark(w);
                 }
@@ -1247,7 +1247,7 @@
             }
             if (p == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
@@ -1255,7 +1255,7 @@
             else if (h == p || p.mode != RMODE) {
                 if (node.prev != p)
                     node.prev = p;
-                else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+                else if (WTAIL.weakCompareAndSet(this, p, node)) {
                     p.next = node;
                     break;
                 }
--- a/src/java.base/share/classes/java/util/jar/JarFile.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/jar/JarFile.java	Tue Sep 20 16:34:47 2016 -0400
@@ -536,19 +536,6 @@
      * @return an ordered {@code Stream} of entries in this jar file
      * @throws IllegalStateException if the jar file has been closed
      * @since 1.8
-     *
-     * @apiNote  A versioned view of the stream obtained from a {@code JarFile}
-     * configured to process a multi-release jar file can be created with code
-     * similar to the following:
-     * <pre>
-     * {@code
-     *     Stream<JarEntry> versionedStream(JarFile jf) {
-     *         return jf.stream().map(JarEntry::getName)
-     *                  .filter(name -> !name.startsWith("META-INF/versions/"))
-     *                  .map(jf::getJarEntry);
-     *     }
-     * }
-     * </pre>
      */
     public Stream<JarEntry> stream() {
         return StreamSupport.stream(Spliterators.spliterator(
@@ -571,7 +558,7 @@
 
     private ZipEntry getVersionedEntry(ZipEntry ze) {
         ZipEntry vze = null;
-        if (BASE_VERSION_MAJOR < versionMajor && !ze.isDirectory()) {
+        if (BASE_VERSION_MAJOR < versionMajor) {
             String name = ze.getName();
             if (!name.startsWith(META_INF)) {
                 vze = searchForVersionedEntry(versionMajor, name);
@@ -836,18 +823,25 @@
     private static final byte[] CLASSPATH_CHARS =
             {'C','L','A','S','S','-','P','A','T','H', ':', ' '};
 
-    // The bad character shift for "class-path:"
+    // The bad character shift for "class-path: "
     private static final byte[] CLASSPATH_LASTOCC;
 
+    // The good suffix shift for "class-path: "
+    private static final byte[] CLASSPATH_OPTOSFT;
+
     private static final byte[] MULTIRELEASE_CHARS =
             {'M','U','L','T','I','-','R','E','L','E', 'A', 'S', 'E', ':',
                     ' ', 'T', 'R', 'U', 'E'};
 
-    // The bad character shift for "multi-release: "
+    // The bad character shift for "multi-release: true"
     private static final byte[] MULTIRELEASE_LASTOCC;
 
+    // The good suffix shift for "multi-release: true"
+    private static final byte[] MULTIRELEASE_OPTOSFT;
+
     static {
         CLASSPATH_LASTOCC = new byte[64];
+        CLASSPATH_OPTOSFT = new byte[12];
         CLASSPATH_LASTOCC[(int)'C' - 32] = 1;
         CLASSPATH_LASTOCC[(int)'L' - 32] = 2;
         CLASSPATH_LASTOCC[(int)'S' - 32] = 5;
@@ -858,8 +852,13 @@
         CLASSPATH_LASTOCC[(int)'H' - 32] = 10;
         CLASSPATH_LASTOCC[(int)':' - 32] = 11;
         CLASSPATH_LASTOCC[(int)' ' - 32] = 12;
+        for (int i = 0; i < 11; i++) {
+            CLASSPATH_OPTOSFT[i] = 12;
+        }
+        CLASSPATH_OPTOSFT[11] = 1;
 
         MULTIRELEASE_LASTOCC = new byte[64];
+        MULTIRELEASE_OPTOSFT = new byte[19];
         MULTIRELEASE_LASTOCC[(int)'M' - 32] = 1;
         MULTIRELEASE_LASTOCC[(int)'I' - 32] = 5;
         MULTIRELEASE_LASTOCC[(int)'-' - 32] = 6;
@@ -872,6 +871,11 @@
         MULTIRELEASE_LASTOCC[(int)'R' - 32] = 17;
         MULTIRELEASE_LASTOCC[(int)'U' - 32] = 18;
         MULTIRELEASE_LASTOCC[(int)'E' - 32] = 19;
+        for (int i = 0; i < 17; i++) {
+            MULTIRELEASE_OPTOSFT[i] = 19;
+        }
+        MULTIRELEASE_OPTOSFT[17] = 6;
+        MULTIRELEASE_OPTOSFT[18] = 1;
     }
 
     private JarEntry getManEntry() {
@@ -913,7 +917,7 @@
      * Since there are no repeated substring in our search strings,
      * the good suffix shifts can be replaced with a comparison.
      */
-    private int match(byte[] src, byte[] b, byte[] lastOcc) {
+    private int match(byte[] src, byte[] b, byte[] lastOcc, byte[] optoSft) {
         int len = src.length;
         int last = b.length - len;
         int i = 0;
@@ -926,9 +930,8 @@
 
                     if (c != src[j]) {
                         // no match
-                        int goodShift = (j < len - 1) ? len : 1;
                         int badShift = lastOcc[c - 32];
-                        i += Math.max(j + 1 - badShift, goodShift);
+                        i += Math.max(j + 1 - badShift, optoSft[j]);
                         continue next;
                     }
                 } else {
@@ -958,10 +961,11 @@
             if (manEntry != null) {
                 byte[] b = getBytes(manEntry);
                 hasClassPathAttribute = match(CLASSPATH_CHARS, b,
-                        CLASSPATH_LASTOCC) != -1;
+                        CLASSPATH_LASTOCC, CLASSPATH_OPTOSFT) != -1;
                 // is this a multi-release jar file
                 if (MULTI_RELEASE_ENABLED) {
-                    int i = match(MULTIRELEASE_CHARS, b, MULTIRELEASE_LASTOCC);
+                    int i = match(MULTIRELEASE_CHARS, b, MULTIRELEASE_LASTOCC,
+                            MULTIRELEASE_OPTOSFT);
                     if (i != -1) {
                         i += MULTIRELEASE_CHARS.length;
                         if (i < b.length) {
--- a/src/java.base/share/classes/java/util/stream/DoubleStream.java	Fri Aug 26 12:20:09 2016 -0700
+++ b/src/java.base/share/classes/java/util/stream/DoubleStream.java	Tue Sep 20 16:34:47 2016 -0400
@@ -567,19 +567,23 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param <R> type of the result
-     * @param supplier a function that creates a new result container. For a
-     *                 parallel execution, this function may be called
+     * @param <R> the type of the mutable result container
+     * @param supplier a function that creates a new mutable result container.
+     *                 For a parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
      * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for incorporating an additional element into a result
+     *                    function that must fold an element into a result
+     *                    container.
      * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *